<!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=utf-8" />
<title>搜索结果 - powered by dedecms</title>
<link href="template/default/style/ask_base.css" rel="stylesheet" type="text/css" />
<link href="template/default/style/ask_list.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--顶部全站导航-->
<div class="sitenav cbody">
	<?php include_once(dirname(__FILE__).'/headmenu.htm'); ?>
</div>

<div class="toplogo cbody margintop">
 	<div class="logobox">
		<img src="template/default/images/toplogo.gif" width="279" height="43" alt="" />	</div>
	<div class="logoright">
		<?php
		if($uid){
			echo '欢迎您：'. $username;
			echo " <a href='../member/control.php'>控制面板</a>";
			echo " <a href=\"../member/index.php?uid=$username\">我的空间</a>";
			echo '  <a href="../member/index_do.php?fmdo=login&dopost=exit">退出</a>';
		}else{
			echo '您好，请您先 <a href="../member/login.php?gourl=../ask/">登陆</a> 或者 <a href="../member/index_do.php?fmdo=user&dopost=regnew">注册</a>';
		}
		?>
		</div>
</div>

<div class="topbox cbody margintop">
	<div class="menu">
		<ul>
			<li><a href="./">问答首页</a></li>
			<li><a href="type.php">全部分类</a></li>
			<li><a href="browser.php?lm=1">精彩问题</a></li>
			<li class="menuright"></li>
		</ul>
	</div>
	<div class="search">
		<form action="search.php?action=search" method="post">
			<input type="text" name="q" value="<?php echo $q?>" class="searchinput"/>
			<input name="" type="submit" value="搜索答案" class="submit"/>
			<input onclick="location.href='post.php'" name="按钮" type="button" class="postqa" value="我要提问"/>
		</form>
	</div>
</div>

<div class="main cbody margintop">
	<!--左侧列表-->
	<div class="pleft">
		<!--位置导航-->
		<div class="thisplace">
			<a href="./">首页</a> &gt; 搜索结果
		</div>

		<!--列表-->
		<div class="leftask">
			<div class="asknav">
				<ul>
					<li><a href="#" class="thisclass">搜索结果</a></li>
				</ul>
			</div>
			<div class="askbox">
				<dl class="asktitle">
					<dd class="biaoti">标题</dd>
					<dd class="jifen">悬赏</dd>
					<dd class="zhuangtai">状态</dd>
					<dd class="huida">回答数</dd>
					<dd class="shijian">时间</dd>
				</dl>

<?php
$mylist = $dlist->GetDataList();
while($row = $mylist->GetArray('dm'))
{
	if($row['status'] == 1){//已解决
		$row['status'] = 'qa_ico_2.gif';
	}elseif($row['status'] == 2){//关闭
		$row['status'] = 'qa_ico_2.gif';
	}elseif($row['status'] == 3){//过期
		$row['status'] = 'qa_ico_2.gif';
	}else{//正常
		$row['status'] = 'qa_ico_1.gif';
	}
	$row['dateline'] = gmdate('m-d', $row['dateline'] + ($timeoffset * 3600));
	$row['title'] = cn_substr($row['title'],40);

	$row['title'] = str_replace("$q",'<b style="color:red;">'.$q.'</b>',$row['title']);
	
	$typedata = ' <a href="browser.php?tid='.$row['tid'].'">'.$row['tidname'].'</a>';
	if($row['tid2'] != 0)
	{
		$typedata = '<a href="browser.php?tid2='.$row['tid2'].'">'.$row['tid2name']."</a>";
	}
?>
				<dl class="asklist">
					<dd class="biaoti"><a href="question.php?id=<?php echo $row['id']?>"><?php echo $row['title']?></a><span>[<?php echo $typedata?>]</span></dd>
					<dd class="jifen"><img src="template/default/images/ico_23.gif" width="12" height="13" /> <?php echo $row['reward']?></dd>
					<dd class="zhuangtai"><img src="template/default/images/<?php echo $row['status']?>" width="44" height="19" /></dd>
					<dd class="huida"><?php echo $row['replies']?></dd>
					<dd class="shijian"><?php echo $row['dateline']?></dd>
				</dl>
<?php
}

?>


<div class="pages">
<?php echo $dlist->GetPageList(7);?>
</div>


			</div>

		</div>
	</div>
	<!--右侧列表-->
	<div class="pright">
	
		<!--快到期问题-->
		<div class="rlist ">
			<div class="rtitle">快到期问题</div>
			<div class="rbox wtlist">
			<ul>
<?php
foreach($expiredasks as $expiredask)
{
	echo '<li><a href="question.php?id='.$expiredask['id'].'">'.$expiredask['title'].'</a></li>';
}
?>
			</ul>
			</div>
		</div>

		<!--总积分排行-->
		<div class="rlist margintop">
			<div class="rtitle">总积分排行</div>
			<div class="rbox paihang">
				<dl>
<?php
foreach($topmembers as $topmember)
{
	$typedata = ' <a href="../member/index.php?uid='.$topmember['userid'].'">'.$topmember['userid'].'</a>';

	echo '<dd><span class="name">'.$typedata.'</span><span class="jifen"><img src="template/default/images/ico_23.gif" /> '.$topmember['scores'].'</span></dd>';
}
?>				</dl>
			</div>
		</div>
	</div>
	
	
	<div class="floatclear"><!--清除浮动--></div>
</div>

<!--页面底部-->
<div class="footer cbody margintop">
	<div class="copyright">
    <span><?php echo $cfg_powerby?><a href="http://www.miibeian.gov.cn/"><?php echo $cfg_beian?></a></span><br />
		Powered by <a href="http://www.dedecms.com/">DedeCms <?php echo $cfg_version ?></a> &copy; 2004-2008  <a href="http://www.desdev.cn/">DesDev Inc.</a>		
	</div>
	<div class="floatclear"></div>
</div>

</body>
</html>