<?php require_once "scripts/init.php"; include $template_directory . "header.inc.php"; $url = $_SERVER["REQUEST_URI"]; $item_records = null; $geral = new geral(); $user = new user(); // parametros para query $where[] = " ativo = '1' "; list($r, $records, $page, $total_pages) = default_search("tb_comentario", $where, "", "dt_comentario DESC"); if ($records) { foreach ($records as $k => $v) { $ponto = $geral->get_ponto_turistico($v["id_ponto_turistico"]); $nm = $user->get_user($v["id_user"]); $item_records[$k]["id"] = $v["id_comentario"]; $item_records[$k]["comentario"] = $v["ds_comentario"]; $item_records[$k]["user"] = $nm[0]["nm_user"]; $item_records[$k]["ponto"] = $ponto[0]["nm_ponto_turistico"]; $item_records[$k]["data"] = date('d/m/Y', strtotime($v["dt_comentario"])); } } // deletar imagens if (get_vars("delete")) { if (get_vars("action_item")) { $list_itens = $_POST["action_item"]; $geral->delete_comentario("'" . implode("','", $list_itens) . "'"); show_message("Comentário(s) removido(s) com sucesso!"); redir_page($url); } else { show_message("Nenhum item selecionado para exclusão, favor selecionar.", false);
<?php require_once "scripts/init.php"; include $template_directory . "header.inc.php"; $url = $_SERVER["REQUEST_URI"]; // parametros para query $where[] = " ativo = '1' "; if (get_vars("search_content")) { $where[] = "endereco like '%" . get_vars('search_content') . "%'"; $url = set_url($url, array("search_content" => get_vars("search_content"))); } list($r, $records, $page, $total_pages) = default_search("tb_ponto", $where, "", "endereco ASC"); // deletar imagens if (get_vars("delete")) { if (get_vars("action_item")) { $geral = new geral(); $list_itens = $_POST["action_item"]; $geral->delete_parada("'" . implode("','", $list_itens) . "'"); show_message("Parada(s) removida(s) com sucesso!"); redir_page($url); } else { show_message("Nenhum item selecionado para exclusão, favor selecionar.", false); redir_page($url); } } // redirecionar para tela de inclusão if (get_vars("new")) { redir_page("paradas_editar.php"); } include $template_directory . "paradas.inc.php"; //fechar conexao
<?php require_once "scripts/init.php"; $url = $_SERVER["REQUEST_URI"]; $geral = new geral(); if (get_vars("onibus")) { $url = set_url($url, array("onibus" => get_vars("onibus"))); $where[] = "id_onibus = " . get_vars("onibus"); list($r, $records, $page, $total_pages) = default_search("tb_rota a INNER JOIN tb_ponto b ON a.latitude = b.latitude AND a.longitude = b.longitude", $where, "a.id_rota, b.endereco, a.sentido, a.sequencia", "sentido, sequencia"); } if (get_vars("new")) { $list_error = null; if (get_vars("onibus") == "-") { $list_errors[] = 'Campo "Ônibus" é obrigatório!'; } if (get_vars("ponto") == "-") { $list_errors[] = 'Campo "Ponto" é obrigatório!'; } if (get_vars("sentido") == "-") { $list_errors[] = 'Campo "Sentido" é obrigatório!'; } if (get_vars("sequencia") == "") { $list_errors[] = 'Campo "Sequencia" é obrigatório!'; } if (is_array($list_errors)) { show_message_html(implode("<br />", $list_errors), false); exit; } else { $coords = explode(',', get_vars('ponto')); $data = array("latitude" => $coords[0], "longitude" => $coords[1], "sentido" => get_vars('sentido'), "onibus" => get_vars('onibus'), "sequencia" => get_vars('sequencia')); $verify = $geral->get_rota_sequencia(get_vars('onibus'), get_vars('sentido'), get_vars('sequencia'));
<?php require_once "scripts/init.php"; $url = $_SERVER["REQUEST_URI"]; $geral = new geral(); if (get_vars("turistico")) { $url = set_url($url, array("turistico" => get_vars("turistico"))); $where[] = "id_ponto_turistico = " . get_vars("turistico"); list($r, $records, $page, $total_pages) = default_search("tb_proximidade a INNER JOIN tb_ponto b ON a.latitude = b.latitude AND a.longitude = b.longitude", $where, "a.id_proximidade, b.endereco, a.grau_proximidade", "grau_proximidade ASC"); } if (get_vars("new")) { $list_error = null; if (get_vars("turistico") == "-") { $list_errors[] = 'Campo "Ponto Turístico" é obrigatório!'; } if (get_vars("ponto") == "-") { $list_errors[] = 'Campo "Ponto" é obrigatório!'; } if (get_vars("grau") == "-") { $list_errors[] = 'Campo "Grau Proximidade" é obrigatório!'; } if (is_array($list_errors)) { show_message_html(implode("<br />", $list_errors), false); exit; } else { $coords = explode(',', get_vars('ponto')); $data = array("latitude" => $coords[0], "longitude" => $coords[1], "grau" => get_vars("grau"), "turistico" => get_vars('turistico')); $geral->insert_proximidade($data); show_message("Proximidade inserida com sucesso!"); redir_page($url, true); }
<?php require_once "scripts/init.php"; include $template_directory . "header.inc.php"; $url = $_SERVER["REQUEST_URI"]; // parametros para query $where[] = " active = '1' "; if (get_vars("search_content")) { $where[] = "nm_ponto_turistico like '%" . get_vars('search_content') . "%'"; $url = set_url($url, array("search_content" => get_vars("search_content"))); } list($r, $records, $page, $total_pages) = default_search("tb_ponto_turistico", $where, "", "nm_ponto_turistico ASC"); // deletar imagens if (get_vars("delete")) { if (get_vars("action_item")) { $geral = new geral(); $list_itens = $_POST["action_item"]; $geral->delete_ponto_turistico("'" . implode("','", $list_itens) . "'"); show_message("Ponto(s) Turístico removido(s) com sucesso!"); redir_page($url); } else { show_message("Nenhum item selecionado para exclusão, favor selecionar.", false); redir_page($url); } } // redirecionar para tela de inclusão if (get_vars("new")) { redir_page("pontos-turisticos_editar.php"); } include $template_directory . "pontos-turisticos.inc.php"; //fechar conexao
<?php require_once "scripts/init.php"; include $template_directory . "header.inc.php"; $url = $_SERVER["REQUEST_URI"]; $item_records = null; // parametros para query $where[] = " verify = '1' AND active = '1' "; if (get_vars("search_content")) { $where[] = "nm_user like '%" . get_vars('search_content') . "%'"; $url = set_url($url, array("search_content" => get_vars("search_content"))); } list($r, $records, $page, $total_pages) = default_search("tb_user", $where, "", "dt_cadastro DESC"); if (get_vars("clear_search")) { redir_page(set_url($url, array("search_content" => null, "sr" => null))); } // deletar imagens if (get_vars("delete")) { if (get_vars("action_item")) { $user = new user(); $list_itens = $_POST["action_item"]; $user->delete_user("'" . implode("','", $list_itens) . "'"); show_message("Usuário(s) removido(s) com sucesso!"); redir_page($url); } else { show_message("Nenhum item selecionado para exclusão, favor selecionar.", false); redir_page($url); } } include $template_directory . "administracao.inc.php"; //fechar conexao
<?php require_once "scripts/init.php"; include $template_directory . "header.inc.php"; $url = '/visita/admin/galeria.php?id=' . get_vars('id'); $item_records = null; // parametros para query $where[] = " ativo = '1' AND id_ponto_turistico = " . get_vars('id'); list($r, $records, $page, $total_pages) = default_search("tb_imagem", $where, "", "id_imagem ASC"); // deletar imagens if (get_vars("delete")) { if (get_vars("action_item")) { $geral = new geral(); $list_itens = $_POST["action_item"]; $geral->delete_imagem("'" . implode("','", $list_itens) . "'"); show_message("Imagem(ns) removida(s) com sucesso!"); redir_page($url); } else { show_message("Nenhum item selecionado para exclusão, favor selecionar.", false); redir_page($url); } } // redirecionar para tela de inclusão if (get_vars("new")) { redir_page("galeria_editar.php?id=" . get_vars("id")); } include $template_directory . "galeria.inc.php"; //fechar conexao $connection->disconnect(); include $template_directory . "footer.inc.php"; ?>
<?php require_once "scripts/init.php"; include $template_directory . "header.inc.php"; $url = $_SERVER["REQUEST_URI"]; $item_records = null; // parametros para query $where[] = " ativo = '1' "; list($r, $records, $page, $total_pages) = default_search("tb_onibus", $where, "", "id_onibus"); // deletar imagens if (get_vars("delete")) { if (get_vars("action_item")) { $geral = new geral(); $list_itens = $_POST["action_item"]; $geral->delete_onibus("'" . implode("','", $list_itens) . "'"); show_message("Ônibus removido(s) com sucesso!"); redir_page($url); } else { show_message("Nenhum item selecionado para exclusão, favor selecionar.", false); redir_page($url); } } // redirecionar para tela de inclusão if (get_vars("new")) { redir_page("onibus_editar.php"); } include $template_directory . "onibus.inc.php"; //fechar conexao $connection->disconnect(); include $template_directory . "footer.inc.php"; ?>