commit 093bedbff3239fad41ac11ac9a1e5a7c9f8d955c Author: Marco Antonio Vivas Date: Fri Aug 8 22:11:05 2025 -0300 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/README.md b/README.md new file mode 100644 index 0000000..9ed6598 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# membros + diff --git a/images/alessandro.jpg b/images/alessandro.jpg new file mode 100644 index 0000000..8d32066 Binary files /dev/null and b/images/alessandro.jpg differ diff --git a/images/alisson.jpg b/images/alisson.jpg new file mode 100644 index 0000000..dc59aa4 Binary files /dev/null and b/images/alisson.jpg differ diff --git a/images/christiano.jpg b/images/christiano.jpg new file mode 100644 index 0000000..ae9295f Binary files /dev/null and b/images/christiano.jpg differ diff --git a/images/foto01.jpg b/images/foto01.jpg new file mode 100644 index 0000000..f000c81 Binary files /dev/null and b/images/foto01.jpg differ diff --git a/images/foto02.jpg b/images/foto02.jpg new file mode 100644 index 0000000..95d416f Binary files /dev/null and b/images/foto02.jpg differ diff --git a/images/foto03.jpg b/images/foto03.jpg new file mode 100644 index 0000000..b879ea9 Binary files /dev/null and b/images/foto03.jpg differ diff --git a/images/foto04.jpg b/images/foto04.jpg new file mode 100644 index 0000000..4ea20f4 Binary files /dev/null and b/images/foto04.jpg differ diff --git a/images/giarola.jpg b/images/giarola.jpg new file mode 100644 index 0000000..9d1d810 Binary files /dev/null and b/images/giarola.jpg differ diff --git a/images/helno.jpg b/images/helno.jpg new file mode 100644 index 0000000..8624892 Binary files /dev/null and b/images/helno.jpg differ diff --git a/images/marco_aurelio.jpg b/images/marco_aurelio.jpg new file mode 100644 index 0000000..b71bc3b Binary files /dev/null and b/images/marco_aurelio.jpg differ diff --git a/images/paulo_henrique.jpeg b/images/paulo_henrique.jpeg new file mode 100644 index 0000000..9b2cdf7 Binary files /dev/null and b/images/paulo_henrique.jpeg differ diff --git a/images/vivas.jpg b/images/vivas.jpg new file mode 100644 index 0000000..029c8d0 Binary files /dev/null and b/images/vivas.jpg differ diff --git a/membros-empresa-plugin.php b/membros-empresa-plugin.php new file mode 100644 index 0000000..242c45d --- /dev/null +++ b/membros-empresa-plugin.php @@ -0,0 +1,524 @@ + 'Alessandro Pontes da Silva', + 'secretaria' => 'SEFIN', + 'setor' => 'Departamento de Informática', + 'profissao' => 'Técnico em informática', + 'funcao' => 'Técnico em informática', + 'foto' => 'alessandro.jpg', + 'contato' => ['email' => 'nome@trescoracoes.mg.gov.br', 'telefone' => '123-456-7890'], + 'status' => 'online', + 'localizacao' => 'Centro Administrativo', + 'pais' => 'Brasil' + ], + [ + 'nome' => 'Alisson Ribeiro Batista', + 'secretaria' => 'SEFIN', + 'setor' => 'Departamento de Informática', + 'profissao' => 'Técnico em informática', + 'funcao' => 'Diretor de informática', + 'foto' => 'alisson.jpg', + 'contato' => ['email' => 'nome@trescoracoes.mg.gov.br', 'telefone' => '123-456-7890'], + 'status' => 'online', + 'localizacao' => 'Centro Administrativo', + 'pais' => 'Brasil' + ], + [ + 'nome' => 'Heleno Carvalho Paralovo', + 'secretaria' => 'SEDUC', + 'setor' => 'Departamento de Informática', + 'profissao' => 'Chefe em informática', + 'funcao' => 'Técnico em informática', + 'foto' => 'helno.jpg', + 'contato' => ['email' => 'nome@trescoracoes.mg.gov.br', 'telefone' => '123-456-7890'], + 'status' => 'offline', + 'localizacao' => 'Centro Administrativo - SEDUC', + 'pais' => 'Brasil' + ], + [ + 'nome' => 'Paulo Henrique Lopes', + 'secretaria' => 'SEMMA', + 'setor' => 'Defesa Civil', + 'profissao' => 'Coordenador - Defesa Civil', + 'funcao' => 'Coordenador - Defesa Civil', + 'foto' => 'paulo_henrique.jpeg', + 'contato' => ['email' => 'nome@trescoracoes.mg.gov.br', 'telefone' => '123-456-7890'], + 'status' => 'online', + 'localizacao' => 'Centro Administrativo', + 'pais' => 'Brasil' + ] +]; + + + // Configurações de paginação + $membros_por_pagina = 4; + $pagina_atual = isset($_GET['pagina']) ? max(1, intval($_GET['pagina'])) : 1; + $total_membros = count($membros); + $total_paginas = ceil($total_membros / $membros_por_pagina); + $indice_inicial = ($pagina_atual - 1) * $membros_por_pagina; + $membros_paginados = array_slice($membros, $indice_inicial, $membros_por_pagina); + + // HTML de saída + $output = '
'; + + // Filtros e busca + $output .= '
'; + $output .= '
'; + $output .= ''; + $output .= ''; + $output .= '
'; + + $output .= ''; + + $output .= ''; + + $output .= ''; + + $output .= ''; + $output .= '
'; + + // Alfabeto + $output .= '
'; + foreach (range('A', 'Z') as $letra) { + $output .= ''; + } + $output .= '
'; + + // Lista de membros (todos, mas inicialmente apenas os da página atual visíveis) + $output .= '
'; + foreach ($membros as $index => $membro) { + $foto_url = plugins_url('images/' . $membro['foto'], __FILE__); + $display_style = ($index >= $indice_inicial && $index < $indice_inicial + $membros_por_pagina) ? '' : 'display: none;'; + + $output .= '
'; + $output .= '
' . esc_attr($membro['nome']) . '
'; + $output .= '
'; + $output .= '

' . esc_html($membro['nome']) . '

'; + $output .= '

Secretaria: ' . esc_html($membro['secretaria']) . '

'; + $output .= '

Setor: ' . esc_html($membro['setor']) . '

'; + $output .= '

Função: ' . esc_html($membro['funcao']) . '

'; + $output .= '
'; + $output .= ''; + $output .= ''; + $output .= '
'; + $output .= '
'; + } + $output .= '
'; + + // Paginação + if ($total_paginas > 1) { + $output .= '
'; + if ($pagina_atual > 1) { + $output .= '« Primeira'; + } + for ($i = max(1, $pagina_atual - 2); $i < $pagina_atual; $i++) { + $output .= '' . $i . ''; + } + $output .= '' . $pagina_atual . ''; + for ($i = $pagina_atual + 1; $i <= min($pagina_atual + 2, $total_paginas); $i++) { + $output .= '' . $i . ''; + } + if ($pagina_atual < $total_paginas) { + $output .= 'Última »'; + } + $output .= '
'; + } + + // Estilos CSS (mantenha os mesmos) + $output .= ''; + + // JavaScript modificado + $output .= ''; + + $output .= '
'; + return $output; +} +add_shortcode('membros_empresa', 'exibir_membros_empresa'); +?> \ No newline at end of file