<!--#include file="head1.asp"-->
  
<%
   MaxPerPage=10
   dim totalPut   
   dim CurrentPage
   dim TotalPages
   dim i
   dim ty
   typeid=Replace(request("typeid"), "'", "''")
    if not isempty(request("page")) then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if
      dim rstype
   dim typesql
   dim types
   if not isEmpty(Replace(request("typeid"), "'", "''")) then
	typeid=Replace(request("typeid"), "'", "''")
   else
	typeid="ӰƬ"
   end if
%>
<% set rs=server.createobject("adodb.recordset")
sql="select type from type"
rs.open sql,conn,1,1%>
<link href="../skin2/imgs/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {color: #5E4927}
-->
</style>
<title><%=sitename%> | <%=typeid%></title>
<meta name="keywords" content="<%=sitekey1%>">
<meta name="description" content="<%=sitekey2%>">
<BODY>
<table width="1002" height="38" border="0" align="center" cellpadding="0" cellspacing="0" background="../skin2/imgs/searchbg.jpg">
  <tr>
    <td>&nbsp;</td>
    <td background="../skin2/imgs/searchbg.jpg"><table width="982" border=0 align="left" cellpadding=0 cellspacing=0>
      <tr>
        <td width="72"><h4>ӰƬ</h4></td>
        <td width="368"  valign="top"><table width=328 border=0 align=left cellpadding=0 cellspacing=0 id=t2>
          <tbody>
            <tr>
              <td width=7>&nbsp;</td>
              <td valign=center width=288><table cellspacing=0 cellpadding=0 width=354 border=0>
                <tbody>
                  <tr>
                    <form action="mlist.asp" method="POST">
                      <td width="158"><b>
                        <input name="keyword" size="20" value=ؼ onFocus="if(this.value=='ؼ')this.value='';" style="border: 1px solid #FFFFFF">
                      </b></td>
                      <td width="103"><select name="typeid" id="select3">
                        <option value="Ƭ">+Ӱ+</option>
                        <option value="Ա">+Ա+</option>
                      </select></td>
                      <td width="6" height="28">
                      <td width="74" align="center">&nbsp;&nbsp;
                                <input 
            style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px" 
            type=image src="../skin2/imgs/s.jpg" 
name=image2></td>
                    </form>
                    <td width="13">&nbsp;</td>
                  </tr>
                </tbody>
              </table></td>
              <td width=33>&nbsp;</td>
            </tr>
          </tbody>
        </table></td>
        <td width="542"  valign="middle">
              <h4>
                <%set rs1=server.createobject("adodb.recordset")
sql="select * from talk where id=22" 
rs1.open sql,conn,1,3
talk=rs1("talk")
rs1.close
set rs1=nothing%>
                <marquee align="center" direction="left" width="100%" height="20" scrollamount="2" scrolldelay="100" class="STYLE22" onMouseOver="this.stop()" onMouseOut="this.start()"><%=talk%>
                </marquee>
              </h4></td>
      </tr>
    </table></td>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="1002" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#616360">
  <tr>
    <td><div class="allmov">
      <div class="allmov_left">
        <div class=listleft>
          <div class=top_left_1>ϵ</div>
          <div class=top_left_1_1>
            <table width="100" height="124" border="0" align="center" cellpadding="5" cellspacing="1">
              <tr>
                <%set rst=server.createobject("adodb.recordset")
      sql="select top 1 * from learning where down=0 and typeid='Ƭ' order by articleid desc"
      rst.open sql,conn,1,1
      if rst.eof and rst.bof then
         response.write"ĿûӰƬ"
      else	  
       %>
                <td width=52% align="left"><div class="img1"><a href="movie.asp?id=<%=rst("articleid")%>" title="ӰƬ:<%=rst("title")%>
ݣ<%content=rst("name")
                          if len(content)>8 then content=left(content,8)&"?-"
                          response.write content
                            %>
ϴʱ䣺<%=rst("dateandtime")%>
ۿ<%=rst("hits")%>"movie.asp?id=<%=rst("articleid")%>" target="_blank"> <img src="../<%=rst("domurl")%>" border=0 width="80" height="100"> </a><a href="movie.asp?id=<%=rst("articleid")%>" target="_blank" style="color: #ffffff"></a></div></td>
                <td align="left" valign="top"><h5>
                    <strong>&nbsp;<a href="movie.asp?id=<%=rst("articleid")%>" target="_blank" title="<%=Left(Rst("Title"),9)%>"><%=Left(Rst("Title"),5)%></a></strong>
                    </h4>
                    <div class=mov_left_1_31><%=Left(Rst("Content"),30)%>...</div></td>
              </tr>
              <%end if
	  rst.close
set rst=nothing
	  %>
            </table>
            <table width="190" height="22" border="0" align="center" cellpadding="0" cellspacing="3" background="imgs/title1.jpg" id="AutoNumber16" style="border-collapse: collapse">
              <%  
dim tt8 
tt8=0  
sql="select top 9 * from learning where typeid='Ƭ' and articleid not in(select Top 1 articleid from learning where typeid='Ƭ' order by hits desc)order by hits desc" 
set rs=server.createobject("adodb.recordset")  
set rs=server.createobject("adodb.recordset")  
rs.open sql,conn,1,1  
do while not rs.eof  
tt8=tt8+1  
%>
              <tr>
                <td width="72%"><h4>&nbsp;<a href="movie.asp?id=<%=rs("articleid")%>" title="<%=Left(Rs("Title"),8)%>" target="_blank" ><%=Left(Rs("Title"),8)%></a></h4></td>
                <td width="28%" align="center"><div align="center"><span style="color: #ffffff">[<%=Month(rs("dateandtime"))%>.<%=day(rs("dateandtime"))%>]</span></div></td>
              </tr>
              <%  
                                  if tt8>=10 then exit do  
                                  rs.movenext  
                                  loop 
								  	  rst.close
set rst=nothing 
                                  %>
            </table>
          </div>
        </div>
        <div class=listleft>
          <div class=top_left_1>վȲӰ</div>
          <div class=top_right_3>
            <table width="200" height="96" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width=5% height="7" align="left"></td>
                <%
      set rs=server.createobject("adodb.recordset")
   sql="update learning set hits=hits+2 where articleID="&articleid
   rs.open sql,conn,1,3
            set rst=server.createobject("adodb.recordset")
      sql="select top 1 * from learning where down=0 and firstbest=true order by hits desc"
      rst.open sql,conn,1,1
      if rst.eof and rst.bof then
         response.write"ĿûӰƬ"
      else 
       %>
                <td width=46% rowspan="2" align="left"><div class="img1"><a href="movie.asp?id=<%=rst("articleid")%>" title="ӰƬ:<%=rst("title")%>
ݣ<%content=rst("name")
                          if len(content)>8 then content=left(content,8)&"..."
                          response.write content
                            %>
ϴʱ䣺<%=rst("dateandtime")%>
ۿ<%=rst("hits")%>"movie.asp?id=<%=rst("articleid")%>" target="_blank" style="color: #666666"><img src="../<%=rst("domurl")%>" border=0 width="80" height="100"></a></div></td>
                <td width=49% rowspan="2" align="left" valign="top"><h5>
                    <strong>&nbsp;<a href="movie.asp?id=<%=rst("articleid")%>" target="_blank"><%=Left(Rst("Title"),5)%></a></strong>
                    </h4>
                    <div class=mov_left_1_31><%=Left(Rst("Content"),30)%>...</div></td>
              </tr>
              <tr>
                <td height="89" align="center" valign="top">&nbsp;</td>
              </tr>
              <%   
      end if
	   rst.close
set rst=nothing
	  
	  %>
            </table>
            <table width="99%" height="23" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="11%" background="../skin2/imgs/hitsbg.jpg">&nbsp;</td>
                <td width="89%"><table width="100%" height="22" border="0" align="center" cellpadding="0" cellspacing="2" background="imgs/title1.jpg" id="AutoNumber16" style="border-collapse: collapse">
                    <%  
dim tt12 
tt12=0  
sql="select top 9 * from learning where firstbest=true and hits not in(select Top 1 hits from learning order by hits desc) order by hits desc" 
set rs=server.createobject("adodb.recordset")  
rs.open sql,conn,1,1  
do while not rs.eof  
tt12=tt12+1  
%>
                    <tr>
                      <td width="80%"><h4><a href="movie.asp?id=<%=rs("articleid")%>" title="<%=Left(Rs("Title"),8)%>" target="_blank" ><%=Left(Rs("Title"),8)%></a></h4></td>
                      <td width="20%" align="center"><div align="center"><img src="../skin2/imgs/tt01.gif" width="15" height="15"></div></td>
                    </tr>
                    <%  
                                  if tt12>=8 then exit do  
                                  rs.movenext  
                                  loop 
								   rs.close
set rs=nothing 
                                  %>
                </table></td>
              </tr>
            </table>
          </div>
        </div>
        <div class="leftad">
          <script src="../adjs/200-200-3.js"></script>
        </div>
      </div>
      <div class="allmov_right">
        <div class="allmov_right_table">
          <table width="780" height="205" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td valign="top"><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="770" id="AutoNumber12">
                <tr>
                  <TD vAlign=top align=middle><table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr>
                        <td colspan="2" align="left"><%
name=trim(request("keyword"))
name=replace(name,"'","''")
dim sql
dim rs
if typeid="" and name="" then
response.write"ûҪҵϢ<a href=""javascript:history.go(-1)"">ز</a>"
response.end
end if
if typeid="Ƭ" then 
    sql="select * from learning where InStr(1,LCase(title),'"&name&"',0)<>0   and down=0 order by articleid desc"
elseif typeid="Ա" then
   sql="select * from learning  where InStr(1,LCase(name),'"&name&"',0)<>0  and down=0 order by articleid desc"
elseif typeid="ӰƬ" then
    sql="select * from learning order by articleid desc"
else
sql="select * from learning where typeid='"&typeid&"'order by articleid desc"
end if    
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<script>alert('໹ûκӰƬҪ뿴ĻϵԱ')</Script><script Language=Javascript>location.href = '';</script>"
response.end
else
	  totalPut=rs.recordcount
      totalPut=rs.recordcount
      if currentpage<1 then
          currentpage=1
      end if
      if (currentpage-1)*MaxPerPage>totalput then
	   if (totalPut mod MaxPerPage)=0 then
	     currentpage= totalPut \ MaxPerPage
	   else
	      currentpage= totalPut \ MaxPerPage + 1
	   end if
      end if
       if currentPage=1 then
           showpage totalput,MaxPerPage,"mlist.asp"
            showContent
            showpage totalput,MaxPerPage,"mlist.asp"
       else
          if (currentPage-1)*MaxPerPage<totalPut then
            rs.move  (currentPage-1)*MaxPerPage
            dim bookmark
            bookmark=rs.bookmark
           showpage totalput,MaxPerPage,"mlist.asp"
            showContent
            showpage totalput,MaxPerPage,"mlist.asp"
        else
	        currentPage=1
          showpage totalput,MaxPerPage,"mlist.asp"
           showContent
           showpage1 totalput,MaxPerPage,"mlist.asp"
	      end if
	   end if
   end if
   sub showContent


'Split("Sun,Mon,Tue,Wed,Thu,Fri,Sat",",")
	BgImg1 = "06,04,08,09"
	BgImg2 = "12,11,14,15"

       dim i
	   i=0
                    %><script src="../adjs/ad1.js"></script>
                            <%i=0
          do while not rs.eof
	If i mod 4 = 0 Then MyBgImg = BgImg1 Else MyBgImg = BgImg2
		MyBgImg = Split(MyBgImg,",")
%></td>
                      </tr>
                      <tr>
                        <td valign="top"><table width="380" height="52%" border="0" align="center" cellpadding="5" cellspacing="1">
                          <tr>
                            <td width="121"><div class="img1"><a href="../Html/<%=Rs("articleid")%>.html" title="ӰƬ:<%=rs("title")%>
ݣ<%content=rs("name")
                          if len(content)>8 then content=left(content,8)&"?-"
                          response.write content
                            %>
ϴʱ䣺<%=rs("dateandtime")%>
ۿ<%=rs("hits")%><a href="../Html/<%=Rs("articleid")%>.html"><img src="<%if rs("domurl")="" then%>img/w.gif<%else%>../<%=rs("domurl")%><%end if%>" width="130" height="170" border="0" align="absmiddle"></a></div></td>
                            <td width="177" valign="top"><table width="100%" height="100%" border="0" cellspacing="3" cellpadding="2">
                                <tr>
                                  <td align="left""><h5><strong><a target="_blank" href="../Html/<%=Rs("articleid")%>.html"><strong>
                                      <%content=rs("title")
                          if len(content)>13 then content=left(content,13)&""
                          response.write content
                            %>
                                  </strong></a></strong></h5></td>
                                </tr>
                                <tr>
                                  <td align="left"><h3><%=rs("typeid")%></h3></td>
                                </tr>
                                <tr>
                                  <td align="left"><h3>ݣ
                                    <%content=rs("name")
                          if len(content)>10 then content=left(content,10)&"..."
                          response.write content
                            %>
                                  </h3></td>
                                </tr>
                                <tr>
                                  <td align="left"><h3>
                                    
                                    <% if rs("canlook")=1 then%>
                                    ͨӰ
                                    <%elseif rs("canlook")=3 then%>
                                    ƽӰ
                                    <%elseif rs("canlook")=0 then%>
                                    ѵӰ
                                    <%end if%>
                                    </h46></td>
                                </tr>
                                <tr>
                                  <td align="left"><h3>ۿ<%=rs("hits")%></h3></td>
                                </tr>
                                <tr>
                                  <td width="90%" align="left"><div align="left">&nbsp;<a href="../Html/<%=Rs("articleid")%>.html" target="_blank"><img src="../skin2/imgs/dianbo.gif" width="49" height="18" border="0"></a> </div></td>
                                </tr>
                            </table></td>
                          </table>
                        <%rs.movenext%></td>
                        <td><% If not rs.eof Then %><table width="380" height="52%" border="0" align="center" cellpadding="5" cellspacing="1">
<tr><td width="121"><div class="img1"><a href="../Html/<%=Rs("articleid")%>.html" title="ӰƬ:<%=rs("title")%>
ݣ<%content=rs("name")
                          if len(content)>8 then content=left(content,8)&"?-"
                          response.write content
                            %>
ϴʱ䣺<%=rs("dateandtime")%>
ۿ<%=rs("hits")%><a href="../Html/<%=Rs("articleid")%>.html"><img src="<%if rs("domurl")="" then%>img/w.gif<%else%>../<%=rs("domurl")%><%end if%>" width="130" height="170" border="0" align="absmiddle"></a></div></td>
                              <td width="177" valign="top"><table width="100%" height="100%" border="0" cellspacing="3" cellpadding="2">
                                  <tr>
                                    <td align="left""><h5><strong><a target="_blank" href="../Html/<%=Rs("articleid")%>.html"><strong>
                                        <%content=rs("title")
                          if len(content)>13 then content=left(content,13)&""
                          response.write content
                            %>
                                    </strong></a></strong></h5></td>
                                  </tr>
                                  <tr>
                                    <td align="left"><h3><%=rs("typeid")%></h3></td>
                                  </tr>
                                  <tr>
                                    <td align="left"><h3>ݣ
                                      <%content=rs("name")
                          if len(content)>10 then content=left(content,10)&"..."
                          response.write content
                            %>
                                    </h3></td>
                                  </tr>
                                  <tr>
                                    <td align="left"><h3>
                                      
                                      <% if rs("canlook")=1 then%>
                                      ͨӰ
                                      <%elseif rs("canlook")=3 then%>
                                      ƽӰ
                                      <%elseif rs("canlook")=0 then%>
                                      ѵӰ
                                      <%end if%>
                                      </h46></td>
                                  </tr>
                                  <tr>
                                    <td align="left"><h3>ۿ<%=rs("hits")%></h3></td>
                                  </tr>
                                  <tr>
                                    <td width="90%" align="left"><div align="left">&nbsp;<a href="../Html/<%=Rs("articleid")%>.html" target="_blank"><img src="../skin2/imgs/dianbo.gif" width="49" height="18" border="0"></a> </div></td>
                                  </tr>
                              </table></td>
                            </table>
                          <%rs.movenext%>
                        </td>
                      </tr>
                      <tr>
                        <% End If %>
                      </tr>
                      <tr>
                        <td height="30" colspan="2"><table width="95%" height="2" border="0" cellpadding="0" cellspacing="0" background="../skin2/imgs/line_bg.jpg">
                          <tr>
                            <td></td>
                          </tr>
                        </table>
                          <% i=i+2
	      if i>=MaxPerPage then exit do
	   loop
		              %>
                        </td>
                      </tr>
                    </table>
                      <%
end sub 

function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
	n= totalnumber \ maxperpage
else
	n= totalnumber \ maxperpage+1
end if
%>
                      <table width="770" height="20" border="0" align="center" cellspacing="0">
                        <form method=Post action="<%=filename%>?typeid=<%=typeid%>">
                          <tr>
                            <td align="left" valign="middle"><div class=pagelist> <%if name<>"" then%><%response.write ""&name&"ӰƬĽ"%><%else%><%=typeid%><%end if%>   &nbsp;&nbsp;<font color="ffffff"><b><%=totalnumber%></b></font>&nbsp;&nbsp;&nbsp;<strong><%=CurrentPage%></strong>ҳ/<strong><%=n%></strong>ҳ
                              <%if CurrentPage<2 then%>
                              ҳ&nbsp;һҳ&nbsp;&nbsp;&nbsp;
                              <%else%>
                              <a href="<%=filename%>?typeid=<%=typeid%>&keyword=<%=name%>&page=1&" style="color:#ffffff">ҳ</a>&nbsp; <a href="<%=filename%>?typeid=<%=typeid%>&keyword=<%=name%>&page=<%=CurrentPage-1%>" style="color:#ffffff">һҳ</a>&nbsp;&nbsp;&nbsp;
                              <%
end if
if n-currentpage<1 then
%>
                              һҳ&nbsp;βҳ&nbsp;&nbsp;&nbsp;
                              <%else%>
                              <a href="<%=filename%>?typeid=<%=typeid%>&keyword=<%=name%>&page=<%=(CurrentPage+1)%>" style="color:#ffffff">һҳ</a>&nbsp; <a href="<%=filename%>?typeid=<%=typeid%>&keyword=<%=name%>&page=<%=n%>" style="color:#ffffff">βҳ</a>&nbsp;
                              <%end if%>
                              </div>
                            <td width="62" align="center"><select name="page" onChange="javascript:submit()">
                                <%for i = 1 to n%>
                                <option value="<%=i%>" <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>><%=i%>ҳ</option>
                                <%next%>
                            </select></td>
                          </tr>
                        </form>
                      </table>
                      <% 
end function
%>
                      <%
sub gotopage
end sub
 rs.close
set rs=nothing 
%>
                </TABLE></td>
            </tr>
          </table>
        </div>
      </div>
    </div></td>
  </tr>
</table>
<!--#include file="end.asp"-->
</BODY></HTML>
