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/mobile/../MCPRO/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/mobile/../MCPRO/prosp22.php
<?php
include_once 'code/init.php';
print_header ('', '', $BodyX );
print_header ( array(), '', $BodyX.'style="margin:5px 10px 5px 10px; padding:5px 10px 5px 10px; border:solid 1px #778;"' );

// $tri="client_id, client_nom, client_adr1, exact";
$ordre='desc';
$tri='';
if(!empty($_GET['tri']) && !empty($_GET['ordre']))
{
$tri=" ORDER BY ".$_GET['tri'].' '.$_GET['ordre'];
	if($_GET['ordre']=='asc')
		$ordre='desc';
	else
		$ordre='asc';
		
}
$where1="";
	$where2="";
	$selected="";
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'];
		$where1=" AND ID_Bureau != $id_bureau ";
		$where2=" AND client_bureau = $id_bureau ";
    }
	elseif($_GET['idbureausel']=="INDEFINI")
	{
	$id_bureau=$_GET['idbureausel'];
	$where2=" AND client_bureau='0' ";
	$selected='selected="selected"';
	}
}
if(!empty($_SESSION['admin'])){

}
elseif($bureau)
{
$where2=" AND client_bureau = $bureau ";
}
$sql = dbi_query(" SELECT *,CONCAT( client_nom,  ' ', client_pnom ) nom from client c 
 LEFT JOIN  proposition p 
USING ( client_id ) 
 
 WHERE  c.client_prospect= '1' AND client_actif='0' AND c.agence_id=$agence $where2  $tri ") ;
// echo " SELECT client_bureau,c.client_id, concat(client_nom, ' ', client_pnom) nom,p.* from 
 // proposition p 
 // LEFT JOIN client c
// USING ( client_id ) 
 
 // WHERE  c.client_prospect= '1' AND c.agence_id=$agence $where2  $tri ";
	

?>
<script language="Javascript">
   function GetIdBureau()
   {
		var idbursel="";
  	  idbureausel = document.bureau_form.client_bureau.value ;
	if( idbureausel > 0 || idbureausel=="INDEFINI" )
	  window.location = "prosp.php?idbureausel="+idbureausel;
	  	else
	window.location = "prosp.php";
   }
</script>
<div class="onglet_dotted">
<?php
if(!empty($_SESSION['admin'])){
?>
<table style="position:absolute; top:35px;  right:20px;">
<form id="bureau_form" name="bureau_form" method="POST" action="a.php">
		<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 } ?>
				<option <?=$selected ?> value="INDEFINI">INDEFINI</option>
				</select>
				  </td>
			</tr>
</form>
</table>
<?php } ?>
<br><br><br><br><br>
<TABLE id="ver-minimalist">
<thead>
<TR>  
  <th>Nom </th>
  <th>Bureau</th>
  <th>Description</th>
  <?php if(!empty($_GET['idbureausel'])) { ?>
  <th><A href="prosp.php?tri=montant_devis&ordre=<?php echo $ordre?>&idbureausel=<?php echo $_GET['idbureausel']?>">Montant</A><SPAN class="sort">&uarr;</SPAN></th>
  <?php } else { ?>
  <th><A href="prosp.php?tri=montant_devis&ordre=<?php echo $ordre?>">Montant</A><SPAN class="sort">&uarr;</SPAN></th>
   <?php }  ?>
  <th>Echeance</th>
  <th>suivi<SPAN class="sort">&uarr;</SPAN></th>
</TR>
</thead>
    <tbody>
<?php while($l=dbi_fetch_row($sql)){ 
// echo " !! ".$l['client_id'];
// $l['client_bureau'];
// print_r($s);
$bureau=dbi_fetch_row((dbi_query('select * from bureau where id_bureau='.$l['client_bureau'].' and agence_id='.$agence.''))) ;
$Nbur=$bureau['nom_agence'];

// if(!empty($_GET['tri']))
$SqlVS = " 
SELECT client_id, CONCAT( Admin_nom,  ' ', Admin_pnom ) anom, humeur, suivi_intitule, suivi_biais_id, annotation, suivi_id, client_suivi_id, suivi_date, client_suivi_clos, suivi_biais_intitule, suivi_programme,suivi_parent_id,UNIX_TIMESTAMP( suivi_date ) AS DATE, DATE( suivi_date ) AS date_suivi
FROM client_suivi cs
LEFT JOIN suivi
USING ( suivi_id ) 
LEFT JOIN suivi_biais
USING ( suivi_biais_id ) 
LEFT JOIN administratif
USING ( Admin_ID ) 
WHERE cs.agence_id = '$agence'
AND client_suivi_clos =  '0' AND cs.client_id =  ".$l['client_id']." 
ORDER BY suivi_date DESC ";

$s=dbi_fetch_row(dbi_query($SqlVS));

					$action = '';
					if ($s['suivi_biais_id']=='4') 
					$action = '<img src="images/icones/warning.gif" alt="Message repondeur" border="0" align="absmiddle">&nbsp;'.$s['suivi_biais_intitule'].' effectu&eacute;';
					else if ($s['suivi_programme']=='1') 
					$action = '<img src="images/icones/programme.gif" alt="Action programme" border="0" align="absmiddle">&nbsp;Pr&eacute;voir un '.strtolower($s['suivi_biais_intitule']);
					else $action = $s['suivi_biais_intitule'].' effectu&eacute;';
					if ($s['suivi_biais_id']=='6') 
					$action = '<img src="images/controles-16.png" alt="Contr&ocirc;le au domicile du client" border="0" align="absmiddle">&nbsp;Pr&eacute;voir une '.strtolower($s['suivi_biais_intitule']);
					
				
?>
		<TR>
			<TD><A href="top.php?link=client&amp;page=aaa&amp;id=<?=$l['client_id']?>" target="ident"><?=$l['nom']; ?></A></TD>
			<TD><?=$Nbur; ?></TD>
			<TD><?=$l['description_devis']; ?></TD>
			<TD><?=number_format( $l['montant_devis'] ,2 )?></TD>
			<TD><?=int2date($l['echeance_devis']); ?></TD>
			<TD><?php
			
if($s['suivi_date']) echo '<b>'.$action.' le '.mysql_datefr($s['suivi_date'],'-','Djma');?>
</TD>
		</TR>
<?php } ?>		
	</tbody>
</TABLE>
</div>

AnonSec - 2021