1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
| <html>
<head>
<title>Appels - Suivis maintenance</title>
<head>
<?php require_once("navig.inc.php");
session_start();
?>
</head>
<body>
<?php
// SELECTIONNE L'ONGLET A AFFICHER
$_SESSION['menu']="apl";
require_once("menu.php");
$client=$_SESSION['clientselec'];
if ($_SESSION['clientselec']!="") {
?>
<center>
<a href="saisie/saisie.php?$elmt=incident" onclick="window.open(this.href,'exemple','height=520,width=420,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,status=no'); return false;">Enregistrer un incident </a>
|
<a href="listeappel.php" >Liste des appels</a></br>
|
<a href="recherche.php" >Rechercher</a></br>
</center>
<hr>
<table>
<?php
// On recherche tous les appels du client
$req="Select * from GRCAPPEL A, GRCINTERLOCUTEUR I where A.GAPINTERLOC=I.GILNO AND I.GILCLIENT=".$client." Order by A.GAPDATE desc";
$bdd->requeteLMD($req);
$nbapl=$bdd->retourneNombreLigne();
$resultapl= $bdd->resultat;
for ($a=0;$a < $nbapl; $a++)
{
$NumeroApl=$resultapl[$a]["GAPNO"];
$date=$resultapl[$a]["GAPDATE"];
$interlocuteur=$resultapl[$a]["GAPINTERLOC"];
$req="Select * from GRCINTERLOCUTEUR Where GILNO=".$interlocuteur; // On recherche l'interlocuteur
$bdd->requeteLMD($req);
$nbint=$bdd->retourneNombreLigne();
$resultint= $bdd->resultat;
for ($i=0;$i < $nbint; $i++)
{
$interlocuteur=$resultint[$i]["GILCIVIL"];
$interlocuteur=$interlocuteur." ".$resultint[$i]["GILNOM"];
}
// On recherche l'evenement d'apres son numero d'appel
$requete="Select * from GRCEVENEMENT where GEVAPPEL=".$NumeroApl;
$bdd->requeteLMD($requete);
$nbevt=$bdd->retourneNombreLigne();
$resultevt= $bdd->resultat;
for ($e=0;$e < $nbevt; $e++)
{
$EVTnum=$resultevt[$e]["GEVNO"];
}
// On recherche le module de l'appel
$req="Select * from grcmodule M,grcevenement E where GEVNO=".$EVTnum."
and E.gevmodule=M.grmno";
$bdd->requeteLMD($req);
$nbmod=$bdd->retourneNombreLigne();
$resultmod= $bdd->resultat;
$nummod=$resultmod[0]["GRMNO"];
$nommod=$resultmod[0]["GRMLIBELLE"];
$ligne='<tr><td>'.$date.'</td><td> -</td><td> Appel de </td><td>'.$interlocuteur.'</td><td></td><td> - </td><td>'.$nommod.'</td>';
// On régarde si il y a eu réponse au probleme
$req="Select * from GRCEVENEMENT Where GEVAPPEL=".$NumeroApl;
$bdd->requeteLMD($req);
$nbevnmt=$bdd->retourneNombreLigne();
$resultevnmt= $bdd->resultat;
for ($e=0;$e < $nbevnmt; $e++)
{
$question=(@$resultevnmt[$e]["GEVQUESTION"]);
$reponse=(@$resultevnmt[$e]["GEVREPONSE"]);
}
if (@$reponse==""){
$prob="Non résolu";}
Else { $prob="Résolu";}
if (@$question!="maj") {
echo $ligne.'<td> -</td><td> '.$prob.'</td>';
?>
<td><a href='suppression/suppression.php?num=<?php echo $NumeroApl; ?>' onclick="window.open(this.href,'exemple','height=300,width=300,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,status=no'); return false;"><img src='img/suppr.gif' title="Supprimer"></a><td>
<td><a href='detailappel.php?num=<?php echo $NumeroApl; ?>' onclick="window.open(this.href,'exemple','height=500,width=420,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,status=no'); return false;"><img src='img/modif.gif' title="Modifier"></a><br><td></tr>
<?php
}
echo '</p>';
}
?>
</table>
<?
}
else { echo "<br><br><center>Aucun client sélectionné</center>";}
require_once("pied.php");
?>
</body>
</html> |
Partager