|
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/mobile/../MCPRO/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
// echo 'test <br/>' ;
// echo "<pre>" ;
// print_r($_GET) ;
// echo "</pre>" ;
// echo "==> get <br/>" ;
// echo "<pre>" ;
// print_r($_GET) ;
// echo "</pre>" ;
// echo "==> post <=== <br/>" ;
// echo "<pre>" ;
// print_r($_POST) ;
// echo "</pre>" ;
// echo "==> session <br/>" ;
// echo "<pre>" ;
// print_r($_SESSION) ;
// echo "</pre>" ;
if (array_key_exists('action',$_POST)) define('FERMER',true);
if(empty($_GET['included'])) {
include_once 'code/init.php';
include('code/suivi/traitements.php');
print_header ();
}
if (!empty($_GET['client_id'])) {
$client_id = $_GET['client_id'];
$get = 'client_id='.$client_id;
} else if (!empty($_GET['interv_id'])){
$inter_id = $_GET['interv_id'];
$get = 'inter_id='.$inter_id;
} else if (!empty($client_id)) $get = 'client_id='.$client_id;
else if (!empty($inter_id)) $get = 'inter_id='.$inter_id;
$suivi_simple = false;
$suivi_etendu = false;
$suivi_historique = false;
if($_GET['suivi']=='simple') $suivi_simple = true;
if($_GET['suivi']=='etendu') $suivi_etendu = true;
if($_GET['suivi']=='historique') $suivi_historique = true;
$where = "c.agence_id = '$agence' AND suivi_parent_id = '0'";
if ($suivi_etendu||$suivi_historique) {
if (!empty($client_id)) $where .= " AND client_id = '".$client_id."'";
else {
$where .= " AND inter_id = '".$inter_id."'";
}
} else $where .= " AND client_id!='0'";
if (!$suivi_historique) $where .= " AND client_suivi_clos='0'";
$suivi = dbi_query("SELECT client_id, concat(client_nom, ' ', client_pnom) nom, humeur, suivi_intitule, annotation, suivi_id, inter_id, client_suivi_id, suivi_date, client_suivi_clos, suivi_biais_intitule FROM ".TABLE_CLIENT_SUIVI." LEFT JOIN ".TABLE_SUIVI." USING(suivi_id) LEFT JOIN ".TABLE_SUIVI_BIAIS." USING(suivi_biais_id) LEFT JOIN ".TABLE_CLIENT." c USING(client_id) WHERE $where AND suivi_id != 10 AND suivi_id != 16 AND suivi_id != 17 AND suivi_id != 13 AND suivi_id != 21 AND suivi_id != 25 AND suivi_id != 18 ORDER BY client_suivi_clos ,suivi_date") ;
if(empty($_GET['interv_id']))
{
?>
<a href="suivi_edition_pere.php?action=nouveau_suivi&<?=$get?>" class="modal" rel="{handler:'iframe',size:{x:600,y:400}}"><h4>Ajouter un suivi</h4></a>
<?
}
// echo "SELECT client_id, concat(client_nom, ' ', client_pnom) nom, humeur, suivi_intitule, annotation, suivi_id, client_suivi_id, suivi_date, client_suivi_clos, suivi_biais_intitule FROM ".TABLE_CLIENT_SUIVI." LEFT JOIN ".TABLE_SUIVI." USING(suivi_id) LEFT JOIN ".TABLE_SUIVI_BIAIS." USING(suivi_biais_id) LEFT JOIN ".TABLE_CLIENT." c USING(client_id) WHERE $where ORDER BY suivi_date" ;
if (mysqli_num_rows($suivi)>0) {
echo '<table class="td_normal" style="margin-top: 10px;" cellpadding="0" cellspacing="0">';
while ($a = dbi_fetch_row($suivi))
{
if(!empty($a['inter_id']))
{
list($inter_nom,$inter_pnom) = dbi_fetch_row(dbi_query("SELECT inter_nom,inter_pnom FROM `intervenant` where inter_id = ".$a['inter_id'])) ;
$chaine= '- '.$inter_nom.' '.$inter_pnom ;
}
if ($a['client_suivi_clos']=='1') $statut_suivi = '<a href="suivi_edition.php?action=ouvrir&client_suivi_id='.$a['client_suivi_id'].'&suivi='.$_GET['suivi'].'&'.$get.'" target="main">
</a>';
else $statut_suivi = '<a href="suivi_edition.php?action=clore&client_suivi_id='.$a['client_suivi_id'].'&suivi='.$_GET['suivi'].'&'.$get.'" target="main"></a>';
//if(isset($_GET['client_suivi_id'])&&($_GET['action']=='modif')&&($_GET['client_suivi_id']==$a['client_suivi_id'])) $edition_suivi = true;
list($biais)=array_values_bd(dbi_fetch_row(dbi_query("SELECT suivi_biais_id FROM ".TABLE_CLIENT_SUIVI." WHERE suivi_parent_id = '".$a['client_suivi_id']."' ORDER BY suivi_date DESC LIMIT 1")));
$icone = '';
if ($biais=='4') $icone = '<img src="images/icones/warning.gif" alt="Message repondeur" border="0" align="absmiddle"> ';
echo '<tr><td class="td_listing1b">';
if ($suivi_etendu||$suivi_historique) { ?>
<h3> <?=$icone.(!empty($inter_id) && !empty($a['nom'])?'<a href="top.php?link=client&page=aaa&id='.$a['client_id'].'" target="ident">'.$a['nom'].'</a> : ':'').$a['suivi_intitule'].' '.$chaine?> <div style="float:right;"><a href="suivi_edition.php?action=nouvelle_action_suivi&client_suivi_id=<?=$a['client_suivi_id']?>&suivi_id=<?=$a['suivi_id']?>&<?=$get?>" class="modal" rel="{handler: 'iframe', size: {x: 600, y: 430}}"><img src="images/ajouter.png" alt="Ajouter" border="0"></a> <a href="suivi_edition.php?action=edition_suivi&client_suivi_id=<?=$a['client_suivi_id']?>&suivi_id=<?=$a['suivi_id']?>&<?=$get?>" class="modal" rel="{handler: 'iframe', size: {x: 600, y: 400}}"></a>
<?
// had if pour n'afficher pas icons cloturer et supprimer pour suivi de type recouvrement , livraison prod et matr , livraison consomable
if($a['suivi_id']!= 10 AND $a['suivi_id']!= 16 AND $a['suivi_id']!= 17 AND $a['suivi_id']!= 7 AND $a['suivi_id']!= 19 AND $a['suivi_id']!= 20 AND $a['suivi_id']!= 21 AND $a['suivi_id']!= 22 AND $a['suivi_id']!= 23 )
{
?>
<a href="suivi_edition.php?action=sup&client_suivi_id=<?=$a['client_suivi_id']?>&<?=$get?>" target="main"></a>
<?=$statut_suivi?></div></h3><?=$a['humeur']!=-2?'<img src="'.$humeur[$a['humeur']].'" border="0"> ':''?><?=$a['annotation']?><br><br>
<?
}
$chaine='' ;
}
else {
if (empty($inter_id) )
echo '<td>'.$icone.'<a href="top.php?link=client&page=aaa&id='.$a['client_id'].'" target="ident">'.$a['nom'].'</a> : '.$a['suivi_intitule'].(!empty($a['suivi_annotation'])?'<br>'.$a['suivi_annotation']:'').($a['humeur']!=-2?' <img src="'.$humeur[$a['humeur']].'" border="0">':'').'<br>'.$a['suivi_biais_intitule'].' le '.mysql_datefr($a['suivi_date'],'-','Djma').'</td>';
else
echo '<td>'.$icone.'<a href="top.php?link=client&page=caa&id='.$a['inter_id'].'" target="ident">'.$a['nom'].'</a> : '.$a['suivi_intitule'].(!empty($a['suivi_annotation'])?'<br>'.$a['suivi_annotation']:'').($a['humeur']!=-2?' <img src="'.$humeur[$a['humeur']].'" border="0">':'').'<br>'.$a['suivi_biais_intitule'].' le '.mysql_datefr($a['suivi_date'],'-','Djma').'</td>';
}
echo '</td></tr>';
echo '<tr><td>';
if ($suivi_etendu||$suivi_historique) {
$where = "agence_id = '$agence' AND suivi_parent_id = '".$a['client_suivi_id']."'";
if ($suivi_etendu||$suivi_historique) $where .= " AND $get";
if (!$suivi_historique) $where .= " AND client_suivi_clos='0'";
$suivi_contact = dbi_query("SELECT humeur, suivi_biais_intitule, client_suivi_id, annotation, suivi_date, suivi_biais_id, suivi_programme FROM ".TABLE_CLIENT_SUIVI." LEFT JOIN ".TABLE_SUIVI_BIAIS." USING(suivi_biais_id) WHERE $where ORDER BY suivi_date DESC ") ;
if (mysqli_num_rows($suivi_contact)>0) {
echo '<table>';
while ($b = dbi_fetch_row($suivi_contact))
{
if(isset($_GET['client_suivi_id'])&&($_GET['action']=='modif')&&($_GET['client_suivi_id']==$a['client_suivi_id'])) $edition_suivi = true;
$action = '';
if ($b['suivi_biais_id']=='4') $action = '<img src="images/icones/warning.gif" alt="Message repondeur" border="0" align="absmiddle"> '.$b['suivi_biais_intitule'].' effectué';
else if ($b['suivi_programme']=='1') $action = '<img src="images/icones/programme.gif" alt="Action programme" border="0" align="absmiddle"> Prévoir un '.strtolower($b['suivi_biais_intitule']);
else $action = $b['suivi_biais_intitule'].' effectué';
if ($b['suivi_biais_id']=='6') $action = '<img src="images/controles-16.png" alt="Contrôle au domicile du client" border="0" align="absmiddle"> Prévoir une '.strtolower($b['suivi_biais_intitule']);
echo '<tr><td class="td_listing0"><b>'.$action.' le '.mysql_datefr($b['suivi_date'],'-','Djma').'</b><br>'.$b['annotation'].'</td><td class="td_listing0">'.($b['humeur']!=-2?'<img src="'.$humeur[$b['humeur']].'" border="0"> ':'').'<a href="suivi_edition.php?action=edition_action_suivi&client_suivi_id='.$b['client_suivi_id'].'&suivi_id='.$a['suivi_id'].'&'.$get.'" class="modal" rel="{handler: \'iframe\', size: {x: 600, y: 430}}"><img src="images/edit.png" alt="Modifier" border="0"></a> <a href="suivi_edition.php?action=sup&client_suivi_id='.$b['client_suivi_id'].'&client_id='.$client_id.'" target="main"></a></td></tr>';
}
echo '</table>';
}
echo '</td></tr>';
}
}
echo '</table>';
}
?>