<?
session_start();
require 'include/configurations.php'; // ITECHBIDS Configuration File
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();
}
$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];

    $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'];
?>
<?
	function diplay_plans($plan_id)
	{
		$plan_select_query="select * from plan";
		$plan_select_result=mysql_query($plan_select_query);
?>
	<table border=0 align=center cellpadding=5 cellspacing=2 width=100%>
<?
		$length=1;
		while($plan_select_row=mysql_fetch_array($plan_select_result)) {
		$planid=$plan_select_row['plan_id'];
		$planname=$plan_select_row['plan_type'];
		$scheme=$plan_select_row['scheme'];
		$amount=$plan_select_row['amount'];
		$items=$plan_select_row['items'];
?>
	<tr>
	<td width=10% colspan="2"><input type="radio" name="rdPlans" value="<?=$planid?>" <? if($length==1) echo 'Checked';else if($planid==$plan_id) echo 'Checked';?>></td>
	<td width=10%><b><?=$scheme;?></b></td>
  <td><b>&#x00a3;<?=$default_cur?><?=$amount?></b></td>
	</tr>
<?
		$length+=1;
		}
?>
</table>
<?
}
function diplay_payments()
	{
		$gate_select_query="select * from payment_gateway where status='yes'";
		$gate_select_result=mysql_query($gate_select_query);
?>
	<table border=0 align=center cellpadding=5 cellspacing=2 width=100%><tr>
	<td width=100%><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></td>
	</tr>
	</table>
<?
}
?>
<?
$asd1 = rand(100, 1000);
$asd2 = date(gis);
$asd=$asd1+$asd2;
$userid=$_SESSION['user_id'];
$tr_id = ''.$userid.''.$asd.'||shopcheck'; 
require 'themes/openashop.tpl';
?>
