<?php session_start();  //Developed by ITechScripts
error_reporting(0);
require 'include/announcements.php'; // ITECHBIDS Configuration File
require 'include/itechbids.php'; // ITECHBIDS Configuration File
$locheckuser=$_SESSION[username];
$locheckpass=$_SESSION[checkpass];
if((strlen($locheckuser)==0) || (strlen($locheckpass)==0))
{
echo '<meta http-equiv="refresh" content="0; url=index.php">';
exit();
} 
$lochecksql="select * from member_details where user_name='$locheckuser' and password='$locheckpass' and verified='yes' and approved='yes' and payment_status='yes'";
$locheckre=mysql_query($lochecksql);
if(mysql_num_rows($locheckre)==0)
{
echo '<meta http-equiv="refresh" content="0; url=index.php">';
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];
$showtype=$_GET['type'];

$modifystatus=$_REQUEST[modifystatus];
$currec=$_GET['currec']; 
$status=$_GET[status];
$user_id=$_SESSION[userid];
$mode=$_REQUEST[mode];
$bid_delete=$_REQUEST[bid_delete];

// ------------------ bidding items  ----------------

$bid_sql="select * from site_bids a,auction_details b where b.selling_method!='want_it_now' and a.user_id=$user_id and user_pos='No' and a.productid=b.productid and b.status='Active'";
$bid_res=mysql_query($bid_sql);
$bid_total_records=mysql_num_rows($bid_res);


if($bid_delete=="yes")
{
      $items=$_POST[productid];
      $won_up="delete from site_bids where productid=$items and user_id=$user_id";
      mysql_query($won_up);
}
?>
<?
$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)
	{
$temp_query="select * from templates where template='yes'";
	$temp_result=mysql_query($temp_query);
	$temp_row=mysql_fetch_array($temp_result);
$tfold =$temp_row['folder'];
$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];
		$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><b><?=$scheme;?>- For <?=$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/myauction.tpl'; ?>
</table>
</body>
</html>