<!-- #include file="../inc/dataconn.asp" -->
<!-- #include file="../inc/newfun.asp" -->

<!-- #include file="inc/request.asp" -->

<%
see_type_html=trim_fun(request("see_type_html"))
top_menu_id=0
html_title=see_type_html
if len(see_type_html)=0 then html_title="全部公告"
html_title=html_title&"-第"& page_no &"页"
%>

<!doctype html>
<html>
<head>
<meta charset="gb2312">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name = "format-detection" content = "telephone=no">
<link rel="stylesheet" type="text/css" href="inc/wap.css"/>
<script type="text/javascript" src="inc/wap.js"></script>
<title><%=html_title%></title>
<body>
<!-- #include file="inc/checksession_hygl.asp" -->
<%this_page="news"%>
<!-- #include file="inc/top.asp" -->

    <div id="search_div_bg" onClick="open_search_div()"></div>
    <div id="search_div" class="search_div">
        <form name="search" method="post" action="?">           
            
            <input name="key_word" class="key_word" placeholder="输入关键词" value="<%=key_word%>">
            <label for="search_type">
                <li>
                    <div class="left">查询类型</div>
                    <div class="right"><div class="more"></div></div>
                    <div class="right">
                        <select name="see_type_html" id="search_type">
                            <option value="">全部</option>
                                <%
                                '读取后台设置
                                news_class=session("news_class")
                                if instr(news_class,"-")>0 then
                                    arrList=split(news_class,"-")
                                    for i=Lbound(arrList) to Ubound(arrList)%>
                                        <option value="<% =arrList(i)%>"  <%if arrList(i)=see_type_html then response.Write(" selected") %>><% =arrList(i)%></option>                                            
                                    <%next
                                else
                                    top_menu_id=1
                                    %><option value="<% =news_class%>"><% =news_class%></option>
                                <%end if
                                %>
                        </select>
                    </div>
                </li>
            </label>
            <label for="dtfrom">
                <li>
                    <div class="left">起始日期</div>           
                    <div class="right"><input type="date" id="dtfrom" name="dtfrom" value="<%=input_dtfrom%>"></div>
                </li>
            </label>
            <label for="dtto">
                <li>
                    <div class="left">截止日期</div>
                    <div class="right"><input type="date" id="dtto" name="dtto" value="<%=input_dtto%>"></div>
                </li>
            </label>
            
            <a class="cancel" href="javascript:void(0);" onClick="open_search_div()">取消</a>
            <input type="submit" class="submit" value="搜索">


               
           
        </form>
        <div class="clear_both"></div>
    </div>
    
    

    
<%
		  sql="select * from news_list where 1=1"
		  if len(dtfrom)>0 then sql=sql&" and news_time>='"& dtfrom &"'"
		  if len(dtto)>0 then sql=sql&" and news_time<='"& dtto &"'"
		  if len(key_word)>0 then sql=sql&" and news_title like '%"& key_word &"%'"
		  if len(see_type_html)>0 then sql=sql&" and news_type='"& see_type_html &"'"
		  sql=sql&" order by id desc"
		  set rs=server.CreateObject("adodb.recordset")
		  rs.open sql,conn,1,1
		  i=1
		  page_size=15
			if not rs.eof then
				rs.PageSize=page_size
				pagecount=rs.PageCount '获取总页码 
				if page_no<=0 then page_no=1 '判断 
				if page_no>pagecount then page_no=pagecount
				rs.AbsolutePage=page_no '设置本页页码 
				allRecordCount=rs.RecordCount
			end if
			allRecordCount=chknum(allRecordCount)
			%>
    
    
    
    
    
    	<%if len(key_word)>0 or len(dtfrom)>0 or len(dtto)>0 then%><!-- #include file="inc/search_result.asp" --><%end if%>
        

    	
    



             <div class="news_list"> 
<%		if rs.eof then response.Write("<li>暂无文章</li>")
		  do while not rs.eof
		  		news_id=rs("id")
		  		news_title=rs("news_title")
				news_ny=rs("news_ny")
				news_time=rs("news_time")
				news_type=rs("news_type")
				news_own=rs("news_own")	
				news_title_color=rs("news_title_color")			
				
					  %>
    
    	<li onClick="window.parent.location.href='news_page.asp?news_id=<%=news_id%>'">
            <div class="title"><font color="<%=news_title_color%>"><%=news_title%></font></div>
            <div class="content"><%=dis_time(news_time)%></div>
        </li>
	  <%		if i>=page_size then exit do
				  i=i+1
				  rs.movenext
		  loop
		  
		  %>
    </div>
    <%=wap_page_no(page_no,pagecount,"see_type_html="& see_type_html &"")%>
<!-- #include file="inc/end.asp" -->
</body>
</html>