newsshow.asp

来自「1.理解Winsock编程模型; 2.掌握Winsock编程的基本方法」· ASP 代码 · 共 1,134 行 · 第 1/4 页

ASP
1,134
字号
rs.open sql,conn,3,3
do while not rs.eof
%>
                                          <tr> 
                                            <% if rs("tupian")=true then %>
                                            <td width="216"> <div align="left"><a href="tshownews.asp?id=<%=rs("newsid")%>" target="_blank"><img src="images/a4.gif" width="12" height="12" border="0"><%=rs("title")%>。。。</a></div></td>
											<td colspan="2">
                                              <div align="center"><%=rs("pubdate")%></div></td>
                                          </tr>
										  <tr>
                                            <td><img src="images/008.gif" width="500" height="1"></td>
                                          </tr>
                                  <% else %> 
								          <tr>  
                                            <td width="216"> <div align="left"><a href="shownews.asp?id=<%=rs("newsid")%>"><img src="images/a4.gif" width="12" height="12" border="0"><%=rs("title")%>。。。</a></div></td>
											<td colspan="2"><div align="center"></div>
                                              <div align="center"><%=rs("pubdate")%></div></td>
                                          </tr>
										  <tr>
                                            <td><img src="images/008.gif" width="500" height="1"></td>
                                          </tr>
                                            <% end if %>
                                            
                                          <% 
		rs.movenext
		loop				
		rs.close
		%>
                                        </table></TD>
                                    </TR>
                                  </TBODY>
                                </TABLE></td>
                            </tr>
                            <tr> 
                              <td colspan="2"></td>
                              <td width="3%"></td>
                            </tr>
                          </table></td>
                      </tr>
                      <tr> 
                        <td><table width="100%"  border="0" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td width="3%" height="29">&nbsp;</td>
                              <td width="94%" background="images/15.gif">
<table width="473" border="0" cellspacing="0" cellpadding="0">
                                  <tr> 
                                    <td width="90"><div align="center"><strong><font size="2">院外新闻</font></strong></div></td>
                                    <td width="383"><div align="right"><a href="newsshow.asp?action=&#23398;&#38498;&#21160;&#24577;&id=1&tppe1=2" target="_blank"><img src="images/11.gif" width="41" height="16" border="0"></a></div></td>
                                  </tr>
                                </table></td>
                              <td height="29">&nbsp;</td>
                            </tr>
                            <tr> 
                              <td colspan="3">&nbsp;</td>
                            </tr>
                            <tr> 
                              <td colspan="3"><TABLE width="94%" height="95" 
border=0 align=center cellPadding=0 cellSpacing=0>
                                  <TBODY>
                                    <TR> 
                                      <TD valign="top"><table width="100%"  border="0">
                                          <tr> 
                                            <td colspan="3"><img src="images/04.gif" width="360" height="1"></td>
                                          </tr>
                                          <%
	  sql= "select top 6 * from News where online=true and newsclass='学院动态' and class='院外'"
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,3,3
do while not rs.eof
%>
                                          <tr> 
                                            <% if rs("tupian")=true then %>
                                            <td width="216"> <div align="left"><a href="tshownews.asp?id=<%=rs("newsid")%>" target="_blank"><img src="images/a4.gif" width="12" height="12" border="0"><%=rs("title")%>。。。</a></div></td>
                                            <td colspan="2"> <div align="center"><%=rs("pubdate")%></div></td>
                                          </tr>
                                          <tr> 
                                            <td><img src="images/008.gif" width="500" height="1"></td>
                                          </tr>
                                          <% else %>
                                          <tr> 
                                            <td width="216"> <div align="left"><a href="shownews.asp?id=<%=rs("newsid")%>"><img src="images/a4.gif" width="12" height="12" border="0"><%=rs("title")%>。。。</a></div></td>
                                            <td colspan="2"><div align="center"></div>
                                              <div align="center"><%=rs("pubdate")%></div></td>
                                          </tr>
                                          <tr> 
                                            <td><img src="images/008.gif" width="500" height="1"></td>
                                          </tr>
                                          <% end if %>
                                          <% 
		rs.movenext
		loop				
		rs.close
		%>
                                        </table></TD>
                                    </TR>
                                  </TBODY>
                                </TABLE></td>
                            </tr>
                            <tr> 
                              <td colspan="2"></td>
                              <td width="3%"></td>
                            </tr>
                          </table></td>
                      </tr>
                      <tr> 
                        <td><table width="100%"  border="0" cellpadding="0" cellspacing="0">
                            <tr> 
                              <td width="3%" height="29">&nbsp;</td>
                              <td width="94%" background="images/15.gif">
<table width="473" border="0" cellspacing="0" cellpadding="0">
                                  <tr> 
                                    <td width="90"><div align="center"><strong><font size="2">图片新闻</font></strong></div></td>
                                    <td width="383"><div align="right"><a href="newsshow.asp?action=&#23398;&#38498;&#21160;&#24577;&id=1&type1=3" target="_blank"><img src="images/11.gif" width="41" height="16" border="0"></a></div></td>
                                  </tr>
                                </table></td>
                              <td height="29">&nbsp;</td>
                            </tr>
                            <tr> 
                              <td colspan="3">&nbsp;</td>
                            </tr>
                            <tr> 
                              <td colspan="3" valign="top"><TABLE width="94%" height="95" 
border=0 align=center cellPadding=0 cellSpacing=0>
                                  <TBODY>
                                    <TR> 
                                      <TD><table width="100%"  border="0">
                                          <tr> 
                                            <td colspan="3"><img src="images/04.gif" width="360" height="1"></td>
                                          </tr>
                                          <%
	  sql= "select top 6 * from News where online=true and newsclass='学院动态' and tupian=true"
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,3,3
do while not rs.eof
%>
                                          <tr>                                           
                            <td width="216"> <div align="left"><a href="tshownews.asp?id=<%=rs("newsid")%>" target="_blank"><img src="images/a4.gif" width="12" height="12" border="0"><%=rs("title")%>。。。</a></div></td>
                                            <td colspan="2"> <div align="center"><%=rs("pubdate")%></div></td>
                                          </tr>
                                          <tr> 
                                            <td><img src="images/008.gif" width="500" height="1"></td>
                                          </tr>                                          
        <%                                 
		rs.movenext
		loop				
		rs.close
		%>
                                        </table></TD>
                                    </TR>
                                  </TBODY>
                                </TABLE></td>
                            </tr>
                            <tr> 
                              <td colspan="2"></td>
                              <td width="3%"></td>
                            </tr>
                          </table></td>
                      </tr>
                    </table>
                  </div></td>
              </tr>
            </table>
            <table width="423"  border="0" cellspacing="0" cellpadding="0">
              <%
	  sql= "select * from News where online=true and newsclass='"&request("action")&"' order by Pubdate desc"
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,3,3
do while not rs.eof
%>
              <tr> 
                <td width="432" colspan="3"><img src="images/04.gif" width="360" height="1"></td>
              </tr>
              <% 
		rs.movenext
		loop				
		rs.close
		%>
            </table></td>
        </tr>
      </table>
	  <% else %>
	<table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>首页&gt;&gt;<%=request("action")%>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td><div align="left">标题</div></td>
              <td><div align="center">加入日期</div></td>
              </tr>
          </table>
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <%			 
	  if request("type1")="1" then
	  sql= "select * from News where online=true and newsclass='"&request("action")&"' and class='院内' order by Pubdate desc"
	  elseif request("type1")="2" then
	  sql= "select * from News where online=true and newsclass='"&request("action")&"' and class='院外' order by Pubdate desc"
	  elseif request("type1")="3" then
	  sql= "select * from News where online=true and newsclass='"&request("action")&"' and tupian=true order by Pubdate desc"
	  else
	   sql= "select * from News where online=true and newsclass='"&request("action")&"' order by Pubdate desc"
	  end if
set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,3,3
do while not rs.eof
%>
            <tr>
              <td colspan="3"><img src="04.gif" width="360" height="1"></td>
              </tr>
            <tr>
			<% if rs("tupian")=true then %>
              <td width="216">                <div align="center">
                  <div align="left"></div>
                    <div align="left">&nbsp;<img src="images/a4.gif" width="12" height="12">&nbsp;<a href="tshownews.asp?id=<%=rs("newsid")%>" target="_blank"><%=rs("title")%>。。。</a></div>
              </div></td>
			  <td colspan="2"><div align="center"></div>                <div align="center"><%=rs("pubdate")%></div></td>
              </tr>
			  <tr>
			  <td><img src="images/008.gif" width="500" height="1"></td>
			  </tr>
			  <% else %>
			  <td width="216">                <div align="center">
                    <div align="left">&nbsp;<img src="images/a4.gif" width="12" height="12">&nbsp;<a href="shownews.asp?id=<%=rs("newsid")%>"><%=rs("title")%>。。。</a></div>
                  </div></td>
              <td colspan="2"><div align="center"></div>                <div align="center"><%=rs("pubdate")%></div></td>
              </tr>
			  <tr>
			  <td><img src="images/008.gif" width="500" height="1"></td>
			  </tr>
			  <% end if             
		rs.movenext
		loop				
		rs.close
		%>
          </table></td>
      </tr>
    </table>
	<% 
	end if
 %>
	</td>
  </tr>
</table>
	  
<table width="777" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td width="170" height="45" bordercolor="#eeeeee" bgcolor="#eeeeee">&nbsp;</td>
    <td height="34" background="images/12.gif"><table width="100%" border="1" cellpadding="1" cellspacing="0" bordercolor="#000000">
        <tr> 
          <td><table width="100%" height="43" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
              <FORM onsubmit="return verify_input(this);"  name=f action=http://www.baidu.com/s target="_blank">
                <tr> 
                  <td width="29%">&nbsp;</td>
                  <td width="62%" valign="bottom"> <INPUT type=hidden value=3 name=cl> 
                    <INPUT class=ff maxLength=100 
      size=20 name=wd value="请输入关键字"> &nbsp; <input name=imageField type=image 
            src="images/13.gif" width="28" height=14 border=0></td>
                  <td width="9%" valign="center">&nbsp;</td>
                </tr>
              </FORM>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</td>
</tr> </table> 
<table width="777" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td><img src="images/6.gif" width="777" height="84"></td>
  </tr>
</table>
<table width="777" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td bgcolor="#f2f2f2"><div align="center"><FONT 
            color=#666666 size="2">石家庄经济学院信息工程学院<br>
        Copyright@2007<br>
        建议使用IE4.0以上,1024*768分辨率进行浏览。</font> </div></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?