<? session_start();
require 'include/configurations.php'; // ITECHBIDS Configuration File
require 'include/itechbids.php'; // Server compatibility Patch
require 'auto.php'; // Server compatibility Patch

$minb=$_GET['minb'];
$maxb=$_GET['maxb'];
$nob=$_GET['nob'];
$pid=$_GET['pid'];
$user_id=$_SESSION[userid];
$_SESSION[userid]=$user_id;

$rantime = rand(2, 10);

$sqlsus="select * from member_details where user_id=$user_id and bid_num>=$nob";
$resultsus=mysql_query($sqlsus);
$totsus=mysql_num_rows($resultsus);
if($totsus>0)
{
$bid_ins="insert into autobids(productid,user_id,maxbid,minbid,bidnum,randomtime) values($pid,$user_id,$maxb,$minb,$nob,$rantime)";
$ins=mysql_query($bid_ins);
echo "$pid";
single_bids($pid,$user_id);
autobids($pid);
}
else {
echo "0";
}
?>