| Current Path : /var/www/cesa.co.za/php/ |
| Current File : /var/www/cesa.co.za/php/awardsentry.php.bak |
<?php
require("class.phpmailer.php");
$sErrors="";
$bDisplayForm=true;
function XMail($to, $subject, $msg, $from, $CC, $type) {
$mail = new PHPMailer();
$mail->Mailer = "mail";
//$mail->Host = "smtp-relay.za24.co.za";
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["go"]) && ($_POST["go"]==1)) {
if (empty($_POST["Contact_Email"])) {
$sErrors.="<li>Please enter your email address</li>";
}
if ($_POST["Agree_To_Rules"]!="Yes") {
$sErrors.="<li>Please accept the rules</li>";
}
if (empty($sErrors)) {
$sMsg='<table width="700" border="1" cellpadding="2">
<tbody>
<tr>
<td width="329" valign="top">Name of CESA Member Firm submitting the entry</td>
<td colspan="2" valign="top">'.$_POST["Firm_Name"].'</td>
</tr>
<tr>
<td valign="top">Name of Award Category (e.g. Projects > R100M)</td>
<td colspan="2" valign="top">'.$_POST["Award_Category"].'</td>
</tr>
<tr>
<td valign="top">Name of Project Entered</td>
<td colspan="2" valign="top">'.$_POST["Project_Name"].'</td>
</tr>
<tr>
<td valign="top">Start Date of Project</td>
<td colspan="2" valign="top">'.$_POST["Start_Date"].'</td>
</tr>
<tr>
<td valign="top">Completion Date of Project i.e. hand-over to client<br>
(Client must confirm completion date on consent letter)</td>
<td colspan="2" valign="top">'.$_POST["Completion_Date"].'</td>
</tr>
<tr>
<td valign="top">Name and Contact Details for Lead Consultant</td>
<td width="99">Name:<br>
Tel. Office:<br>
Mobile:<br>
Email:</td>
<td width="252">'.$_POST["Lead_Consultant_Name"].'
<br>
'.$_POST["Lead_Consultant_Tel"].'
<br>
'.$_POST["Lead_Consultant_Mobile"].'
<br>
'.$_POST["Lead_Consultant_Email"].'</td>
</tr>
<tr>
<td valign="top">Your Role in the Project</td>
<td colspan="2">'.$_POST["Role_In_Project"].'</td>
</tr>
<tr>
<td valign="top">List of JV Partners (CESA Members Only)</td>
<td colspan="2">'.$_POST["JV_Partners"].'
</p></td>
</tr>
<tr>
<td valign="top">Letter of Consent from JV partners sent?</td>
<td colspan="2">'.$_POST["JV_Consent"].'</td>
</tr>
<tr>
<td valign="top">Name of Client / Company / Mentor / Young Engineer being Nominated</td>
<td colspan="2" valign="top">'.$_POST["Nominee_Name"].'</td>
</tr>
<tr>
<td valign="top">Letter of Consent from nominee / client sent?</td>
<td colspan="2" valign="top">'.$_POST["Nominee_Consent"].'</td>
</tr>
<tr>
<td valign="top">Description of Project or Motivation for Nominee sent<br>
Minimum 1 x A4, Arial 10</td>
<td colspan="2" valign="top">'.$_POST["Description_Sent"].'</td>
</tr>
<tr>
<td valign="top">Contact Details for person submitting this entry</td>
<td>Name:<br>
Job Title:<br>
Tel. Office:<br>
Mobile:<br>
Email:</td>
<td>'.$_POST["Contact_Name"].'
<br>
'.$_POST["Contact_Job_Title"].'
<br>
'.$_POST["Contact_Tel"].'
<br>
'.$_POST["Contact_Mobile"].'
<br>
'.$_POST["Contact_Email"].'</td>
</tr>
<tr>
<td valign="top">Would you like an A1 poster at a cost of R2 800.00 excl VAT?</td>
<td>'.$_POST["A1_Poster_Required"].'</td>
<td>Quantity:
'.$_POST["Quantity"].'</td>
</tr>
</tbody>
</table>
';
XMail("bonolo@cesa.co.za,patriciaf@cesa.co.za,athromethm@cesa.co.za,julia@xe.co.za", "Online Awards Entry", $sMsg, $_POST["Contact_Email"], "", "html");
$bDisplayForm=false;
echo "<p><b>Thank you for submitting your pre-entry.</b></p>";
}
}
?>
<p>Please send the following <strong>required</strong> documents by email to <a href="mailto:bonolo@cesa.co.za">bonolo@cesa.co.za</a>:</p>
<ul>
<li>Letters of consent from nominee / client, and JV partners</li>
<li>Description of project or motivation for nominee (minimum 1 x A4, Arial 10)</li>
</ul>
<?php
if ($bDisplayForm) {
if (!empty($sErrors)) {
?>
<p style='color:red'>Please correct the following errors:</p>
<ul style='color:red'>
<?php
echo $sErrors;
?>
</ul>
<?php
}
?>
<form method="post" action="/node/572">
<input type="hidden" name="go" value="1">
<table width="700" border="1" cellpadding="2">
<tbody>
<tr>
<td width="329" valign="top">Name of CESA Member Firm submitting the entry</td>
<td colspan="2" valign="top"><input type="text" name="Firm_Name" id="Firm_Name" size="50" value="<?php echo $_POST["Firm_Name"]; ?>"></td>
</tr>
<tr>
<td valign="top">Award Category</td>
<td colspan="2" valign="top"><select name="Award_Category" id="Award_Category">
<?php
$arrCats=array('Project with a value greater than R250 million', 'Project with a value between R50 million and R250 million', 'Project with a value less than R50 million', 'Best International Project', 'Business Excellence Award', 'Young Company of the Year', 'Mentoring Company of the Year', 'Young Engineer of the Year', 'Mentor of the Year', 'Visionary Client of the Year');
foreach ($arrCats as $value) {
echo '<option value="'.$value.'"';
if ($value==$_POST["Award_Category"]) echo ' selected';
echo '>'.$value.'</option>';
}
?></select></td>
</tr>
<tr>
<td valign="top">Name of Project Entered</td>
<td colspan="2" valign="top"><input type="text" name="Project_Name" id="Project_Name" size="50" value="<?php echo $_POST["Project_Name"]; ?>"></td>
</tr>
<tr>
<td valign="top">Start Date of Project</td>
<td colspan="2" valign="top"><input type="text" name="Start_Date" id="Start_Date" size="50" value="<?php echo $_POST["Start_Date"]; ?>"></td>
</tr>
<tr>
<td valign="top">Completion Date of Project i.e. hand-over to client<br>
(Client must confirm completion date on consent letter)</td>
<td colspan="2" valign="top"><input type="text" name="Completion_Date" id="Completion_Date" size="50" value="<?php echo $_POST["Completion_Date"]; ?>"></td>
</tr>
<tr>
<td valign="top">Name and Contact Details for Lead Consultant</td>
<td width="99">Name:<br>
Tel. Office:<br>
Mobile:<br>
Email:</td>
<td width="252"><input type="text" name="Lead_Consultant_Name" id="Lead_Consultant_Name" size="40" value="<?php echo $_POST["Lead_Consultant_Name"]; ?>">
<br>
<input type="text" name="Lead_Consultant_Tel" id="Lead_Consultant_Tel" size="40" value="<?php echo $_POST["Lead_Consultant_Tel"]; ?>">
<br>
<input type="text" name="Lead_Consultant_Mobile" id="Lead_Consultant_Mobile" size="40" value="<?php echo $_POST["Lead_Consultant_Mobile"]; ?>">
<br>
<input type="text" name="Lead_Consultant_Email" id="Lead_Consultant_Email" size="40" value="<?php echo $_POST["Lead_Consultant_Email"]; ?>"></td>
</tr>
<tr>
<td valign="top">Your Role in the Project</td>
<td colspan="2"><input type="text" name="Role_In_Project" id="Role_In_Project" size="50" value="<?php echo $_POST["Role_In_Project"]; ?>"></td>
</tr>
<tr>
<td valign="top">List of JV Partners (CESA Members Only)</td>
<td colspan="2"><p>
<textarea name="JV_Partners" id="JV_Partners" cols="45" rows="5"><?php echo $_POST["JV_Partners"]; ?></textarea>
</p></td>
</tr>
<tr>
<td valign="top">Letter of Consent from JV partners sent?</td>
<td colspan="2"><input name="JV_Consent" type="checkbox" id="JV_Consent" value="Yes"<?php if ($_POST["JV_Consent"]=="Yes") echo " checked"; ?>> Yes</td>
</tr>
<tr>
<td valign="top">Name of Client / Company / Mentor / Young Engineer being Nominated</td>
<td colspan="2" valign="top"><input type="text" name="Nominee_Name" id="Nominee_Name" size="50" value="<?php echo $_POST["Nominee_Name"]; ?>"></td>
</tr>
<tr>
<td valign="top">Letter of Consent from nominee / client sent? (<em>Not required for Visionary Client of the Year category)</em></td>
<td colspan="2" valign="top"><input name="Nominee_Consent" type="checkbox" id="Nominee_Consent" value="Yes"<?php if ($_POST["Nominee_Consent"]=="Yes") echo " checked"; ?>>
Yes</td>
</tr>
<tr>
<td valign="top">Description of Project or Motivation for Nominee sent<br>
Minimum 1 x A4, Arial 10</td>
<td colspan="2" valign="top"><input name="Description_Sent" type="checkbox" id="Description_Sent" value="Yes"<?php if ($_POST["Description_Sent"]=="Yes") echo " checked"; ?>>
Yes</td>
</tr>
<tr>
<td valign="top">Contact Details for person submitting this entry</td>
<td>Name:<br>
Job Title:<br>
Tel. Office:<br>
Mobile:<br>
Email:</td>
<td><input type="text" name="Contact_Name" id="Contact_Name" size="40" value="<?php echo $_POST["Contact_Name"]; ?>">
<br>
<input type="text" name="Contact_Job_Title" id="Contact_Job_Title" size="40" value="<?php echo $_POST["Contact_Job_Title"]; ?>">
<br>
<input type="text" name="Contact_Tel" id="Contact_Tel" size="40" value="<?php echo $_POST["Contact_Tel"]; ?>">
<br>
<input type="text" name="Contact_Mobile" id="Contact_Mobile" size="40" value="<?php echo $_POST["Contact_Mobile"]; ?>">
<br>
<input type="text" name="Contact_Email" id="Contact_Email" size="40" value="<?php echo $_POST["Contact_Email"]; ?>"></td>
</tr>
<tr>
<td valign="top">Would you like an A1 poster at a cost of R2 800.00 excl VAT?</td>
<td><input name="A1_Poster_Required" type="checkbox" id="A1_Poster_Required" value="Yes"<?php if ($_POST["A1_Poster_Required"]=="Yes") echo " checked"; ?>>
Yes</td>
<td>Quantity:
<input type="text" name="Quantity" id="Quantity" size="40" value="<?php echo $_POST["Quantity"]; ?>"></td>
</tr>
<tr>
<td valign="top"> </td>
<td> </td>
<td> </td>
</tr>
<tr valign="top">
<td colspan="3"><p>
<input name="Agree_To_Rules" type="checkbox" id="Agree_To_Rules" value="Yes"<?php if ($_POST["Agree_To_Rules"]=="Yes") echo " checked"; ?>>
I agree to abide by the rules and regulations of the CESA Aon Engineering Excellence Awards and also pay a non refundable deposit of R4 005.00 (excluding VAT) on submission of this Pre-entry form. This amounts to 30% of the total entry fee.<br>
The balance of R8 800.00 (excluding VAT), I agree to pay on invitation to submit a full entry if all criteria for full entry are met.</p></td>
</tr>
<tr valign="top">
<td colspan="3" align="center"><input type="submit" name="submit" id="submit" value="Submit"></td>
</tr>
<tr valign="top">
<td colspan="3"><p>Please take note of the following:</p>
<ul>
<li>This is a preliminary entry only and indicates your intention to submit a full entry at a later stage in accordance with the rules of the competition.</li>
<li>Once the Awards Committee has reviewed your pre-entry form/s, an email of confirmation will be sent to you, should your entry/entries be successful by no later than Wednesday, 13th April 2016.</li>
<li>Incomplete or late entries will not be considered.</li>
<li>If your pre-entry is successful, the full entry will be required by Wednesday, 25th May 2016.</li>
</ul></td>
</tr>
</tbody>
</table>
</form>
<?php
}
?>