git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk/src@1 e2b1556b-49f8-d141-9351-52d6861a72d9
110 lines
3.0 KiB
PHP
110 lines
3.0 KiB
PHP
<?php
|
|
include("seguridad.php");
|
|
include("functions.php");
|
|
if(!$usuario->tieneRol("4")){
|
|
header("Location: aplicacion.php?e=permiso");
|
|
exit;
|
|
}
|
|
|
|
// Mostramos el parte de actividad en versión imprimible
|
|
include_once("Objects/ParteActividad.php");
|
|
include_once("Objects/Vacaciones.php");
|
|
include_once("Objects/HTML.php");
|
|
$html=new HTML($locale);
|
|
$oidEmpleado=$_GET['oid'];
|
|
$mes_hoy=$_GET['mes'];
|
|
$ano_hoy=$_GET['anio'];
|
|
?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title><?php echo $locale['001'];?></title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
<script src="functions.js" language="JavaScript" type="text/javascript"></script>
|
|
<!-- style sheet links -->
|
|
<link rel="stylesheet" type="text/css" href="css/style.css" />
|
|
<link rel="stylesheet" type="text/css" href="css/menu.css" />
|
|
<link rel="stylesheet" type="text/css" href="css/tablas.css" />
|
|
<link rel="shortcut icon" href="css/favicon.ico">
|
|
<style type="text/css">
|
|
<!--
|
|
#printParte {
|
|
margin:5px;
|
|
border-width:5px;;
|
|
border-color:#000000;
|
|
border-style:double;
|
|
width:800px;
|
|
padding:10px;
|
|
}
|
|
-->
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<?php
|
|
try{
|
|
$parteActividad=new ParteActividad($usuario,$oidEmpleado,$mes_hoy,$ano_hoy,$locale);
|
|
$vacaciones=new Vacaciones($usuario,$oidEmpleado,$mes_hoy,$ano_hoy,$locale);
|
|
} catch(Exception $e){
|
|
$msg=$e->getMessage();
|
|
include_once("showError.php");
|
|
exit;
|
|
}
|
|
?>
|
|
<div id="printParte">
|
|
<h2><?php echo $locale['576'].$locale['de'].": ".$parteActividad->getNombreEmpleado(); ?></h2>
|
|
<?php
|
|
|
|
include_once("Objects/Calendario.php");
|
|
|
|
// Recuperamos información de los días relevantes
|
|
$vacSoli=$vacaciones->getVacSoli();
|
|
$vacPend=$vacaciones->getVacPend();
|
|
$vacApro=$vacaciones->getVacApro();
|
|
$vacRech=$vacaciones->getVacRech();
|
|
$antesAlta=$parteActividad->getDiasAntesAlta();
|
|
|
|
/* Creamos el array con los días especiales y su código de color
|
|
*
|
|
* 3 - Vacaciones Solicitadas
|
|
* 4 - Vacaciones pendiente de anulaicón
|
|
* 5 - Vacaciones aprobadas
|
|
* 6 - Vacaciones rechazadas
|
|
*/
|
|
|
|
$diasEsp=array();
|
|
foreach($vacSoli as $dia){
|
|
$diasEsp[$dia]="3";
|
|
}
|
|
foreach($vacPend as $dia){
|
|
$diasEsp[$dia]="4";
|
|
}
|
|
foreach($vacApro as $dia){
|
|
$diasEsp[$dia]="5";
|
|
}
|
|
foreach($vacRech as $dia){
|
|
$diasEsp[$dia]="6";
|
|
}
|
|
foreach($antesAlta as $dia){
|
|
$diasEsp[$dia]="7";
|
|
}
|
|
// Creamos el objeto calendario
|
|
$calendario=new Calendario($usuario,$parteActividad->getMes(),$parteActividad->getAnio(),$diasEsp,$back,$locale);
|
|
|
|
// Mostramos el calendario
|
|
?>
|
|
<div style="float:left;margin-left:10px; margin-bottom:10px">
|
|
<?php
|
|
$parte=$parteActividad->getParte();
|
|
echo $calendario->getMostrable($parte);
|
|
?>
|
|
Observaciones<br />
|
|
|
|
<?php echo nl2br($parteActividad->getObservacion()); ?>
|
|
</div>
|
|
<div style="float:left;margin-left:10px; margin-bottom:10px">
|
|
<?php echo $html->leyendaParteActividad(); ?>
|
|
|
|
</div>
|
|
<div style="clear:both;"></div>
|
|
</body>
|
|
</html>
|