All pastes #481046 Raw Edit

Yancho

public php v1 · immutable
·published 2007-05-10 16:08 UTC
rendered paste body
<?php// taking care of new transport bookinginclude 'login_html.php';session_start();connect_db();if ($_POST['groupno'])   {     $groupno = $_POST['groupno'];     $leadername = $_POST['leadername'];     $leadermob = $_POST['leadermobile'];     $gurnata = $_POST['gurnata'];     $day = $_POST['day'];     $month = $_POST['month'];     $year = $_POST['year'];     $depdate = $year."-".$month."-".$day;     $hr = $_POST['hr'];     $min = $_POST['min'];     $deptime = $hr.":".$min.":00" ;          $deppoint = $_POST['R1']; // departure point          $typeoftransport = $_POST['typeoftransport'];          $pax = $_POST['pax'];     $leaders = $_POST['pax'];          $activitytype = $_POST['R2']; // activitytype          $typeofpayment = $_POST['R3']; //typeofpayment          $destination = $_POST['R4']; //destination           $hr1 = $_POST['hr1'];     $min = $_POST['min1'];     $rettime = $hr1.":".$min1.":00" ;          $returnfrom = $_POST['returnfrom'];     $returnto = $_POST['returnto'];          $updatedby = $_SESSION['name']; //updated by     $active = "1";     $manageremail = "matthew@solutions-lab.net" ;     $supplieremail = "yancho@mepa-clan.info";          $recepient[0] = $manageremail;     $recepient[1] = $supplieremail;          foreach ($recepient AS $i => $value) {}  {          echo "$i $recepient $value $recepient[$i]  ";     $mime_boundary = "----EF Malta----".md5(time());        # -=-=-=- MAIL HEADERS        $to = $recepient[$i];        $subject = "New Transport Booking from EF";                $headers = "From: Beach Club <company@ourcompany.com>\n";        $headers .= "Reply-To: Our Company <company@ourcompany.com>\n";        $headers .= "MIME-Version: 1.0\n";        $headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n";                # -=-=-=- TEXT EMAIL PART                $message = "--$mime_boundary\n";        $message .= "Content-Type: text/plain; charset=UTF-8\n";        $message .= "Content-Transfer-Encoding: 8bit\n\n";                $message .= "New Booking:\n\n";        $message .= "Group Number : $groupno\n";        $message .= "Leader Name : $leadername\n";        $message .= "Leader Mobile Number : $leadermob\n";        $message .= "\n\n";        $message .= "Departure Date : $gurnata : $day / $month / $year\n";        $message .= "Departure Time : $hr:$min\n";        $message .= "Type of Activity : $activitytype\n";        $message .= "Destination : $destination\n";        $message .= "Return at $hr1:$min1 from $returnfrom\n";        $message .= "Return Point : $returnto\n\n";        $message .= "\n\n";        $message .= "Number of Paying Students : $pax\n";        $message .= "Number of Free Leaders : $leaders\n";        $message .= "Type of Transport Requested : $typeoftransport\n";        $message .= "\n\n";        $message .= "Booking made by : $updatedby\n";        $message .= "Date : time()\n";        $message .= "Thank You.\n\n";                        # -=-=-=- FINAL BOUNDARY                $message .= "--$mime_boundary--\n\n";        # -=-=-=- SEND MAIL                $mail_sent = @mail( $to, $subject, $message, $headers );     }   }else {  new_transport_booking ();}