<?php session_start();  //Developed by ITechScripts
require 'include/announcements.php'; // ITECHBIDS Configuration File
require 'include/itechbids.php';
require 'include/calculate.php';
require 'payments/api.php';
if(strlen($_SESSION[username])==0)
{
echo '<meta http-equiv="refresh" content="0; url=index.php">';
exit();
} 
 $userid=$_SESSION['userid'];
$pid = $_GET['pid'];
$payamount = site_plans($pid, 'registration_fee');
$scheme = site_plans($pid, 'scheme');
$type="upgrade";
if(($default_mode=="Account") && (pay_account($userid,$payamount,$type))){
$payid="Account";
}
else{
    $payid = $_POST['paymentid'];
}

    $admin_sql="select * from genaralsettings where set_id=1";
    $get_res=mysql_query($admin_sql);
    $get_row=mysql_fetch_array($get_res);
    $yoursite=$get_row['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];
$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];
			    
require 'payments/gateways.php';
		

?>
<?
function diplay_payments()
	{
		$gate_select_query="select * from payment_gateway where status='yes'";
		$gate_select_result=mysql_query($gate_select_query);
?>
	<select name=paymentid>

<?
		$length=1;
		while($gate_select_row=mysql_fetch_array($gate_select_result)) {
		$gateway_id=$gate_select_row['gateway_id'];
            $payment_gateway=$gate_select_row['payment_gateway'];
?>
	<option value="<?=$gateway_id?>"><?=$payment_gateway?></option>



<?
		$length+=1;
		}
?>
</select>
<?
}
?>
<? 
$asd1 = rand(100, 1000);
$asd2 = date(gis);
$asd=$asd1+$asd2;
$userid=$_SESSION['userid'];
$tr_id = ''.$userid.''.$asd.'||mem_up'; 
require'themes/get_plan.tpl'; ?>
</table>
<?
// }
?>	
</tr>
<tr><td>
<?
  require 'templates/'.$tfold.'/footer.php';
?>
</td></tr>
</table>	
 