Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php date_default_timezone_set('Europe/London'); include('/home/easymoneysystemz/public..

Decoded Output download

<?php 
date_default_timezone_set('Europe/London'); 
include('/home/easymoneysystemz/public_html/affcentre/controller/affiliate-tracking.php'); 
//error_reporting(0); 
//ini_set('display_errors','on'); 
//include the config file 
include('includes/config.php'); 
 // Process PayPal payment 
  if (isset($_POST['purchase'])) { 
	//check_slot_availability 
	$check = $site_data->check_slot_availability(); 
	if(!$check) { 
	 $link = "index.php?action=slot_unavailable"; 
	 redirect($link); 
	} 
	$packageid = $_POST['packageid'];	 
	$order_type = $_POST['order_type'];	 
	$links = $_POST['links'];	 
	$banner_links = $_POST['banner_links'];	 
	$banner_links = json_encode($banner_links); 
	$link = $links[0];	 
	$links = json_encode($links); 
	$name = $_POST['name']; 
	$email = $_POST['email']; 
	$cname = $_POST['cname']; 
	$price = $site_data->get_price($packageid);	 
	//if banner order skip screenshot generation section 
	if($order_type == 2) { 
		GOTO SKIP_SCREENSHOT; 
	} 
	//generate screenshot of the each link	 
		$img = mt_rand().".gif"; //random image name		 
		$url = "http://easy-money-systemz.com/premium-traffic-rotator/shots.php?urls=$links&&img=$img"; 
		$thumb_url = "http://easy-money-systemz.com/premium-traffic-rotator/gifs/$img"; 
		 
		// Get cURL resource 
		$curl = curl_init(); 
		// Set some options - we are passing in a useragent too here 
		curl_setopt_array($curl, array( 
			CURLOPT_RETURNTRANSFER => 1, 
			CURLOPT_URL => $url, 
			CURLOPT_USERAGENT => 'Brainy cURL Request' 
		)); 
		// Send the request & save response to $resp 
		session_write_close(); 
		$resp = curl_exec($curl); 
		// Close request to clear up some resources 
		curl_close($curl); 
 
		// // create a new cURL resource 
		 // $ch = curl_init(); 
		 
		// // set URL and other appropriate options 
		 // curl_setopt($ch, CURLOPT_URL, $url); 
		 // curl_setopt($ch, CURLOPT_HEADER, 0); 
		 // curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1); 
		 
		// // grab URL and pass it to the browser 
		 // echo curl_exec($ch); exit; 
		 
		// // close cURL resource, and free up system resources 
		 // curl_close($ch); 
	 
	//create proforma invoice for site orders 
	$invoice_id = $site_data->create_proforma_invoice_site($packageid,$links,$name,$email,$cname,$order_type,$thumb_url); 
	SKIP_SCREENSHOT: //if it is banner order 
	if($order_type == 2) { 
	 //create proforma invoice for banner orders 
	 $invoice_id = $site_data->create_proforma_invoice_banner($packageid,$links,$name,$email,$cname,$order_type,$banner_links);	 
	} 
	if(1 == 1) {	 
	 if($_POST['pmode'] == 1) { //process order for Payza 
	  
	// Prepare GET data 
	$query = array(); 
	$query['notify_url'] = 'http://easy-money-systemz.com/premium-traffic-rotator/ipn.php'; 
	$query['cmd'] = '_cart'; 
	$query['upload'] = '1'; 
	$query['business'] = $site_data->get_ppemail(); 
	$query['item_name_1'] = "Rotator Purchase | Invoice ID:".$invoice_id; 
	$query['item_number_1'] = '1'; 
	$query['amount_1'] = $price; 
	$query['currency_code'] = "USD"; 
 
	// Prepare query string 
	$query_string = http_build_query($query); 
 
	header('Location: https://www.paypal.com/cgi-bin/webscr?' . $query_string); 
	} 
   
  else { //process order for Payza		    
    
  // Prepare GET data 
		$query = array(); 
		$query['ap_returnurl'] = 'http://easy-money-systemz.com/premium-traffic-rotator/ipn.php'; 
		$query['ap_cancelurl'] = 'http://easy-money-systemz.com/premium-traffic-rotator/cancel.php'; 
		$query['ap_merchant'] = $site_data->get_pzemail(); 
		$query['ap_purchasetype'] = 'item';    
 
		//main item 
		$query['ap_itemname'] = "Rotator Purchase | Invoice ID:".$invoice_id; 
		$query['ap_itemcode'] = "3099-XYZ"; 
		$query['ap_amount'] = $price;                            
		$query['ap_currency'] = "USD"; 
 
		// Prepare query string 
		$query_string = http_build_query($query); 
 
	 //header('Location:  https://sandbox.Payza.com/sandbox/payprocess.aspx?' . $query_string); //Sandbox 
	 header('Location: https://secure.payza.com/checkout?' . $query_string); //Live 
  } 
  } 
   else { 
   echo "<h5 class='text-center'>Please enter valid amount</h5>"; 
  } 
 }  
  
 //process submit_feedback form 
 if(isset($_POST['submit_feedback'])) { 
  if( !empty($_POST['name']) && !empty($_POST['message']) ) { 
	$stmt = $db->prepare("INSERT INTO `feedbacks`(name,website,message) VALUES(:name,:website,:message)"); 
	$stmt->execute(array(':name' => $_POST['name'], ':website' => $_POST['website'], ':message' => $_POST['message'])); 
	$link = "index.php?action=feedback_posted"; 
	redirect($link); 
  } 
 } 
   
  //process submit_contact form 
 if(isset($_POST['submit_contact'])) { 
  if( !empty($_POST['name']) && !empty($_POST['message']) ) { 
	$mail = "[email protected]"; 
	$headers = "From:  [email protected] 
"; 
	$headers .= "MIME-Version: 1.0
"; 
	$headers .= "Content-Type: text/html; charset=ISO-8859-1
"; 
	$msg = " 
			<b>Name: </b> $_POST[name]<br><b>Email: </b> $_POST[email]<br> 
			<b>Country: </b> $_POST[country]<br> 
			<b>Message: </b> $_POST[message] 
		   "; 
	mail($mail, "Contact Form Message", $msg, $headers); 
	$link = "index.php?action=contact_posted"; 
	redirect($link); 
  }		   
 } 
?> 
<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
    <meta name="description" content=""> 
    <meta name="author" content=""> 
    <title>EMS Premium Traffic Systemz</title> 
	 
	<!-- core CSS --> 
    <link href="css/bootstrap.min.css" rel="stylesheet"> 
    <link href="css/font-awesome.min.css" rel="stylesheet"> 
    <link href="css/animate.min.css" rel="stylesheet"> 
    <link href="css/prettyPhoto.css" rel="stylesheet"> 
    <link href="css/main.css" rel="stylesheet"> 
    <link href="css/responsive.css" rel="stylesheet"> 
    <link href="css/login.css" rel="stylesheet"> 
     <link href="css/prices.css" rel="stylesheet"> 
    <!--[if lt IE 9]> 
    <script src="js/html5shiv.js"></script> 
    <script src="js/respond.min.js"></script> 
    <![endif]-->        
    <link rel="shortcut icon" href="images/favicon.png"> 
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/ico/apple-touch-icon-144-precomposed.png"> 
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/ico/apple-touch-icon-114-precomposed.png"> 
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/ico/apple-touch-icon-72-precomposed.png"> 
    <link rel="apple-touch-icon-precomposed" href="images/ico/apple-touch-icon-57-precomposed.png"> 
	 
	<link rel="stylesheet" href="css/cstyle.css" type="text/css"> 
	 
		 
		 
	<script>     
	 
    function CountDownTimer(dt, id, distance) 
    { 
		 
        var _second = 1000; 
        var _minute = _second * 60; 
        var _hour = _minute * 60; 
        var _day = _hour * 24; 
        var timer; 
 
        function showRemaining() { 
            if (distance < 0) { 
                clearInterval(timer); 
				var ids='countdown-' + id; 
                document.getElementById(ids).innerHTML = 'EXPIRED!'; 
 
                return; 
            } 
            var days = Math.floor(distance / _day); 
            var hours = Math.floor((distance % _day) / _hour); 
            var minutes = Math.floor((distance % _hour) / _minute); 
            var seconds = Math.floor((distance % _minute) / _second); 
            //add zeros to single digits 
			if (days.toString().length == 1) { 
				days = "0" + days;             
			} 
			if (hours.toString().length == 1) { 
				hours = "0" + hours;             
			} 
			if (minutes.toString().length == 1) { 
				minutes = "0" + minutes;             
			} 
			if (seconds.toString().length == 1) { 
				seconds = "0" + seconds;             
			} 
			 
			//set time holder element vars 
			var ad = "ad-"+id; 
			var ah = "ah-"+id; 
			var am = "am-"+id; 
			var as = "as-"+id; 
            document.getElementById(ad).innerHTML = days; 
            document.getElementById(ah).innerHTML = hours; 
            document.getElementById(am).innerHTML = minutes; 
            document.getElementById(as).innerHTML = seconds; 
        } 
 
        timer = setInterval(showRemaining, 1000); 
    } 
	/* 
	//function to rotate thumbnails 
	 
  window.setInterval(function () {	   
			var xmlhttp = new XMLHttpRequest(); 
        xmlhttp.onreadystatechange = function() { 
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 
				var index; 
				var a = JSON.parse(xmlhttp.responseText); 
				for (index = 0; index < a.length; index++) { 
					get_thumb(a[index]); 
				}				 
            } 
        } 
        xmlhttp.open("GET", "thumb_rotator.php", true); 
        xmlhttp.send(); 
	}, 3000); 
	 
	function get_thumb(id) { 
		var id_img = "image-"+id; 
		var hits = "hits-"+id; 
		var link = "link-"+id; 
		    var xmlhttp = new XMLHttpRequest(); 
        xmlhttp.onreadystatechange = function() { 
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 
				var links = JSON.parse(xmlhttp.responseText); 
				for (var index in links) { 
					document.getElementById(id_img).src = links['path'];								 
					document.getElementById(hits).innerHTML = links['hits']; 
					document.getElementById(link).href = links['link']; 
				}                 
            } 
        } 
        xmlhttp.open("GET", "get_thumb.php?id="+id, true); 
        xmlhttp.send();  
	} 
	*/ 
	 
	//function to update today hits 
  window.setInterval(function () {	   
			var xmlhttp = new XMLHttpRequest(); 
        xmlhttp.onreadystatechange = function() { 
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 
			  document.getElementById("today_hits").innerHTML = xmlhttp.responseText; 
            } 
        } 
        xmlhttp.open("GET", "today_hits.php", true); 
        xmlhttp.send(); 
	}, 1000);	 
	 
	//function to update online visitors (session based) 
  window.setInterval(function () {	   
			var xmlhttp = new XMLHttpRequest(); 
        xmlhttp.onreadystatechange = function() { 
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 
			  document.getElementById("online_visitors").innerHTML = xmlhttp.responseText; 
            } 
        } 
        xmlhttp.open("GET", "online_visitors.php", true); 
        xmlhttp.send(); 
	}, 1000); 
	 
	 
</script> 
</head><!--/head--> 
 
<body class="homepage"> 
 
    <header id="header"> 
        <div class="top-bar"> 
            <div class="container"> 
                 
            </div><!--/.container--> 
        </div><!--/.top-bar--> 
 
        <nav class="navbar navbar-inverse" role="banner"> 
            <div class="container"> 
                <div class="navbar-header"> 
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> 
                        <span class="sr-only">Toggle navigation</span> 
                        <span class="icon-bar"></span> 
                        <span class="icon-bar"></span> 
                        <span class="icon-bar"></span> 
                    </button> 
                    <a class="navbar-brand" href="index.php"><img src="images/logo.png" alt="logo"></a> 
                </div> 
				 
                <div class="collapse navbar-collapse navbar-right"> 
                    <ul class="nav navbar-nav"> 
                        <li class="active"><a href="index.html">Home</a></li> 
                        <li><a href="#feature">Service</a></li> 
                        <li><a href="#recent-works">Slots</a></li> 
                        <li><a href="#contact-page">Order</a></li>  
                        <li><a href="#content">Testimonial</a></li>                         
                    </ul> 
                </div> 
            </div><!--/.container--> 
        </nav><!--/nav--> 
		 
    </header><!--/header--> 
 
	<?php 
	if(isset($_GET['action'])){ 
		//check the action 
		switch ($_GET['action']) { 
			case 'slot_unavailable': 
			echo "<h4 class='text-center status alert alert-success'>Slot is unavailable</h4>"; 
			break; 
			case 'feedback_posted': 
			echo "<h4 class='text-center status alert alert-success'>Feedback Successfully Submitted</h4>"; 
			break; 
			case 'contact_posted': 
			echo "<h4 class='text-center status alert alert-success'>Message Successfully Sent</h4>"; 
			break;					 
		} 
 
	} 
	?> 
   		<!-- banner start --> 
		<!-- ================ --> 
   <div class="row" style="background: url(./images/bg.jpg);background-size: cover;"> 
  <div class="col-md-12"> 
  <div class="center">  
  <div class="jumbotron"> 
  <h1><font color="#fff" font-family: 'Black Ops One', cursive; text-shadow: black 0.1em 0.1em 0.2em;>EMS Premium</font><font color="#fff" font-family: 'Black Ops One', cursive; text-shadow: black 0.1em 0.1em 0.2em;><strong>Traffic Systemz</strong></font> - <font color="#fff">affordable advertising</font></h1><BR> 
  <p style="font-size:1.50em; font-style:italic;">Providing quality advertising at affordable price since September 2015.</p><BR> 
  <p style="font-size:1.50em; line-height:1.5em;">Need <b>sales</b> & <b>referrals</b>? <BR><BR> Running on a tight budget or simply don't want to spend a fortune advertising on several PTC sites? <b>You definitely came to the right place!</b></p><BR> 
  <p><a class="btn btn-primary btn-lg" href="#contact-page" role="button">Click here for more information</a></p> 
</div></div></div> 
   
   
   
  
  </div> 
  </div> 
  	 
		<!-- banner end --> 
 
    <section id="feature" style="background: #e0e0e0;"> 
        <div class="container"> 
           <div class="center wow fadeInDown"> 
                <h2 style="font-size: 50px;">HOW IT WORKS?</h2> 
                <p class="lead">EXTREMELY POWERFUL ADVERTISING SERVICE</p> 
            </div> 
 
            <div class="row"> 
                <div class="features"> 
                  <div class="col-md-6"> 
                    <div class="center">  
                    <h2 style="font-size: 30px; font-family: Sans Serif; line-height: 1.5em;">FULL PAGE EXPOSURE</h2>  
                    <h3>You will get user attentions easily with full page exposure</h3>  
                    <p style="font-size: 30px; font-family: Fjalla One;">With our rotator you will get full page ads from the high traffic sites that we get all our premium traffic from. This means you will get more exposure to people that want to buy or sign up for your offers.</p> 
                   </div> 
                   </div><!--/.col-md-8--> 
                     
                    <div class="col-md-6">  
                  <div class="wow fadeInDown" data-wow-duration="1000ms" data-wow-delay="600ms"> 
                        <div class="feature-wrap"> 
                          <div class="center">  
                           <img style="width: 65%;" src="images/website22.png">    
                        </div> 
                      </div> 
                    </div><!--/.col-md-4-->    
                </div><!--/.services--> 
             </div><!--/.md12--> 
            </div><!--/.row-->     
        </div><!--/.container--> 
    </section><!--/#feature--> 
 
    <section id="feature" > 
        <div class="container"> 
 
            <div class="row"> 
                <div class="features"> 
                  <div class="col-md-6">  
                   <div class="center">  
                    <div class="wow fadeInDown" data-wow-duration="1000ms" data-wow-delay="600ms"> 
                        <div class="feature-wrap"> 
                            <img style="width: 65%;" src="images/verification25.png">    
                        </div> 
                      </div> 
                    </div><!--/.col-md-4--> 
                   </div><!--/.col-md-8--> 
                     
                    <div class="col-md-6">  
                    <div class="center">  
                    <h2 style="font-size: 30px; font-family: Sans Serif; line-height: 1.5em;">FAST APPROVAL</h2> 
                    <h3>You order will be process with in 1-12 hours.</h3>                 
                    <p style="font-size: 30px; font-family: Fjalla One;">You will get the fastest possible solutions to help you suit your business needs, that way you can start too see why you must buy this now and feel that its the best thing for you moving forward with your future in business.</p> 
                 </div> 
                </div><!--/.services--> 
             </div><!--/.md12--> 
            </div><!--/.row-->     
        </div><!--/.container--> 
    </section><!--/#feature--> 
 
     <section id="feature" style="background: #e0e0e0;"> 
        <div class="container"> 
            <div class="row"> 
                <div class="features"> 
                 <div class="col-md-6"> 
                 <div class="center">  
                  <h2 style="padding:35px;">INCREASE YOUR SALES</h2> 
                   <h3>You will get visitors from high traffic websites.</h3> 
                    <p style="font-size: 30px; font-family: Sans Serif; line-height: 1.5em;>Increasing website traffic and sales revenue has a lot of people concerned now that the economy is showing signs of another recession. With so many websites out there fighting for the competition and more and more shaky advertisers, if you want your site to succeed, whether it is an informational blog or a business that sells products and services and depends on advertising as well, then you need to get your traffic and sales revenue moving.</p> 
                    </div> 
                   </div><!--/.col-md-6--> 
                     
                    <div class="col-md-6">  
                  <div class="wow fadeInDown" data-wow-duration="1000ms" data-wow-delay="600ms"> 
                        <div class="feature-wrap"> 
                         <div class="center">  
                          <img style="width: 75%;" src="images/sales1.png">   
                        </div> 
                      </div> 
                    </div><!--/.col-md-6--> 
                 
                     
                </div><!--/.services--> 
             </div><!--/.md12--> 
            </div><!--/.row-->     
        </div><!--/.container--> 
    </section><!--/#feature--> 
 
    
 
    <section id="recent-works" style="background: url(./images/bg.jpg);background-size: cover;"> 
        <div class="container"> 
            <div class="center wow fadeInDown"> 
                <h2 style="color:white;">OUR SLOTS</h2> 
                <tbody> 
                <table style="margin:0 auto;"> 
                <tr> 
                <td style="color:#fff; padding:0 20px; font-size:16px;">Total Visits</td> 
                <td style="color:#fff; padding:0 20px; font-size:16px;">Yesterday Visits</td> 
                <td style="color:#fff; padding:0 20px; font-size:16px;">Today Visits</td> 
                <td style="color:#fff; padding:0 20px; font-size:16px;">Online Visitors</td> 
                <td style="color:#fff; padding:0 20px; font-size:16px;">Slots in use</td> 
                </tr> 
                 <tr style="line-height:35px;"> 
                <th style="text-align:center; font-size:22px; color:#fff;"><?php echo $site_data->get_total_visits();?></th> 
                <th style="text-align:center; font-size:22px; color:#fff;"><?php echo $site_data->get_yesterday_hits();?></th> 
                <th style="text-align:center; font-size:22px; color:#fff;"><span id="today_hits"></span></th> 
                <th style="text-align:center; font-size:22px; color:#fff;"><span id="online_visitors"></span></th> 
                <th style="text-align:center; font-size:22px; color:#fff;"><?php echo $site_data->get_num_inuse_slots()."/20";?></th> 
            
                </tr> 
                </table> 
                </tbody><BR> 
                 <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample"> 
  Daily Traffic Stats History 
</button><BR><BR> 
<div class="collapse" id="collapseExample"> 
  <div class="well"> 
    <div id="container_graph" style="min-width: 1096px; height: 400px; margin: 0 auto"></div> 
  </div> 
</div> 
            </div> 
 
            <div class="row">  
				  
				<?php 
				//load active ad slots 
				$ad_slots = $site_data->load_ad_slots("all"); 
				$count = 0; 
				foreach($ad_slots as $ad_slot) { 
				//only allow "site"	orders in slots 
				if($ad_slot['order_type'] == 1) { 
				   //count this order 
				   $count++; 
				  //get required vars 
				  $order_id = $ad_slot['id']; 
				  $pack_id = $ad_slot['packageid'];				 
				  $hits = $site_data->get_ad_hits($ad_slot['id']); 
				  $pack_data = $site_data->get_package_data($pack_id); 
				  $thumbnail = $site_data->get_thumbnail($ad_slot['id']); 
				  $days = $pack_data[0]['days']; 
				  $hours = $days * 24; 
				  $date = $ad_slot['date']; 
				  if($order_id == 147) { 
					  echo $date; 
				  } 
				  $date = strtotime($date) + $hours * 3600; 
				  $cdate = date("m/d/Y H:i", $date); 
				  $date = date( "Y-M-d H:i:s", strtotime( $date ) + $hours * 3600 );;//expire time 
				  //get distance				   
				  $expiry_date = strtotime($cdate); 
				  $distance = $expiry_date - time(); 
				  $distance = $distance * 1000; 
				  //some time stuff 
					$time = new DateTime($cdate); 
					$adate = $time->format('Y-m-d'); 
					$atime = $time->format('H:i:s'); 
					$datetime = "iso".$adate."T".$atime; 
					 
					 
				   echo "<div class='col-md-3 col-sm-4 col-xs-6'>						 
				  		 <div class='recent-work-wrap'> 
				  			<img src='$thumbnail' class='img-responsive' id='image-$ad_slot[id]' /> 
				  		   <div class='overlay'> 
				  			<div class='recent-work-inner' style='border-radius:12px;'> 
				  			 <h3 style='text-align:center;'><a href='#'>$ad_slot[cname]</a></h3> 
				  			   <p class='text-center'><strong>Hits: <span id='hits-$ad_slot[id]'>$hits</span></strong></p> 
							   <table id='t' border='0' cellpadding='0' style='margin:0 auto;'> 
								   <tr class='ar'> 
								   <td id='ad-$order_id' style='font-size:20px; font-weight:400;'>0</td> 
								   <td>:&nbsp;</td> 
								   <td id='ah-$order_id' style='font-size:20px; font-weight:400;'>0</td> 
								   <td>:&nbsp;</td> 
								   <td id='am-$order_id' style='font-size:20px; font-weight:400;'>0</td> 
								   <td>:&nbsp;</td> 
								   <td id='as-$order_id' style='font-size:20px; font-weight:400;'>0</td> 
								   </tr> 
								    
								   <tr class='bl'> 
								   <td id='bd' style='font-size:6.8pt;'>Day(s)</td> 
								   <td></td> 
								   <td id='bh' style='font-size:6.8pt;'>Hour(s)</td> 
								   <td></td> 
								   <td id='bm' style='font-size:6.8pt;'>Minute(s)</td> 
								   <td></td> 
								   <td id='bs' style='font-size:6.8pt;'>Second(s)</td> 
								   </tr>	 
									<tr> 
									 
									</tr>									 
							   </table> 
				  			   <div class='row'> 
								<a id='link-$ad_slot[id]' href='visit.php?id=$ad_slot[id]' target='_blank'><h3 class='text-center'>Visit</h3></a> 
				  			   </div> 
				  			</div>  
				  		   </div> 
				  		 </div>	 
				  		</div> 
				  	  "; 
				   echo "<script type='text/javascript'>CountDownTimer('$cdate','$order_id', '$distance');</script>";	   
				  } 
				}  
				//handle available slots 
				$needle = 20; 
				if($count == 0) {$needle = 20;} 
				//if($count >= 10) {$needle = $needle + 12;} 
				for($i=0;$i < $needle - $count;$i++) { 
				echo "	<div class='col-md-3 col-sm-4 col-xs-6'> 
						 <div class='recent-work-wrap'> 
						  <img class='img-responsive' src='images/available-img.png' alt=''> 
						   <div class='overlay'> 
							<div class='recent-work-inner'> 
							 <h3 style='text-align:center;'><a href='#contact-page'>Buy Now</a> </h3> 
							</div>  
						   </div> 
						 </div>						 
						</div> 
					";	 
				} 
				 
				?>	 
            </div><!--/.row--> 
        </div><!--/.container--> 
    </section><!--/#recent-works--> 
       <BR><BR> 
         <div class="container"> 
        <div class="row"> 
     <div class="col-md-6 wow fadeInDown"> 
    <h2 style="text-align:center; font-weight:400; font-size:40px;">Main Features</h2> 
    <table> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Get referrals or affiliates to any program</h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Generate leads & sales</h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Get your site known online!</h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Small, non-intrusive upper ad-frame</h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Advertise up to 5 ads in one slot</h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Request URL change once per 24 hours</h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Fast & professional support</h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Get referrals or affiliates to any program</h4></td> 
    </tr> 
    </table> 
  </div> 
 
  <div class="col-md-6 wow fadeInDown"><h2 style="text-align:center; font-weight:400; font-size:40px;">Pricing</h2> 
    <table> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;1 Day Site Ads <span class="p20">$4.00</span> </h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;3 Days Site Ads <span class="p20">$10.00</span> </h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;7 Days Site Ads <span class="p20">$25.00</span> & Banner Ads <span class="p20">$5.00</span></h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;14 Days Site Ads <span class="p20">$45.00</span> & Banner Ads <span class="p20">$8.00</span></h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;30 Days Site Ads <span class="p20">$99.00</span> & Banner Ads <span class="p20">$10.00</span></h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;60 Days Site Ads <span class="p20">$179.00</span> & Banner Ads <span class="p20">$27.00</span></h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;90 Days Site Ads <span class="p20">$325.00</span> & Banner Ads <span class="p20">$27.00</span></h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;180 Days Site Ads <span class="p20">$575.00</span> & Banner Ads <span class="p20">$50.00</span></h4></td> 
    </tr> 
    <tr> 
    <td><i class="fa fa-check-circle fa-2x"></i></td> 
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;365 Days Site Ads <span class="p20">$959.00</span> & Banner Ads <span class="p20">$100.00</span></h4></td> 
    </tr> 
    </table></div> 
  </div><!--/.row--> 
  </div><!--/.container-->  
    <BR><BR> 
     <section id="contact-page" > 
        <div class="container"> 
        <div class="row"> 
          <div class="col-md-12 wow fadeInDown"> 
            <div class="center">         
                <h2 style="color: #fff;">Place Your Order</h2> 
            </div> 
            </div><!--/cd-md-12--> 
            </div> <!--/row--> 
             
             
            <div class="row" style="color: white;"> 
          <div class="col-md-12 col-sm-8 wow fadeInDown"> 
		   
            <div class="row contact-wrap" style="background: background: #fff;"> 
                <form method="post" action="index.php"> 
				<h4 class="text-center" style="color: white;"><u>Select Your EMS Package:</u></h4><BR> 
                    <div class="col-sm-5 col-sm-offset-1"> 
                        <div class="form-group"> 
                            <label>Name *</label> 
                            <input type="text" name="name" class="form-control" required="required" /> 
                        </div> 
                        <div class="form-group"> 
                            <label>Email *</label> 
                            <input type="email" name="email" class="form-control" required="required" /> 
                        </div> 
						<div class="form-group"> 
                            <label>Campaign Name *</label> 
                            <input type="text" name="cname" class="form-control" required="required" /> 
                        </div> 
                       <div class="form-group"> 
                            <label>Site Link 1 *</label> 
                            <input type="text" name="links[]" class="form-control" required="required"/> 
                        </div> 
                       <div class="form-group"> 
                            <label>Site Link 2 </label> 
                            <input type="text" name="links[]" class="form-control" /> 
                        </div>  
                        <div class="form-group"> 
                            <label>Site Link 3 </label> 
                            <input type="text" name="links[]" class="form-control" /> 
                        </div>      
                         <div class="form-group"> 
                            <label>Site Link 4 </label> 
                            <input type="text" name="links[]" class="form-control" /> 
                        </div>                   
                    </div> 
                    <div class="col-sm-5"> 
                     
                         <div class="form-group"> 
                            <label>Site Link 5 </label> 
                            <input type="text" name="links[]" class="form-control" /> 
                        </div> 
						 
                        <div class="form-group"> 
                            <label>Plans Pricing</label> 
                             <!-- Select Package --> 
							<div class="control-group"> 
							  <div class="controls"> 
								<select id="packageid" name="packageid" class="form-control"> 
								<?php 
								//get packages 
								$packages = $site_data->get_packages(1); 
								foreach($packages as $package) { 
								 $price = $site_data->get_price($package['id']);	 
								 echo "<option value='$package[id]'>$package[days] Day(s) | $ $price</option>"; 
								} 
								?> 
								</select> 
							  </div> 
							</div> 
						</div>  
						 <div class="form-group"> 
							<label>Payment Processor</label> 
							<select id="pmode" name="pmode" class="form-control"> 
							  <option value="1">Paypal</option> 
							  <option value="2">Payza</option> 
							</select> 
                        </div> 
						<div class="checkbox"> 
						 <label> 
						  <input type="checkbox" required=""> I accept and agree Easy-Money-Systemz.com <a href="#terms">Terms Of Service 
						 </a></label> 
					    </div>						 
                        <div class="form-group"> 
                            <input type="hidden" name="order_type" value="1" /> 
							<button type="submit" id="purchase" name="purchase" class="btn btn-primary btn-lg">Order Now</button> 
                        </div> 
                    </div> 
                </form>  
                </div> 
				 
               </div><!--/col-md-7 col-sm-8--> 
			   </div><!--/.row--> 
             
         
     
     
    <div class="container"> 
    <div class="row"> 
    <div class="col-md-12 col-sm-4 wow fadeInDown" style="border-top:2px solid color: white;height:600px"> 
		<div class="row contact-wrap" style="color: white;">                  
               <form method="post" action="index.php"> 
				<h4 class="text-center"><u>EMS Banner Packages:</u></h4><BR> 
                    <div class="col-sm-5 col-sm-offset-1"> 
                        <div class="form-group"> 
                            <label>Name *</label> 
                            <input type="text" name="name" class="form-control" required="required" /> 
                        </div> 
                        <div class="form-group"> 
                            <label>Email *</label> 
                            <input type="email" name="email" class="form-control" required="required" /> 
                        </div> 
						<div class="form-group"> 
                            <label>Campaign Name *</label> 
                            <input type="text" name="cname" class="form-control" required="required" /> 
                        </div> 
                       <div class="form-group"> 
                            <label>Banner Image Link 1 *</label> 
                            <input type="text" name="links[]" class="form-control" required="required" /> 
                        </div> 
						<div class="form-group"> 
                            <label>Target Link 1 *</label> 
                            <input type="text" name="banner_links[]" class="form-control" required="required" /> 
                        </div> 
                       <div class="form-group"> 
                            <label>Banner Image Link 2 </label> 
                            <input type="text" name="links[]" class="form-control" /> 
                        </div> 
						 <div class="form-group"> 
                            <label>Target Link 2 </label> 
                            <input type="text" name="banner_links[]" class="form-control"  /> 
                         </div>						 
						 
						</div> 
						 
						<div class="col-sm-5"> 
						 
                        <div class="form-group"> 
                            <label>Banner Image Link 3 </label> 
                            <input type="text" name="links[]" class="form-control" /> 
                        </div>      
						<div class="form-group"> 
                            <label>Target Link 3 </label> 
                            <input type="text" name="banner_links[]" class="form-control"  /> 
                        </div>						 
                         <div class="form-group"> 
                            <label>Banner Image Link 4 </label> 
                            <input type="text" name="links[]" class="form-control" /> 
                        </div>     
						<div class="form-group"> 
                            <label>Target Link 4 </label> 
                            <input type="text" name="banner_links[]" class="form-control"  /> 
                        </div>												                                         
                     
                         <div class="form-group"> 
                            <label>Banner Image Link 5 </label> 
                            <input type="text" name="links[]" class="form-control" /> 
                        </div> 
						<div class="form-group"> 
                            <label>Target Link 5 </label> 
                            <input type="text" name="banner_links[]" class="form-control"  /> 
                        </div>						 
						 
                        <div class="form-group"> 
                            <label>Plans Pricing</label> 
                            <!-- Select Package --> 
							<div class="control-group"> 
							  <div class="controls"> 
								<select id="packageid" name="packageid" class="form-control"> 
								<?php 
								//get packages 
								$packages = $site_data->get_packages(2); 
								foreach($packages as $package) { 
								 $price = $site_data->get_price($package['id']);	 
								 echo "<option value='$package[id]'>$package[days] Day(s) | $ $price</option>"; 
								} 
								?> 
								</select> 
							  </div> 
							</div> 
						</div>  
						 <div class="form-group"> 
							<label>Payment Processor</label> 
							<select id="pmode" name="pmode" class="form-control"> 
							  <option value="1">Paypal</option> 
							  <option value="2">Payza</option> 
							</select> 
                        </div>    
					   <div class="checkbox"> 
						<label> 
						  <input type="checkbox" required=""> I accept and agree Easy-Money-Systemz.com <a href="#terms"">Terms Of Service 
						</a></label> 
					   </div>						 
                        <div class="form-group"> 
							<input type="hidden" name="order_type" value="2" /> 
							<button type="submit" id="purchase" name="purchase" class="btn btn-primary btn-lg">Order Now</button> 
                        </div> 
                    </div> 
                </form>  
                </div>     
    </div><!--/col-md-5 col-sm-4--> 
	 
 </div><!--/.row--> 
 </div><!--/.container--> 
</section><!--/#contact-page--> 
<section id="terms" style="margin-top:100px;"> 
    <div class="container"> 
        <div class="row"> 
          <div class="col-md-12 wow fadeInDown"> 
          <div class="center">         
            <?php 
			 echo $site_data->get_tos_content(); 
			?> 
 
          </div> 
          </div> 
    </section> 
 
 
<!-- Modal Testimonial Box --> 
 
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> 
  <div class="modal-dialog"> 
    <div class="modal-content"> 
      <div class="modal-header"> 
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> 
        <h4 class="modal-title" id="exampleModalLabel">Testimonial</h4> 
      </div> 
      <div class="modal-body"> 
        <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST"> 
        <div class="form-group"> 
                            <label>Name *</label> 
                            <input type="text" id="name" name="name" class="form-control" required="required" /> 
                        </div> 
                         <div class="form-group"> 
                            <label>Website *</label> 
                            <input type="text" id="website" name="website" class="form-control" /> 
                        </div> 
						<div class="form-group"> 
                            <label>Message *</label> 
                            <textarea id="message" name="message" class="form-control" required="required"></textarea> 
                        </div>                                
      </div> 
      <div class="modal-footer"> 
        <button type="submit" class="btn btn-success" name="submit_feedback">Send message</button> 
      </div> 
	  </form> 
    </div> 
  </div> 
</div> 
 
<!-- Modal Contact Us Box --> 
 
<div class="modal fade" id="exampleModal1" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> 
  <div class="modal-dialog"> 
    <div class="modal-content"> 
      <div class="modal-header"> 
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> 
        <h4 class="modal-title" id="exampleModalLabel">Testimonial</h4> 
      </div> 
      <div class="modal-body"> 
        <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST"> 
        <div class="form-group"> 
                            <label>Name *</label> 
                            <input type="text" id="name" name="name" class="form-control" required="required" /> 
                        </div> 
                        <div class="form-group"> 
                            <label>Email *</label> 
                            <input type="text" id="email" name="email" class="form-control" required="required" /> 
                        </div> 
						<div class="form-group"> 
                            <label>Country</label> 
                            <input type="text" id="country" name="country" class="form-control" /> 
                        </div> 
						<div class="form-group"> 
                            <label>Message *</label> 
                            <textarea id="message" name="message" class="form-control" required="required"></textarea> 
                        </div>                                
      </div> 
      <div class="modal-footer"> 
        <button type="submit" class="btn btn-success" name="submit_contact">Send message</button> 
      </div> 
	  </form> 
    </div> 
  </div> 
</div> 
 
<!-- Modal Testimonial Box --> 
 
 
   <section id="content"> 
        <div class="container"> 
            <div class="row"> 
               <div class="col-xs-12 col-md-8 wow fadeInDown"> 
                    <div class="testimonial"> 
                        <h2>Testimonials</h2> 
						<?php 
						 //fetch and echo feedbacks` 
						  $stmt = $db->prepare(" SELECT * FROM `feedbacks` WHERE `approve`=? ORDER BY `date` DESC "); 
						  $stmt->execute(array(1)); 
						  $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); 
						  $feedbacks = ""; 
						  foreach($rows as $row) { 
						   echo " 
						        <div class='media testimonial-inner'> 
									<div class='media-body'> 
								  <blockquote> 
										<p>$row[message]</p> 
										<span><strong>-$row[name]/</strong> $row[website]</span> 
										</blockquote> 
									</div> 
								</div> 
								"; 
						  } 
						?>                      
 
                         </div> 
                       </div> <!--/col-xs-12 col-md-8--> 
                        
                       <div class="col-xs-6 col-md-4 wow fadeInDown"> 
					    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@getbootstrap"><a href="#exampleModal">Submit Testimonial</a></button>						 
					   </div> 
					   <div class="col-xs-6 col-md-4 wow fadeInDown"> 
					    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal1" data-whatever="@getbootstrap"><a href="#exampleModal">Contact Us</a></button>						 
					   </div> 
                                           
                        
                    </div><!--/row--> 
 
                    </div> 
    </section><!--/#content--> 
     
 
 
    <footer id="footer" class="midnight-blue"> 
        <div class="container"> 
            <div class="row"> 
                <div class="col-sm-6"> 
                    &copy; 2015 - 2016. EMS Premium Traffic Systemz Design & Developed By <a href="http://msdigitalmediagroup.com" title="EMS Premium Traffic Site Owned">Easy Money Systemz</a>. 
                </div> 
                <div class="col-sm-6"> 
                    <ul class="pull-right"> 
                        <li class="active"><a href="https://easy-money-systemz.com/">Home</a></li> 
                        <li><a href="#recent-works">Slots</a></li> 
                        <li><a href="#contact-page">Order</a></li>  
                        <li><a href="#content">Testimonial</a></li>  
 
                    </ul> 
                </div> 
            </div> 
        </div> 
    </footer><!--/#footer--> 
    <script src="js/jquery.js"></script> 
    <script src="js/bootstrap.min.js"></script> 
    <script src="js/jquery.prettyPhoto.js"></script> 
    <script src="js/jquery.isotope.min.js"></script> 
    <script src="js/wow.min.js"></script> 
    <script src="js/main.js"></script> 
    <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> 
      <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> 
	<!-- Highchart script files -->        
	<script src="https://code.highcharts.com/highcharts.js"></script> 
        <script src="https://code.highcharts.com/modules/exporting.js"></script> 
	<?php 
	//get last 5 days hits 
	 $day_date_time5 = date('Y-m-d', time()); 
	 $day_date_time4 = date('Y-m-d', strtotime($day_date_time5) - 24*60*60); 
	 $day_date_time3 = date('Y-m-d', strtotime($day_date_time5) - 2*24*60*60); 
	 $day_date_time2 = date('Y-m-d', strtotime($day_date_time5) - 3*24*60*60); 
	 $day_date_time1 = date('Y-m-d', strtotime($day_date_time5) - 4*24*60*60); 
	 $hits_array = array(); 
	 $days_array = array(); 
	 for($i = 1;$i < 6;$i++) { 
		$day_date_time = "day_date_time$i"; 
		$day_date_time = $$day_date_time; 
		$stmt = $db->prepare(" SELECT * FROM `stats` WHERE `date`=? "); 
		$stmt->execute(array($day_date_time)); 
		$rows = $stmt->fetchAll(PDO::FETCH_ASSOC); 
		array_push($hits_array, $rows[0]['today_hits']); 
		array_push($days_array, date('d-M', strtotime($day_date_time))); 
	 }	  
	 $hits_array = json_encode($hits_array); 
	 $hits_array = str_replace('"',"",$hits_array); 
	 $days_array = json_encode($days_array); 
	?> 
	<script> 
		$(function () { 
    $('#container_graph').highcharts({ 
        title: { 
            text: 'Monthly Hits Statistics', 
            x: -20 //center 
        }, 
        subtitle: { 
            text: 'Powered by: Brainy PRB', 
            x: -20 
        }, 
        xAxis: { 
            categories: <?php echo $days_array;?> 
        }, 
        yAxis: { 
            title: { 
                text: 'Hits' 
            }, 
            plotLines: [{ 
                value: 0, 
                width: 1, 
                color: '#808080' 
            }] 
        }, 
        legend: { 
            layout: 'vertical', 
            align: 'right', 
            verticalAlign: 'middle', 
            borderWidth: 0 
        }, 
        series: [{ 
            name: 'Visits', 
            data: <?php echo $hits_array;?>}] 
    }); 
}); 
	</script> 
</body> 
</html>

Did this file decode correctly?

Original Code

<?php
date_default_timezone_set('Europe/London');
include('/home/easymoneysystemz/public_html/affcentre/controller/affiliate-tracking.php');
//error_reporting(0);
//ini_set('display_errors','on');
//include the config file
include('includes/config.php');
 // Process PayPal payment
  if (isset($_POST['purchase'])) {
	//check_slot_availability
	$check = $site_data->check_slot_availability();
	if(!$check) {
	 $link = "index.php?action=slot_unavailable";
	 redirect($link);
	}
	$packageid = $_POST['packageid'];	
	$order_type = $_POST['order_type'];	
	$links = $_POST['links'];	
	$banner_links = $_POST['banner_links'];	
	$banner_links = json_encode($banner_links);
	$link = $links[0];	
	$links = json_encode($links);
	$name = $_POST['name'];
	$email = $_POST['email'];
	$cname = $_POST['cname'];
	$price = $site_data->get_price($packageid);	
	//if banner order skip screenshot generation section
	if($order_type == 2) {
		GOTO SKIP_SCREENSHOT;
	}
	//generate screenshot of the each link	
		$img = mt_rand().".gif"; //random image name		
		$url = "http://easy-money-systemz.com/premium-traffic-rotator/shots.php?urls=$links&&img=$img";
		$thumb_url = "http://easy-money-systemz.com/premium-traffic-rotator/gifs/$img";
		
		// Get cURL resource
		$curl = curl_init();
		// Set some options - we are passing in a useragent too here
		curl_setopt_array($curl, array(
			CURLOPT_RETURNTRANSFER => 1,
			CURLOPT_URL => $url,
			CURLOPT_USERAGENT => 'Brainy cURL Request'
		));
		// Send the request & save response to $resp
		session_write_close();
		$resp = curl_exec($curl);
		// Close request to clear up some resources
		curl_close($curl);

		// // create a new cURL resource
		 // $ch = curl_init();
		
		// // set URL and other appropriate options
		 // curl_setopt($ch, CURLOPT_URL, $url);
		 // curl_setopt($ch, CURLOPT_HEADER, 0);
		 // curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
		
		// // grab URL and pass it to the browser
		 // echo curl_exec($ch); exit;
		
		// // close cURL resource, and free up system resources
		 // curl_close($ch);
	
	//create proforma invoice for site orders
	$invoice_id = $site_data->create_proforma_invoice_site($packageid,$links,$name,$email,$cname,$order_type,$thumb_url);
	SKIP_SCREENSHOT: //if it is banner order
	if($order_type == 2) {
	 //create proforma invoice for banner orders
	 $invoice_id = $site_data->create_proforma_invoice_banner($packageid,$links,$name,$email,$cname,$order_type,$banner_links);	
	}
	if(1 == 1) {	
	 if($_POST['pmode'] == 1) { //process order for Payza
	 
	// Prepare GET data
	$query = array();
	$query['notify_url'] = 'http://easy-money-systemz.com/premium-traffic-rotator/ipn.php';
	$query['cmd'] = '_cart';
	$query['upload'] = '1';
	$query['business'] = $site_data->get_ppemail();
	$query['item_name_1'] = "Rotator Purchase | Invoice ID:".$invoice_id;
	$query['item_number_1'] = '1';
	$query['amount_1'] = $price;
	$query['currency_code'] = "USD";

	// Prepare query string
	$query_string = http_build_query($query);

	header('Location: https://www.paypal.com/cgi-bin/webscr?' . $query_string);
	}
  
  else { //process order for Payza		   
   
  // Prepare GET data
		$query = array();
		$query['ap_returnurl'] = 'http://easy-money-systemz.com/premium-traffic-rotator/ipn.php';
		$query['ap_cancelurl'] = 'http://easy-money-systemz.com/premium-traffic-rotator/cancel.php';
		$query['ap_merchant'] = $site_data->get_pzemail();
		$query['ap_purchasetype'] = 'item';   

		//main item
		$query['ap_itemname'] = "Rotator Purchase | Invoice ID:".$invoice_id;
		$query['ap_itemcode'] = "3099-XYZ";
		$query['ap_amount'] = $price;                           
		$query['ap_currency'] = "USD";

		// Prepare query string
		$query_string = http_build_query($query);

	 //header('Location:  https://sandbox.Payza.com/sandbox/payprocess.aspx?' . $query_string); //Sandbox
	 header('Location: https://secure.payza.com/checkout?' . $query_string); //Live
  }
  }
   else {
   echo "<h5 class='text-center'>Please enter valid amount</h5>";
  }
 } 
 
 //process submit_feedback form
 if(isset($_POST['submit_feedback'])) {
  if( !empty($_POST['name']) && !empty($_POST['message']) ) {
	$stmt = $db->prepare("INSERT INTO `feedbacks`(name,website,message) VALUES(:name,:website,:message)");
	$stmt->execute(array(':name' => $_POST['name'], ':website' => $_POST['website'], ':message' => $_POST['message']));
	$link = "index.php?action=feedback_posted";
	redirect($link);
  }
 }
  
  //process submit_contact form
 if(isset($_POST['submit_contact'])) {
  if( !empty($_POST['name']) && !empty($_POST['message']) ) {
	$mail = "[email protected]";
	$headers = "From:  [email protected] \r\n";
	$headers .= "MIME-Version: 1.0\r\n";
	$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
	$msg = "
			<b>Name: </b> $_POST[name]<br><b>Email: </b> $_POST[email]<br>
			<b>Country: </b> $_POST[country]<br>
			<b>Message: </b> $_POST[message]
		   ";
	mail($mail, "Contact Form Message", $msg, $headers);
	$link = "index.php?action=contact_posted";
	redirect($link);
  }		  
 }
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>EMS Premium Traffic Systemz</title>
	
	<!-- core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <link href="css/animate.min.css" rel="stylesheet">
    <link href="css/prettyPhoto.css" rel="stylesheet">
    <link href="css/main.css" rel="stylesheet">
    <link href="css/responsive.css" rel="stylesheet">
    <link href="css/login.css" rel="stylesheet">
     <link href="css/prices.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->       
    <link rel="shortcut icon" href="images/favicon.png">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="images/ico/apple-touch-icon-57-precomposed.png">
	
	<link rel="stylesheet" href="css/cstyle.css" type="text/css">
	
		
		
	<script>    
	
    function CountDownTimer(dt, id, distance)
    {
		
        var _second = 1000;
        var _minute = _second * 60;
        var _hour = _minute * 60;
        var _day = _hour * 24;
        var timer;

        function showRemaining() {
            if (distance < 0) {
                clearInterval(timer);
				var ids='countdown-' + id;
                document.getElementById(ids).innerHTML = 'EXPIRED!';

                return;
            }
            var days = Math.floor(distance / _day);
            var hours = Math.floor((distance % _day) / _hour);
            var minutes = Math.floor((distance % _hour) / _minute);
            var seconds = Math.floor((distance % _minute) / _second);
            //add zeros to single digits
			if (days.toString().length == 1) {
				days = "0" + days;            
			}
			if (hours.toString().length == 1) {
				hours = "0" + hours;            
			}
			if (minutes.toString().length == 1) {
				minutes = "0" + minutes;            
			}
			if (seconds.toString().length == 1) {
				seconds = "0" + seconds;            
			}
			
			//set time holder element vars
			var ad = "ad-"+id;
			var ah = "ah-"+id;
			var am = "am-"+id;
			var as = "as-"+id;
            document.getElementById(ad).innerHTML = days;
            document.getElementById(ah).innerHTML = hours;
            document.getElementById(am).innerHTML = minutes;
            document.getElementById(as).innerHTML = seconds;
        }

        timer = setInterval(showRemaining, 1000);
    }
	/*
	//function to rotate thumbnails
	
  window.setInterval(function () {	  
			var xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				var index;
				var a = JSON.parse(xmlhttp.responseText);
				for (index = 0; index < a.length; index++) {
					get_thumb(a[index]);
				}				
            }
        }
        xmlhttp.open("GET", "thumb_rotator.php", true);
        xmlhttp.send();
	}, 3000);
	
	function get_thumb(id) {
		var id_img = "image-"+id;
		var hits = "hits-"+id;
		var link = "link-"+id;
		    var xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				var links = JSON.parse(xmlhttp.responseText);
				for (var index in links) {
					document.getElementById(id_img).src = links['path'];								
					document.getElementById(hits).innerHTML = links['hits'];
					document.getElementById(link).href = links['link'];
				}                
            }
        }
        xmlhttp.open("GET", "get_thumb.php?id="+id, true);
        xmlhttp.send(); 
	}
	*/
	
	//function to update today hits
  window.setInterval(function () {	  
			var xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			  document.getElementById("today_hits").innerHTML = xmlhttp.responseText;
            }
        }
        xmlhttp.open("GET", "today_hits.php", true);
        xmlhttp.send();
	}, 1000);	
	
	//function to update online visitors (session based)
  window.setInterval(function () {	  
			var xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			  document.getElementById("online_visitors").innerHTML = xmlhttp.responseText;
            }
        }
        xmlhttp.open("GET", "online_visitors.php", true);
        xmlhttp.send();
	}, 1000);
	
	
</script>
</head><!--/head-->

<body class="homepage">

    <header id="header">
        <div class="top-bar">
            <div class="container">
                
            </div><!--/.container-->
        </div><!--/.top-bar-->

        <nav class="navbar navbar-inverse" role="banner">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="index.php"><img src="images/logo.png" alt="logo"></a>
                </div>
				
                <div class="collapse navbar-collapse navbar-right">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="index.html">Home</a></li>
                        <li><a href="#feature">Service</a></li>
                        <li><a href="#recent-works">Slots</a></li>
                        <li><a href="#contact-page">Order</a></li> 
                        <li><a href="#content">Testimonial</a></li>                        
                    </ul>
                </div>
            </div><!--/.container-->
        </nav><!--/nav-->
		
    </header><!--/header-->

	<?php
	if(isset($_GET['action'])){
		//check the action
		switch ($_GET['action']) {
			case 'slot_unavailable':
			echo "<h4 class='text-center status alert alert-success'>Slot is unavailable</h4>";
			break;
			case 'feedback_posted':
			echo "<h4 class='text-center status alert alert-success'>Feedback Successfully Submitted</h4>";
			break;
			case 'contact_posted':
			echo "<h4 class='text-center status alert alert-success'>Message Successfully Sent</h4>";
			break;					
		}

	}
	?>
   		<!-- banner start -->
		<!-- ================ -->
   <div class="row" style="background: url(./images/bg.jpg);background-size: cover;">
  <div class="col-md-12">
  <div class="center"> 
  <div class="jumbotron">
  <h1><font color="#fff" font-family: 'Black Ops One', cursive; text-shadow: black 0.1em 0.1em 0.2em;>EMS Premium</font><font color="#fff" font-family: 'Black Ops One', cursive; text-shadow: black 0.1em 0.1em 0.2em;><strong>Traffic Systemz</strong></font> - <font color="#fff">affordable advertising</font></h1><BR>
  <p style="font-size:1.50em; font-style:italic;">Providing quality advertising at affordable price since September 2015.</p><BR>
  <p style="font-size:1.50em; line-height:1.5em;">Need <b>sales</b> & <b>referrals</b>? <BR><BR> Running on a tight budget or simply don't want to spend a fortune advertising on several PTC sites? <b>You definitely came to the right place!</b></p><BR>
  <p><a class="btn btn-primary btn-lg" href="#contact-page" role="button">Click here for more information</a></p>
</div></div></div>
  
  
  
 
  </div>
  </div>
  	
		<!-- banner end -->

    <section id="feature" style="background: #e0e0e0;">
        <div class="container">
           <div class="center wow fadeInDown">
                <h2 style="font-size: 50px;">HOW IT WORKS?</h2>
                <p class="lead">EXTREMELY POWERFUL ADVERTISING SERVICE</p>
            </div>

            <div class="row">
                <div class="features">
                  <div class="col-md-6">
                    <div class="center"> 
                    <h2 style="font-size: 30px; font-family: Sans Serif; line-height: 1.5em;">FULL PAGE EXPOSURE</h2> 
                    <h3>You will get user attentions easily with full page exposure</h3> 
                    <p style="font-size: 30px; font-family: Fjalla One;">With our rotator you will get full page ads from the high traffic sites that we get all our premium traffic from. This means you will get more exposure to people that want to buy or sign up for your offers.</p>
                   </div>
                   </div><!--/.col-md-8-->
                    
                    <div class="col-md-6"> 
                  <div class="wow fadeInDown" data-wow-duration="1000ms" data-wow-delay="600ms">
                        <div class="feature-wrap">
                          <div class="center"> 
                           <img style="width: 65%;" src="images/website22.png">   
                        </div>
                      </div>
                    </div><!--/.col-md-4-->   
                </div><!--/.services-->
             </div><!--/.md12-->
            </div><!--/.row-->    
        </div><!--/.container-->
    </section><!--/#feature-->

    <section id="feature" >
        <div class="container">

            <div class="row">
                <div class="features">
                  <div class="col-md-6"> 
                   <div class="center"> 
                    <div class="wow fadeInDown" data-wow-duration="1000ms" data-wow-delay="600ms">
                        <div class="feature-wrap">
                            <img style="width: 65%;" src="images/verification25.png">   
                        </div>
                      </div>
                    </div><!--/.col-md-4-->
                   </div><!--/.col-md-8-->
                    
                    <div class="col-md-6"> 
                    <div class="center"> 
                    <h2 style="font-size: 30px; font-family: Sans Serif; line-height: 1.5em;">FAST APPROVAL</h2>
                    <h3>You order will be process with in 1-12 hours.</h3>                
                    <p style="font-size: 30px; font-family: Fjalla One;">You will get the fastest possible solutions to help you suit your business needs, that way you can start too see why you must buy this now and feel that its the best thing for you moving forward with your future in business.</p>
                 </div>
                </div><!--/.services-->
             </div><!--/.md12-->
            </div><!--/.row-->    
        </div><!--/.container-->
    </section><!--/#feature-->

     <section id="feature" style="background: #e0e0e0;">
        <div class="container">
            <div class="row">
                <div class="features">
                 <div class="col-md-6">
                 <div class="center"> 
                  <h2 style="padding:35px;">INCREASE YOUR SALES</h2>
                   <h3>You will get visitors from high traffic websites.</h3>
                    <p style="font-size: 30px; font-family: Sans Serif; line-height: 1.5em;>Increasing website traffic and sales revenue has a lot of people concerned now that the economy is showing signs of another recession. With so many websites out there fighting for the competition and more and more shaky advertisers, if you want your site to succeed, whether it is an informational blog or a business that sells products and services and depends on advertising as well, then you need to get your traffic and sales revenue moving.</p>
                    </div>
                   </div><!--/.col-md-6-->
                    
                    <div class="col-md-6"> 
                  <div class="wow fadeInDown" data-wow-duration="1000ms" data-wow-delay="600ms">
                        <div class="feature-wrap">
                         <div class="center"> 
                          <img style="width: 75%;" src="images/sales1.png">  
                        </div>
                      </div>
                    </div><!--/.col-md-6-->
                
                    
                </div><!--/.services-->
             </div><!--/.md12-->
            </div><!--/.row-->    
        </div><!--/.container-->
    </section><!--/#feature-->

   

    <section id="recent-works" style="background: url(./images/bg.jpg);background-size: cover;">
        <div class="container">
            <div class="center wow fadeInDown">
                <h2 style="color:white;">OUR SLOTS</h2>
                <tbody>
                <table style="margin:0 auto;">
                <tr>
                <td style="color:#fff; padding:0 20px; font-size:16px;">Total Visits</td>
                <td style="color:#fff; padding:0 20px; font-size:16px;">Yesterday Visits</td>
                <td style="color:#fff; padding:0 20px; font-size:16px;">Today Visits</td>
                <td style="color:#fff; padding:0 20px; font-size:16px;">Online Visitors</td>
                <td style="color:#fff; padding:0 20px; font-size:16px;">Slots in use</td>
                </tr>
                 <tr style="line-height:35px;">
                <th style="text-align:center; font-size:22px; color:#fff;"><?php echo $site_data->get_total_visits();?></th>
                <th style="text-align:center; font-size:22px; color:#fff;"><?php echo $site_data->get_yesterday_hits();?></th>
                <th style="text-align:center; font-size:22px; color:#fff;"><span id="today_hits"></span></th>
                <th style="text-align:center; font-size:22px; color:#fff;"><span id="online_visitors"></span></th>
                <th style="text-align:center; font-size:22px; color:#fff;"><?php echo $site_data->get_num_inuse_slots()."/20";?></th>
           
                </tr>
                </table>
                </tbody><BR>
                 <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
  Daily Traffic Stats History
</button><BR><BR>
<div class="collapse" id="collapseExample">
  <div class="well">
    <div id="container_graph" style="min-width: 1096px; height: 400px; margin: 0 auto"></div>
  </div>
</div>
            </div>

            <div class="row"> 
				 
				<?php
				//load active ad slots
				$ad_slots = $site_data->load_ad_slots("all");
				$count = 0;
				foreach($ad_slots as $ad_slot) {
				//only allow "site"	orders in slots
				if($ad_slot['order_type'] == 1) {
				   //count this order
				   $count++;
				  //get required vars
				  $order_id = $ad_slot['id'];
				  $pack_id = $ad_slot['packageid'];				
				  $hits = $site_data->get_ad_hits($ad_slot['id']);
				  $pack_data = $site_data->get_package_data($pack_id);
				  $thumbnail = $site_data->get_thumbnail($ad_slot['id']);
				  $days = $pack_data[0]['days'];
				  $hours = $days * 24;
				  $date = $ad_slot['date'];
				  if($order_id == 147) {
					  echo $date;
				  }
				  $date = strtotime($date) + $hours * 3600;
				  $cdate = date("m/d/Y H:i", $date);
				  $date = date( "Y-M-d H:i:s", strtotime( $date ) + $hours * 3600 );;//expire time
				  //get distance				  
				  $expiry_date = strtotime($cdate);
				  $distance = $expiry_date - time();
				  $distance = $distance * 1000;
				  //some time stuff
					$time = new DateTime($cdate);
					$adate = $time->format('Y-m-d');
					$atime = $time->format('H:i:s');
					$datetime = "iso".$adate."T".$atime;
					
					
				   echo "<div class='col-md-3 col-sm-4 col-xs-6'>						
				  		 <div class='recent-work-wrap'>
				  			<img src='$thumbnail' class='img-responsive' id='image-$ad_slot[id]' />
				  		   <div class='overlay'>
				  			<div class='recent-work-inner' style='border-radius:12px;'>
				  			 <h3 style='text-align:center;'><a href='#'>$ad_slot[cname]</a></h3>
				  			   <p class='text-center'><strong>Hits: <span id='hits-$ad_slot[id]'>$hits</span></strong></p>
							   <table id='t' border='0' cellpadding='0' style='margin:0 auto;'>
								   <tr class='ar'>
								   <td id='ad-$order_id' style='font-size:20px; font-weight:400;'>0</td>
								   <td>:&nbsp;</td>
								   <td id='ah-$order_id' style='font-size:20px; font-weight:400;'>0</td>
								   <td>:&nbsp;</td>
								   <td id='am-$order_id' style='font-size:20px; font-weight:400;'>0</td>
								   <td>:&nbsp;</td>
								   <td id='as-$order_id' style='font-size:20px; font-weight:400;'>0</td>
								   </tr>
								   
								   <tr class='bl'>
								   <td id='bd' style='font-size:6.8pt;'>Day(s)</td>
								   <td></td>
								   <td id='bh' style='font-size:6.8pt;'>Hour(s)</td>
								   <td></td>
								   <td id='bm' style='font-size:6.8pt;'>Minute(s)</td>
								   <td></td>
								   <td id='bs' style='font-size:6.8pt;'>Second(s)</td>
								   </tr>	
									<tr>
									
									</tr>									
							   </table>
				  			   <div class='row'>
								<a id='link-$ad_slot[id]' href='visit.php?id=$ad_slot[id]' target='_blank'><h3 class='text-center'>Visit</h3></a>
				  			   </div>
				  			</div> 
				  		   </div>
				  		 </div>	
				  		</div>
				  	  ";
				   echo "<script type='text/javascript'>CountDownTimer('$cdate','$order_id', '$distance');</script>";	  
				  }
				} 
				//handle available slots
				$needle = 20;
				if($count == 0) {$needle = 20;}
				//if($count >= 10) {$needle = $needle + 12;}
				for($i=0;$i < $needle - $count;$i++) {
				echo "	<div class='col-md-3 col-sm-4 col-xs-6'>
						 <div class='recent-work-wrap'>
						  <img class='img-responsive' src='images/available-img.png' alt=''>
						   <div class='overlay'>
							<div class='recent-work-inner'>
							 <h3 style='text-align:center;'><a href='#contact-page'>Buy Now</a> </h3>
							</div> 
						   </div>
						 </div>						
						</div>
					";	
				}
				
				?>	
            </div><!--/.row-->
        </div><!--/.container-->
    </section><!--/#recent-works-->
       <BR><BR>
         <div class="container">
        <div class="row">
     <div class="col-md-6 wow fadeInDown">
    <h2 style="text-align:center; font-weight:400; font-size:40px;">Main Features</h2>
    <table>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Get referrals or affiliates to any program</h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Generate leads & sales</h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Get your site known online!</h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Small, non-intrusive upper ad-frame</h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Advertise up to 5 ads in one slot</h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Request URL change once per 24 hours</h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Fast & professional support</h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;Get referrals or affiliates to any program</h4></td>
    </tr>
    </table>
  </div>

  <div class="col-md-6 wow fadeInDown"><h2 style="text-align:center; font-weight:400; font-size:40px;">Pricing</h2>
    <table>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;1 Day Site Ads <span class="p20">$4.00</span> </h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;3 Days Site Ads <span class="p20">$10.00</span> </h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;7 Days Site Ads <span class="p20">$25.00</span> & Banner Ads <span class="p20">$5.00</span></h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;14 Days Site Ads <span class="p20">$45.00</span> & Banner Ads <span class="p20">$8.00</span></h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;30 Days Site Ads <span class="p20">$99.00</span> & Banner Ads <span class="p20">$10.00</span></h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;60 Days Site Ads <span class="p20">$179.00</span> & Banner Ads <span class="p20">$27.00</span></h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;90 Days Site Ads <span class="p20">$325.00</span> & Banner Ads <span class="p20">$27.00</span></h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;180 Days Site Ads <span class="p20">$575.00</span> & Banner Ads <span class="p20">$50.00</span></h4></td>
    </tr>
    <tr>
    <td><i class="fa fa-check-circle fa-2x"></i></td>
    <td><h4 style="font-weight:600; font-size:20px;">&nbsp;&nbsp;365 Days Site Ads <span class="p20">$959.00</span> & Banner Ads <span class="p20">$100.00</span></h4></td>
    </tr>
    </table></div>
  </div><!--/.row-->
  </div><!--/.container--> 
    <BR><BR>
     <section id="contact-page" >
        <div class="container">
        <div class="row">
          <div class="col-md-12 wow fadeInDown">
            <div class="center">        
                <h2 style="color: #fff;">Place Your Order</h2>
            </div>
            </div><!--/cd-md-12-->
            </div> <!--/row-->
            
            
            <div class="row" style="color: white;">
          <div class="col-md-12 col-sm-8 wow fadeInDown">
		  
            <div class="row contact-wrap" style="background: background: #fff;">
                <form method="post" action="index.php">
				<h4 class="text-center" style="color: white;"><u>Select Your EMS Package:</u></h4><BR>
                    <div class="col-sm-5 col-sm-offset-1">
                        <div class="form-group">
                            <label>Name *</label>
                            <input type="text" name="name" class="form-control" required="required" />
                        </div>
                        <div class="form-group">
                            <label>Email *</label>
                            <input type="email" name="email" class="form-control" required="required" />
                        </div>
						<div class="form-group">
                            <label>Campaign Name *</label>
                            <input type="text" name="cname" class="form-control" required="required" />
                        </div>
                       <div class="form-group">
                            <label>Site Link 1 *</label>
                            <input type="text" name="links[]" class="form-control" required="required"/>
                        </div>
                       <div class="form-group">
                            <label>Site Link 2 </label>
                            <input type="text" name="links[]" class="form-control" />
                        </div> 
                        <div class="form-group">
                            <label>Site Link 3 </label>
                            <input type="text" name="links[]" class="form-control" />
                        </div>     
                         <div class="form-group">
                            <label>Site Link 4 </label>
                            <input type="text" name="links[]" class="form-control" />
                        </div>                  
                    </div>
                    <div class="col-sm-5">
                    
                         <div class="form-group">
                            <label>Site Link 5 </label>
                            <input type="text" name="links[]" class="form-control" />
                        </div>
						
                        <div class="form-group">
                            <label>Plans Pricing</label>
                             <!-- Select Package -->
							<div class="control-group">
							  <div class="controls">
								<select id="packageid" name="packageid" class="form-control">
								<?php
								//get packages
								$packages = $site_data->get_packages(1);
								foreach($packages as $package) {
								 $price = $site_data->get_price($package['id']);	
								 echo "<option value='$package[id]'>$package[days] Day(s) | $ $price</option>";
								}
								?>
								</select>
							  </div>
							</div>
						</div> 
						 <div class="form-group">
							<label>Payment Processor</label>
							<select id="pmode" name="pmode" class="form-control">
							  <option value="1">Paypal</option>
							  <option value="2">Payza</option>
							</select>
                        </div>
						<div class="checkbox">
						 <label>
						  <input type="checkbox" required=""> I accept and agree Easy-Money-Systemz.com <a href="#terms">Terms Of Service
						 </a></label>
					    </div>						
                        <div class="form-group">
                            <input type="hidden" name="order_type" value="1" />
							<button type="submit" id="purchase" name="purchase" class="btn btn-primary btn-lg">Order Now</button>
                        </div>
                    </div>
                </form> 
                </div>
				
               </div><!--/col-md-7 col-sm-8-->
			   </div><!--/.row-->
            
        
    
    
    <div class="container">
    <div class="row">
    <div class="col-md-12 col-sm-4 wow fadeInDown" style="border-top:2px solid color: white;height:600px">
		<div class="row contact-wrap" style="color: white;">                 
               <form method="post" action="index.php">
				<h4 class="text-center"><u>EMS Banner Packages:</u></h4><BR>
                    <div class="col-sm-5 col-sm-offset-1">
                        <div class="form-group">
                            <label>Name *</label>
                            <input type="text" name="name" class="form-control" required="required" />
                        </div>
                        <div class="form-group">
                            <label>Email *</label>
                            <input type="email" name="email" class="form-control" required="required" />
                        </div>
						<div class="form-group">
                            <label>Campaign Name *</label>
                            <input type="text" name="cname" class="form-control" required="required" />
                        </div>
                       <div class="form-group">
                            <label>Banner Image Link 1 *</label>
                            <input type="text" name="links[]" class="form-control" required="required" />
                        </div>
						<div class="form-group">
                            <label>Target Link 1 *</label>
                            <input type="text" name="banner_links[]" class="form-control" required="required" />
                        </div>
                       <div class="form-group">
                            <label>Banner Image Link 2 </label>
                            <input type="text" name="links[]" class="form-control" />
                        </div>
						 <div class="form-group">
                            <label>Target Link 2 </label>
                            <input type="text" name="banner_links[]" class="form-control"  />
                         </div>						
						
						</div>
						
						<div class="col-sm-5">
						
                        <div class="form-group">
                            <label>Banner Image Link 3 </label>
                            <input type="text" name="links[]" class="form-control" />
                        </div>     
						<div class="form-group">
                            <label>Target Link 3 </label>
                            <input type="text" name="banner_links[]" class="form-control"  />
                        </div>						
                         <div class="form-group">
                            <label>Banner Image Link 4 </label>
                            <input type="text" name="links[]" class="form-control" />
                        </div>    
						<div class="form-group">
                            <label>Target Link 4 </label>
                            <input type="text" name="banner_links[]" class="form-control"  />
                        </div>												                                        
                    
                         <div class="form-group">
                            <label>Banner Image Link 5 </label>
                            <input type="text" name="links[]" class="form-control" />
                        </div>
						<div class="form-group">
                            <label>Target Link 5 </label>
                            <input type="text" name="banner_links[]" class="form-control"  />
                        </div>						
						
                        <div class="form-group">
                            <label>Plans Pricing</label>
                            <!-- Select Package -->
							<div class="control-group">
							  <div class="controls">
								<select id="packageid" name="packageid" class="form-control">
								<?php
								//get packages
								$packages = $site_data->get_packages(2);
								foreach($packages as $package) {
								 $price = $site_data->get_price($package['id']);	
								 echo "<option value='$package[id]'>$package[days] Day(s) | $ $price</option>";
								}
								?>
								</select>
							  </div>
							</div>
						</div> 
						 <div class="form-group">
							<label>Payment Processor</label>
							<select id="pmode" name="pmode" class="form-control">
							  <option value="1">Paypal</option>
							  <option value="2">Payza</option>
							</select>
                        </div>   
					   <div class="checkbox">
						<label>
						  <input type="checkbox" required=""> I accept and agree Easy-Money-Systemz.com <a href="#terms"">Terms Of Service
						</a></label>
					   </div>						
                        <div class="form-group">
							<input type="hidden" name="order_type" value="2" />
							<button type="submit" id="purchase" name="purchase" class="btn btn-primary btn-lg">Order Now</button>
                        </div>
                    </div>
                </form> 
                </div>    
    </div><!--/col-md-5 col-sm-4-->
	
 </div><!--/.row-->
 </div><!--/.container-->
</section><!--/#contact-page-->
<section id="terms" style="margin-top:100px;">
    <div class="container">
        <div class="row">
          <div class="col-md-12 wow fadeInDown">
          <div class="center">        
            <?php
			 echo $site_data->get_tos_content();
			?>

          </div>
          </div>
    </section>


<!-- Modal Testimonial Box -->

<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="exampleModalLabel">Testimonial</h4>
      </div>
      <div class="modal-body">
        <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
        <div class="form-group">
                            <label>Name *</label>
                            <input type="text" id="name" name="name" class="form-control" required="required" />
                        </div>
                         <div class="form-group">
                            <label>Website *</label>
                            <input type="text" id="website" name="website" class="form-control" />
                        </div>
						<div class="form-group">
                            <label>Message *</label>
                            <textarea id="message" name="message" class="form-control" required="required"></textarea>
                        </div>                               
      </div>
      <div class="modal-footer">
        <button type="submit" class="btn btn-success" name="submit_feedback">Send message</button>
      </div>
	  </form>
    </div>
  </div>
</div>

<!-- Modal Contact Us Box -->

<div class="modal fade" id="exampleModal1" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="exampleModalLabel">Testimonial</h4>
      </div>
      <div class="modal-body">
        <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST">
        <div class="form-group">
                            <label>Name *</label>
                            <input type="text" id="name" name="name" class="form-control" required="required" />
                        </div>
                        <div class="form-group">
                            <label>Email *</label>
                            <input type="text" id="email" name="email" class="form-control" required="required" />
                        </div>
						<div class="form-group">
                            <label>Country</label>
                            <input type="text" id="country" name="country" class="form-control" />
                        </div>
						<div class="form-group">
                            <label>Message *</label>
                            <textarea id="message" name="message" class="form-control" required="required"></textarea>
                        </div>                               
      </div>
      <div class="modal-footer">
        <button type="submit" class="btn btn-success" name="submit_contact">Send message</button>
      </div>
	  </form>
    </div>
  </div>
</div>

<!-- Modal Testimonial Box -->


   <section id="content">
        <div class="container">
            <div class="row">
               <div class="col-xs-12 col-md-8 wow fadeInDown">
                    <div class="testimonial">
                        <h2>Testimonials</h2>
						<?php
						 //fetch and echo feedbacks`
						  $stmt = $db->prepare(" SELECT * FROM `feedbacks` WHERE `approve`=? ORDER BY `date` DESC ");
						  $stmt->execute(array(1));
						  $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
						  $feedbacks = "";
						  foreach($rows as $row) {
						   echo "
						        <div class='media testimonial-inner'>
									<div class='media-body'>
								  <blockquote>
										<p>$row[message]</p>
										<span><strong>-$row[name]/</strong> $row[website]</span>
										</blockquote>
									</div>
								</div>
								";
						  }
						?>                     

                         </div>
                       </div> <!--/col-xs-12 col-md-8-->
                       
                       <div class="col-xs-6 col-md-4 wow fadeInDown">
					    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@getbootstrap"><a href="#exampleModal">Submit Testimonial</a></button>						
					   </div>
					   <div class="col-xs-6 col-md-4 wow fadeInDown">
					    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal1" data-whatever="@getbootstrap"><a href="#exampleModal">Contact Us</a></button>						
					   </div>
                                          
                       
                    </div><!--/row-->

                    </div>
    </section><!--/#content-->
    


    <footer id="footer" class="midnight-blue">
        <div class="container">
            <div class="row">
                <div class="col-sm-6">
                    &copy; 2015 - 2016. EMS Premium Traffic Systemz Design & Developed By <a href="http://msdigitalmediagroup.com" title="EMS Premium Traffic Site Owned">Easy Money Systemz</a>.
                </div>
                <div class="col-sm-6">
                    <ul class="pull-right">
                        <li class="active"><a href="https://easy-money-systemz.com/">Home</a></li>
                        <li><a href="#recent-works">Slots</a></li>
                        <li><a href="#contact-page">Order</a></li> 
                        <li><a href="#content">Testimonial</a></li> 

                    </ul>
                </div>
            </div>
        </div>
    </footer><!--/#footer-->
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/jquery.prettyPhoto.js"></script>
    <script src="js/jquery.isotope.min.js"></script>
    <script src="js/wow.min.js"></script>
    <script src="js/main.js"></script>
    <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
      <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script>
	<!-- Highchart script files -->       
	<script src="https://code.highcharts.com/highcharts.js"></script>
        <script src="https://code.highcharts.com/modules/exporting.js"></script>
	<?php
	//get last 5 days hits
	 $day_date_time5 = date('Y-m-d', time());
	 $day_date_time4 = date('Y-m-d', strtotime($day_date_time5) - 24*60*60);
	 $day_date_time3 = date('Y-m-d', strtotime($day_date_time5) - 2*24*60*60);
	 $day_date_time2 = date('Y-m-d', strtotime($day_date_time5) - 3*24*60*60);
	 $day_date_time1 = date('Y-m-d', strtotime($day_date_time5) - 4*24*60*60);
	 $hits_array = array();
	 $days_array = array();
	 for($i = 1;$i < 6;$i++) {
		$day_date_time = "day_date_time$i";
		$day_date_time = $$day_date_time;
		$stmt = $db->prepare(" SELECT * FROM `stats` WHERE `date`=? ");
		$stmt->execute(array($day_date_time));
		$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
		array_push($hits_array, $rows[0]['today_hits']);
		array_push($days_array, date('d-M', strtotime($day_date_time)));
	 }	 
	 $hits_array = json_encode($hits_array);
	 $hits_array = str_replace('"',"",$hits_array);
	 $days_array = json_encode($days_array);
	?>
	<script>
		$(function () {
    $('#container_graph').highcharts({
        title: {
            text: 'Monthly Hits Statistics',
            x: -20 //center
        },
        subtitle: {
            text: 'Powered by: Brainy PRB',
            x: -20
        },
        xAxis: {
            categories: <?php echo $days_array;?>
        },
        yAxis: {
            title: {
                text: 'Hits'
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }]
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0
        },
        series: [{
            name: 'Visits',
            data: <?php echo $hits_array;?>}]
    });
});
	</script>
</body>
</html>

Function Calls

None

Variables

None

Stats

MD5 c3782ca9650ef39e7c1c77953b094c6b
Eval Count 0
Decode Time 107 ms