jun. 27, 2006 session_start(); if (!$_GET['option']) $_GET['option']="recent"; include_once ("config/config.php"); include ("themes/".$setts['default_theme']."/header.php"); if ($_GET['option']=="featured") $head = $lang[Featured_Auctions]; else if ($_GET['option']=="recent") $head = $lang[Recently_Listed_Auction]; else if ($_GET['option']=="highbid") $head = $lang[Recently_Bid_On]; else if ($_GET['option']=="ending") $head = $lang[Ending_Soon]; header5($head); if (!$_REQUEST['orderField']) $orderField = "enddate"; else $orderField=$_REQUEST['orderField']; if (!$_REQUEST['orderType']) { $orderType = "ASC"; $newOrder="DESC"; } else { $orderType=$_REQUEST['orderType']; $newOrder=($orderType=="ASC")?"DESC":"ASC"; } $query = "SELECT id, itemname, maxbid, nrbids, enddate, startdate, bidstart, picpath, currency, bn, bnvalue FROM probid_auctions"; $tomorrow = date("Y-m-d H:i:s",time()+86400); $yesterday = date("Y-m-d H:i:s",time()-86400); if ($_GET['option']=="featured") $query .= " WHERE hpfeat='Y' AND closed=0 AND active=1 AND deleted!=1 AND listin!='store' ORDER BY startdate DESC"; else if ($_GET['option']=="recent") $query .= " WHERE closed=0 AND active=1 AND deleted!=1 AND listin!='store' ORDER BY startdate DESC"; else if ($_GET['option']=="highbid") $query .= " WHERE maxbid>0 AND closed=0 AND active=1 AND deleted!=1 AND listin!='store' ORDER BY maxbid DESC"; else if ($_GET['option']=="ending") $query .= " WHERE closed=0 AND active=1 AND deleted!=1 AND enddate>'".$timeNowMysql."' AND listin!='store' ORDER BY enddate ASC"; if ($_GET['start'] == "") $start = 0; else $start = $_GET['start']; $limit = 20; $totalAuctions = getSqlNumber($query); $auctionsQuery = mysql_query($query." LIMIT ".$start.",".$limit.""); $additionalVars = "&option=".$_REQUEST['option']; ?>
\n". " \n". ""; } else { while ($auctionDetails = mysql_fetch_array($auctionsQuery)) { ?> ">
".$lang[noauctionsthiscat]."
$auctionDetails['itemname'], 'id' => $auctionDetails['id']))."\">"; echo ""; echo ""; ?>