Export de rapport format xml, doc et html.
This commit is contained in:
parent
a9c52bbbe4
commit
e466491dfe
@ -1,3 +1,8 @@
|
||||
<script language="javascript">
|
||||
function download(id, format) {
|
||||
location.href = 'modules/graydon/export.php?id=' + id + '&format=' + format;
|
||||
}
|
||||
</script>
|
||||
<form name="tri" action="./index.php?q=graydon/commandes" method="post">
|
||||
<input type="hidden" name="mode" value="search" />
|
||||
<table border="0" width="50%" cellspacing="2" cellpadding="3">
|
||||
@ -47,6 +52,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Date de la commande</th>
|
||||
@ -114,11 +120,19 @@ include("../mysql_inc.php");
|
||||
}
|
||||
|
||||
|
||||
$result_commande = mysql_query("SELECT cmd.*, cntr.graydon_country, cmdd.* FROM commandes cmd
|
||||
$result_commande = mysql_query("
|
||||
SELECT cmd.*
|
||||
, cntr.graydon_country
|
||||
, cmdd.*
|
||||
, rpt.id as id_rapport, rpt.content, rpt.format, rpt.order_id
|
||||
FROM commandes cmd
|
||||
LEFT JOIN country cntr
|
||||
ON cntr.id = cmd.country_id
|
||||
LEFT JOIN commandes_detail cmdd
|
||||
ON cmdd.commandes_id = cmd.id
|
||||
LEFT JOIN report rpt
|
||||
ON rpt.order_id = cmd.id
|
||||
|
||||
WHERE 1 $WHERE
|
||||
ORDER by dateordered
|
||||
");
|
||||
@ -181,7 +195,14 @@ display:none;
|
||||
<a href="Javascript:;" class="closeBtn<?=$commande->id;?>">Masquer Détails</a>
|
||||
<?php } ?>
|
||||
|
||||
| <a href="">Rapport</a>
|
||||
| <?php
|
||||
if(is_null($commande->order_id)) {
|
||||
echo "<font color=\"gray\">Rapport</font>";
|
||||
}
|
||||
else {
|
||||
?>
|
||||
<a href="Javascript:download('<?=$commande->id_rapport?>', '<?=$commande->format?>');">Rapport</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user