<?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>