Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/relay/include/
Upload File :
Current File : /var/www/cesa.co.za/relay/include/mailer.php

<?php
  session_start();
  $admin_email='events@cesa.co.za';
  require('db.php');
$standquery="SELECT * FROM saace_areas WHERE id='".$_GET['id']."'";
$standres=mysql_query($standquery);
if ($standres) {
  $standrow=mysql_fetch_assoc($standres);
  $total=4000;
  if ($standrow['tent']==1) {
    $total+=950;
  } elseif ($standrow['tent']==2) {
    $total+=1100;
  }
  $total+=($standrow['chairs']*4.5);
  $total+=($standrow['tbles']*15);
  $total+=($standrow['rubbish']*17.50);
  $total+=($standrow['bath']*24);
  
  $costs="Stand ".$standrow['name']." : R4000<br/>";
  if ($standrow['tent']==1) {
    $costs.="Tent : White 2 Section Tent 6 x 6.8 : R950<br/>\n";
  } elseif ($standrow['tent']==2) {
    $costs.="Tent : White 3 Section Tent 6 x 10.2 : R1100<br/>\n";
  }
  $costs.="Chairs : ".$standrow['chairs']." x R4.50 : R".($standrow['chairs']*4.5)."<br/>\n";
  $costs.="Tables : ".$standrow['tbles']." x R15 : R".($standrow['tbles']*15)."<br/>\n";
  $costs.="Rubbish Bins : ".$standrow['rubbish']." x R17.50 : R".($standrow['rubbish']*17.50)."<br/>\n";
  $costs.="Galvanised baths : ".$standrow['bath']." x R24 : R".($standrow['bath']*24)."<br/>\n";
  $selquery="SELECT * FROM saace_company WHERE id='".$standrow['comp_id']."'";
  $selres=mysql_query($selquery);
  
          if ($selres) {
            $selrow=mysql_fetch_assoc($selres);
            $cmstr="<html><body><p>Dear ".$selrow['contact']."<br/><br/>Thank you for reserving an area for the CESA Relay race. <br/><br/>You will be issued with an invoice on which you will find the banking details.<br/><br/>CESA Admin. <br/><br/><a href='mailto:events@cesa.co.za'>events@cesa.co.za</a><br/><img src='http://www.cesa.co.za/relay/img/eMailLogo.gif' alt=''Logo></p></body></html>";
    //mail client
        $headers = "From: ".$admin_email."\r\n"."Reply-To: ".$admin_email."\r\nMIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\nBcc: events@cesa.co.za\r\n";
        mail($selrow['email'],'CESA Social Area reserved',$cmstr,$headers);
        }
        }

?>