<?php
include("../bd/sql_variables.php");

$db_conexion= mysql_connect("$sql_host", "$sql_usuario", "$sql_pass") or die(header ("No Disponible Servidor de Base de Datos"));
mysql_select_db("$sql_db");

//$ugid = $_GET['ugid'];

$ugid ='ADM';
//$idj ='1';
//$ids ='0';

$sqlusu="select concat(up_nom,' ',up_apepat) as nom from tb_usuprog where ug_id='$ugid'";
$resultusu = mysql_query($sqlusu);
while ($row= mysql_fetch_array($resultusu)){
$usunombre = $row['nom'];
}



?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="JavaScript" type="text/javascript" src="ajax.js"></script>
<link rel="stylesheet" type="text/css" href="styles/Style.css">
<link type="text/css" rel="stylesheet" href="src/css/jscal2.css" />
    <link type="text/css" rel="stylesheet" href="src/css/border-radius.css" />
    <!-- <link type="text/css" rel="stylesheet" href="src/css/reduce-spacing.css" /> -->

    <link id="skin-win2k" title="Win 2K" type="text/css" rel="alternate stylesheet" href="src/css/win2k/win2k.css" />
    <link id="skin-steel" title="Steel" type="text/css" rel="alternate stylesheet" href="src/css/steel/steel.css" />
    <link id="skin-gold" title="Gold" type="text/css" rel="alternate stylesheet" href="src/css/gold/gold.css" />
    <link id="skin-matrix" title="Matrix" type="text/css" rel="alternate stylesheet" href="src/css/matrix/matrix.css" />

    <link id="skinhelper-compact" type="text/css" rel="alternate stylesheet" href="src/css/reduce-spacing.css" />

    <script src="src/js/jscal2.js"></script>
	<!--script src="src/js/lang/en.js"></script-->
    <!-- you actually only need to load one of these; we put them all here for demo purposes -->
     <script src="src/js/lang/es.js"></script>
    
    <link type="text/css" rel="stylesheet" href="demopage.css" />
<script type="text/javascript"> 

function agregarVacaProg(){ 
   //alert("hola mundo");
	var ugid = document.getElementById('vacaproglist').value;
	//alert(ugid);
    window.open("vacacionesprog.php?ugid="+ugid,"","height=350,width=600,scrollbars=NO");
} 

function modificarestado(){ 
   //alert("hola mundo");
	var ugid = document.getElementById('vacaproglist').value;
	var idfecha = document.getElementById('listfechavp').value;
	//alert(ugid);
    window.open("editarvacaciones.php?ugid="+ugid+"&idfecha="+idfecha,"","height=300,width=600,scrollbars=NO");
} 

function AdministrarPersonal(){ 
   var idj = document.getElementById("idj").value;
   var ids = document.getElementById("ids").value;
   var ugid = document.getElementById("ugid").value;
   document.location= "listadopersonalasistencial.php?idj="+idj+"&ids="+ids+"&ugid="+ugid;
    
}
function VerTurnosPersonal(){ 
   var idj = document.getElementById("idj").value;
   var ugid = document.getElementById("ugid").value;
   document.location= "../reporte/buscarprogramacionadm.php?idj="+idj+ "&ugid="+ugid;
    
}

function iniprogramacion(){ 
   var idj = document.getElementById("idj").value;
   var ids = document.getElementById("ids").value;
   var ugid = document.getElementById("ugid").value;
   var tusu = document.getElementById("prog").value;
   document.location= "../programacion/programacionpersonal.php?idj="+idj+"&ids="+ids+"&ugid="+ugid+"&tusu="+tusu;
}

function reporteProg(){ 
   var idj = document.getElementById("idj").value;
   var ids = document.getElementById("ids").value;
   var ugid = document.getElementById("ugid").value;
   document.location= "../reporte/menureporteadmin.php?idj="+idj+"&ids="+ids+"&ugid="+ugid;
}

</script> 
</head>
<body >
<form name='form1'>
<br><br>
<hr color='blue' size='10'>
<hr color='blue'>
<?php
echo "<input type='hidden' id='idj' name='idj' value='".$idj."'>";
echo "<input type='hidden' id='ids' name='ids' value='".$ids."'>";
echo "<input type='hidden' id='ugid' name='ugid' value='".$ugid."'>";


?>
<table align='center' class='FacetFormTABLE' width='700' >
<tr><td class='FacetFieldCaptionTD' colspan='2'><font size='10'><?php echo "HI, ".$usunombre; ?></font></td><td width='20'></td><td align='center' class='FacetFieldCaptionTDT'><a href='../login.php'>Salir</a></td><td width='20'></td></tr>
<tr><td width='20'></td><td>
	<table align='center' class='FacetFormTABLE' width='400'>
	<tr><td class='FacetFieldCaptionTDT' align='center'><font color='red'><?php echo $jefatura;?></font></td></tr>
	<tr><td class='FacetFieldCaptionTDT' align='center'><?php echo $subjefatura;?></td></tr>
	<br>
	<tr><td align='center'><b><?php setlocale(LC_TIME,"spanish"); 
	echo strftime("Hoy es %A, %d de %B del %Y." ,time()); ?></b></td><tr>
	</table>
	<fieldset>
	<legend align='left'><font color='red'>Administrar</font></legend>
	<table width='250'  height='100' align='center'><tr>
	<td width='120'align='center'>
	<fieldset>
	<legend align='left'><font color='blue'>Personal</font></legend>			
		<img src='img/rrhh.jpg' width='60' height='60' onClick='AdministrarPersonal()'>		
	<br>
	</fieldset>
	</td><td width='120'align='center'>
	<fieldset>
	<legend align='left'><font color='blue'>Reportes</font></legend>			
		<img src='img/reporteadm.jpg' width='60' height='60' onClick='reporteProg()'>		
	<br>
	</fieldset>
	</td></tr>
	</table></fieldset>
	
	</td><td></td><td width='200' align='center'>
	
	</td><td></td></tr>
<tr>
<td colspan='3'>
		
</td><td colspan='2'>
		
</td></tr>
</table>

<hr color='blue'>
<hr color='blue' size='10'>
</form>
</body>
</html>