[go: up one dir, main page]

Menu

[r20]: / clientsTable.php  Maximize  Restore  History

Download this file

50 lines (44 with data), 1.9 kB

 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
<?php
include('includes/databaseLogin.php');
include('includes/installedLanguage.php');
echo "<!DOCTYPE html>";
?>
<html>
<head>
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<?php
if(isset($_POST[sCode])){
echo "<table width=\"100%\" style=\"font-size:0.8em;\" cellspacing=\"5\">";
echo " <tr>";
echo " <td width=\"10%\"><b>" . _T("Surname") . "</td>";
echo " <td width=\"10%\"><b>" . _T("Name") . "</td>";
echo " <td width=\"35%\"><b>" . _T("Address") . "</td>";
echo " <td width=\"15%\"><b>" . _T("Em@il") . "</td>";
echo " <td width=\"10%\"><b>" . _T("Telephone num.") . "</td>";
echo " <td width=\"10%\"><b>" . _T("Mobile num.") . "</td>";
echo " <td width=\"10%\"><b>" . _T("Office num.") . "</td>";
echo " </tr>";
$cName = addslashes($_POST[name]);
$cSurname = addslashes($_POST[surname]);
$cCity = addslashes($_POST[city]);
$getClients = mysql_query("SELECT * FROM clients WHERE clientName REGEXP '^$cName' AND clientSurname REGEXP '^$cSurname' AND clientCity REGEXP '^$cCity' ORDER BY clientSurname");
while($row = mysql_fetch_array($getClients)) {
echo "<tr>";
echo "<td><a class=\"aClientNominative\" name=\"" . $row[clientID] . "\" href=\"#\">" . $row[clientSurname] . "</a></td>";
echo "<td><a class=\"aClientNominative\" name=\"" . $row[clientID] . "\" href=\"#\">" . $row[clientName] . "</a></td>";
echo "<td>" . $row[clientAddressLine1] . ", " . $row[clientAddressLine2] . ", " . $row[clientCity] . "," . $row[clientCountry] . ", " .$row[clientState] . "</td>";
echo "<td>" . $row[clientEmail] . "</td>";
echo "<td>" . $row[clientHomePhone] . "</td>";
echo "<td>" . $row[clientMobile] . "</td>";
echo "<td>" . $row[clientWorkNumber] . "</td>";
echo "</tr>";
}
echo "</table>";
}else{
//Error
}
?>
</body>
</html>