<?php

session_start();

include "../config.php";
include "../header.php";
include "../style.php";

if( isset($_SESSION["ulogin"]) )
   	{  // members only stuff!
		include("navigation.php");
        include("../banners2.php");

        echo "<font size=2 face='$fonttype' color='$fontcolour'><p><center>";
        
		if($_POST['week'] AND $_POST['type']) {
		
			$price = 1000000;
			if($_POST['week']=="1") {
				if($_POST['type']=="Mon/Wed/Fri") $price = $scheduledsolo1_mwf;
				elseif($_POST['type']=="Fri/Sat/Sun") $price = $scheduledsolo1_fss;
				else $price = $scheduledsolo1_day;
			} elseif($_POST['week']=="2") {
				if($_POST['type']=="Mon/Wed/Fri") $price = $scheduledsolo2_mwf;
				elseif($_POST['type']=="Fri/Sat/Sun") $price = $scheduledsolo2_fss;
				else $price = $scheduledsolo2_day;
			} elseif($_POST['week']=="3") {
				if($_POST['type']=="Mon/Wed/Fri") $price = $scheduledsolo3_mwf;
				elseif($_POST['type']=="Fri/Sat/Sun") $price = $scheduledsolo3_fss;
				else $price = $scheduledsolo3_day;
			} elseif($_POST['week']=="4") {
				if($_POST['type']=="Mon/Wed/Fri") $price = $scheduledsolo4_mwf;
				elseif($_POST['type']=="Fri/Sat/Sun") $price = $scheduledsolo4_fss;
				else $price = $scheduledsolo4_day;
			}
			
			if($_POST['type']=="once") {
			$type = $_POST['day'];
			$number = $_POST['week'];
			} else {
			$type = $_POST['type'];
			$number = $_POST['week']*3;
			}
			
			echo "<b>Price: </b>\$".$price."<br><br><br>";

			
      

          if ($paypal<>"") { ?>

	            <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">

	            <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but01.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">

	            <input type="hidden" name="cmd" value="_xclick">

	            <input type="hidden" name="business" value="<? echo $paypal; ?>">

	            <input type="hidden" name="item_name" value="<? echo $sitename; ?> Scheduled Solos <? echo $userid; ?>">

	            <input type="hidden" name="on0" value="User ID">

				<input type="hidden" name="os0" value="<? echo $userid; ?>">


	            <input type="hidden" name="on1" value="Type">

				<input type="hidden" name="os1" value="<? echo $type; ?>">				
				<input type="hidden" name="custom" value="<? echo $number; ?>">						
	            <input type="hidden" name="amount" value="<? echo $price; ?>">

				<input type="hidden" name="undefined_quantity" value="1">

	            <input type="hidden" name="no_note" value="1">

                <input type="hidden" name="return" value="<? echo $domain; ?>/members/advertise.php">

                <input type="hidden" name="cancel" value="<? echo $domain; ?>/members/advertise.php">

				<input type="hidden" name="notify_url" value="<? echo $domain; ?>/members/advertise_ipn.php">

	            <input type="hidden" name="currency_code" value="USD">

	            </form>

          <? }

		  if ($alertpay<>"") { ?>

	        <form method="post" action="https://www.alertpay.com/PayProcess.aspx" > 

          <input type="hidden" name="ap_purchasetype" value="item"/> 

          <input type="hidden" name="ap_merchant" value="<? echo $alertpay; ?>"/> 

          <input type="hidden" name="ap_currency" value="USD"/> 

          <input type="hidden" name="ap_returnurl" value="<? echo $domain; ?>/members/payreturn.php"/> 

          <input type="hidden" name="ap_itemname" value="<? echo $sitename; ?> Scheduled Solos <? echo $userid; ?>"/> 

          <input type="hidden" name="ap_quantity" value="1"/> 

		  <input type="hidden" name="apc_1" value="<? echo $userid; ?>">
		  <input type="hidden" name="apc_2" value="<? echo $type; ?>">
		  <input type="hidden" name="apc_2" value="<? echo $number; ?>">
          <input type="hidden" name="ap_amount" value="<? echo $price; ?>"/> 

          <input type="image" name="ap_image" src="https://www.alertpay.com/Images/BuyNow/pay_now_3.gif"/> </form>

          <? }

		  if ($moneybookers_email<>"") { ?>

<form action="https://www.moneybookers.com/app/payment.pl" method="post" target="_blank">

<input type="hidden" name="pay_to_email" value="<? echo $moneybookers_email; ?>">

<input type="hidden" name="status_url" value="<? echo $domain; ?>/moneybookers_ipn.php">

<input type="hidden" name="return_url" value="<? echo $domain; ?>/members/payreturn.php">

<input type="hidden" name="cancel_url" value="<? echo $domain; ?>/advertise.php">

<input type="hidden" name="language" value="EN">

<input type="hidden" name="amount" value="<? echo $price; ?>">

<input type="hidden" name="currency" value="USD">

<input type="hidden" name="merchant_fields" value="userid,itemname,stype,snumber">

<input type="hidden" name="itemname" value="<? echo $sitename; ?> Scheduled Solos <? echo $userid; ?>">

<input type="hidden" name="userid" value="<? echo $userid; ?>">
<input type="hidden" name="stype" value="<? echo $type; ?>">
<input type="hidden" name="snumber" value="<? echo $number; ?>">

<input type="hidden" name="detail1_text" value="<? echo $sitename; ?> Scheduled Solos <? echo $userid; ?>">

<input type="image" style="border-width: 1px; border-color: #8B8583" width="82" src="http://www.moneybookers.com/images/logos/checkout_logos/checkout_120x40px.gif">

</form>

          <? }

		  if ($safepay_email<>"") { ?>

<form action="https://www.safepaysolutions.com/index.php" method="post">

<input type="hidden" name="_ipn_act" value="_ipn_payment">

<input type="hidden" name="fid" value="49d5116c623ffa73411fcfd33227c7">

<input type="hidden" name="notifyURL" value="<? echo $domain; ?>/safepay_ipn.php">

<input type="hidden" name="returnURL" value="<? echo $domain; ?>/members/payreturn.php">

<input type="hidden" name="cancelURL" value="<? echo $domain; ?>/advertise.php">

<input type="hidden" name="iowner" value="<? echo $safepay_email; ?>">

<input type="hidden" name="ireceiver" value="<? echo $safepay_email; ?>">

<input type="hidden" name="iamount" value="<? echo $timesoloprice; ?>">

<input type="hidden" name="itemName" value="<? echo $sitename; ?> Scheduled Solos <? echo $userid; ?>">

<input type="hidden" name="itemNum" value="">

<input type="hidden" name="idescr" value="">

<input type="hidden" name="idelivery" value="1">

<input type="hidden" name="iquantity" value="1">

<input type="hidden" name="imultiplyPurchase" value="n">

<input type="hidden" name="custom1" value="<? echo $userid; ?>">
<input type="hidden" name="custom2" value="<? echo $type; ?>">
<input type="hidden" name="custom3" value="<? echo $number; ?>">
<input type="hidden" name="colortheme" value="">

<input type="image" src="https://www.safepaysolutions.com/images/xpmt_paybutton_1.gif" alt="Pay through SafePay Solutions">

</form>

          <? }

  			
			
			

			
		
		} else {
		
			$query = "SELECT * FROM pages where name='Scheduled Solos'";
			$result = mysql_query ($query)
				or die ("Query failed");
			while ($line = mysql_fetch_array($result)) {
				$htmlcode = $line["htmlcode"];
				echo $htmlcode;
	        }
			?>
			
			<br><br>
			
			<b>One week</b>
			<form method=post>
			<input type="hidden" name="week" value="1">
			<input type="radio" name="type" value="Mon/Wed/Fri"> Monday/Wednesday/Friday - $<? echo $scheduledsolo1_mwf; ?><br>
			<input type="radio" name="type" value="Fri/Sat/Sun"> Friday/Saturday/Sunday - $<? echo $scheduledsolo1_fss; ?><br>
			<input type="radio" name="type" value="once"> Once: <select name="day"><option>Sunday</option><option>Monday</option><option>Tuesday</option><option>Wednesday</option><option>Thursday</option><option>Friday</option><option>Saturday</option></select> - $<? echo $scheduledsolo1_day; ?><br>
			
			<br><input type="submit" value="Purchase"></form><br><br>

			
			<b>Two weeks</b>
			<form method=post>
			<input type="hidden" name="week" value="2">
			<input type="radio" name="type" value="Mon/Wed/Fri"> Monday/Wednesday/Friday - $<? echo $scheduledsolo2_mwf; ?><br>
			<input type="radio" name="type" value="Fri/Sat/Sun"> Friday/Saturday/Sunday - $<? echo $scheduledsolo2_fss; ?><br>
			<input type="radio" name="type" value="once"> Once: <select name="day"><option>Sunday</option><option>Monday</option><option>Tuesday</option><option>Wednesday</option><option>Thursday</option><option>Friday</option><option>Saturday</option></select> - $<? echo $scheduledsolo2_day; ?><br>
			
			<br><input type="submit" value="Purchase"></form><br><br>			

			
			<b>Three weeks</b>
			<form method=post>
			<input type="hidden" name="week" value="3">
			<input type="radio" name="type" value="Mon/Wed/Fri"> Monday/Wednesday/Friday - $<? echo $scheduledsolo3_mwf; ?><br>
			<input type="radio" name="type" value="Fri/Sat/Sun"> Friday/Saturday/Sunday - $<? echo $scheduledsolo3_fss; ?><br>
			<input type="radio" name="type" value="once"> Once: <select name="day"><option>Sunday</option><option>Monday</option><option>Tuesday</option><option>Wednesday</option><option>Thursday</option><option>Friday</option><option>Saturday</option></select> - $<? echo $scheduledsolo3_day; ?><br>
			
			<br><input type="submit" value="Purchase"></form><br><br>			
			

			
			<b>One month</b>
			<form method=post>
			<input type="hidden" name="week" value="4">
			<input type="radio" name="type" value="Mon/Wed/Fri"> Monday/Wednesday/Friday - $<? echo $scheduledsolo4_mwf; ?><br>
			<input type="radio" name="type" value="Fri/Sat/Sun"> Friday/Saturday/Sunday - $<? echo $scheduledsolo4_fss; ?><br>
			<input type="radio" name="type" value="once"> Once: <select name="day"><option>Sunday</option><option>Monday</option><option>Tuesday</option><option>Wednesday</option><option>Thursday</option><option>Friday</option><option>Saturday</option></select> - $<? echo $scheduledsolo4_day; ?><br>
			
			<br><input type="submit" value="Purchase"></form><br><br>			
			
			
			<?
		}
		
		
        echo "</font></td></tr></table>";
	}

else
  { ?>

  <font size=2 face="<? echo $fonttype; ?>" color="<? echo $fontcolour; ?>"><p><b><center>You must be logged in to access this site. Please <a href="<? echo $domain; ?>/memberlogin.php">click here</a> to login.</p></b></font><center>

  <? }

include "../footer.php";
mysql_close($dblink);
?>