<?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 "<p><br><center><font size=6><img src='images/Purchaseset&forgetsoloads.png'></font><br><br>";
        
		if($_POST['week'] AND $_POST['type']) {
		
			$price = 1000000;
			if($_POST['week']=="1") {
				if($_POST['type']=="Mon/Wed/Fri") $price = $snfsolo1_mwf;
				elseif($_POST['type']=="Tues/Thurs/Sat") $price = $snfsolo1_tts;
				else $price = $snfsolo1_day;
			} elseif($_POST['week']=="2") {
				if($_POST['type']=="Mon/Wed/Fri") $price = $snfsolo2_mwf;
				elseif($_POST['type']=="Tues/Thurs/Sat") $price = $snfsolo2_tts;
				else $price = $snfsolo2_day;
			} elseif($_POST['week']=="3") {
				if($_POST['type']=="Mon/Wed/Fri") $price = $snfsolo3_mwf;
				elseif($_POST['type']=="Tues/Thurs/Sat") $price = $snfsolo3_tts;
				else $price = $snfsolo3_day;
			} elseif($_POST['week']=="4") {
				if($_POST['type']=="Mon/Wed/Fri") $price = $snfsolo4_mwf;
				elseif($_POST['type']=="Tues/Thurs/Sat") $price = $snfsolo4_tts;
				else $price = $snfsolo4_day;
			}
			
			if($_POST['type']=="once") {
			$type = $_POST['day'];
			$number = $_POST['week'];
			} else {
			$type = $_POST['type'];
			$number = $_POST['week']*3;
			}
			
			echo "<b>Price: \$".$price."</b><br><br><br>";

			
      

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

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

	            <input type="image" src="../images/PayPal_BuyNow.jpg" 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; ?> Set N Forget Solo <? 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/payreturn.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; ?> Set 'N Forget Solo(s) <? 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>

<? } if ($stripe<>"") { ?>
<form action="<? echo $stripeurl; ?>/members/ccpayp.php" method="post" target="_top">
<input type="hidden" name="item" value="24">
<input type="hidden" name="userid" value="<? echo $userid; ?>">
<input type="hidden" name="type" value="<?php echo $type;?>">
<input type="hidden" name="number" value="<?php echo $number;?>">
<input type="hidden" name="amount" value="<? echo $price; ?>">
<input type="image" src="/images/ccbutton.jpg" style="cursor: pointer;" border="0" name="submit" alt="Pay by Credit Card">
</form>

          <? }

  			
			
			

			
		
		} else {
		
			$query = "SELECT * FROM pages where name='Auto Send 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 $snfsolo1_mwf; ?><br>
			<input type="radio" name="type" value="Tues/Thurs/Sat"> Tuesday/Thursday/Saturday - $<? echo $snfsolo1_tts; ?><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 $snfsolo1_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 $snfsolo2_mwf; ?><br>
			<input type="radio" name="type" value="Tues/Thurs/Sat"> Tuesday/Thursday/Saturday - $<? echo $snfsolo2_tts; ?><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 $snfsolo2_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 $snfsolo3_mwf; ?><br>
			<input type="radio" name="type" value="Tues/Thurs/Sat"> Tuesday/Thursday/Saturday - $<? echo $snfsolo3_tts; ?><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 $snfsolo3_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 $snfsolo4_mwf; ?><br>
			<input type="radio" name="type" value="Tues/Thurs/Sat"> Tuesday/Thursday/Saturday - $<? echo $snfsolo4_tts; ?><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 $snfsolo4_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);
?>