2009-12-04 17:17:09 +00:00
|
|
|
|
<?php
|
|
|
|
|
/*
|
|
|
|
|
* Liste des commandes pass<EFBFBD>es sur infogreffe
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
?>
|
|
|
|
|
<div id="center">
|
|
|
|
|
<h1>Commandes INFOGREFFE</h1>
|
|
|
|
|
<?php
|
2010-01-06 12:39:08 +00:00
|
|
|
|
$usersAuthorized = array('fzicaro','jmartory','mheitz','mricois','ylenaour','mpurcarin','aegasse','mfuret');
|
2009-12-04 17:17:09 +00:00
|
|
|
|
if (!$_SESSION['connected'])
|
|
|
|
|
{
|
|
|
|
|
echo 'Vous devez <20>tre connect<63> afin de pouvoir utiliser cette fonctionnalit<69>';
|
|
|
|
|
}
|
|
|
|
|
elseif(!in_array($_SESSION['tabInfo']['login'], $usersAuthorized))
|
|
|
|
|
{
|
|
|
|
|
echo 'L\'acc<63>s <20> cette page est restreint';
|
|
|
|
|
}
|
|
|
|
|
//Affichage des commandes
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
isset($_REQUEST['num'])? $num = trim($_REQUEST['num']) : $num = '';
|
|
|
|
|
isset($_REQUEST['siren'])? $siren = trim(preg_replace('/[^0-9]/', '', $_REQUEST['siren'])) : $siren = '';
|
|
|
|
|
?>
|
|
|
|
|
<div class="block">
|
|
|
|
|
<form name="" method="post" action="./?page=greffescmd">
|
2009-12-11 12:44:15 +00:00
|
|
|
|
<label>Num<EFBFBD>ro de gestion</label> <input type="text" name="num" value="<?=$num?>"/>
|
|
|
|
|
<label>Siren</label> <input type="text" name="siren" value="<?=$siren?>" />
|
|
|
|
|
<br/>
|
2009-12-04 17:17:09 +00:00
|
|
|
|
<input type="submit" name="submit" value="Rechercher"/>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
if(!empty($num) || !empty($siren))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
require_once 'dbbootstrap.php';
|
2009-12-17 09:31:33 +00:00
|
|
|
|
require_once 'infogreffe/constantes.php';
|
|
|
|
|
|
2009-12-04 17:17:09 +00:00
|
|
|
|
setDbConn('sdv1');
|
|
|
|
|
if( !empty($siren) && empty($num) )
|
|
|
|
|
{
|
|
|
|
|
$q = Doctrine_Query::create()->from('Commandes')->where('siren = ?', $siren);
|
|
|
|
|
}elseif( empty($siren) && !empty($num) ){
|
|
|
|
|
$q = Doctrine_Query::create()->from('Commandes')->where('idCommande = ?', $num);
|
|
|
|
|
}else{
|
|
|
|
|
$q = Doctrine_Query::create()->from('Commandes')->where('siren = ?', $siren)->andWhere('idCommande = ?', $num);
|
|
|
|
|
}
|
|
|
|
|
$commandes = $q->execute();
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
<div class="block">
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
2009-12-11 12:44:15 +00:00
|
|
|
|
<th>N<EFBFBD>Gestion</th>
|
2009-12-04 17:17:09 +00:00
|
|
|
|
<th>Siren</th>
|
2009-12-11 12:44:15 +00:00
|
|
|
|
<th>Email</th>
|
|
|
|
|
<th>Ref</th>
|
2009-12-17 09:31:33 +00:00
|
|
|
|
<th>Type</th>
|
2009-12-11 12:44:15 +00:00
|
|
|
|
<th>Lib</th>
|
2009-12-04 17:17:09 +00:00
|
|
|
|
<th>dateCommande</th>
|
|
|
|
|
<th>dateReception</th>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php
|
|
|
|
|
foreach($commandes as $commande)
|
|
|
|
|
{
|
|
|
|
|
?>
|
|
|
|
|
<tr>
|
2009-12-11 12:44:15 +00:00
|
|
|
|
<td>G<?=$commande->idCommande?></td>
|
2009-12-17 11:07:15 +00:00
|
|
|
|
<td><a href="./?page=greffes&vue=actes&siret=<?=$commande->siren?>" target="_blank"><?=$commande->siren?></a></td>
|
2009-12-04 17:17:09 +00:00
|
|
|
|
<td><?=$commande->emailCommande?></td>
|
2009-12-17 09:31:33 +00:00
|
|
|
|
<td><?=$commande->refDocument?></td>
|
2009-12-17 10:17:13 +00:00
|
|
|
|
<td><?=(array_key_exists('a'.substr($commande->refDocument, 0, 2), $typeActes)) ? $typeActes['a'.substr($commande->refDocument, 0, 2)] : ''; ?></td>
|
2009-12-11 12:44:15 +00:00
|
|
|
|
<td><?=$commande->libDocument?></td>
|
2009-12-04 17:17:09 +00:00
|
|
|
|
<td><?=$commande->dateCommande?></td>
|
|
|
|
|
<td><?=$commande->dateReception?></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
} // Fin permission d'acc<63>s
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|