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

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TEST/../MCPRO/remiseee.php
<?php
 
include_once 'code/init.php';


session_start();
// echo "<pre>" ;
// print_r($_POST) ; 
// echo "</pre>" ; 
?>
<style>
#yass-a
{
font-family:"Lucida Sans Unicode", "Lucida Grande", Sans-Serif;font-size:12px;width:800px;text-align:center;border-collapse:collapse;border:2px solid #C0C0C0;margin:20px;}#yass-a th{font-weight:normal;background-color: #1ABC9C;font-size:12px;color:#FFFFFF;border-solid:1px dashed #69c;padding:12px 17px;}#yass-a td{color:#34495E;padding:7px 17px;}#yass-a tbody tr:hover td{color:#FFFFFF;background:#1ABC9C;}#newspaper-b{font-family:"Lucida Sans Unicode", "Lucida Grande", Sans-Serif;font-size:12px;width:800px;text-align:left;border-collapse:collapse;border:1px solid #34495E;margin:20px;}
#yass-th
{
font-family:"Lucida Sans Unicode", "Lucida Grande", Sans-Serif;font-size:12px;width:800px;text-align:center;border-collapse:collapse;border:2px solid #C0C0C0;margin:20px;}#yass-a th{font-weight:normal;background-color: #1ABC9C;font-size:12px;color:#FFFFFF;border-solid:1px dashed #69c;padding:12px 17px;}#yass-a td{color:#34495E;padding:7px 17px;}#yass-a tbody tr:hover td{color:#FFFFFF;background:#1ABC9C;}#newspaper-b{font-family:"Lucida Sans Unicode", "Lucida Grande", Sans-Serif;font-size:12px;width:800px;text-align:left;border-collapse:collapse;border:1px solid #34495E;margin:20px;}
</style>
<?

if($_POST['nvremise']=="Nouvelle remise")
{
list($id) = dbi_fetch_row(dbi_query("SELECT max(id_remis)  FROM remise  ")) ;
$_SESSION['id'] = $id +1;

list($idcheque) = dbi_fetch_row(dbi_query("SELECT max(id_remise_de_cheque)  FROM remise_de_cheque  ")) ;
$_SESSION['idcheque'] = $idcheque;

$_SESSION['totatle']=0 ; 
$_SESSION['date']=0 ; 
}
$total = 0 ; 
?>
<form action="" method="post">
 	
      <td colspan="2" align="right" class="td_listing1"><input type="submit" name="nvremise"value="Nouvelle remise" class="bigbutton" ></td>
      <td colspan="2" align="right" class="td_listing1"><input type="submit" name="Visualiser"value="Visualiser les remises" class="bigbutton" ></td>
</form>

<?
if(isset($_POST['client_id']))
{ 
	$mnt= $_POST['montant'] ; 
	// dbi_query("INSERT INTO remise(date_remis, montant_remis) VALUES ('".date2int($_POST['contrat_date_day'],$_POST['contrat_date_month'],$_POST['contrat_date_year'])."',   '$mnt')")  ;

			$idd=$_SESSION['id'] ;
         $idc = $_POST['client_id'] ;  
		 $num_fact = $_POST['NF'] ; 
	
		dbi_query("INSERT INTO remise_de_cheque(client_id, montant_cheque, numero_facture, id_remise,agence_id ) VALUES ('$idc','$mnt' ,'$num_fact','$idd', '$agence' )")  ;	

}
if($_POST['Ajout']== "Ajouter")
{
$_SESSION['date'] = date2int($_POST['contrat_date_day'],$_POST['contrat_date_month'],$_POST['contrat_date_year']) ; 
}

if($_POST['vald']== "valider")
{
$date=$_SESSION['date'] ; 
	$mnt= $_POST['totale'] ; 
	dbi_query("INSERT INTO remise(date_remis, montant_remis) VALUES ('$date',   '$mnt')")  ;

}

print_header ('','','style="margin-top:15px; padding:20px;"');


	
	// si l'intervenant possède des contrats on les affiches
	$contrat_existant = false;	
		
?>
<br />
<br />
<center>


 
<div id="frm_contrat_partial">

		</table>
		
		
		</div>
  
  <?
  if($_POST['nvremise']=="Nouvelle remise" or $_POST['Ajout']=="Ajouter")
  {
  ?>

	   <form action="" method="post">
<input type="hidden" name="nbh" style="width:50px;">
<input type="hidden" name="tmp" value="CT"/>
 

       
  <table class="td_normal" cellpadding="4">
    <tr>
	<td>
	Clients :
	</td>
    <td>
	<?
	$client = dbi_query("SELECT *  FROM  client where agence_id = $agence and client_actif = '1' ORDER BY  `client`.`client_nom` ASC   "); 
			?>
			<select name="client_id">
	         <?
		while($cl=dbi_fetch_row($client))
		{
		?>
		<option  value="<?=$cl['client_id']?>"> <?=$cl['client_nom']."".$cl['client_pnom']?></option>
		<?}?>
		</select>
		</td>
	</tr>
	<tr>
		<td> Date</td>
      <td class="td_listing0"><?=date_selection_html("contrat_date_", '')?></td>
    </tr>
		<tr><td>Numéro Factures: </td><td><input type="text" name="NF"/></td></tr>
        <tr><td>Montant: </td><td><input type="text" name="montant"/></td></tr>
 		<tr>
      <td colspan="2" align="right" class="td_listing1"><input type="submit" name="Ajout" value="Ajouter" class="bigbutton" ></td>
    </tr>
  </table>
</form><br /><br />


<?
if($_POST['Ajout']=="Ajouter")
{
?>
<table class="td_normal">
<tr>
<td width="15%" class="td_listing1b"> Nom client </td>
<td width="15%" class="td_listing1b"> Montant </td>
</tr>
<?
 $idcheque = $_SESSION['idcheque'] ;
 $a=dbi_query("SELECT client_nom ,client_pnom ,montant_cheque FROM remise_de_cheque r , client c  WHERE c.client_id = r.client_id and id_remise_de_cheque > $idcheque ") ; 
while($aa=dbi_fetch_row($a))
{
 ?>
<tr>
<td width="15%" class="td_listing1b"> <?=$aa['client_nom']." ".$aa['client_pnom']?> </td>
<td width="15%" class="td_listing1b"><?=$aa['montant_cheque']?> </td>
</tr>
<?
$total= $total + $aa['montant_cheque'] ; 
}
?>
<tr>
<td width="15%" color="red"   > Totale</td>
<td width="15%" color="red"   >  <?=$total?> </td>
</tr>



</table>
   <form action="" method="post">
      <input type="hidden" name="totale" value="<?=$total?>">
	    <input type="hidden" name="date" value="$total">
		
     <td colspan="2" align="right" class="td_listing1"><input type="submit" name="vald" value="valider" class="bigbutton" ></td>
   </form>
<?
}
}

  if($_POST['Visualiser']=="Visualiser les remises" or $_POST['Ajout']=="Ajouter")
  {
  ?>
  
  <fieldset><legend>DATE</legend>
<form action="" method="post">
<table>
	<tr>
		<td>Du : </td>
		<td colspan="2"><?php print_date_selection('from', (isset($from)?$from:$fact_du))?>
		</td>
	</tr>
	<tr>
		<td>Au : </td>
		<td colspan="2"><?php print_date_selection('to', (isset($to)?$to:$fact_au))?></td>
	</tr>
	<tr>
		<td colspan="2" align="right">
<input type="submit" class="bigbutton" name="val" value="Valider">
</td>
<td>&nbsp;</td>
	</tr>
</table>
</form>
</fieldset>
  

  

<?php
}
?>

<?
// echo "--->".$_POST['val']."<br/>" ; 
if($_POST['val']=="Valider")
{
$from = sprintf("%04d%02d%02d", $_POST['fromyear'], $_POST['frommonth'], $_POST['fromday']) ;
$to = sprintf("%04d%02d%02d", $_POST['toyear'], $_POST['tomonth'], $_POST['today']) ;


$remise =dbi_query("SELECT id_remis , montant_remis FROM remise WHERE  date_remis BETWEEN $from AND $to  ") ; 

// echo "$from  ___ $to <br/>" ; 
?>
<table id="yass-a" class="td_listing0" border="2" >
<tr>
<th width="15%" class="td_listing0" id="yass-th">Nom client </th>
<th width="20%" class="td_listing0" id="yass-th">Montant </th>
</tr>

<?
while($rr= dbi_fetch_row($remise))
{
// echo "<pre>" ; 
// print_r($rr) ;
// echo "</pre>" ; 
list($idc) = dbi_fetch_row(dbi_query( "select distinct client_id from remise_de_cheque where id_remise = ".$rr['id_remis'])) ; 

list ($nom,$prenom) = dbi_fetch_row(dbi_query("SELECT client_nom ,client_pnom from client where client_id = $idc")) ; 
// $remise =dbi_fetch_row(dbi_query("SELECT client_nom ,client_pnom FROM  client   WHERE c.client_id = r.client_id and rm.id_remis=r.id_remise  ") ); 

$nom = $nom." ".$prenom; 
?>
    <tr>
	<td>  <?=$nom?></td>
	<td><?=$rr['montant_remis'];?></td>
	</tr>
<?
}
?>	

</table>  


<?
}



if ($contrat_renouvelle==1) echo '<h2 align="center" style="margin-top:0">Rupture du contrat de travail (fin de la période d\'essai)</h2>
<form action="renouvellement-fin-pdf.php" method="GET" style="text-align:center;"><input type="hidden" name="inter_id" value="'.$_GET['interv_id'].'" />'.date_selection_html("inter_fin_", '').'<input type="submit" value="Générer PDF" class="bigbutton" onClick="this.disabled=true;this.form.submit();"></form>'; 

?>

</body></html>

AnonSec - 2021