function validate_email ($address) { return (ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.' . '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $address)); } function order($name,$address,$telephone,$email,$orderno,$Item1Quantity,$Item1Price,$Item1Total,$Item2Quantity,$Item2Price,$Item2Total,$Item3Quantity,$Item3Price,$Item3Total,$Item4Quantity,$Item4Price,$Item4Total,$Item5Quantity,$Item5Price,$Item5Total,$Item6Quantity,$Item6Price,$Item6Total,$Item7Quantity,$Item7Price,$Item7Total,$Item8Quantity,$Item8Price,$Item8Total,$Item9Quantity,$Item9Price,$Item9Total,$Item10Quantity,$Item10Price,$Item10Total,$Item11Quantity,$Item11Price,$Item11Total,$Item12Quantity,$Item12Price,$Item12Total,$Item13Quantity,$Item13Price,$Item13Total,$Item14Quantity,$Item14Price,$Item14Total,$Item15Quantity,$Item15Price,$Item15Total,$Item16Quantity,$Item16Price,$Item16Total,$Item17Quantity,$Item17Price,$Item17Total,$OrderTotal,$Discount,$vat,$GrandTotal,$postageTotal) { if($email) $from = 'From: '.$email; else $from = 'From: noreply@rtime.info'; // Check all required info present if (!$name || !$address || !$telephone) return FALSE; // Validate email address //if ($email) //if (!validate_email($email)) //return FALSE; // Timezone hack :/ putenv ('TZ=Europe/Amsterdam'); mktime(0,0,0,1,1,1970); $array = localtime(); if ($array[8]) { $thedate = date("j/m/Y",time()-3600); $thetime = date("H:i",time()-3600); } else { $thedate = date("j/m/Y"); $thetime = date("H:i"); }; // Check for dupe IP address //$ip = $_SERVER['REMOTE_ADDR']; //if($_SESSION['swip'] == md5($ip)) // return FALSE; //else // $_SESSION['swip'] = md5($ip); // Email message $message = "\nDate: ".$thedate. "\nTime: ".$thetime. "\n\nCUSTOMER DETAILS\n".$name. "\n".$address. "\nTelephone: ".$telephone. "\nEmail: ".$email. "\nOrder no: ".$orderno. "\n\nORDER DETAILS"; if($Item1Quantity) $message .= "\nR time main manual: ".$Item1Quantity." x ".$Item1Price." = ".$Item1Total; if($Item2Quantity) $message .= "\nR time for EYFS and Key Stage 1: ".$Item2Quantity." x ".$Item2Price." = ".$Item2Total; if($Item3Quantity) $message .= "\nR time Activities for Key Stage 2: ".$Item3Quantity." x ".$Item3Price." = ".$Item3Total; if($Item4Quantity) $message .= "\nR time for Independent Nurseries: ".$Item4Quantity." x ".$Item4Price." = ".$Item4Total; if($Item5Quantity) $message .= "\nT time to support Transition: ".$Item5Quantity." x ".$Item5Price." = ".$Item5Total; if($Item6Quantity) $message .= "\nR time to Stop Bullying: ".$Item6Quantity." x ".$Item6Price." = ".$Item6Total; if($Item7Quantity) $message .= "\nR time Activities to Support S.E.A.L.: ".$Item7Quantity." x ".$Item7Price." = ".$Item7Total; if($Item8Quantity) $message .= "\nMaking the Most of R time: ".$Item8Quantity." x ".$Item8Price." = ".$Item8Total; if($Item9Quantity) $message .= "\nMaking the Most of SEAL: ".$Item9Quantity." x ".$Item9Price." = ".$Item9Total; if($Item11Quantity) $message .= "\nThink About, Talk About: ".$Item11Quantity." x ".$Item11Price." = ".$Item11Total; if($Item12Quantity) $message .= "\nNegotiate: ".$Item12Quantity." x ".$Item12Price." = ".$Item12Total; if($Item13Quantity) $message .= "\nR time Training DVD with accompanying notes: ".$Item13Quantity." x ".$Item13Price." = ".$Item13Total; if($Item10Quantity) $message .= "\nBetter Behaved: ".$Item10Quantity." x ".$Item10Price." = ".$Item10Total; // if($Item14Quantity) $message .= "\nWristband 1: ".$Item14Quantity." x ".$Item14Price." = ".$Item14Total; // if($Item15Quantity) $message .= "\nWristband 2: ".$Item15Quantity." x ".$Item15Price." = ".$Item15Total; // if($Item16Quantity) $message .= "\nWristband 3: ".$Item16Quantity." x ".$Item16Price." = ".$Item16Total; // if($Item17Quantity) $message .= "\nWristband 4: ".$Item17Quantity." x ".$Item17Price." = ".$Item17Total; $message .= "\n\nSubtotal: ".$OrderTotal. "\nPostage: ".$postageTotal. "\nGrand Total: ".$GrandTotal; // Send admin emails // mail ('gregsrtime@hotmail.com','Rtime Order Notification',$message,"noreply@rtime.info"); // mail ('rojstone@gmail.com','Rtime Order Notification',$message,"noreply@rtime.info"); // mail ('rstone.office@ntlworld.com','Rtime Order Notification',$message,"noreply@rtime.info"); // mail('rtime.orders.uk@gmail.com','Rtime Order Notification',$message,"noreply@rtime.info"); mail ('rtime.uk.orders@gmail.com','Rtime Order Notification',$message,"noreply@rtime.info"); mail ('jason@jaspastudios.co.uk','Rtime Order Notification',$message,"noreply@rtime.info"); // mail ('steve@sidekickdigital.co.uk','Rtime Order Notification',$message,"noreply@rtime.info"); // Send customer email $message2="Thank you. Your R time order will be processed shortly.\n\n".$message; mail ($email,'Rtime Order Confirmation',$message2,'From: noreply@rtime.info'); return TRUE; }; session_start(); ?>
You will be invoiced by post shortly.
To return to the R time website please close this window
'; //header('Location: http://www.rtime.info/uk/order-thank-you.php'); echo ""; exit; } else echo 'Please note — This Order Form is for UK orders only - customers in the USA should contact R time USA through the US website — click here
}; ?>