AnonSec Team
Server IP : 10.128.40.6  /  Your IP : 216.73.216.233
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/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TEST/www/../../MCPRO/exceptions.php
<?php
include_once 'code/init.php';
/*
$q = dbi_query("SELECT p.*,client_nom,client_pnom FROM ".TABLE_PREST." p ,".TABLE_CLIENT." c WHERE p.agence_id=$agence AND c.client_id=p.client_id AND (p.presta_date_fin >= $from OR p.presta_date_fin IS NULL) AND prestation_type NOT IN (SELECT prestation_type_id FROM prestation_type) order by client_nom,client_pnom");
$qfitch=dbi_fetch_row($q) ;
echo "------------------------------->" ; 
echo "<pre>" ;
print_r($qfitch);
echo "</pre>" ;
echo "------------------------------->" ; 
exit() ;

*/

print_header ( array(), '', $BodyX.'style="margin:5px 10px 5px 10px; padding:5px 10px 5px 10px; border:solid 1px #778;"' );
$presta_jour2 = array('1' => 'nynnnnn', '2' => 'nnynnnn', '3' => 'nnnynnn', '4' => 'nnnnynn', '5' => 'nnnnnyn', '6' => 'nnnnnny', '0' => 'ynnnnnn')  ;
$debut_de_ce_mois = sprintf("%04d%02d%02d", date('Y'), date('m'), 1);
$fin_de_ce_mois = sprintf("%04d%02d%02d", date('Y'), date('m'), date('t'));
if(!empty($_POST))
{
	$from = getPostDate('debut') ;
	$to = getPostDate('fin') ;

// $q = dbi_query("SELECT p.*,client_nom,client_pnom FROM ".TABLE_PREST." p ,".TABLE_CLIENT." c WHERE p.agence_id=$agence AND c.client_id=p.client_id AND p.presta_date_debut >= $from AND (p.presta_date_fin >= $from OR p.presta_date_fin IS NULL) AND chantier_id NOT IN (SELECT ID FROM fact_chantier) order by client_nom,client_pnom");

} 
else 
{
	$from = $debut_de_ce_mois ;
	$to = $fin_de_ce_mois ;
}
$q = dbi_query("SELECT * FROM exception e, prestation p, client c WHERE c.client_id = p.client_id AND p.presta_id = e.presta_id AND en_cours = ''");



/*

$q = dbi_query("SELECT p.*,client_nom,client_pnom FROM ".TABLE_PREST." p ,".TABLE_CLIENT." c WHERE p.agence_id=$agence AND c.client_id=p.client_id AND (p.presta_date_fin >= $from OR p.presta_date_fin IS NULL) AND prestation_type NOT IN (SELECT prestation_type_id FROM prestation_type) order by client_nom,client_pnom");
$qfitch=dbi_fetch_row($q) ;

echo "------------------------------->" ; 
echo "<pre>" ;
print_r($qfitch);
echo "</pre>" ;
echo "------------------------------->" ; 
exit() ;
*/

// $q = dbi_query("SELECT p.*,client_nom,client_pnom FROM ".TABLE_PREST." p ,".TABLE_CLIENT." c WHERE p.agence_id=$agence AND c.client_id=p.client_id AND (p.presta_date_fin >= CURDATE()+0 OR p.presta_date_fin IS NULL) AND chantier_id NOT IN (SELECT ID FROM fact_chantier) order by client_nom,client_pnom");
// echo $from;
?>


<div class="onglet_dotted">
<form action="" name="prest" method="post">
		Du <?=date_selection_html("debut", $from)?><br>
		Au <?=date_selection_html("fin", $to)?>&nbsp;&nbsp;
		<input type="submit" value="Valider" class="bigbutton">
		</form><br>


<?php
$jour = date('w') ;


	?>
<TABLE id="ver-minimalist">
<thead>
<TR>
  <th>Prestation</th>
  <th >Client</th>
  <th> Exception ID</th>
   <th>date exception</th>
  <!--<th>Action</th> -->
</TR>
</thead>
    <tbody>
<?php 
	$time = time() ;
	$date = time2int($time) ;
	while($prest = dbi_fetch_row($q))
	{
		if($prest['presta_jour']== 'nnnnnnn' || $prest['presta_jour']== '' || $prest['presta_jour']== NULL )
	$prest['presta_jour']=$presta_jour2[date("w",strtotime($prest['presta_date_fin']))];
		$data = array('jour' => $prest['presta_jour'], 'deb' => $prest['presta_Hdeb'], 'duree' => $prest['presta_Hduree'], 'inter' => $prest['inter_id'], 'taux' => $prest['presta_forfait']) ;
		$q1 = dbi_query("SELECT * FROM ".TABLE_PRESTA_MODIF." WHERE presta_id = ".$prest['presta_id']." order by `start`, `date`") ;
		while (($m = dbi_fetch_row($q1)) && $date >= $m['start'])
		{
			$data['jour'] = $m['jour'] === NULL ? $data['jour'] : $m['jour'] ;
			$data['deb'] = $m['Hdeb'] === NULL ? $data['deb'] : $m['Hdeb'] ;
			$data['duree'] = $m['Hduree'] === NULL ? $data['duree'] : $m['Hduree'] ;
			$data['inter'] = $m['inter_id'] === NULL ? $data['inter'] : $m['inter_id'] ;
			$data['taux'] = $m['taux'] === NULL ? $data['taux'] : $m['taux'] ;
		}
		$date_Exception =int2date($prest['date']) ;
		$inter = dbi_fetch_row(dbi_query("SELECT * FROM ".TABLE_INTERV." WHERE inter_id = '".$data['inter']."' AND agence_id = $agence")) ;
		// $client = dbi_fetch_row(dbi_query("SELECT * FROM ".TABLE_CLIENT." WHERE client_id = '".$prest['client_id']."' AND agence_id = $agence")) ;
?>
		<TR>
		<?php if($prest['presta_recur']==1) { ?>
			<TD><?='Prestation r&eacute;guli&egrave;res du '.ucfirst(presta_jour2jour($data['jour'])).' de '.int2heure($data['deb']).' &agrave '.int2heure(addDuree($data['deb'], $data['duree']));?></TD>
		<?php } else {?>	
			<TD><?='Prestation ponctuelle du '.ucfirst(presta_jour2jour($data['jour'])).' de '.int2heure($data['deb']).' &agrave '.int2heure(addDuree($data['deb'], $data['duree'])).' Intervention du '.int2date($prest['presta_date_debut'])?></TD>
		<?php } ?>	
			<TD><?=strtoupper($prest['client_nom']).' '.ucwords(strtolower($prest['client_pnom']))?></TD>
			<TD><?=$prest['excpt_id']?></TD>
			<TD><?=$date_Exception?></TD>
		
			<!-- <TD><a href="aac2.php?presta_id=<?=$prest['presta_id']?>"  style="cursor:pointer; font-weight:bold">Editer</a></TD> --> 

		</TR>
<?php 

// echo $client_id.' ! '.$c['client_id'].' == ';
} ?>		
	</tbody>


</TABLE>
	
</div>

</body></html>

AnonSec - 2021