|
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/MC/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
// echo "test <br/>" ;
include_once 'code/init.php';
// echo "yassin <br/>" ;
// echo "<pre>" ;
// print_r($_POST);
// echo "</pre>" ;
// echo "<pre>" ;
// print_r($_GET);
// echo "</pre>" ;
echo "<br/><br/><br/><br/>" ;
print_header ('', '', $BodyX );
if (!empty($_POST['excp_id']) )
{
// echo "yassino <br/>" ;
dbi_query("UPDATE exception SET dis_inter_msg=1 WHERE excpt_id = ".$_POST['excp_id']) ;
}
if (!empty($_POST['va_presta']) )
{
// echo "yassino <br/>" ;
dbi_query("UPDATE prestation SET dis_inter_msg=1 WHERE presta_id = ".$_POST['excp_id_prsta']) ;
}
$agence=$_SESSION['agence'];
$date_haujourduit = date("Ymd");
?>
<html>
<head>
<title>LIGHTBOX EXAMPLE</title>
<style>
.black_overlay{
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.white_content {
display: none;
position: absolute;
top: 25%;
left: 25%;
width: 50%;
height: 50%;
padding: 16px;
border: 16px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
color:black ;
}
</style>
</head>
<body>
<title>LIGHTBOX EXAMPLE</title>
<style>
.black_overlay{
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.white_content {
display: none;
position: absolute;
top: 25%;
left: 25%;
width: 50%;
height: 50%;
padding: 16px;
border: 16px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
}
</style>
<script language="Javascript">
function GetIdBureau()
{
var idbursel="";
idbureausel = document.bureau_form.client_bureau.value ;
if( idbureausel > 0 || idbureausel=="INDEFINI" )
window.location = "partt_test.php?idbureausel="+idbureausel;
else
window.location = "partt_test.php";
}
</script>
<?
// echo "$date_haujourduit<br/>" ;
// exit ;
?>
<style>
#newspaper-a
{
/*font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;*/
font-family:"Lucida Sans Unicode", "Lucida Grande",Sans-Serif;
font-size:12px;
width:1080px;
text-align:left;
border-collapse:collapse;
border:2px
solid #C0C0C0;
margin:20px;
text-align: left;
border-collapse: collapse;
/* width: 95%; */
padding: 0px;
}
#newspaper-a th
{
padding: 0px 20px 0px 20px;
background:#990066;
color:#FFFFFF;
font-weight: normal;
font-size: 14px;
/* border-bottom: 2px solid #6678b1;
border-right: 20px solid #fff;
/*border-left: 20px solid #fff; */
}
#newspaper-a tr
{
font-weight:normal;
font-size:13px;color:#FFFFFF;
border-solid:1px dashed #69c;
padding:12px 17px;
}
#newspaper-a td
{
color:#34495E;
padding:7px 17px;
padding: 12px 0px 0px 2px;
color: #669;
}
#newspaper-a tbody tr:hover td
{
color:#FFFFFF;
background:#990066;
}
#newspaper-b
{
font-family:"Lucida Sans Unicode", "Lucida Grande", Sans-Serif;font-size:12px;width:1080px;text-align:left;border-collapse:collapse;border:1px solid #34495E;margin:20px;}
A.couleur
{
color:#FFFFFF;
}
A.couleur_ktba
{
color: #669;
}
button {
width:110px;
cursor:pointer;
text-transform:capitalize;
}
.bouton2 {
border-radius:12px 0 12px 0;
background: #990066;
border:none;
color:#fff;
font:bold 12px Verdana;
padding:6px 0 6px 0;
}
</style>
<?
$where2 = "" ;
if($_GET['idbureausel'] && !empty($_GET['idbureausel']) )
{
if($_GET['idbureausel']>0)
{
$idbureausel=$_GET['idbureausel'];
$tabbursel=dbi_fetch_row((dbi_query('select * from bureau where id_bureau='.$_GET['idbureausel'].' and agence_id='.$agence.''))) ;
$id_bureau=$tabbursel['id_bureau'];
$nom_bureau=$tabbursel['nom_agence'];
$where2=" AND client_bureau = $id_bureau ";
}
elseif($_GET['idbureausel']=="INDEFINI")
{
$id_bureau=$_GET['idbureausel'];
$where2=" AND client_bureau='0' ";
$selected='selected="selected"';
}
}
// SELECT * FROM `prestation` WHERE `presta_date_debut`=`presta_date_fin` and `presta_date_debut` >= 20141111
// exit() ;
$qq=dbi_query(" SELECT * FROM prestation p ,intervenant i ,client c WHERE p.client_id = c.client_id and p.inter_id = i.inter_id and presta_date_debut = presta_date_fin AND presta_date_debut >= $date_haujourduit AND c.agence_id = $agence and p.dis_inter_msg != 1 AND `presta_id` NOT IN ( SELECT new_presta_id FROM `exception` WHERE `new_presta_id` IS NOT NULL ) $where2 ") ;
?>
<table style="position:absolute; top:35px; right:20px;">
<form id="bureau_form" name="bureau_form" method="POST" action="">
<tr>
<td align="left" valign="top" class="td_listing0" >Bureau :</td>
<td align="left" valign="top" class="td_listing0">
<select id="client_bureau" name="client_bureau" onchange="GetIdBureau()";>
<option selected="selected" value=""> TOUS </option>
<?php if(isset($id_bureau) && isset($nom_bureau)) { ?>
<option selected="selected" value="<?=$id_bureau ?>"><?=$nom_bureau?></option>
<?php } ?>
<?php
$Reqbureau=dbi_query("select * from bureau where agence_id=$agence $where1") or die(mysql_error());
while($listbureau=dbi_fetch_row($Reqbureau)){ ?>
<option value="<?php echo $listbureau['id_bureau']?>"><?php echo $listbureau['nom_agence'] ?></option>
<?php } ?>
</select>
</td>
</tr>
</form>
</table>
<TABLE id="newspaper-a">
<TR>
<th ><A class="couleur" hrf="a.php?tri=nom&ordre=<?php echo $ordre?>">Nom du client</A><SPAN class="sort"></SPAN></th>
<!--<th ><A class="couleur" hrf="a.php?tri=nom&ordre=<?php//echo $ordre?>"> id </A><SPAN class="sort"></SPAN></th> -->
<th align="center">Nom de l'intervenant</th>
<th align="center"><A class="couleur" hef="a.php?tri=cp&ordre=<?php echo $ordre?>">Date</A></th>
<th align="center"><A class="couleur" hef="a.php?tri=cp&ordre=<?php echo $ordre?>">Type</A></th>
<!-- <th align="center"><A class="couleur" hef="a.php?tri=cp&ordre=<?php //echo $ordre?>">excpt_id</A></th> -->
<!--<th align="center"><A class="couleur" hef="a.php?tri=cp&ordre=<?php ////echo $ordre?>">Type</A></th>-->
<th align="center"><A class="couleur" hef="a.php?tri=cp&ordre=<?php // echo $ordre?>">Info</A></th>
<th align="center"><A class="couleur" hef="a.php?tri=cp&ordre=<?php //echo $ordre?>">test</A></th>
</TR>
<tbody>
<?
$b = 0 ;
while($cc = dbi_fetch_row($qq)) {
// echo "-----> $b <br/>" ;
// $b ++ ;
$nomC = $cc['client_nom']." ".$cc['client_pnom'] ;
$nomI = $cc['inter_nom']." ".$cc['inter_pnom'] ;
// if($cc['new_presta_id'] != NULL)
// {
// $idprsta = $cc['new_presta_id'] ;
// $req=dbi_fetch_row(dbi_query("SELECT * from prestation p ,intervenant i WHERE presta_id = $idprsta and p.inter_id = i.inter_id and i.agence_id = $agence")) ;
// $nomI = $req['inter_nom']." ".$req['inter_pnom'] ;
// }
// else
// {
// unset($tab);
// $nbrrr=count($tab) ;
// echo "---nbrrr---> $nbrrr <br/>" ;
// $idprsta = $cc['presta_id'] ;
// echo "---> $idprsta <br/> " ;
// $req= dbi_query(" SELECT * FROM presta_modif pf WHERE `presta_id` = $idprsta ORDER BY pf.id DESC") ;
// while($rq = dbi_fetch_row($req))
// {
// $tab[] = $rq['inter_id'] ;
// }
// echo "<pre>" ;
// print_r($tab) ;
// echo "</pre>" ;
// $nbr=count($tab) ;
// echo "---nbr---> $nbr <br/>" ;
// $ccmp=0 ;
// for($i=0 ; $i<$nbr ; $i++)
// {
// if($tab[$i]!= NULL)
// {
// $id_inter = $tab[$i] ;
// break ;
// }
// $ccmp ++ ;
// }
// echo "---cmp---> $ccmp <br/>" ;
// echo "---id_inter---> $id_inter <br/>" ;
// if($ccmp != $nbr)
// {
// $reqinter=dbi_fetch_row(dbi_query(" SELECT * FROM `intervenant` WHERE inter_id = $id_inter")) ;
// $nomI = $reqinter['inter_nom']." ".$reqinter['inter_pnom'] ;
// }
// }
$datee=int2date($cc['presta_date_debut']) ;
// echo "-->".$cc['client_id']."<br/>" ;
$adress = $cc['client_adr1']." ".$cc['client_adr2']." ".$cc['client_cp']." ".$cc['client_ville'] ;
// $tabdate[]=$datee ;
// $tabnom[]=$nomC ;
/***************************************************************************************************************/
$min ='00' ;
$min_fin ='00' ;
$nombreh = $cc['presta_Hdeb'] / 60 ;
if (is_int($nombreh))
{
$b= 1 ;
}
else
{
$b= 0 ;
}
$i=0 ;
if($cc['presta_Hdeb']>=90000 and $cc['presta_Hdeb']<100000 )
{
$min_test=(int)substr($cc['presta_Hdeb'],1,2);
if($min_test==0 and $b==1) // cas normale heur sans minut soit heur début soi heur de fin
{
$hrdb=(int)substr($cc['presta_Hdeb'],0,1);
}
elseif($min_test==0 and $b==0) // cas normale heur sans minut soit heur début soi heur de fin
{
$hrdb=(int)substr($cc['presta_Hdeb'],0,1);
$nombreh = (int)$nombreh ;
$nbhhh=(int)$nombreh ;
$nbh_par_min = $nbhhh*60 ;
$min_fin = $cc['presta_Hdeb'] - $nbh_par_min ;
}
elseif($min_test!=0 and $b==0 )
{
$nombreh = (int)$nombreh ;
$nombreh = $nombreh + 1 ;
$min=(int)substr($cc['presta_Hdeb'],1,2);
$hrdb=(int)substr($cc['presta_Hdeb'],0,1);
}
elseif($min_test!='00' and $b==1)
{
$hrdb=(int)substr($cc['presta_Hdeb'],0,1);
$min=(int)substr($cc['presta_Hdeb'],1,2);
$min_fin = $min ;
}
}
// *******************************************************
elseif($cc['presta_Hdeb']>=100000)
{
$min_test=(int)substr($cc['presta_Hdeb'],2,2);
if($min_test==0 and $b==1) // cas normale heur sans minut soit heur début soi heur de fin
{
$hrdb=(int)substr($cc['presta_Hdeb'],0,2);
}
elseif($min_test==0 and $b==0) // cas normale heur sans minut soit heur début soi heur de fin
{
$hrdb=(int)substr($cc['presta_Hdeb'],0,2);
$nombreh = (int)$nombreh ;
$nbhhh=(int)$nombreh ;
$nbh_par_min = $nbhhh*60 ;
$min_fin = $cc['presta_Hdeb'] - $nbh_par_min ;
}
elseif($min_test!=00 and $b==0 )
{
$nombreh = (int)$nombreh ;
$nombreh = $nombreh + 1 ;
$min=(int)substr($cc['presta_Hdeb'],2,2);
$hrdb=(int)substr($cc['presta_Hdeb'],0,2);
}
elseif($min_test!='00' and $b==1)
{
$hrdb=(int)substr($cc['presta_Hdeb'],0,2);
$min=(int)substr($cc['presta_Hdeb'],2,2);
$min_fin = $min ;
}
}
// *******************************************************
elseif($cc['presta_Hdeb'] < 90000)
{
$min_test=(int)substr($cc['presta_Hdeb'],1,2);
if($min_test==0) // cas normale heur sans minut soit heur début soi heur de fin
{
$hrdb=(int)substr($cc['presta_Hdeb'],0,1);
}
if($min_test==0 and $b==0) // cas normale heur sans minut soit heur début soi heur de fin elsssssssssssssssssssssssssssssssssssssss
{
$hrdb=(int)substr($cc['presta_Hdeb'],0,1);
$nombreh = (int)$nombreh ;
$nbhhh=(int)$nombreh ;
$nbh_par_min = $nbhhh*60 ;
$min_fin = $cc['presta_Hdeb'] - $nbh_par_min ;
}
elseif($min_test!=00 and $b==0 )
{
$nombreh = (int)$nombreh ;
$nombreh = $nombreh + 1 ;
$min=(int)substr($cc['presta_Hdeb'],1,2);
$hrdb=(int)substr($cc['presta_Hdeb'],0,1);
//$hrdb=$hrdb*10 ;
}
elseif($min_test!='00' and $b==1)
{
$hrdb=(int)substr($cc['presta_Hdeb'],0,1);
$min=(int)substr($cc['presta_Hdeb'],1,2);
$min_fin = $min ;
}
}
$minf = $min ;
// $cc['presta_Hduree'] = 90 ;
$dure = $cc['presta_Hduree'] / 60 ;
echo "- -->".$cc['presta_Hduree']."<br/>" ;
echo "-- duree--> $dure <br/>" ;
if (is_int($dure))
{
$tmp= 1 ;
}
else
{
$tmp= 0 ;
}
if ($tmp == 1)
{
$hrfin = $hrdb + $dure ;
}
else
{
if($min != '00')
{
$minf = '00';
$dure=(int)$dure ;
$hrfin = $hrdb + $dure + 1 ;
}
else
{
$dure=(int)$dure ;
$hrfin = $hrdb + $dure ;
$minf=30 ;
}
}
echo "-----------------------------------> ".$cc['presta_Hdeb']."<br/>" ;
echo "-----------------------------------> ".$cc['presta_Hduree']."<br/>" ;
$heur_fin= $hrfin."h:".$minf."mn" ;
$heur_debut= $hrdb."h:".$min."mn" ;
echo "- heur debute --> $heur_debut<br/>" ;
echo "- heur fin --> $heur_fin<br/>" ;
/***************************************************************************************************************/
// Bonjour - Prestation ponctuelle Chez Client_nom Client_pnom le XX/XX/XX (Date de la prestation) de Heure de Début à heure de fin.
?>
<TR>
<TD ><?=$nomC?></TD>
<TD align="center"><?=$nomI ?></TD>
<TD align="center"><?=int2date($cc['presta_date_debut'])?></TD>
<TD align="center">Ponctuelle</TD>
<!-- <TD align="center"><?//=$cc['excpt_id'] ?></TD> -->
<td align='center'> <a href = "javascript:void(0)" onclick = "document.getElementById('<?=$b?>').style.display='block';document.getElementById('fade').style.display='block'"><img height="16px" width="16px" src="ima.jpg"></a>
<div id="<?=$b?>" class="white_content"><?="Bonjour - Prestation ponctuelle Chez $nomC le $datee de $heur_debut à $heur_fin <br/ $adress > "?><a href = "javascript:void(0)" onclick = "document.getElementById('<?=$b?>').style.display='none';document.getElementById('fade').style.display='none'"><?="<br/><br/><br/><br/><br/><br/><br/>Fermer "?></a></div>
<div id="fade" class="black_overlay"></div> </td>
<?
// echo "<td align='center'><b> <img height=\"16px\" width=\"16px\" src=\"ima.jpg\" \"/> </td>";
/*if($cc['new_presta_id']==NULL)
{
?>
<TD align="center"><?=Suppression?></TD>
<?
}
else
{
?>
<TD align="center"><?=Modification?></TD>
<?
}
*/
/*
if($cc['new_presta_id']==NULL)
{
?>
<td align='center'> <a href = "javascript:void(0)" onclick = "document.getElementById('<?=$b?>').style.display='block';document.getElementById('fade').style.display='block'"><img height="16px" width="16px" src="ima.jpg"></a>
<div id="<?=$b?>" class="white_content"><?="La prestation du $datee chez $nomC est annulee"?><a href = "javascript:void(0)" onclick = "document.getElementById('<?=$b?>').style.display='none';document.getElementById('fade').style.display='none'"><?="<br/><br/><br/><br/><br/><br/><br/>Fermer "?></a></div>
<div id="fade" class="black_overlay"></div> </td>
<?
// echo "<td align='center'><b> <img height=\"16px\" width=\"16px\" src=\"ima.jpg\" onclick=\"alert('La prestation du $datee chez $nomC est annulee')\"/> </td>";
}
else
{
echo "<td align='center'><b> <img height=\"16px\" width=\"16px\" src=\"ima.jpg\" \"/> </td>";
}
*/
?>
<!--
<td align="center">
<form METHOD="POST" action="" >
<input class="bouton2" name="va" type="submit" value="valider" >
<input name="excp_id" type="hidden" value="<?//=$cc['excpt_id']?>" >
</form>
</td>
-->
<td align="center">
<form METHOD="POST" action="" >
<input class="bouton2" name="va_presta" type="submit" value="valider" >
<input name="excp_id_prsta" type="hidden" value="<?=$cc['presta_id']?>" >
</form>
</td>
</TR>
<?
}
$q=dbi_query("SELECT excpt_id,presta_date_fin,p.presta_id,c.agence_id, date,client_bureau, client_nom , client_pnom , inter_nom , new_presta_id,inter_pnom FROM exception e , prestation p ,intervenant i ,client c WHERE e.presta_id= p.`presta_id` and p.client_id = c.client_id and p.inter_id = i.inter_id and c.agence_id = $agence and date >= $date_haujourduit and ( p.presta_date_fin > $date_haujourduit OR presta_date_fin is NULL ) and inter_abs != '1' and e.dis_inter_msg != 1 $where2 ORDER BY date LIMIT 0 , 600 ") ;
$b = 0 ;
while($c = dbi_fetch_row($q)) {
// echo "-----> $b <br/>" ;
$b ++ ;
$nomC = $c['client_nom']." ".$c['client_pnom'] ;
$nomI = $c['inter_nom']." ".$c['inter_pnom'] ;
if($c['new_presta_id'] != NULL)
{
$idprsta = $c['new_presta_id'] ;
$req=dbi_fetch_row(dbi_query("SELECT * from prestation p ,intervenant i WHERE presta_id = $idprsta and p.inter_id = i.inter_id and i.agence_id = $agence")) ;
$nomI = $req['inter_nom']." ".$req['inter_pnom'] ;
}
else
{
unset($tab);
$nbrrr=count($tab) ;
// echo "---nbrrr---> $nbrrr <br/>" ;
$idprsta = $c['presta_id'] ;
// echo "---> $idprsta <br/> " ;
$req= dbi_query(" SELECT * FROM presta_modif pf WHERE `presta_id` = $idprsta ORDER BY pf.id DESC") ;
while($rq = dbi_fetch_row($req))
{
$tab[] = $rq['inter_id'] ;
}
// echo "<pre>" ;
// print_r($tab) ;
// echo "</pre>" ;
$nbr=count($tab) ;
// echo "---nbr---> $nbr <br/>" ;
$cmp=0 ;
for($i=0 ; $i<$nbr ; $i++)
{
if($tab[$i]!= NULL)
{
$id_inter = $tab[$i] ;
break ;
}
$cmp ++ ;
}
// echo "---cmp---> $cmp <br/>" ;
// echo "---id_inter---> $id_inter <br/>" ;
if($cmp != $nbr)
{
$reqinter=dbi_fetch_row(dbi_query(" SELECT * FROM `intervenant` WHERE inter_id = $id_inter")) ;
$nomI = $reqinter['inter_nom']." ".$reqinter['inter_pnom'] ;
}
}
$datee=int2date($c['date']) ;
$tabdate[]=$datee ;
$tabnom[]=$nomC ;
?>
<TR>
<TD ><?=$nomC?></TD>
<TD align="center"><?=$nomI ?></TD>
<TD align="center"><?=int2date($c['date'])?></TD>
<? if($c['new_presta_id']==NULL)
{
?>
<TD align="center"><?=Suppression?></TD>
<?
}
else
{
?>
<TD align="center"><?=Modification?></TD>
<?
}
if($c['new_presta_id']==NULL)
{
?>
<td align='center'> <a href = "javascript:void(0)" onclick = "document.getElementById('<?=$b +1?>').style.display='block';document.getElementById('fade').style.display='block'"><img height="16px" width="16px" src="ima.jpg"></a>
<div id="<?=$b +1?>" class="white_content"><?="La prestation du $datee chez $nomC est annulee"?><a href = "javascript:void(0)" onclick = "document.getElementById('<?=$b +1 ?>').style.display='none';document.getElementById('fade').style.display='none'"><?="<br/><br/><br/><br/><br/><br/><br/>Fermer "?></a></div>
<div id="fade" class="black_overlay"></div> </td>
<?
// echo "<td align='center'><b> <img height=\"16px\" width=\"16px\" src=\"ima.jpg\" onclick=\"alert('La prestation du $datee chez $nomC est annulee')\"/> </td>";
}
else
{
echo "<td align='center'><b> <img height=\"16px\" width=\"16px\" src=\"ima.jpg\" \"/> </td>";
}
?>
<td align="center">
<form METHOD="POST" action="" >
<input class="bouton2" name="va" type="submit" value="valider" >
<input name="excp_id" type="hidden" value="<?=$c['excpt_id']?>" >
</form>
</td>
</TR>
<?
}
?>
</body>
</html>
