⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1-1.asp

📁 这是一个文章管理的网页源程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.0 Transitional/EN">
<HTML><HEAD>
<style type="text/css">
<!--
p, b, a, ul, center, td, select, input, textarea { font-family: 宋体, 新宋体; font-size: 9pt; line-height: 20px }
a:link       { text-decoration: none; color: #000000 }
a:visited    { text-decoration: none; color: #000000 }
a:active     { text-decoration: underline; color: #000000 }
a:hover      { text-decoration: underline; color: #000000 }
-->
</style>

<TITLE>晨怡网景文章站点</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<script language="JavaScript">
<!--

function MM_reloadPage(init) {  /reloads the window if Nav4 resized/
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->


</script>

</HEAD>
<BODY  topMargin=0>
<table border=0 cellpadding=0 cellspacing=0 width=100%>

</table>
<table align=center border=0 cellpadding=0 cellspacing=0 height=12 width=359>
  <tbody> 
  <tr height=11> 
    <td>
      <%dim conn   
dim connstr
on error resume next
connstr="DBQ="+server.mappath("mymdb/news.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
     set conn=server.createobject("ADODB.CONNECTION")
     conn.open connstr 
	 %>
      <%      dim flag
        if session("flag")="" then
        session("flag")=0
        end if
		if session("flag")<>"" then
		session("flag")=0
		end if
        session("admin")=""
	dim rs,sql
	dim classid
	dim classname
   
  	set rs = server.createobject("adodb.recordset")
 
  	sql="select * from Aclass where classID="&cstr(classid)
 	rs.open sql,conn,1,1
 	if not rs.eof then
		classname=rs("class")
 	end if
	rs.close
%>
    </td>
  </tr>
  </tbody>
</table>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=100%>
  <TBODY> 
  <TR vAlign=top>
    <TD  height=422 width=1></TD>

    <TD  width=1></TD>
    <TD align=middle> 
      <TABLE border=0 cellPadding=0 cellSpacing=0 width="395">
        <TBODY> 
        <TR>
                <TD width="100%"><IMG border=0 height=12 
                  src="imges/dot.gif" 
              width=1></TD></TR></TBODY></TABLE>
            
      <table border=0 cellpadding=0 cellspacing=0 width="100%">
        <tbody> 
        <tr> 
          <td width="100%"> 
            <table border=0 cellpadding=0 cellspacing=0 width="99%">
              <tbody> 
              <tr> 
                <td valign=top width="69%"> 
                  <table width="100%" border="0" cellpadding="0">
                    <tr> 

                    </tr>
                    <tr> 
                      <td colspan="2" align="center" height="19"> 
                        <%sql="SELECT news,content,img,addtime FROM img  order by id desc" 
	rs.open sql,conn,1,1 
	if rs.eof and rs.bof then 
%>
                        没有更新任何新闻 
                        <%else %>
                        <%rs.movefirst%>
                        <%=rs("news")%> </td>
                    </tr>
                    <tr> 
                      <td colspan="2"><a href="imgnews.asp"><img src="<%=rs("img")%>" align="left" alt="查看详细内容" border="0" width="120" height="90" ></a> 
                        <%if len(rs("content"))>200 then%>
                        <%=left(rs("content"),200)%>...... 
                        <%else%>
                        <%=rs("content")%> 
                        <%end if%>
                        <%end if%>
                      </td>
                    </tr>
                    <tr align="right"> 
                      <td colspan="2"><a href="imgnews.asp">看详细内容</a> <font face="宋体">[<%=rs("addtime")%>] 
                        </font> 
                        <%rs.close%>
                         <a href="allimg.asp" target="_blank">以往新闻&gt;&gt;</a></td>
                    </tr>
                  </table>
                </td>
              </tr>
              </tbody> 
            </table>
            <hr color=#000000 noShade size=1>
            <table width="100%" border="0">
              <tr> 
                <td width="50%" valign=top> 
                  <div align="center"> 
                    <table width="100%" border="0">
                      <tr> 
                        <td> 
                          <div align="center"> 
                            <table cellspacing=0 cellpadding=0 width="100%" bgcolor=#9ea4af 
            border=0>
                              <tbody> 
                              <tr> 
                                <td width="30%" colspan=4><img height=1 src="" width=1></td>
                                <td width="70%" bgcolor=#ffffff><img height=1 src="" 
                width=1></td>
                              </tr>
                              <tr> 
                                <td width=1 height="19"><img height=1 src="" width=1></td>
                                <td width="9%" bgcolor=#ffffff height="19"><img src="IMAGES/dom.gif"></td>
                                <td align=middle width=%21 height="19"><font color="#FFFFFF">其他 
                                  教材</font> </td>
                                <td width=1 height="19"><img height=1 src="" width=1></td>
                                <td width="70%" bgcolor=#ffffff height="19"> 
                                  <div align="right"><a href="Index.asp?classid=2">更多内容&gt;&gt;</a></div>
                                </td>
                              </tr>
                              <tr> 
                                <td width="100%" colspan=5 height="2"><img height=1 src="" 
              width=1></td>
                              </tr>
                              </tbody> 
                            </table>
                          </div>
                        </td>
                      </tr>
                    </table>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <% 
	sql="select top 5 " 
	sql=sql&"article.writer,article.articleid,article.title,article.dateandtime,article.hits,article.daifa,article.classid,article.Nclassid,ANclass.Nclass " 
	sql=sql&" from article,ANclass where article.Nclassid=ANclass.Nclassid and article.classid=2 and daifa=1 " 
	sql=sql&" order by article.articleid desc" 
	rs.open sql,conn,1,1 
	if rs.eof and rs.bof then 
%>
                      <tr> 
                        <td class="td1" rowspan="2">&nbsp;</td>
                      </tr>
                      <%else%>
                      <%do while not rs.eof%>
                      <tr> 
                        <td class="td1"> </td>
                      </tr>
                      <tr> 
                        <td class="td1" colspan="2">&nbsp;<a href="list.asp?id=<%=rs("articleid")%>"><%=rs("title")%></a> 
                          <%if rs("dateandtime")=date() then%>
                          <font color=red class=font1><%=month(rs("dateandtime"))%>/<%=day(rs("dateandtime"))%>/</font> 
                          <%else%>
                          <font color='#999999' class=font1><%=month(rs("dateandtime"))%>/<%=day(rs("dateandtime"))%>/</font> 
                          <%end if%>
                        </td>
                      </tr>
                      <% 
	rs.movenext 
	loop 
	end if 
	rs.close
	
%>
                      <tr align="right"> 
                        <td colspan="2" class="td1">&nbsp;</td>
                      </tr>
                    </table>
                  </div>
                </td>
                <td width="50%"> 
                  <div align="center"> 
                    <table border=0 cellpadding=2 cellspacing=0 width="100%">
                      <tbody> 
                      <tr> 
                        <td rowspan=2 valign=center width=7><font 
            color=#660000></font></td>
                      </tr>
                      <tr> 
                        <td colspan=2 valign=top> 
                          <table width="100%" border="0">
                            <tr> 
                              <td> 
                                <div align="center"> 
                                  <table cellspacing=0 cellpadding=0 width="100%" bgcolor=#9ea4af 
            border=0>
                                    <tbody> 
                                    <tr> 
                                      <td width="30%" colspan=4><img height=1 src="" width=1></td>
                                      <td width="70%" bgcolor=#ffffff><img height=1 src="" 
                width=1></td>
                                    </tr>
                                    <tr> 
                                      <td width=1 height="19"><img height=1 src="" width=1></td>
                                      <td width="9%" bgcolor=#ffffff height="19"><img src="IMAGES/dom.gif"></td>
                                      <td align=middle width=%21 height="19"><font color="#FFFFFF">其他 
                                        教材</font> </td>
                                      <td width=1 height="19"><img height=1 src="" width=1></td>
                                      <td width="70%" bgcolor=#ffffff height="19"> 
                                        <div align="right"><a href="Index.asp?classid=1">更多新闻&gt;&gt;</a></div>
                                      </td>
                                    </tr>
                                    <tr> 
                                      <td width="100%" colspan=5 height="2"><img height=1 src="" 
              width=1></td>
                                    </tr>
                                    </tbody> 
                                  </table>
                                </div>
                              </td>
                            </tr>
                          </table>
                          <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <% 
	sql="select top 5 " 
	sql=sql&"article.writer,article.articleid,article.title,article.dateandtime,article.hits,article.daifa,article.classid,article.Nclassid,ANclass.Nclass " 
	sql=sql&" from article,ANclass where article.Nclassid=ANclass.Nclassid and article.classid=2 and daifa=1 " 
	sql=sql&" order by article.articleid desc" 
	rs.open sql,conn,1,1 
	if rs.eof and rs.bof then 
%>
                            <tr> 
                              <td class="td1" rowspan="2">&nbsp;</td>
                            </tr>
                            <%else%>
                            <%do while not rs.eof%>
                            <tr> 
                              <td class="td1"> </td>
                            </tr>
                            <tr> 
                              <td class="td1" colspan="2">&nbsp;<a href="list.asp?id=<%=rs("articleid")%>"><%=rs("title")%></a> 
                                <%if rs("dateandtime")=date() then%>
                                <font color=red class=font1><%=month(rs("dateandtime"))%>/<%=day(rs("dateandtime"))%>/</font> 
                                <%else%>
                                <font color='#999999' class=font1><%=month(rs("dateandtime"))%>/<%=day(rs("dateandtime"))%>/</font> 
                                <%end if%>
                              </td>
                            </tr>
                            <% 
	rs.movenext 
	loop 
	end if 
	rs.close
	
%>
                            <tr align="right"> 
                              <td colspan="2" class="td1">&nbsp;</td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                      </tbody> 
                    </table>
                  </div>
                </td>
              </tr>
            </table>
            
          </td>
        </tr>
        <tr> 
          
        </tr>
        <tr> 
          <td width="100%"> 
            <TABLE border=0  cellPadding=0 cellSpacing=0 
      class=unnamed1 width="100%">
</TABLE>
            <table width="100%" border="0">
              <tr> 
                <td width="50%" valign=top> 
                  <div align="center"> 
                    <table width="100%" border="0">
                      <tr> 
                        <td> 
                          <div align="center"> 
                            <table cellspacing=0 cellpadding=0 width="100%" bgcolor=#9ea4af 
            border=0>
                              <tbody> 
                              <tr> 
                                <td width="30%" colspan=4><img height=1 src="" width=1></td>
                                <td width="70%" bgcolor=#ffffff><img height=1 src="" 
                width=1></td>
                              </tr>
                              <tr> 
                                <td width=1 height="19"><img height=1 src="" width=1></td>
                                <td width="9%" bgcolor=#ffffff height="19"><img src="IMAGES/dom.gif"></td>
                                <td align=middle width=%21 height="19"><font color="#FFFFFF">其他 
                                  教材</font> </td>
                                <td width=1 height="19"><img height=1 src="" width=1></td>
                                <td width="70%" bgcolor=#ffffff height="19"> 
                                  <div align="right"><a href="Index.asp?classid=2">更多内容&gt;&gt;</a></div>
                                </td>
                              </tr>
                              <tr> 
                                <td width="100%" colspan=5 height="2"><img height=1 src="" 
              width=1></td>
                              </tr>
                              </tbody> 
                            </table>
                          </div>
                        </td>
                      </tr>
                    </table>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <% 
	sql="select top 5 " 
	sql=sql&"article.writer,article.articleid,article.title,article.dateandtime,article.hits,article.daifa,article.classid,article.Nclassid,ANclass.Nclass " 
	sql=sql&" from article,ANclass where article.Nclassid=ANclass.Nclassid and article.classid=2 and daifa=1 " 
	sql=sql&" order by article.articleid desc" 
	rs.open sql,conn,1,1 
	if rs.eof and rs.bof then 
%>
                      <tr> 
                        <td class="td1" rowspan="2">&nbsp;</td>
                      </tr>
                      <%else%>

⌨️ 快捷键说明

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