tieneRol("4") && !$usuario->tieneRol("1")){ header("Location: aplicacion.php?e=permiso"); exit; } $oid=$_GET['oid']; try{ $solicitante=new Persona($oid); } catch(Exception $e){ $msg=$e->getMessage(); include_once("showError.php"); } if($_GET['anual']=="true"){ $anual=true; }else{ $anual=false; } $mes_hoy=date("n"); if($_GET['mes']!="") $mes_hoy=$_GET['mes']; if($_POST['mes']!="") $mes_hoy=$_POST['mes']; $ano_hoy=date("Y"); if($_GET['anio']!="") $ano_hoy=$_GET['anio']; if($_POST['anio']!="") $ano_hoy=$_POST['anio']; $version=$_GET['version']; if($version=="print"){ include_once("html/cabeceraPrint.php"); }else{ include_once("html/cabecera.php"); } include_once("Objects/Vacaciones.php"); include_once("Objects/Calendario.php"); try{ if($anual){ $vacacionesAnual=array(); for($i=1; $i<=12; $i++){ $vacacionesAct=new Vacaciones($usuario,$oid,$i,$ano_hoy, $locale); $vacacionesAnual[$i]=$vacacionesAct; } }else{ $vacacionesAnual=array(); $vacaciones=new Vacaciones($usuario,$oid,$mes_hoy,$ano_hoy, $locale); $vacacionesAnual[$mes_hoy]=$vacaciones; } $calendario=new Calendario($usuario,"","","","",""); } catch (Exception $e){ $msg=$e->getMessage(); include_once("showError.php"); exit; } $action=""; if($_GET['action']!="") $action=$_GET['action']; if($_POST['action']!="") $action=$_POST['action']; if($action!=""){ switch ($action) { case "AcepVacSoli": $diaAction=$_GET['diaaction']; try{ $solicitudRechazo=array(); $solicitudRechazo[$diaAction]=""; $vacacionesAnual[$mes_hoy]->aprobar($diaAction); $tipo="ok"; $msg=$locale['465']." ".$diaAction.$locale['de'].nombre_mes($mes_hoy).$locale['del'].$ano_hoy; }catch (Exception $e){ $tipo="error"; $msg=$e->getMessage(); } break; case "RechVacSoli": $diaAction=$_POST['dia']; try{ $solicitudRechazo=array(); $solicitudRechazo[$diaAction]=$_POST['obs']; $vacacionesAnual[$mes_hoy]->rechazar($solicitudRechazo); $tipo="ok"; $msg=$locale['465']." ".$diaAction.$locale['de'].nombre_mes($mes_hoy).$locale['del'].$ano_hoy; }catch (Exception $e){ $tipo="error"; $msg=$e->getMessage(); } break; case "AcepVacPend": $diaAction=$_GET['diaaction']; try{ $solicitudRechazo=array(); $solicitudRechazo[$diaAction]=""; $vacacionesAnual[$mes_hoy]->anular($solicitudRechazo); $tipo="ok"; $msg=$locale['465']." ".$diaAction.$locale['de'].nombre_mes($mes_hoy).$locale['del'].$ano_hoy; }catch (Exception $e){ $tipo="error"; $msg=$e->getMessage(); } break; case "RechVacPend": $diaAction=$_POST['dia']; try{ $solicitudRechazo=array(); $solicitudRechazo[$diaAction]=$_POST['obs']; $vacacionesAnual[$mes_hoy]->rechazarAnulacion($solicitudRechazo); $tipo="ok"; $msg=$locale['465']." ".$diaAction.$locale['de'].nombre_mes($mes_hoy).$locale['del'].$ano_hoy; }catch (Exception $e){ $tipo="error"; $msg=$e->getMessage(); } break; default: break; } } ?>

getNombrePersona(); ?>

".$msg.""; } ?>
">
&oid=" >

$diaCierreVac){ // este y posterior echo "(".date('Y').") ".$solicitante->getDiasVacaciones(date('Y'))."
"; $pos=date('Y')+1; echo "(".$pos.") ".$solicitante->getDiasVacaciones($pos); } else { $pos=date('Y')-1; echo "(".$pos.") ".$solicitante->getDiasVacaciones($pos). "
"; echo "(".date('Y').") ".$solicitante->getDiasVacaciones(date('Y')); } ?>
"> getVacSoli(); if(count($listaActual)>0){ $hay=true; foreach($listaActual as $solicitudActual){ ?>
Día Acción
de action=AcepVacSoli&oid="> )" >
"> getVacPend(); if(count($listaActual)>0){ $hay=true; foreach($listaActual as $solicitudActual){ ?>
Día Acción
de action=AcepVacPend&oid="> )" >
"> getVacApro(); if(count($listaActual)>0){ $hay=true; foreach($listaActual as $solicitudActual){ ?>
Día
de getObservacionRRHH($solicitudActual); ?>
"> getVacRech(); if(count($listaActual)>0){ $hay=true; foreach($listaActual as $solicitudActual){ ?>
Día
de getObservacionRRHH($solicitudActual); ?>