tieneRol("6")){ header("Location: aplicacion.php?e=permiso"); echo "no puedes"; exit; } include_once("html/cabecera.php"); ?>

getValor("oid"),$mes_hoy,$ano_hoy,$locale); $permisos=new Permisos($usuario,$usuario->getValor("oid"),$mes_hoy,$ano_hoy,$locale); $back="vacaciones.php"; if($_POST['action']){ switch ($_POST['action']) { case "pedir": $ultimo_dia = verifica_long_mes($mes_hoy,$ano_hoy); // Recorremos todos los valores de los d�as $dias=array(); for($i=1;$i<=$ultimo_dia;$i++){ if($_POST['d'.$i.'-'.$mes_hoy]=="on"){ //if($vacaciones->esSolicitable($i)){ $dias[$i]=""; //} } } try{ $vacaciones->solicitar($dias); $tipo="ok"; $msg=$locale['290']; foreach($dias as $diaShow => $mensaje){ $msg.=$diaShow." "; } } catch (Exception $e){ $tipo="error"; $msg=$e->getMessage(); } break; case "anular": $ultimo_dia = verifica_long_mes($mes_hoy,$ano_hoy); // Recorremos todos los valores de los d�as $dias=array(); for($i=1;$i<=$ultimo_dia;$i++){ if($_POST['a'.$i.'-'.$mes_hoy]=="on"){ //if($vacaciones->esAnulable($i)){ $dias[$i]=""; //} } } try{ $vacaciones->solicitarAnulacion($dias); $tipo="ok"; $msg=$locale['464']; foreach($dias as $diaShow){ $msg.=$diaShow." "; } } catch (Exception $e){ $tipo="error"; $msg=$e->getMessage(); } break; case "eliminar": $ultimo_dia = verifica_long_mes($mes_hoy,$ano_hoy); // Recorremos todos los valores de los d�as $dias=array(); for($i=1;$i<=$ultimo_dia;$i++){ if($_POST['e'.$i.'-'.$mes_hoy]=="on"){ //if($vacaciones->esAnulableSolicitud($i)){ $dias[$i]=""; //} } } try{ $vacaciones->eliminarSolicitud($dias); $tipo="ok"; $msg=$locale['471']; foreach($dias as $diaShow => $mensaje){ $msg.=$diaShow." "; } } catch (Exception $e){ $tipo="error"; $msg=$e->getMessage(); } break; default: break; } } if($msg!=""){ echo "
".$msg."
"; } ?>

$diaCierreVac){ // este y posterior echo "(".date('Y').") ".$usuario->getDiasVacaciones(date('Y'))."
"; $pos=date('Y')+1; echo "(".$pos.") ".$usuario->getDiasVacaciones($pos); } else { $pos=date('Y')-1; echo "(".$pos.") ".$usuario->getDiasVacaciones($pos). "
"; echo "(".date('Y').") ".$usuario->getDiasVacaciones(date('Y')); } ?>
getValor("oid"),$mes_hoy,$ano_hoy,$locale); include_once("ver_vacaciones.php"); ?>
leyendaVacaciones(); ?>
getVacApro(); $vacRech=$vacaciones->getVacRech(); $vacPend=$vacaciones->getVacPend(); $vacSoli=$vacaciones->getVacSoli(); $todosDias=array_merge($vacSoli,$vacApro,$vacRech,$vacPend); sort($todosDias); if(count($todosDias)>0){ echo $locale['562']."
"; foreach($todosDias as $dia){ echo "".$dia.$locale['de'].nombre_mes($mes_hoy).$locale['de'].$ano_hoy." : "; if($vacaciones->getObservacionRRHH($dia)!=""){ echo "".$vacaciones->getObservacionRRHH($dia).""; } echo "
"; } } ?>