</td>
</tr>
<tr>
<td colspan="7" align="center">
<table width="100%" align="center" cellpadding="10" cellspacing="0" class="blue" style="border: solid 2px black;">
<tr>
<td>
<table align="right" cellpadding="10" cellspacing="0">
<tr>
<td>
<?
// bottom row of table (ie total etc)
Print("<td> </td><td align ='center'>Sub Total</td><td> </td><td>$".number_format($grand,2)."</td></tr></table>");
?>
</tr>
</td>
</table>
</tr>
</td>
<tr>
<td colspan="7" align="center">
<table width="100%" align="center" cellpadding="10" cellspacing="0" class="blue" style="border: solid 2px black;">
<tr>
<td>
<table align="right" cellpadding="10" cellspacing="0">
<tr>
<td>
<?
$gst = ($grand * .10);
Print("<td> </td><td align ='center'>+ 10% Gst</td><td> </td><td>$".number_format($gst,2)."</td></tr></table>");
?>
</tr>
</td>
</table>
</tr>
</td>
<tr>
<td colspan="7" align="center">
<table width="100%" align="center" cellpadding="10" cellspacing="0" class="blue" style="border: solid 2px black;">
<tr>
<td>
<table align="right" cellpadding="10" cellspacing="0">
<tr>
<td>
<?
$postage = ($count * 4.95);
Print("<td> </td><td align ='center'>Postage</td><td> </td><td>$".number_format($postage,2)."</b></td></tr></table></b>");
?>
</tr>
</td>
</table>
</tr>
</td>
<tr>
<td colspan="7" align="center">
<table width="100%" align="center" cellpadding="10" cellspacing="0" class="blue" style="border: solid 2px black;">
<tr>
<td>
<table align="right" cellpadding="10" cellspacing="0">
<tr>
<td>
<?
$final = ($gst + $grand + $postage);
Print("<td> </td><td align ='center'><b>Grand Total</td><td> </td><td><b>$".number_format($final,2)."</b></td></tr></table></b>");
}
?>
</tr>
</td>
</table>
<!-- start of input-->
<tr>
<td colspan="7" align="center">
<table width="100%" align="center" cellpadding="10" cellspacing="0" class="blue" style="border: solid 2px black;">
<tr>
<td align ="center" colspan="2"><h2><a name="details">Please Enter Your Details</h2></a></td>
</tr>
<tr>
<td colspan="2">
<form name="client" action="ch2.php" method="post">
<table cellpadding="2" cellspacing="0" align="center" class="blue" width="500">
<tr>
<td align="right" class="formtext">First Name : </td>
<td align="left"><input type="text" name="fname" class="form" size="30" value="<?=$_REQUEST["fname"]?>"></td>
<?
if (!preg_match("/^[a-z ]+$/i", $_REQUEST["fname"]))
{
echo'<input type="hidden" name="notgood" value="notgood">';
$count = $count - 1;
if ($firstimeround == "off")
{
print("<td class='formtextred'><-- First Name missing</td></tr>");
echo'<input type="hidden" name="notgood" value="notgood">';
}
}
?>
<tr>
<td align="right" class="formtext">Last Name : </td>
<td align="left"><input type="text" name="lname" class="form" value="<?=$_REQUEST["lname"]?>" size="30"></td>
<?
if (!preg_match("/^[a-z ]+$/i", $_REQUEST["lname"]))
{
echo'<input type="hidden" name="notgood" value="notgood">';
if ($firstimeround == "off")
{
print("<td class='formtextred'><-- Last Name missing</td></tr>");
echo'<input type="hidden" name="notgood" value="notgood">';
}
}
?>
<tr>
<td align="right" class="formtext">Phone Number : </td>
<td align="left"><input type="text" name="phone" size="30" class="form" value="<?=$_REQUEST["phone"]?>"></td>
<?
if (!preg_match("/^[0-9\ ]+[0-9\ ]$/", $_REQUEST["phone"]))
{
echo'<input type="hidden" name="notgood" value="notgood">';
if ($firstimeround == "off")
{
print("<td class='formtextred'><-- Phone # missing</td></tr>");
echo'<input type="hidden" name="notgood" value="notgood">';
}
}
?>
<tr>
<td align="right" class="formtext">Email Address : </td>
<td align="left"><input type="text" name="email" size="30" class="form" value="<?=$_REQUEST["email"]?>"></td>
<?
if (!preg_match("/^[a-z0-9\_\.\-]{2,}\@[a-z0-9\-]{2,}(\.[a-z0-9\-]{2,})+$/i", $_REQUEST["email"]))
{
echo'<input type="hidden" name="notgood" value="notgood">';
if ($firstimeround == "off")
{
print("<td class='formtextred'><-- Email Invalid</td></tr>");
echo'<input type="hidden" name="notgood" value="notgood">';
}
}
else if (DupeEmail($_REQUEST['email']))
{
Print("<td class='formtextred'>Sorry the Email Address entered is already in the system, please try another.</td></tr>");
echo'<input type="hidden" name="notgood" value="notgood">';
}
?>
<tr>
<td align="right" class="formtext">Street Number / Name : </td>
<td align="left"><input type="text" name="street" size="30" class="form" value="<?=$_REQUEST["street"]?>"></td>
<?
if (!$street)
{
echo'<input type="hidden" name="notgood" value="notgood">';
if ($firstimeround == "off")
{
print("<td class='formtextred'><-- Street Name missing</td></tr>");
echo'<input type="hidden" name="notgood" value="notgood">';
}
}
?>
<tr>
<td align="right" class="formtext">City : </td>
<td align="left"><input type="text" name="city" size="30" class="form" value="<?=$_REQUEST["city"]?>"></td>
<?
if (!preg_match("/^[a-z0-9\- ]+[a-z0-9\ ]+[a-z0-9\- ]+[a-z0-9\- ]+$/i", $_REQUEST["city"]))
{
echo'<input type="hidden" name="notgood" value="notgood">';
if ($firstimeround == "off")
{
print("<td class='formtextred'><-- City missing</td></tr>");
echo'<input type="hidden" name="notgood" value="notgood">';
}
}
?>
<tr>
<td align="right" class="formtext">State: </td>
<td align="left"><input type="text" name="state" size="30" class="form" value="<?=$_REQUEST["state"]?>"></td>
<?
if (!preg_match("/^[a-z ]+[a-z ]+[a-z ]+$/i", $_REQUEST["state"]))
{
echo'<input type="hidden" name="notgood" value="notgood">';
if ($firstimeround == "off")
{
print("<td class='formtextred'><-- State missing</td></tr>");
echo'<input type="hidden" name="notgood" value="notgood">';
}
}
?>
<tr>
<td align="right" class="formtext">Post Code: </td>
<td align="left"><input type="text" name="postcode" size="30" class="form" value="<?=$_REQUEST["postcode"]?>"></td>
<?
if (!preg_match("/^[0-9]+$/", $_REQUEST["postcode"]))
{
echo'<input type="hidden" name="notgood" value="notgood">';
if ($firstimeround == "off")
{
print("<td class='formtextred'><-- Postcode missing</td></tr>");
echo'<input type="hidden" name="notgood" value="notgood">';
}
}
?>
<tr>
<td align="right" class="formtext">Country: </td>
<td align="left"><input type="text" name="country" size="30" class="form" value="<?=$_REQUEST["country"]?>"></td>
<?
if (!preg_match("/^[a-z ]+[a-z ]+[a-z ]$/i", $_REQUEST["country"]))
{
echo'<input type="hidden" name="notgood" value="notgood">';
if ($firstimeround == "off")
{
print("<td class='formtextred'><-- Country missing</td></tr>");
echo'<input type="hidden" name="notgood" value="notgood">';
}
}
?>
<tr>
</tr>
</table>
<tr>
</tr>
</table>
<br><br>
<table width="100%" align="center" border="0" cellpadding="10" cellspacing="0" class="blue" style="border: solid 2px black;">
<tr height="60">
<?
if (!isset($payment))
{
echo'<input type="hidden" name="notgood" value="notgood">';
if ($firstimeround == "off")
{
echo '<td class="formtextred" align="center">Please choose a payment method.</td></tr>';
echo'<input type="hidden" name="notgood" value="notgood">';
}
}
?>
<td align="center"><b>Select Payment Method</b><br><br>
<input type="radio" name="payment" value="deposit"> Bank Deposit
<input type="radio" name="payment" value="cheque"> Cheque
</td>
</tr>
</table>
<br><br>
<table width="100%" align="center" border="1" cellpadding="10" cellspacing="0" class="greycell" style="border: solid 2px black;">
<tr height="60">
<td align="center"><textarea name="comments" rows="10" cols="100" class="form"><? if (isset($comments)) {
echo $comments;
}
else
{
echo "Enter Your Comments";
}
?></textarea>
</td>
</tr>
</table>
<br><Br>
<table width="100%" align="center" border="1" cellpadding="10" cellspacing="0" class="description1" style="border: solid 2px black;">
<?$final = number_format($final,2);
echo'<input type="hidden" name="totalcost" value="'.$final.'">';?>
<tr>
<td colspan="2" align="center"><input type="submit" value="Submit" class="form">
<input type="hidden" name="firstimeround" value="off">
</form>
</td>
</tr>
</table>
</td>
</tr>
<!---- start of client input -->
<!-- end of client input -->
</td>
</tr>
</table>
</td>
</tr>
<?
include("footer.php");