%PDF- %PDF-
Direktori : /home/tjamichg/portal.tjamich.gob.mx/adminit2018/ |
Current File : /home/tjamichg/portal.tjamich.gob.mx/adminit2018/funciones_bk.php |
<?php function db_connect2() { $conexion = @mysql_connect("localhost", "tjamichg_webmast", "Tjamich10:-") or die(mysql_error()); $db = @mysql_select_db("tjamichg_web18", $conexion) or die(mysql_error()); return $conexion; } function desconectar() { mysql_close(); } /* // ESTA FUNCIÓN ES PARA CAMBIAR EL COLOR SI HAY DISPONIBLE O NO function colorexistencia() { if ($produ_piezas >= 10) { $color_existencia = "#5ed364"; } else { $color_existencia = "#d52330"; } } */ $opc=$_GET['opc']; /* * Parameters: * $opc - The string to sanitize. * $force_lowercase - Force the string to lowercase? * $anal - If set to *true*, will remove all non-alphanumeric characters. */ /*function string_sanitize($opc, $force_lowercase = true, $anal = false) { $strip = array("~", "`", "!", "@", "#", "^", "*", "(", ")", "_", "=", "+", "[", "{", "]", "}", "\\", "|", ";", ":", "\"", "'", "‘", "’", "“", "”", "–", "—", "—", "–", ",", "<", ".", ">", "/", "?"); $clean = trim(str_replace($strip, "", strip_tags($opc))); $clean = preg_replace('/\s+/', "-", $clean); $clean = ($anal) ? preg_replace("/[^a-zA-Z0-9]/", "", $clean) : $clean ; return ($force_lowercase) ? (function_exists('mb_strtolower')) ? mb_strtolower($clean, 'UTF-8') : strtolower($clean) : $clean; } */ // //$opc = string_sanitize(); switch ($opc) { case NULL: $opc = 'portada.php'; $bread = ''; break; case "Panel-de-Control": $opc = 'portada.php'; $bread = ''; break; case "Panel-de-Control-Eventos": $opc = 'portada_eventos.php'; $bread = ''; break; case "Nueva-Noticia": $opc = 'nueva_nota.php'; $bread = ''; break; case "Editar-Noticia": $opc = 'editar_nota.php'; $bread = 'Editar Noticia'; break; case "Nuevo-Evento": $opc = 'nuevo_evento.php'; $bread = ''; break; default: $opc = 'error404.html'; $bread = 'No tienes acceso a esta sección'; break; } return $opc; //endswitch; ?>