Reference :
 
De à (Format : AAAA-MM-JJ)
0) { $search = $_POST; /* echo "
";
			print_r($search);
			exit;
*/
			affiche_liste_commandes();		
		}		
	break;
	
	default :
		affiche_liste_commandes();
		break;
	break;
}

/******************************************************************************
 * FONCTIONS
 *****************************************************************************/
/*
 * Fonction affiche la liste des commandes
 */

function affiche_liste_commandes() { 
	
	global $search;
		
include("../mysql_inc.php");

	$WHERE = "";
	
	if(!empty($search['reference'])) { $WHERE .= " AND cmd.reference = '".$search['reference']."'";}
	if(!empty($search['country'])) { $WHERE .= " AND cmd.country_id = '".$search['country']."'";}
	if(!empty($search['servicespeed'])) { $WHERE .= " AND cmd.servicespeed = '".$search['servicespeed']."'";}
	if(!empty($search['status'])) { $WHERE .= " AND cmd.orderstate = '".$search['status']."'";}
	
	if(!empty($search['dateFrom']) && !empty($search['dateTo'])) { 
		
		if (preg_match("#^([0-9]{4})(-[0-9]{2}){2}$#", $search['dateFrom']) &&
			preg_match("#^([0-9]{4})(-[0-9]{2}){2}$#", $search['dateTo'])) {			
		
			$WHERE .= " AND cmd.dateordered BETWEEN  '".$search['dateFrom']."' AND '".$search['dateTo']."'";
		}
	}
	

	$result_commande = mysql_query("SELECT cmd.*, cntr.graydon_country, cmdd.* FROM commandes cmd 
						LEFT JOIN country cntr
							ON cntr.id = cmd.country_id
						LEFT JOIN commandes_detail cmdd
							ON cmdd.commandes_id = cmd.id
						WHERE 1 $WHERE 
						ORDER by dateordered						
						");
	
	if(mysql_num_rows($result_commande) == 0) {
		echo "
"; } while($commande = mysql_fetch_object($result_commande)) { ?> ".$pays['graydon_country'].""; } mysql_free_result($result_pays); mysql_close($connexion); } ?>
Date de la commande Reference Pays Reference Service commandé Prix de la commande Status de la commande Date due Actions

Aucune commande n'est enregistrée.

dateordered;?> reference;?> graydon_country;?> reference;?> servicespeed;?> prix;?> orderstate;?> datedue;?> commandes_id)) { echo "  Afficher Détails"; } else { ?> Afficher Détails Masquer Détails | Rapport
 
dIdentite : ".$commande->dIdentite."
"; echo "dTelephone : ".$commande->dTelephone."
"; echo "dEmail : ".$commande->dEmail."
"; echo "dFax : ".$commande->dFax."
"; echo "eLanguageCode : ".$commande->eLanguageCode."
"; echo "eName : ".$commande->eName; echo "eIdentifiers : ".$commande->eIdentifiers."
"; echo "eAdresse : ".$commande->eAdresse."
"; echo "eTelephone : ".$commande->eTelephone."
"; echo "eCreditOpinionCurrency : ".$commande->eCreditOpinionCurrency."
"; echo "eCreditOpinionPeriod : ".$commande->eCreditOpinionPeriod."
"; echo "eBankers : ".$commande->eBankers."
"; echo "eAttentionOf : ".$commande->eAttentionOf."
"; echo "eSpecialRemarks : ".$commande->eSpecialRemarks."
"; echo "commandes_id : ".$commande->commandes_id."
"; echo "CreditOpinionPeriod : ".$commande->eCreditOpinionPeriod."
"; echo "Date de commande : ".$commande->created_at; ?>