extranet/www/pages/international_identitec.php
2010-03-31 12:25:38 +00:00

35 lines
910 B
PHP

<?php
if ($_SESSION['connected'] == false) {
die();
}
require_once 'graydon/graydon_wsfunctions.php';
require_once 'dbbootstrap.php';
setDbConn('graydon');
$identifier = $_GET['identifier'];
$pidentifier = $_GET['pidentifier'];
print '<div id="center">';
// Verifier si on a un rapport
$rapports = Doctrine_Query::create()
->from('Report')
->where('identifier = ?', $identifier)
->orderby('id desc')
->execute();
if ($rapports != false && count($rapports) > 0) {
$commande_id = copieDesRapports($rapports[0]->order_id,
$identifier, $pidentifier);
} else {
$commande_id = getIdentite($identifier, $pidentifier);
}
if ($commande_id > 0) {
header('Location: ?page=international_commandes&id='.$commande_id);
print '<a href="?page=international_commandes&id='.$commande_id.
'">Veuillez suivre ce lien</a>';
}
print '</div>';
?>