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/../../MC/code/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TEST/www/../../MC/code/planning11.php
<?
include_once 'code/init.php';
if(empty($inter))
	die('</body></html>') ;
$dispo = dbi_query("SELECT dispo_Hdeb,dispo_Hduree,dispo_jour FROM indisponibilite WHERE inter_id=$inter AND agence_id=$agence order by dispo_hdeb");
$jours = array_fill(0, 7, array_fill(HSTART, HEND-HSTART, 0)) ;
while ($d = dbi_fetch_row($dispo))
{
	sscanf(sprintf("%06d", $d['dispo_Hdeb']), "%02d%02d00", $h, $m) ;
	$deb = $h*4+$m/15 ;
	for ($i = 0 ; $i < $d['dispo_Hduree']/15 ; $i++)
		$jours[$d['dispo_jour']][$deb+$i] = 1 ;
}

$labels =  array_fill(0, 7, array_fill(HSTART, HEND-HSTART, '')) ;
$dat = date("Ymd");
$timestamp = time();

$from = isset($_GET['date']) ? $_GET['date'] : time2int(time()-(date('w')-1)*24*3600) ;
$to = time2int(int2time($from)+6*24*3600) ;

$l=1;
$offset = 0 ;
$indic=0;
$conteur=0;
for ( $indice = 0 ; $indice < count($p['planning_id']);$indice++)
{

if($p['presta_date_debut'][$indice]<=jour_jouren2($p['presta_jour'][$indice],$_GET['date']))
 if($p['presta_date_fin'][$indice]==0 || $p['presta_date_fin'][$indice]==NULL || $p['presta_date_fin'][$indice]>=jour_jouren2($p['presta_jour'][$indice],$_GET['date']))

 {
	// if ($p['presta_date_debut'][$indice] <= $to && $p['presta_date_debut'][$indice] >= $from)
	// {
		if($p['inter_id'][$indice] == $inter)
		{
			sscanf(sprintf("%06d", $p['presta_Hdeb'][$indice]), "%02d%02d00", $h, $m) ;
			$deb = $h*4+$m/15 ;
			$jour = $p['presta_jour'][$indice] ;
 $d = date('d', strtotime($from));
 $m = date('m', strtotime($from));
 $y = date('Y', strtotime($from));		

$dansjours = date("Ymd", mktime(0, 0, 0, $m, $d+$jour-1, $y));
			for ($i = 0 ; $i < $p['presta_Hduree'][$indice]/15 ; $i++)
			{
				switch(@$jours[$jour][$deb+$i])
				{
					case 0 : $jours[$jour][$deb+$i] = 3 ;
							 break ;
					case 1 : $jours[$jour][$deb+$i] = 2 ;
							 break ;
					case 2 : $jours[$jour][$deb+$i] = 4 ;
							 break ;
				}
				if (($jours[$jour][$deb+$i-1] != $jours[$jour][$deb+$i]) || ($i==0))
				{
					$labels[$jour][$deb+$i] = ($labels[$jour][$deb+$i] != '' ? $labels[$jour][$deb+$i] .'<br>' : '').'<a href="top.php?page=aac2&link=client&id='.$p['client_id'][$indice].'&presta_id='.$p['presta_id'][$indice].'&recur='.$dansjours.'&offset='.$offset.'&oldpage='.$inter.'&dateplan='.$from.'" target="ident">'.int2heure($p['presta_Hdeb'][$indice]).' - '.int2heure(addDuree($p['presta_Hdeb'][$indice], $p['presta_Hduree'][$indice])).'</a><br /><a href="top.php?page=aaa&link=client&id='.$p['client_id'][$indice].'&oldpage='.$inter.'&dateplan='.$from.'" target="ident">'.$p['client_nom'][$indice].' '.$p['client_pnom'][$indice].'</a>';
					if($p['presta_recur'][$indice]==0) $labels[$jour][$deb+$i].="<br><b>Prestation ponctuelle</b>";
					
					if($p['client_id'][$indice] )
					{
						{
							$labels[$jour][$deb+$i].="<br><i>".wordwrap($p['client_adr1'][$indice], 23, "<br />\n")."</i>";
							$labels[$jour][$deb+$i].="<br><i>".$p['client_cp'][$indice].' '.$p['client_ville'][$indice]."</i>";
							$labels[$jour][$deb+$i].="<br><i>".$p['client_zones_id'][$indice]."</i>";
						}	
					}
				}
			}
		}
		
	// }
	
	else{
	sscanf(sprintf("%06d", $p['presta_Hdeb'][$indice]), "%02d%02d00", $h, $m) ;
				sscanf(sprintf("%06d", $p['presta_Hdeb'][$indice]), "%02d%02d00", $h, $m) ;
			$deb = $h*4+$m/15 ;
			
			$jour = $p['presta_jour'][$indice];
 $d = date('d', strtotime($from));
 $m = date('m', strtotime($from));
 $y = date('Y', strtotime($from));		

$dansjours = date("Ymd", mktime(0, 0, 0, $m, $d+$jour-1, $y));
			for ($i = 0 ; $i < $p['presta_Hduree'][$indice]/15 ; $i++)
			{
				switch(@$jours[$jour][$deb+$i])
				{
					case 0 : $jours[$jour][$deb+$i] = 3 ;
							 break ;
					case 1 : $jours[$jour][$deb+$i] = 2 ;
							 break ;
					case 2 : $jours[$jour][$deb+$i] = 4 ;
							 break ;
				}
				if (($jours[$jour][$deb+$i-1] != $jours[$jour][$deb+$i]) ||($i==0))		
				{
					$labels[$jour][$deb+$i] = ($labels[$jour][$deb+$i] != '' ? $labels[$jour][$deb+$i] .'<br>' : '').'<a href="top.php?page=aac2&link=client&id='.$p['client_id'][$indice].'&presta_id='.$p['presta_id'][$indice].'&recur='.$dansjours.'&offset='.$offset.'&oldpage='.$inter.'&dateplan='.$from.'" target="ident">'.int2heure($p['presta_Hdeb'][$indice]).' - '.int2heure(addDuree($p['presta_Hdeb'][$indice], $p['presta_Hduree'][$indice])).'</a><br /><a href="top.php?page=aaa&link=client&id='.$p['client_id'][$indice].'&oldpage='.$inter.'&dateplan='.$from.'" target="ident">'.$p['client_nom'][$indice].' '.$p['client_pnom'][$indice].'</a>';
					if($p['presta_recur'][$indice]==0) $labels[$jour][$deb+$i].="<br><b>Prestation ponctuelle</b>";
					{
						{
							$labels[$jour][$deb+$i].="<br><i>".wordwrap($p['client_adr1'][$indice], 23, "<br />\n")."</i>";
							$labels[$jour][$deb+$i].="<br><i>".$p['client_cp'][$indice].' '.$p['client_ville'][$indice]."</i>";
							$labels[$jour][$deb+$i].="<br><i>".$p['client_zones_id'][$indice]."</i>";
						}	
					}
				}
			}
	}
	
}
}

// }
/// fin de programme
for ($i = 0 ; $i <= 6 ; $i++)
{
	$date = time2int(int2time($from)+$i*24*3600) ;
	$q = dbi_query("SELECT if(date_debut != $date, 0, heure_debut) deb, if(date_fin is null OR date_fin != $date, 235900, heure_fin) fin FROM ".TABLE_ABSENCES." where ($date between date_debut and date_fin OR ($date >= date_debut and date_fin is null)) AND inter_id = $inter AND agence_id=$agence") ;
	while($abs = dbi_fetch_row($q))
	{
			$pos = 8*4 ;
		sscanf(sprintf("%06d", $abs['deb']), "%02d%02d00", $h, $m) ;
		for(;$pos < $h*4+$m/15 ; $pos++);
		sscanf(sprintf("%06d", $abs['fin']), "%02d%02d00", $h, $m) ;
		for(;$pos <= $h*4+$m/15 ; $pos++)
			if ($jours[($i+1)%7][$pos] < 5)
				$jours[($i+1)%7][$pos] = $jours[($i+1)%7][$pos] <= 1 ? 5 : $jours[($i+1)%7][$pos]+($jours[($i+1)%7][$pos] >= 3 ? 3 : 4) ;
	}
}

$days = array('Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi', 'Dimanche') ;

?>

AnonSec - 2021