%PDF- %PDF-
| Direktori : /home/tjamichg/portal.tjamich.gob.mx/adminit2018/ |
| Current File : /home/tjamichg/portal.tjamich.gob.mx/adminit2018/funciones.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-Noticias":
$opc = 'portada_noticias.php';
$bread = '';
break;
case "Panel-de-Control-Eventos":
$opc = 'portada_eventos.php';
$bread = '';
break;
case "Panel-de-Control-Videos":
$opc = 'portada_videos.php';
$bread = '';
break;
case "Panel-de-Control-Revistas":
$opc = 'portada_revistas.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;
case "Editar-Evento":
$opc = 'editar_evento.php';
$bread = 'Editar Evento';
break;
case "Nuevo-Video":
$opc = 'nuevo_video.php';
$bread = '';
break;
case "Editar-Videos":
$opc = 'editar_video.php';
$bread = 'Editar Video';
break;
case "Nueva-Revista":
$opc = 'nueva_revista.php';
$bread = '';
break;
case "Editar-Revista":
$opc = 'editar_revista.php';
$bread = 'Editar Revista';
break;
case "Prueba-Evento":
$opc = 'calendario.php';
$bread = 'Prueba Evento';
break;
default:
$opc = 'error404.html';
$bread = 'No tienes acceso a esta sección';
break;
}
return $opc;
//endswitch;
?>