| Current Path : /var/www/cesa.co.za/php/ |
| Current File : /var/www/cesa.co.za/php/directorybooking.php |
<?php
die();
require("class.phpmailer.php");
include( 'inc_db.php' );
function XMail($to, $subject, $msg, $from, $CC, $type) {
$mail = new PHPMailer();
$mail->Mailer="mail";
if ($type=="html") $mail->IsHTML(true);
$mail->From = $from;
$mail->FromName = $from;
$arrto = explode(",",$to);
for ($i=0; $i<count($arrto); $i++) {
$mail->AddAddress($arrto[$i]);
}
$mail->Subject=$subject;
$mail->Body=$msg;
if (!$mail->Send()) echo $mail->ErrorInfo;
}
if (isset($_POST["mem"])) {
$sMsg='<table width="700" border="1" cellpadding="2">
<tbody>';
foreach ($_POST as $key=>$value) {
if (($key!="form_tools_form_id") && ($key!="Submit")) {
$sMsg.='<tr>
<td valign="top">'.str_replace("_"," ",$key).'</td>
<td valign="top">'.$value.'</td>
</tr>';
}
}
$sMsg.=' </tbody>
</table>
';
$subject="DoF Rate Card Booking - ";
$IsMember="N";
if ($_POST["mem"]==1) {
$subject.="Member";
$IsMember="Y";
} else {
$subject.="Non-Member";
}
$sql="INSERT INTO `AdvertBookings` (`CompanyName`, `ContactPerson`, `EmailAddress`, `Designation`, `OrderNo`, `VATNo`,
`PhysicalAddress`, `PostalAddress`, `TelNumber`, `FaxNumber`, `CellNumber`, `TypeOfAdvert`, `IsMember`)
VALUES ('".addslashes($_POST["Name_of_Firm"])."', '".addslashes($_POST["Contact_Person"])."',
'".addslashes($_POST["Email_Address"])."', '".addslashes($_POST["Designation"])."', '".addslashes($_POST["Order_No"])."',
'".addslashes($_POST["VAT_Registration_No"])."', '".addslashes($_POST["Physical_Address"])."',
'".addslashes($_POST["Postal_Address"])."', '".addslashes($_POST["Telephone_Number"])."',
'".addslashes($_POST["Fax_Number"])."', '".addslashes($_POST["Cell_Number"])."',
'".addslashes($_POST["Advert_Type"])."', '".$IsMember."')";
mysql_query($sql);
XMail("bonolo@cesa.co.za,athromethm@cesa.co.za,julia@xe.co.za,kea@swmcommunications.co.za", $subject, $sMsg, $_POST["Email_Address"], "", "html");
?>
<p><b>Thank you.</b></p>
<p>Kindly proceed with compiling artwork for the CESA Directory of Firms. For further details, please contact Bonolo Nkgodi, email: <a href="mailto:bonolo@cesa.co.za">bonolo@cesa.co.za</a></p>
<?php
} else {
?>
<style>
.textfieldRequiredMsg {
font-size:10px;color:red;
}
</style>
<form action="/directorybooking" method="post">
<input type="hidden" name="mem" value="<?php echo $_REQUEST["mem"]; ?>" />
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="24"> </td>
<td width="602"><h1>CESA Directory Advertising Booking Form</h1></td>
<td width="24"> </td>
</tr>
<tr>
<td valign="top"> </td>
<td valign="top"><table width="600" border="0" align="left" cellpadding="5" cellspacing="0">
<tr>
<td width="141" align="right">Company Name:</td>
<td width="414">
<span id="sprytextfield1">
<label for="Name of Firm"></label>
<input name="Name of Firm" type="text" id="Name of Firm" size="55" required />
<span class="textfieldRequiredMsg">Required.</span>
</span>
</td>
<td width="15"> </td>
</tr>
<tr>
<td align="right">Contact Person:</td>
<td> <span id="sprytextfield2">
<label for="Contact Person"></label>
<input name="Contact Person" type="text" id="Contact Person" size="55" required />
<span class="textfieldRequiredMsg">Required.</span>
</span></td>
<td> </td>
</tr>
<tr>
<td align="right">Email Address:</td>
<td><span id="sprytextfield3">
<label for="Email Address"></label>
<input name="Email Address" type="text" id="Email Address" size="55" required />
<span class="textfieldRequiredMsg">Required.</span>
</span></td>
<td> </td>
</tr>
<tr>
<td align="right">Designation:</td>
<td> <span id="sprytextfield4">
<label for="Designation"></label>
<input name="Designation" type="text" id="Designation" size="55" />
</span></td>
<td> </td>
</tr>
<tr>
<td align="right">Order No:</td>
<td> <span id="sprytextfield5">
<label for="Order No"></label>
<input name="Order No" type="text" id="Order No" size="55" />
</span></td>
<td> </td>
</tr>
<tr>
<td align="right">VAT Registration No:</td>
<td> <span id="sprytextfield6">
<label for="VAT Registration No"></label>
<input name="VAT Registration No" type="text" id="VAT Registration No" size="55" />
</span></td>
<td> </td>
</tr>
<tr>
<td align="right">Physical Address:</td>
<td><span id="sprytextarea1">
<label for="Physical Address"></label>
<textarea name="Physical Address" id="Physical Address" cols="40" rows="5"></textarea>
</span></td>
<td> </td>
</tr>
<tr>
<td align="right">Postal Address:</td>
<td><span id="sprytextarea2">
<label for="Postal Address"></label>
<textarea name="Postal Address" id="Postal Address" cols="40" rows="5"></textarea>
</span></td>
<td> </td>
</tr>
<tr>
<td align="right">Telephone Number:</td>
<td><span id="sprytextfield7">
<label for="Telephone Number"></label>
<input name="Telephone Number" type="text" id="Telephone Number" size="55" required />
<span class="textfieldRequiredMsg">Required.</span>
</td>
<td> </td>
</tr>
<tr>
<td align="right">Fax Number:</td>
<td><span id="sprytextfield8">
<label for="Fax Number"></label>
<input name="Fax Number" type="text" id="Fax Number" size="55" />
</span></td>
<td> </td>
</tr>
<tr>
<td align="right">Cell Number:</td>
<td><span id="sprytextfield9">
<label for="Cell Number"></label>
<input name="Cell Number" type="text" id="Cell Number" size="55" />
<!--<span class="textfieldRequiredMsg">This is required.</span>-->
</span></td>
<td> </td>
</tr>
<tr>
<td align="right" valign="top">Type of Advert:</td>
<td valign="top"><span id="spryselect1">
<label for="Advert Type"></label>
<select name="Advert Type" size="1" id="Advert Type" required>
<option value="Quarter Page">Quarter Page</option>
<option value="Half Page">Half Page</option>
<option value="Full Page">Full Page</option>
<option value="Page 1 (Full page)">Page 1 (Full page)</option>
<option value="Page 2 (Full page)">Page 2 (Full page)</option>
<option value="Inside Cover (Front and Back)">Inside Cover (Front and Back)</option>
<option value="Back Cover (Outside)">Back Cover (Outside)</option>
</select>
<span class="textfieldRequiredMsg">Required.</span>
</td>
<td> </td>
</tr>
<tr>
<td align="right"> </td>
<td colspan="2"><label for="Submit"></label>
<input type="submit" name="Submit" id="Submit" value="Submit" /></td>
</tr>
</table>
</td>
<td> </td>
</tr>
<tr>
<td valign="top"> </td>
<td valign="top"><p><br />
All prices are exclusive of agency commission and VAT. A detailed invoice will be issued (VAT Reg no. 4170109013)
upon receipt of this booking form.<br /><br />
Payments to CESA trading as SAACE by cheque or direct transfer to:
<br />
<strong>Bank:</strong> Nedbank <br />
<strong>Branch:</strong>Ferndale <br />
<strong>Account No.</strong>: 1922 019 801<br />
<strong>Branch Code</strong>: 1922 05<br />
<strong>Reference:</strong> DIREC2019_your company name</p>
<p> </p></td>
<td> </td>
</tr>
</table></form>
<?php
}
?>