AnonSec Team
Server IP : 10.128.40.6  /  Your IP : 216.73.217.20
Web Server : Apache
System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : logmcpe ( 111175)
PHP Version : 7.3.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0705) :  /home/logmcpe/www/TEST/www/../../MCPRO/feuillesroute/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TEST/www/../../MCPRO/feuillesroute/../RH_abs.php
<html>

<body>
<?php

include_once 'code/init.php';
function date_selection_htmlAA($prefix, $date, $num_years_from='-5', $num_years_to='10', $form='', $params='', $params2='') {
	$ret = "";
	//$num_years = 20;
	$num_years = $num_years_to;
	if (strlen ($date) != 8)
		$date = date ("Ymd");
	$thisyear = $year = substr ($date, 0, 4);
	$thismonth = $month = substr ($date, 4, 2);
	$thisday = $day = substr ($date, 6, 2);
	if ($thisyear - date ("Y") >= ($num_years - 1))
		$num_years = $thisyear - date ("Y") + 2;
	$ret .= "<select name=\"".$prefix."day\" id=\"".$prefix."day\" $params>\n";
	for ($i = 1 ; $i <= 31 ; $i++)
		$ret .= "<option value=\"$i\"".($i == $thisday ? " selected=\"selected\" style=\"font-weight:bold\"" : "").">$i</option>\n";
	$ret .= "</select>\n<select name=\"".$prefix."month\" id=\"".$prefix."month\" $params>\n";
	for ($i = 1 ; $i <= 12 ; $i++) {
		$m = month_short_name ($i - 1);
		$ret .= "<option value=\"$i\"".($i == $thismonth ? " selected=\"selected\" style=\"font-weight:bold\"" : "").">$m</option>\n";
	}
	$ret .= "</select>\n<select name=\"".$prefix."year\" id=\"".$prefix."year\" $params>\n";
	for ($i = $num_years_from ; $i < $num_years_to ; $i++) {
		$y = $thisyear + $i;
		$ret .= "<option value=\"$y\"".($y == $thisyear ? " selected=\"selected\" style=\"font-weight:bold\"" : "").">$y</option>\n";
	}
	$ret .= "</select>\n";
	
	return $ret;
}



function print_date_selectionTT ($prefix, $date, $num_years_from='-5', $num_years_to='10', $form='', $params='',$params2='') {
	print date_selection_htmlTT ($prefix, $date, $num_years_from, $num_years_to, $form, $params, $params2);
}
// session_start();
function date_selection_htmlTT ($prefix, $date, $num_years_from='-5', $num_years_to='10', $form='', $params='', $params2='') {
	$ret = "";
	// $num_years = 20;
	// echo "==> $date  <br/>" ; 
	$date = 20170101 ;  
	$num_years = $num_years_to;
	if (strlen ($date) != 8)
		$date = date ("Ymd");
		
	$thisyear = $year = substr ($date, 0, 4);
	$thismonth = $month = substr ($date, 4, 2);
	$thisday = $day = substr ($date, 6, 2);
	if ($thisyear - date ("Y") >= ($num_years - 1))
		$num_years = $thisyear - date ("Y") + 2;
	$ret .= "<select name=\"".$prefix."day\" id=\"".$prefix."day\" $params>\n";
	for ($i = 1 ; $i <= 31 ; $i++)
		$ret .= "<option value=\"$i\"".($i == $thisday ? " selected=\"selected\" style=\"font-weight:bold\"" : "").">$i</option>\n";
	$ret .= "</select>\n<select name=\"".$prefix."month\" id=\"".$prefix."month\" $params>\n";
	for ($i = 1 ; $i <= 12 ; $i++) {
		$m = month_short_name ($i - 1);
		$ret .= "<option value=\"$i\"".($i == $thismonth ? " selected=\"selected\" style=\"font-weight:bold\"" : "").">$m</option>\n";
	}
	$ret .= "</select>\n<select name=\"".$prefix."year\" id=\"".$prefix."year\" $params>\n";
	for ($i = $num_years_from ; $i < $num_years_to ; $i++) {
		$y = $thisyear + $i;
		$ret .= "<option value=\"$y\"".($y == $thisyear ? " selected=\"selected\" style=\"font-weight:bold\"" : "").">$y</option>\n";
	}
	$ret .= "</select>\n";
	
	return $ret;
}





 
// if( !empty($_POST))
// {
// echo "<pre>" ; 
// print_r($_POST) ; 
// echo "</pre>" ;
// exit() ; 
// }

// echo "==> $agence <br/>" ; 

if(isset($_POST['contrat_datefin_essai_year']))
{
	$from =date2int($_POST['contrat_date_day'],$_POST['contrat_date_month'],$_POST['contrat_date_year']) ;
	$to =date2int($_POST['contrat_datefin_essai_day'],$_POST['contrat_datefin_essai_month'],$_POST['contrat_datefin_essai_year']) ; 

	
	
}


print_header ('','','style="margin-top:15px; padding:20px;"');


?>


<div class="">
 <form id="inter_form" name="inter_form" method="post" action="">

<table width=100% style="margin:0 auto;"    height="50px">
<tr>
<td style="padding: 2px 16px 2px 0px; " valign="top"  width="100%">
 <div id="sb" valign="top"  style=" position: relative; top: 0px; " >


   <h3>Informations</h3>
   <table width=100% >
	  
	    	 <tr>
	    <td class="td2" colspan="2" width=25%><label for="login_username" >	date D&eacute;but :</label></td>
			
 <td>
 <?php print_date_selectionTT('contrat_date_', (isset($from)?$from:$fact_du))?>
		
		 </td>
	</tr>
	  
	  
	  
	  	 <tr>
	    <td class="td2" colspan="2" width=25%><label for="login_username" >Date Fin  :</label></td>
			
 <td>
 <?=date_selection_htmlAA("contrat_datefin_essai_", '') ?>
	 </td>
	</tr>

	  	 <tr>
	    <td class="td2" colspan="2" width=25%><label for="login_username" > Motif :</label></td>
			
 <td>

	   <select name="motiff">
  
 
	   <?
	    $rq = dbi_query(" SELECT * FROM `cause_absence` ") ; 
		while($data = dbi_fetch_row($rq))
		{
		?>
		<option value="<?=$data['cause_id']?>"><?=$data['descr']?></option> 
		<?
		}
	   ?>
	   <option value="tous">tous</option> 
	   </select>
	   
<input type="hidden" name="nbh" style="width:50px;">
<input type="hidden" name="tmp" value="CT"/>
 </td>
	</tr>
	  

  <tr>
    
 <input type="hidden" name="inter_id" value="<?=$id_inter?>">	

    <td align="center" colspan="4">
 <input type="hidden" name="inter_id" value="<?=$id_inter?>">	
 <input     type="submit" value="Ajouter" >

 </td>
   </tr>
   
   </table>

   
</div>
</td>
</tr>

 

 
 
 </table>
 
 </form>
 
</div>























<br />
<br />
<center>





<? 
if(!empty($_POST))
{
$from =date2int($_POST['contrat_date_day'],$_POST['contrat_date_month'],$_POST['contrat_date_year']) ;
	$to =date2int($_POST['contrat_datefin_essai_day'],$_POST['contrat_datefin_essai_month'],$_POST['contrat_datefin_essai_year']) ; 
$where2 = " AND cause = ".$_POST['motiff'] ;
	if($_POST['motiff']== "tous")
{
	$sql .="SELECT inter_nom, inter_pnom,date_debut,heure_debut,date_fin,heure_fin,descr,inter_bureau FROM absence a , intervenant i, cause_absence c  WHERE a.inter_id = i.inter_id and a.cause = c.cause_id and a.agence_id = $agence AND (date_debut between $from AND $to OR date_fin between $from AND $to OR (date_debut < $from AND date_fin > $to) OR (date_debut < $to AND date_fin is NULL) ) AND inter_actif ='0' order by inter_nom ,date_debut ASC";
}
else
{
	$sql .="SELECT inter_nom, inter_pnom,date_debut,heure_debut,date_fin,heure_fin,descr,inter_bureau FROM absence a , intervenant i, cause_absence c  WHERE a.inter_id = i.inter_id and a.cause = c.cause_id and a.agence_id = $agence AND (date_debut between $from AND $to OR date_fin between $from AND $to OR (date_debut < $from AND date_fin > $to) OR (date_debut < $to AND date_fin is NULL) ) AND inter_actif ='0' $where2 order by inter_nom ,date_debut ASC";

}		

			$req = dbi_query($sql);
				
?>
	<div id="tab"  >
<TABLE width="90%" style="margin:0 auto;">

<thead>
<TR>
  <th width="30%">Nom du salarié</th>
  <th width="30%">BUREAU</th>
  <th width="20%">Date de début </th>
  <th width="20%">Date de fin </th>
  <th width="20%"> Motif</th>
</TR>
</thead>
    <tbody>
<?php 	while($info = dbi_fetch_row($req))
					{

					$nom = $info['inter_nom']." ".$info['inter_pnom'] ;  
list($Bureau) = dbi_fetch_row(dbi_query(" select nom_agence from bureau where id_bureau = ".$info['inter_bureau'])) ; 

?>
		<TR>
		
		
             <TD align="center"><?= $nom ; ?></TD>	
			<TD align="center"><?=$Bureau?></TD>			 
			<TD align="center"><?= int2date($info['date_debut']) ; ?></TD>
			<TD align="center"><?=int2date($info['date_fin']); ?></TD>
			
			<TD align="center"><?=$info['descr']?></TD>
			
		</TR>
<?php 
} ?>	

	</tbody>
</TABLE>
	</div>

<?

}

?>
</body></html>

AnonSec - 2021