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
| <?php
$userlog=&JFactory::getuser();
$emaillog=$userlog->email;
$connexion=odbc_connect($dsn,$user,$password) or die(odbc_error());
$requet="SELECT M.Contact, M.Collegue AS Technicien, ROUND(M.DateDep,'%d-%M-%Y') AS Date, M.Logiciel, M.Probleme, M.Resolution, M.Dateresolution AS Date_de_Resolution FROM maintenance M, Contact C WHERE M.iDCLIENT=C.CLCLEUNIK AND C.Email = '$emailconnected'";
$result=odbc_exec($connexion,$requet);
if(false !== $result)
{
if(odbc_num_rows($result) > 0)
{
echo '<h1 align="center">Liste des Maintenances<h1>';
echo '<table border="1" id="tableau">';
$row = odbc_fetch_array($result);
echo '<tr><th>', implode('</th><th>', array_keys($row)), '</th></tr>';
do
{
echo '<tr><td>', implode('</td><td>', $row), '</td></tr>';
}
while($row = odbc_fetch_array($result));
echo '</table>';
}
odbc_free_result($result);
}
?> |
Partager