454 |
454 |
|
455 |
455 |
if (!haveRight("computer","r")) return false;
|
456 |
456 |
|
457 |
|
$query = "SELECT code,activation_date,g.name as installateur FROM glpi_plugin_anet_epacks
|
|
457 |
$query = "SELECT code,activation_date,FK_contract as contract,g.name as installateur FROM glpi_plugin_anet_epacks
|
458 |
458 |
LEFT JOIN glpi_entities AS g ON FK_activation=g.ID
|
459 |
459 |
WHERE FK_enduser=".$instID;
|
460 |
460 |
// print $query;
|
... | ... | |
467 |
467 |
if ($number > 0) {
|
468 |
468 |
echo "<br><div align='center'><table class='tab_cadre' align='center' width='95%'>";
|
469 |
469 |
echo "<tr>";
|
470 |
|
echo "<th colspan='3'>Epack et Installation - <a href=\"".$CFG_GLPI["root_doc"]."/plugins/anet_epacks/front/plugin_anet_epacks.out_of_maintenance.php?code=" . $DB->result($result, $i, "code") . "\" target=\"_blank\">[marquer hors maintenance]</a> - </th>";
|
|
470 |
echo "<th colspan='4'>Epack et Installation</th>";
|
471 |
471 |
echo "</tr>";
|
472 |
472 |
while($i < $number) {
|
473 |
473 |
echo "<tr class='tab_bg_2'>";
|
474 |
|
echo "<td width=\"33%\">".$DB->result($result, $i, "code")."</td>";
|
475 |
|
echo "<td width=\"33%\">Date d'activation: ".$DB->result($result, $i, "activation_date")."</td>";
|
476 |
|
echo "<td width=\"33%\">Installateur: ".$DB->result($result, $i, "installateur")."</td>";
|
|
474 |
echo "<td width=\"20%\">".$DB->result($result, $i, "code")."</td>";
|
|
475 |
echo "<td width=\"20%\">Date d'activation: ".$DB->result($result, $i, "activation_date")."</td>";
|
|
476 |
echo "<td width=\"20%\">Installateur: ".$DB->result($result, $i, "installateur")."</td>";
|
|
477 |
if($DB->result($result, $i, "contract") < 0)
|
|
478 |
echo "<td width=\"20%\"><a href=\"".$CFG_GLPI["root_doc"]."/plugins/anet_epacks/front/plugin_anet_epacks.out_of_maintenance.php?status=renewmaintenance&code=" . $DB->result($result, $i, "code") . "\" target=\"_blank\">[remarquer sous maintenance]</a> </td>";
|
|
479 |
if($DB->result($result, $i, "contract") >= 0)
|
|
480 |
echo "<td width=\"20%\"><a href=\"".$CFG_GLPI["root_doc"]."/plugins/anet_epacks/front/plugin_anet_epacks.out_of_maintenance.php?status=outofmaintenance&code=" . $DB->result($result, $i, "code") . "\" target=\"_blank\">[marquer hors maintenance]</a> </td>";
|
477 |
481 |
echo "</tr>";
|
478 |
482 |
$i++;
|
479 |
483 |
}
|