<?
session_start();
require 'include/announcements.php'; // ITECHBIDS Configuration File
require 'include/itechbids.php'; // Server compatibility Patch
require 'include/calculate.php';
require 'payments/api.php';
if(!isset($_SESSION[username]))
{ 
$link="signin.php";
$url="openashop.php";
echo '<meta http-equiv="refresh" content="0;url='.$link.'?url='.$url.'">';
echo "$lang_675 <a href=$link?$url>$lang_117</a>";
exit();
}
    $qry=mysql_query("select * from genaralsettings where set_id=1");
	$result=mysql_fetch_array($qry);
	$strsite=$result['set_value'];
	
    $qry=mysql_query("select * from genaralsettings where set_id=5");
	$result=mysql_fetch_array($qry);
	$sitename=$result['set_value'];
?>
<?
$canSave=$_POST['canSave'];
if($canSave==1) 
{
		$plan_id=$_POST['rdPlans'];
		$payid=$_POST['paymentid'];
		$plan_check_query="select * from plan where plan_id=$plan_id";
		$plan_check_result=mysql_query($plan_check_query);
		$plan_check_row=mysql_fetch_array($plan_check_result);
	    $amount=$plan_check_row['amount'];
		$scheme=$plan_check_row['scheme'];
$total_setup_fee = $amount;
$producttitle = $scheme;
$default_currency="select * from genaralsettings where set_id=55";
$default_res=mysql_query($default_currency);
$default_row=mysql_fetch_array($default_res);
$default_cur=$default_row[set_value];


$default_currency="select * from genaralsettings where set_id=56";
$default_res=mysql_query($default_currency);
$default_row=mysql_fetch_array($default_res);
$default_cur_code=$default_row[set_value];

$username=$_SESSION[username];
   $query="select * from member_details where user_name ='$username'";
   $table=mysql_query($query);
   if($seller_row=mysql_fetch_array($table))
   {
   $seller_name=$seller_row['user_name'];  
   $seller_email=$seller_row['email']; 
   }
   
        $admin="select * from genaralsettings where set_id=1"; //sitename -> id=1
	    $admin_res=mysql_query($admin);
	    $admin_rec=mysql_fetch_array($admin_res);
	    $yoursite=$admin_rec[set_value];
		
		$admin="select * from genaralsettings where set_id=3"; //sitename -> id=1
	    $admin_res=mysql_query($admin);
	    $admin_rec=mysql_fetch_array($admin_res);
	    $adminmail=$admin_rec[set_value];
			    
		require 'payments/gateways.php';

}
$_SESSION['amount']=$amount;
$_SESSION['productid']=$scheme;
$_SESSION['payment_gateway']=$payid;
$_SESSION['plan_id']=$plan_id;
$asd1 = rand(100, 1000);
$asd2 = date(gis);
$asd=$asd1+$asd2;
$userid=$_SESSION['userid'];
$tr_id = ''.$userid.''.$asd.'##shopcheck##'.$userid.'##'.$plan_id; 

?>
<?	
require 'themes/subscribe.tpl';
?>