<?php
session_start();

if (isset($_SESSION['usuario']))
{
	$user=$_SESSION['usuario'];
}
else
{
	?>
	<script>
    location.href="index.php?errorusuario=3";
	</script>
	<?php
}

include("conexion.php");

$cons="Select nombre,tipo,idClinica,caja FROM usuarios Where idUsuario='$user'";
$res=mysql_query($cons,$conex) or die ("No se realizó la consulta en usuarios");
$nombreuser=mysql_result($res,0,'nombre');
$tipo=mysql_result($res,0,'tipo');
$caja=mysql_result($res,0,'caja');
$clini=mysql_result($res,0,'idClinica');

?>
<!doctype html>
<html>
<head>
	<meta charset="ISO-8859-1">
	<title>CLINISYS :. UC</title>
	<link href="ucaestilos.css" rel="stylesheet" type="text/css" />
	<link href="ticket_estiloimpresionrecibo.css" rel="stylesheet" type="text/css" media="print">

	<!-- menu inicia
	<script type="text/javascript" src="scripts/jquery-1.8.3.min.js"></script>
	<script src="scripts/jquery-1.12.4.min.js"></script>
	<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />
	<script type="text/javascript" src="scripts/ddsmoothmenu.js"></script>
	<script type="text/javascript">
	ddsmoothmenu.init({
		mainmenuid: "smoothmenu1", //menu DIV id
		orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
		classname: 'ddsmoothmenu', //class added to menu's outer DIV
		customtheme: ["#0D3356", "#A9C238"],
		contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
	})
</script>
 termina menu -->
<link rel="stylesheet" type="text/css" href="css/jquery.datetimepicker.css"/>
<script src="scripts/jquery.datetimepicker.full.min.js"></script>
<script>
jQuery.datetimepicker.setLocale('es');
</script>
</head>
<body>
	<table width="1200" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
		<tr>
			<td><img src="img/top03.jpg" width="1200"  id="noimprimible"></td>
		</tr>
		<tr>
			<td>
				<div id="noimprimible">
					<table width="100%" border="0">
						<tr>
							<td width="3%"><img src="img/icon_security.jpg" width="22" height="22"></td>
							<td width="28%"><span class="style4" style="color:#A9C238 !important;">Bienvenido: </span><span class="style5"><?php echo $nombreuser;?></span></td>
							<td width="69%">

							</td>
						</tr>
					</table>
				</div>
				<div id="noimprimible">
					<table width="100%" border="0">
						<tr>
							<td width="89%" height="20" bgcolor="#0D3356">
								<?php include ("newmenu.php"); ?>
							</td>
							<td width="11%" bgcolor="#999999" align="center"><a href="cerrar.php" class="style6" style="text-decoration:none;">Cerrar Sesi&oacute;n</a></td>
						</tr>
					</table>
				</div>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td height="400" align="left" valign="top">
							<p>
								<?php
								if (isset($_GET['a']))
								{
									$a=$_GET['a'];

									//OPCIONES DEL MENU
									if($a==1){
										include ($abrirpagina);
									}
									//PRODUCTOS
									if($a==2){include ("productos.php");}
									if($a==21){include ("nvoproducto.php");}
									if($a==22){include ("editproducto1.php");}

									/*NUEVO 2023*/
									if($a==201){include ("agregaproductopaquete.php");}

									//captura manual de precios
									if($a==23){
										include ("capturaprecios.php");
									}
									//escasos
									if($a==24){
										include ("escasos.php");
									}
									//captura manual
									if($a==255){include ("capturamanualexistencia.php");}
									if($user=='orios' or $user=='grios')
									{
										if($a==25){include ("capturamanual.php");}
										if($a==2513){include ("reporteproductosblanco.php");}
									}

									if($a==2512){include ("reporteprodconexistencia.php");}
									if($a==2511){include ("reporteproductos.php");}
									if($a==251){include ("clasificaciones.php");}
									if($a==252){include ("inventarioincontables.php");}
									if($a==253){include ("eliminardeincontables.php");}
									if($a==254){include ("incontablesypresentaciones.php");}

									//VALES
									if($a==31){
										include ("vale.php");
									}
									if($a==311){
										include ("creavale.php");
									}
									//PAQUETES
									if($a==32){
										include ("paquete.php");
									}
									if($a==321){
										include ("nvopaquete.php");
									}
									if($a==322){
										//include ("creapaquete.php");
										include ("svpaquete.php");
									}
									if($a==323){
										include ("editpaquete.php");
									}
									if($a==324){
										include ("duplicarpaquete.php");
									}
									if($a==325){
										include ("nvotratamientocompleto.php");
									}
									if($a==326){
										include ("contenidotratamientocompleto.php");
									}
									if($a==327){
										include ("edittratamientocompleto.php");
									}
									if($a==328){
										include ("listadocontenidotratamientos.php");
									}
									if($a==3281){
										include ("listadocontenidotratamientosyprecios.php");
									}
									if($a==329){
										include ("listarpaquetes.php");
									}
									if($a==3291){
										include ("listarpaquetesyprecios.php");
									}
									//REQUISICION
									if($a==33){
										include ("requisicion.php");
									}
									if($a==34){
										include ("crearequisicion.php");
									}
									//INGRESOS POR COMPRAS
									if($a==41){
										include ("compra.php");
									}
									if($a==411){
										include ("creacompra.php");
									}
									//INGRESOS POR VALES
									if($a==42){
										include ("altavale.php");
									}
									//DEVOLUCION DE MATERIAL DE NOTA
									if($a==43){
										include ("ejecutardevolucion.php");
									}
									//EXISTENCIAS EN ALMACEN
									if($a==44){
										include ("existencias.php");
									}
									if($a==45){
										include ("consulcompras.php");
									}
									if($a==46){
										include ("ticketentregamaterial.php");
									}
									if($a==47){
										include ("ejecutarsalida.php");
									}
									//PUNTO DE VENTA - tickets
									if($a==471){
										include ("cortecaja1.php");
									}
									if($a==4712){
										include ("cortecaja2.php");
									}
									if($a==4713){
										include ("ventatratamientos1.php");
									}
									if($a==47131){
										include ("ventatratamientos2.php");
									}
									if($a==4714){
										include ("ventatratamientosdetallada1.php");
									}
									if($a==47141){
										include ("ventatratamientosdetallada2.php");
									}
									if($a==472){
										include ("ticketconsulta1.php");
									}

									if($a==476){include ("tratamientosxalumno1.php");}
									if($a==4761){include ("tratamientosxalumno2.php");}


									//CANCELACION DE TICKET
									if($a==461){
										include ("cancelacion.php");
									}
									//PACIENTES Y ALUMNOS
									if($a==473){
										include ("pacientes.php");
									}
									if($a==4731){
										include ("nvopaciente.php");
									}
									if($a==4732){
										include ("editpaciente.php");
									}
									if($a==474){
										include ("alumnos.php");
									}
									if($a==4741){
										include ("nvoalumno.php");
									}
									//asignacion de materias
									if($a==4742){
										include ("asignacionmaterias.php");
									}
									//editar alumno
									if($a==4743){
										include ("editalumno.php");
									}
									//PACIENTES PEDIATRICOS
									if($a==475){
										include ("pacientesodontopediatria.php");
									}
									if($a==4751){
										include ("nvopacienteodontopediatria.php");
									}
									if($a==4752){
										include ("editpacienteodontopediatria.php");
									}
									/*
									if($a==48){
									include ("capturaexistencias.php");
								}
								*/
								//ENTREGA MATERIAL A CATEDR�TICOS
								if($a==48){
									include ("entregacatedraticos.php");
								}
								if($a==481){
									include ("entregacatedraticos1.php");
								}
								if($a==4811){
									include ("entregacatedraticos2.php");
								}
								if($a==4812){
									include ("editentregacatedraticos.php");
								}
								if($a==4813){
									include ("nvocatedratico.php");
								}
								if($a==4814){
									include ("listacatedraticos.php");
								}
								if($a==4815){
									include ("editcatedratico.php");
								}
								if($a==482){
									include ("consulentregacatedraticos.php");
								}
								if($a==4821){
									include ("consulentregacatedraticos2.php");
								}
								if($a==4822){
									include ("consulentregacatedraticos3.php");
								}
								//REPORTES DE FARMACIA Y RECTORIA
								if($a==483){
									include ("reportesalidas1.php");
								}
								if($a==4831){
									include ("reportesalidas2.php");
								}
								if($a==484){
									include ("reporterectoria1.php");
								}
								if($a==4841){
									include ("reporterectoria2.php");
								}
								//BAJA PRODUCTO
								if($a==49){
									include ("bajaproductos.php");
								}
								if($a==491){
									include ("consulbajaproductos.php");
								}
								if($a==492){
									include ("productobaja.php");
								}
								//ENTREGA ACTIVIDADES
								if($a==5){
									include ("entregaactividades.php");
								}
								if($a==51){
									include ("entregaactividades1.php");
								}
								if($a==512){
									include ("entregaactividades2.php");
								}
								if($a==513){
									include ("nvaactividad.php");
								}
								if($a==514){
									include ("listaactividades.php");
								}
								if($a==515){
									include ("editentregaactividades.php");
								}

								//PROVEEDORES
								if($a==7){
									include ("proveedores.php");
								}
								if($a==71){
									include ("nvoproveedor.php");
								}
								if($a==72){
									include ("editproveedor2.php");
								}
								//USUARIOS
								if($a==8){
									include ("usuarios.php");
								}
								if($a==81){
									include ("nvousuario.php");
								}
								if($a==82){
									include ("bitacoraacc.php");
								}
								if($a==83){
									include ("bitacoraacc2.php");
								}
								if($a==84){
									include ("editusuario1.php");
								}
								//CATALOGOS
								if($a==9){
									include ("clinicas.php");
								}
								if($a==91){
									include ("nvaclinica.php");
								}
								if($a==92){
									include ("presentaciones.php");
								}
								if($a==93){
									include ("nvapresentacion.php");
								}
								if($a==94){
									include ("descuentos.php");
								}
								if($a==95){
									include ("nvodescuento.php");
								}
								if($a==96){
									include ("editdescuento.php");
								}
								if($a==941){
									include ("asignardescuentos.php");
								}
								if($a==97){
									include ("materias.php");
								}
								if($a==971){
									include ("nvamateria.php");
								}
								if($a==972){
									include ("editmateria.php");
								}
								if($a==98){
									include ("tipopacientes.php");
								}
								if($a==981){
									include ("nvotipopaciente.php");
								}
								if($a==982){
									include ("edittipopaciente.php");
								}
							}
							else
							{
								include ($abrirpagina);
							}
							?>
							<br>
						</p>
					</td>
				</tr>
				<tr>
					<td height="26" style="background-color:#0D3356;">
						<div align="center" id="noimprimible">
							<table width="99%" border="0" align="center" cellpadding="2" cellspacing="0">
								<tr>
									<td align="center" class="style8">Desarrollado para la Universidad Cuauht&eacute;moc por <a href="http://www.upweb.mx" target="_blank"><img src="img/webmaster.svg" style="height:16px; vertical-align:bottom;"></a></td>
								</tr>
							</table>
						</div></td>
					</tr>
				</table></td>
			</tr>
		</table>
	</body>
	</html>
