<!--#include file="inc/config.asp"-->
<!--#include file="inc/conn.asp"-->
<!--#include file="wd_function.asp"-->
<!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" />
<title>旅游问答</title>
<meta name="keywords" content="旅游问答" />
<meta name="description" content="旅游问答" />
<link href="style/global.css" rel="stylesheet" type="text/css" />
<link href="style/list.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/common.js"></script>
<script language="javascript">
function goto(frm)
{
	var gourl ="?id=<%=id%>&";
	gourl += "page=" + (frm.page.value);
     var hid=parseInt(frm.hid.value);
	 if(parseInt(frm.page.value)>hid||frm.page.value<=0){
	 alert("错误！请确定你输入的数字在1-"+hid+"之间");
	 return false;
	 }
	window.location.href(gourl);
}</script>
<style type="text/css">
<!--
.tel {	color: #128203;
}
.f_in{ border:1px solid #CCC; color:#333;}
-->
</style>
</head>

<body>
<div id="wrapper">
	<div id="page">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="25%"><a href="/"><img src="image/logo.gif" width="250" height="80" alt="$SiteName$" /></a></td>
        <td width="75%" valign="bottom">
        <div id="menu">
          <ul>
            <li><a href="/">网站首页</a></li>
            <li><a href="/routes.asp">旅游线路</a></li>
            <li><a href="/hotel.asp">特惠酒店</a></li>
            <li><a href="/meeting.asp">会议接待</a></li>
            <li><a href="/ticket.asp">景点门票</a></li>
            <li><a href="/picture/">风光图片</a></li>
            <li><a href="/wenda.asp" class="current">旅游问答</a></li>
          </ul>        
        </div>
        </td>
      </tr>
    </table>
    <!--#include file="nav.asp"-->
    <div class="br"></div>
		<div id="rows">
    	<div id="left">
    	  <div class="cont">
    	    <div class="topic">问题搜索</div>
          <div class="br"></div>
          <form id="form2" name="form2" method="get" action="wenda_list.asp">
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="32" align="center" class="tel"><strong>关键字：</strong></td>
                <td><input name="key" type="text" id="key" size="10" /></td>
                <td><input type="image" name="imageField" id="imageField" src="image/but1.jpg" /></td>
              </tr>
            </table>
          </form>
<div class="br"></div>
  	    </div>
    	  <div class="br"></div>
    	  <div class="cont">
    	    <div class="topic">快速提问</div>
          <div class="br"></div>
    	    <form id="form3" name="form3" method="post" action="wenda_add.asp">
    	      <table width="90%" border="0" align="center" cellpadding="1" cellspacing="0">
    	        <tr>
    	          <td height="25">分类：
    	            <select name="CatalogId" id="CatalogId">
									<%=getSourceOption(0,"t_wenda_catalog")%>
                  </select>
                </td>
  	          </tr>
    	        <tr>
    	          <td height="25"><input name="Title" type="text" class="f_in" id="Title" onclick="if(this.value=='标题：') this.value='';" value="标题：" style="width:230px;" /></td>
  	          </tr>
    	        <tr>
    	          <td><textarea name="Content" class="f_in" id="Content" onclick="if(this.value=='内容：') this.value='';" style="width:230px; height:100px;">内容：</textarea></td>
  	          </tr>
    	        <tr>
    	          <td height="25" align="center">妮称：
   	            <input name="UserName" type="text" class="f_in" id="UserName" size="5" /> 
   	            验证码：
   	            <input name="vertcode" type="text" class="f_in" id="vertcode" size="4" /> <img src="/image.asp" onclick="this.src='/image.asp?time='+Math.random()"></td>
  	          </tr>
    	        <tr>
    	          <td height="25" align="center"><input type="submit" name="button2" id="button2" value="提交问题" /></td>
  	          </tr>
  	        </table>
  	      </form>
          <div class="br"></div>
    	  </div>
      </div>
      <div id="right">
        <table width="100%" border="0" cellspacing="0" cellpadding="1">
          <tr>
            <td width="20%"><img src="image/dh.gif" width="137" height="31" alt=" " /></td>
            <td width="80%"> &nbsp;◇ 您现在的位置：<a href="/">首页</a> &gt;&gt; <a href="/wenda.asp">旅游问答</a></td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="1">
          <tr>
            <td align="center">&nbsp;问题总数：<span style="color:#F00"><%=conn.execute("select count(*) from t_wenda")(0)%></span>
            已解决数：<span style="color:#F00"><%=conn.execute("select count(*) from t_wenda where Status=1")(0)%></span>
            </td>
          </tr>
        </table>

        <div class="br"></div>
        
        <div class="brd_t">
        	<div class="th">问题分类</div>
          <div class="wenda_catalog">
          	<%
						set rs=conn.execute("select id,title from t_wenda_catalog order by id asc")
						while not rs.eof
						%>
            <div class="item"><a href="wenda_list.asp?id=<%=rs(0)%>"><%=rs(1)%></a></div>
            <%
							rs.movenext
						wend
						rs.close
						set rs=nothing
						%>
          </div>
          <div class="br"></div>
        </div>
        <div class="br"></div>
        <div class="brd_t">
        	<div class="th"><span class="right"><a href="wenda_list.asp">more&nbsp;</a></span>热门问题</div>
          <div class="wendas">
          	<div class="col1">标题</div>
            <div class="col2">提问者 </div>
            <div class="col3">点击</div>
            <div class="col4">日期</div>
            <div class="col5">状态</div>
          </div>      
          <%
						set rs=conn.execute("select id,UserId,Title,[Status],PubDate,Hits from t_wenda where IsCheck=1 order by Hits desc,id desc")
						while not rs.eof
						%>
          <div class="wendas">
          	<div class="col1"><a href="ask/<%=rs(0)%>.html"><%=rs(2)%></a></div>
            <div class="col2"><%=rs(1)%></div>
            <div class="col3"><%=rs(5)%></div>
            <div class="col4"><%=rs(4)%></div>
            <div class="col5"><img src="image/status<%=rs(3)%>.gif" /></div>
          </div>  
          <%
						rs.movenext
					wend
					rs.close
					set rs=nothing
					%>
        </div>
        <div class="br"></div>
        <div class="brd_t">
        	<div class="th"><span class="right"><a href="wenda_list.asp">more&nbsp;</a></span>最新问题</div>
          <div class="wendas">
          	<div class="col1">标题</div>
            <div class="col2">提问者 </div>
            <div class="col3">点击</div>
            <div class="col4">日期</div>
            <div class="col5">状态</div>
          </div>      
          <%
						set rs=conn.execute("select id,UserId,Title,[Status],PubDate,Hits from t_wenda where IsCheck=1 order by id desc")
						while not rs.eof
						%>
          <div class="wendas">
          	<div class="col1"><a href="ask/<%=rs(0)%>.html"><%=rs(2)%></a></div>
            <div class="col2"><%=rs(1)%></div>
            <div class="col3"><%=rs(5)%></div>
            <div class="col4"><%=rs(4)%></div>
            <div class="col5"><img src="image/status<%=rs(3)%>.gif" /></div>
          </div>  
          <%
						rs.movenext
					wend
					rs.close
					set rs=nothing
					%>
        </div>
      </div>
    </div>
    <div class="br"></div>
    <!--#include file="root.asp"-->
  </div>
</div>
</body>
</html>
<%
call connclose()
%>

