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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8?" />
<meta charset="utf-8?" /><link rel="stylesheet" href="css/style.css" />
<title>Recherche par nom</title>
<link rel="stylesheet" href="css/themes/my-custom-theme.css" />
<link rel="stylesheet" href="js/jquery.mobile-1.3.1.min.css" />
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery.mobile-1.3.1.min.js"></script>
</head>
<body>
<div id="bloc_page">
<h1 class="visualisation">Recherche par nom Fax </h1>
<section>
<fax_recherche>
<?PHP
$filename ='C:\wamp\www\Essai\faxarchive.mdb';
$connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=$filename","","");
$sql="SELECT DISTINCT sender_name FROM `fm_faxout` ORDER BY sender_name ASC";
$result = odbc_exec($connection , $sql) or die("L'instruction SQL a échoué.");
function showTable($result)
{ echo "<TABLE id='table_user' border = '1' cellspacing='5' >"; // border = '1' align='center' height='272' cellspacing=0 cellpadding=2 width=100%
$i=0;
while( $row = odbc_fetch_array($result) )
{
if (($i % 3) ==0){echo "<TR>";}
$user= $row["sender_name"];
echo "<TD id = 'user'>$user";
$name = str_replace(" ","+",$user);
echo "<a href='./admin/recherche2.php?search=$name'><img src='./pics/unknown_user.jpg' id = 'user1'></a>";
echo "</TD>";
if (($i % 3) ==2){echo "</TR>";}
$i++;
}
echo "</TABLE>";
}
?>
<?PHP showTable($result); ?>
</fax_recherche>
<menu>
<?PHP include "test_listbox.html";?>
</menu>
</section>
<?php odbc_close($connection); ?>
</div>
</body>
</html> |
Partager