error_reporting(E_WARNING); /*** Affiliate Tracking Begin ***/ $a = "none"; if ( !isset ( $_COOKIE['pplaff'] ) && isset ( $_GET['ref'] ) ) { $cookie_name = pplaff; $cookie_value = $_GET['ref']; $a = $_GET['ref']; // send a cookie setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 30 days // write a log $t=time(); $file = 'logs/'.$a.'.php'; // Open the file to get existing content $current = file_get_contents($file); // Append a new data to the file $current .= date("Y-m-d h:i:s",$t)."\n"; // Write the contents back to the file file_put_contents($file, $current); } if ( isset ( $_COOKIE['pplaff'] ) ) // who's first is best { $a = $_COOKIE['pplaff']; // affiliate id that reffers to us } /*** Affiliate Tracking End ***/ // form $form = cleanForm('form_submit'); if ($form == true) { $charset = "UTF-8"; $to = "support@presspadapp.com"; $from = cleanForm('name') . " <".cleanForm('email').">"; $subject = "PressPad Kindle Fire Pre-Order"; if (cleanForm('name') != '') { $subject .= ' from ' . cleanForm('name'); } $message = " Name: ".cleanForm('name')." Email: ".cleanForm('email')." Email: ".cleanForm('title')." Email: ".cleanForm('location')." Email: ".cleanForm('offer')." Ref: ".cleanForm('affiliate')." "; $headers = 'From: ' . $from . "\n"; $headers .= 'To: ' . $to . "\n"; $headers .= 'Return-Path: ' . $from . "\n"; $headers .= 'MIME-Version: 1.0' ."\n"; $headers .= 'Content-Type: text/plain; charset=UTF-8' ."\n"; $headers .= $message . "\n"; if(mail('', $subject, '', $headers)) { $request_sent = true; header("Location: http://www.presspadapp.com/kindle-fire-apps/?status=sent#alert"); } } function cleanForm ($field) { return strip_tags(htmlspecialchars($_GET[$field])); } ?>
Pre-Order Now!
Click above to contact us