<?php
function checkaucstatus($status)
	{
		$st = $status;
		if($st=="2")
		{
			$qryauc = "select * from auction a left join auc_due_table adt on a.auctionID=adt.auction_id where adt.auc_due_time!=0 and auc_status='".$st."'";
		}
		else
		{
		$qryauc = "select * from auction where auc_status='".$st."'";
		}
		
		$rsauc = mysql_query($qryauc);
		$totalauc = mysql_num_rows($rsauc);
		return $totalauc;
	}
	
	function getcatname($category)
	{
			$qrysel = "select *,c.".$lng_prefix."name as catname from auction a left join products p on a.productID=p.productID left join categories c on a.categoryID=c.categoryID where a.categoryID=".$category." and auc_status='2'";
			$rssel = mysql_query($qrysel);
			$totalsel = mysql_num_rows($rssel);
			return $totalsel;
	}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="verify-v1" content="I+MCQMVtPcr/Ah6TqxPMwx6Ll947YF4TnjBWAndCmJQ=" />
<title>拍客网</title>
<meta name="Description" content="" />
<meta name="Keywords" content="" />
<link href="css/global.css" rel="stylesheet" type="text/css" media="screen" />
<link href="css/hp.css" rel="stylesheet" type="text/css" media="screen" />
  <script language="javascript">
    function _delete_login_fields(_field, _default, _current) {
      if (_default == _current) {
        _field.value='';
      }
    }
  </script>

</head>
<body>
	
<div id="hd" name="__YT">
	<div class="wrap">
		<div class="logo"> <a target="_blank" href="" title="拍客网首页"> <img src="../images/3.gif" alt="麦考林" /></a></div>
		<ul class="hd-my">
				<? if($_SESSION["userid"]==""){ ?>
			<li><a href="">注册</a></li>
			<li><a href="">登录</a></li>
			<li><a href="">我的金点</a></li>
			<li><a href="">我的积分</a></li>
				<? } else { ?>
			<li><?=iconv('gb2312','utf-8',stripslashes($lng_welcome));?>&nbsp;<?=iconv('gb2312','utf-8',stripslashes(getUserName($_SESSION["userid"])));?>&nbsp;<span>|</span>&nbsp;<?=iconv('gb2312','utf-8',stripslashes($lng_availablebids));?> : <span id="bids_count" style="color: #000000"><?=GetUserFinalBids($_SESSION["userid"]);?></span>&nbsp;&nbsp;<a href="logout.html"><font color=blue><?=iconv('gb2312','utf-8',stripslashes($lng_logout));?></font></a></li>
				<? } ?>			
		</ul>		
		<div class="top_mar">				
				<marquee direction="left" scrollAmount="2" onMouseOver='this.stop();' onMouseOut='this.start();' style="cursor:pointer;">
					<div class="red">恭喜</div><div class="blue">yangfeilai</div>在 2009-11-06 12:15:03 获得了<a href="/goods/show/2557" target="_bank">有点充值卡 100</a> 价格：0.0元 节省100.00%
				
					<div class="red">恭喜</div><div class="blue">sinay</div>在 2009-11-06 11:34:32 获得了<a href="/goods/show/2556" target="_bank">纽曼q8</a> 价格：1.5元 节省99.86%
				
					<div class="red">恭喜</div><div class="blue">spring2000</div>在 2009-11-06 11:06:01 获得了<a href="/goods/show/2555" target="_bank">雅诗兰黛鲜活营养精华眼霜</a> 价格：5.1元 节省99.13%
			</marquee>
		</div>			
		<!--ul class="hd-special">
			<li class="s4"><a href="">麦考林用户激活</a></li>
			<li class="s1"><a href=""> 目录购买</a></li>
			<li class="s2"><a href="">绿色订购通道</a></li>
			<li class="s5"><a href="" target="_blank">门店地址</a></li>
		</ul-->
	</div>
	<div class="hd-box">
		<div class="hd-main">
			<ul id="hd-nav">
				<li class="hp"><a href="" title="首页"><span>首页</span></a></li>
				<li class="woman"><a href=""><span>正在热拍(<?=checkaucstatus(2);?>)</span></a>
					<div class="navp">
						<ul class="navlist br1">
		<?
		    
				$qryc = "select *,".$lng_prefix."name as name from categories where status='1' limit 0,".$half1;				
				$resc = mysql_query($qryc);
				$totalc = mysql_num_rows($resc);

				while($cat = mysql_fetch_array($resc))
				{ 
					echo '<li><a href="all_auctions_'.$cat["categoryID"].'.html">&nbsp;&nbsp;&nbsp;'.iconv('gb2312','utf-8',stripslashes($cat['name'])).' ('.getcatname($cat["categoryID"]).')</a></li>';
				}
		?>							
						</ul>
						<ul class="navlist">
							<?
				
				$qryc = "select *,".$lng_prefix."name as name from categories where status='1' limit ".$half2.",".$count1;				
				$resc = mysql_query($qryc);
				$totalc = mysql_num_rows($resc);

				while($cat = mysql_fetch_array($resc))
				{ 
					echo '<li><a href="all_auctions_'.$cat["categoryID"].'.html">&nbsp;&nbsp;&nbsp;'.iconv('gb2312','utf-8',stripslashes($cat['name'])).' ('.getcatname($cat["categoryID"]).')</a></li>';
				}
							
							?>
						</ul>
						<!--ul class="navtm">
							<li><a href="" target="_blank">EUROMODA人气热卖 轻薄塑型打底衣免费送</a></li>
							<li><a href="" target="_blank">RAMPAGE秋冬新款 送价值99元基本高领T恤</a></li>
						</ul-->
					</div>
				</li>
				<li class="beauty"><a href=""><span>即将开始(<?=checkaucstatus(1);?>)</span></a>
				</li>
				<li class="house"><a href=""><span>已售出(<?=checkaucstatus(3);?>)</span></a>
				</li>
				<li class="man"><a href=""><span>优惠活动</span></a>
				</li>
				<li class="all"><a href=""><span>金牌推广计划</span></a></li>
			</ul>
			<!--ul id="hd-cart">
				<li class="cart1"><a href="http://www.m18.com/Order/OrderShopCart.aspx">查看购物车</a></li>
				<li class="cart2"><a href="http://www.m18.com/Order/OrderShopCart.aspx">去结账</a></li>
			</ul-->
		</div>
	</div>
	<div class="wrap hd-subbox">
		<ul class="hd-subnav">
			<li><a href="http://www.m18.com/N1-N1-12-40-1-00-3.htm" class="hl2">今天开拍</a></li>
			<li><a href="http://www.m18.com/N1-N1-21-40-1-00-2.htm" class="hl2">明天开拍</a></li>
			<!--li><a href="http://www.m18.com/Market/DailyScareBuying.aspx">天天抢</a></li>
			<li><a href="http://www.m18.com/N1-N1-12-40-1-00-4.htm">金钻卡尊享区</a></li>
			<li><a href="http://www.m18.com/00-00-12-40-1-00-5.htm">最新商品</a></li>
			<li><a href="http://www.m18.com/static/mag/magazine.html" target="_blank">时尚搭配</a><span class="ico-new">新</span></li-->
		</ul>
		<div id="hd-sr"> <a href="http://www.m18.com/Style/StyleSearch.aspx" class="seniorsr">高级搜索</a>
			<fieldset>
				<legend>搜索</legend>
				<input type="text" name="input" value="输入要找的商品" class="hd-text" onclick="_delete_login_fields(this, '输入要找的商品', this.value);" onFocus="_delete_login_fields(this, 'Password:', this.value);" />
				<input type="submit" name="" value="搜索" class="hd-sbt" />
			</fieldset>
		</div>
	</div>
</div>
</body>
</html>