|
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/wp-content/../../../MC/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
include_once 'code/init.php' ;
if(empty($_GET['interv_id'])) {
print_header('','','style="margin-top:60px; background:#E6F4FF"');
} else print_header();
list($infore)=dbi_fetch_row(dbi_query("SELECT `value` FROM `config` WHERE `key`='inforech' AND agence_id='".$agence."'"));
$q = dbi_query("SELECT * FROM ".TABLE_CONFIG." WHERE agence_id=$agence") ;
$conf = array() ;
while($r = dbi_fetch_row($q))
$conf[$r['key']] = $r['value'] ;
define('HSTART', substr($conf['hstart'], 0, 2)*4+substr($conf['hstart'], 2, 2)/15) ;
define('HEND', substr($conf['hend'], 0, 2)*4+substr($conf['hend'], 2, 2)/15) ;
define('RIEN','FFFFFF'); //blanc
define('DISPO',$conf['dispo']); //vert
define('OCCUPE',$conf['prest']); //bleu
define('HORS_DISPO',$conf['presthd']); //orange
define('CHEVAUCHEMENT',$conf['prestc']); //rouge
define('RIEN_ABS',$conf['abs']); //gris
define('OCCUPE_ABS',$conf['prestabs']); //bleu-gris
define('CHEVAUCHEMENT_ABS',$conf['prestcabs']); //rouge-gris
$colors = array(RIEN, DISPO, OCCUPE, HORS_DISPO, CHEVAUCHEMENT, RIEN_ABS, OCCUPE_ABS, CHEVAUCHEMENT_ABS) ;
$inter = $_GET['interv_id'] ;
include_once 'code/planningaffiche.php' ;
$last = array_fill(0, 6, 0) ;
?>
<table cellspacing="0" cellpadding="0" width="100%" border="0" class="cal">
<tr style="height:25px" class="tr_cal1">
<th class="cal"></th>
<?php
foreach($days as $dec => $nom)
if(substr_count($conf['jour'], ($dec+1)%7))
printf ('<th class="cal" width="%d%%">%s %s</th>', 100/strlen($conf['jour']), $nom, int2date('0')) ;
?>
</tr>
<?php
for($i = HSTART ; $i <= HEND ; $i++)
{
?>
<tr style="height:5px; font-size:10px">
<?php
if ($i%2 == 0)
echo ' <td rowspan="2" align="right" class="td_cal'.($i/2%2).'">'.sprintf("%02s:%02s", intval($i/4), (($i/4 - intval($i/4))*4*15)).'</td>' ;
for($d = 1 ; $d <= 7 ; $d++)
{
$j = $d%7 ;
if(substr_count ($conf['jour'], $j))
{
if($last[$j] == 0)
{
$rowspan = 1 ;
for($k = $i+1 ; !in_array($jours[$j][$i], array(0, 5)) && $k <= HEND && $jours[$j][$k] === $jours[$j][$i] && ($labels[$j][$i] == '' || ($labels[$j][$i] != '' && $labels[$j][$k] == '')) ; $k++, $rowspan++) ;
$last[$j] = $rowspan-1;
?>
<td nowrap="nowrap" rowspan="<?=$rowspan?>" valign="top" <?=$jours[$j][$i] == 0 ? 'class="td_cal'.($i/2%2).'" style="padding:5px" ' : ' style="padding:5px; '.(($colors[$jours[$j][$i]]==RIEN_ABS)?' background-color:#'.RIEN_ABS.'':'border: #'.$colors[$jours[$j][$i]].' thin solid').'; border-left:thick #'.$colors[$jours[$j][$i]].' solid;"'?>>
<?=$jours[$j][$i] == 1 ? sprintf("%02dh%02d - %s", intval($i/4), ($i/4 - intval($i/4))*4*15, int2heure(addDuree(sprintf("%02d%02d00", intval($i/4), ($i/4 - intval($i/4))*4*15), $rowspan*15))) : ($jours[$j][$i] ? $labels[$j][$i] : '')?>
</td>
<?php
}
else
$last[$j] -- ;
}
}
?>
<?php
}
?>
</table>
</body>
</html>
