コード例 #1
0
ファイル: get_data2.php プロジェクト: samkos/oyak-origin
    }
    if ($clients) {
        $table = "clients";
    }
    if ($fournisseurs) {
        $table = "fournisseurs";
    }
    if ($produits) {
        $table = "produits";
    }
    if ($table) {
        $query = "select min(timestamp),max(timestamp) from " . $prefixe_table . $table;
        //print $query;
        $req = mysql_query($query);
        while ($ligne = mysql_fetch_array($req)) {
            print date2string($ligne["min(timestamp)"]) . '!' . date2string($ligne["max(timestamp)"]) . '=';
            if ($header) {
                print "<BR>";
            }
        }
    }
} else {
    if ($vendeurs) {
        $query = "select id,nom,prenom,timestamp from " . $prefixe_table . "vendeurs {$where} order by nom ";
        //print $query;
        $req = mysql_query($query);
        while ($ligne = mysql_fetch_array($req)) {
            print $ligne["id"] . '!' . $ligne[nom] . '!' . $ligne[prenom] . '!' . $ligne[timestamp] . '=';
            if ($header) {
                print "<BR>";
            }
コード例 #2
0
ファイル: get_data.php プロジェクト: samkos/oyak-origin
 	  printf ("%s!%s!%04d!%s=",$ligne["societe"],$ligne[ville],$ligne[clef],date2string($ligne[timestamp]));
 	  if ($header) {print "<BR>";}
 	}
 }
 	 
 if ($produits) {
   $query="select barcode,clef,fournisseur,prix_vente_ht,prix_plancher_ht,prix_stock_ht,stock,poids,titre from ".$prefixe_table."produits $where" ;
 	//print $query;
   $req = mysql_query($query);
 	while($ligne = mysql_fetch_array($req))
 	{ 
 	  #print $ligne["barcode"].'!'.$ligne[clef].'!'.$ligne[fournisseur].'!'.$ligne[prix_vente_ht].'!'.$ligne[prix_plancher_ht].'!'.$ligne[titre].'=';
 		//$clef=substr($ligne["barcode"],2,5);
 		$clef=sprintf("%04d",$ligne["clef"]);
 		$fournisseur=substr($ligne["barcode"],7,5);
 	  printf ("%s!%d!%04d!%7.2f!%7.2f!%7.2f!%s!%s=",$ligne["barcode"],$ligne[clef],$ligne[fournisseur],$ligne[prix_vente_ht],$ligne[prix_plancher_ht],$ligne[poids],$ligne[titre],date2string($ligne[timestamp]));
 	  if ($header) {print "<BR>";}
 	}
 }
 
 if ($releases) {
 	   $files = glob("$release_dir/*");
 		$i=0;
     foreach ($files as $filename) {
 	 			$filename=str_replace("$release_dir/","",$filename);
 				if ($filename!="CVS") {
       	      print "$i!$filename=";
 							$i=$i+1;
 				}