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

📄 article.asp

📁 基于asp的博客系统+论文(代码齐全)经过调试
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="Public.asp"-->
<!--#include file="Config.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%= cfgTitle %></title>
<style type="text/css">
<!--
body {
	background-color: #666688;
}
-->
</style>
<style type="text/css">
<!--
.style2 {font-weight: bold}
.style3 {
	font-size: 14px;
	font-weight: bold;
	color: #FFFFFF;
}
-->
</style>
<link href="Style.css" rel="stylesheet" type="text/css">
<% 
Dim click
if request("ContentID") <> "" then
	call ConnExec("update Article set click = click + 1 where username='" & request("user") & "'")
end if

if request("action") = "save" then
call creaters(rs,"select * from Comment")
	rs.addnew
		rs("ContentID") = Request("ContentID")
		rs("Person") = request.Form("Person")
		rs("Description") = request.Form("Description")
		rs("date") = date()
	rs.update
 call closers(rs) 
 response.Redirect("Article.asp?user=" & request("user") &"&ContentID=" & Request("ContentID"))
 end if
 %>
</head>

<body>
<!--#include file="top.asp"-->
<% 
call creaters(rs,"select * from Article where contentID=" & request("contentID"))
 %>
<link href="Style.css" rel="stylesheet" type="text/css">
<table width="614" border="0" align="center" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="614" height="15"  valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <td width="614" height="15"></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="29"  valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <td width="614" height="29" valign="middle" background="images/Main_01.gif">&nbsp;&nbsp;<span class="style3"><%= rs("title") %> </span></td>
        </tr>
                </table></td>
  </tr>
  <tr>
    <td height="80"  valign="top"><table width="100%" border="0" cellpadding="10" cellspacing="0" background="images/Main_02.gif">
      <!--DWLayoutTable-->
      <tr>
        <td width="614" align="left" valign="top"><%= SetHtml(rs("Content")) %></td>
      </tr>
	  <% click = rs("click") %>
      <tr>
        <td height="39" align="right" valign="bottom"><div align="left">   
		<table width="98%" height="24"  border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#C0E096">
		<% call creaters(rs_Comment,"select * from View_Comment where t1.ContentID=" & request("ContentID")) %>   
		<% if not rs_Comment.eof then %>    
		<hr width="100%" size="1" noshade>
		<% end if %>
		<% while not rs_Comment.eof %>
		
            <tr bgcolor="#FFFFFF">
              <td width="22%" height="22"><%= rs_Comment("Person") %>&nbsp;[<%= rs_Comment("t1.Date") %>]</td>
              <td width="78%"><%= SetHtml(rs_Comment("t2.Description")) %>  </td>
            </tr>
          
		  <% 
			rs_Comment.movenext
			wend
			 %>
			<% call closers(rs_Comment) %>
			</table>
        <br>        
        <table width="98%" height="45"  border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#C0E096">
		  <form name="frmUnit" action="Article.asp?action=save&ContentID=<%= request("ContentID") %>&user=<%= request("user") %>" method="post">
            <tr bgcolor="#F3F9EC">
              <td><strong>您的大名:</strong></td>
              <td><input name="Person" type="text" class="InputBox" id="Person" value="匿名" size="60"></td>
            </tr>
            <tr bgcolor="#FFFFFF">
              <td width="27%"><strong>评论内容:</strong></td>
              <td width="73%"><textarea name="Description" cols="60" rows="3" class="InputBox" id="Description"></textarea></td>
            </tr>
            <tr bgcolor="#F3F9EC">
              <td colspan="2"><div align="center">
                  <input name="btnSubmit" type="button" class="InputBox" value="提交">
                  <input name="Submit2" type="reset" class="InputBox" value="重置">
              </div></td>
              </tr>
			  </form>
          </table>
          <div align="right"><br>
              <a href="javascript:window.print();">打印</a> | <a href="javascript:history.back(1);">返回</a> | <a href="#">已经被浏览 <%= click %> 次</a></div>
        </div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="25"  valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <td width="614" height="25" valign="top"><img src="images/Main_03.gif" width="614" height="25"></td>
        </tr>
        </table></td>
  </tr>
</table>
<% call closers(rs) %>
<!--#include file="down.asp"-->
</body>
</html>
<script language="vbscript">
	sub btnSubmit_onclick()
		if frmUnit.Description.value = "" then
			Msgbox "内容不允许为空.",VbCritical,"内容"
			exit sub
		end if
		
		if frmUnit.Person.value = "" then
			Msgbox "您的大名不允许为空.",VbCritical,"您的大名"
			exit sub
		end if
		frmUnit.submit
	end sub
</script>

⌨️ 快捷键说明

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