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

📄 postreply.asp

📁 单班同学录 一个非常漂亮的同学录 哦
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<%@LANGUAGE="VBScript" CODEPAGE="936"%>
<!--#include file="session.asp" -->
<!--#include file="conn.asp" -->
<!--#include file="CHAR.asp" -->
<%
'发表回复
If request.ServerVariables("REQUEST_METHOD")="POST" then
	if session("usergroup")=1 then
		response.write"<script>alert('对不起,您还没有经过同学验证,无权发布消息!');location='"&request.ServerVariables("HTTP_REFERER")&"'</script>"
		response.end
	end if
	ReplyID=request("ReplyID")
	PostID=request("PostID")
	PostTitle=trim(request("PostTitle"))
	PostText=trim(request("MssgText"))
	
	set rs1=server.CreateObject("adodb.recordset")
	if PostID="" then     '增加记录
		rs1.open "bbs",conn,1,3
		rs1.addnew
		rs1("PostTitle")=PostTitle
		rs1("PostText")=PostText
		rs1("PostUser")=session("username")
		rs1("PostTime")=now()
		rs1("ReplyTime")=now()
		rs1("ReplyID")=ReplyID
		rs1("ReplyNo")=0
		rs1.update
		rs1.close
		set rs1=nothing
		conn.execute("update bbs set replytime=now(),ReplyNo=ReplyNo+1 where PostID="&ReplyID)
		CloseDatabase
		response.Redirect("postdisplay.asp?id="&ReplyID)
	else
		sql1="select * from bbs where PostID="&Postid
		rs1.open sql1,conn,2,3
		rs1("PostTitle")=PostTitle
		rs1("PostText")=PostText
		rs1.update
		rs1.close
		set rs1=nothing
		CloseDatabase
		response.Redirect("postdisplay.asp?id="&ReplyID)
	end if
end if 

pID=request("PID")
id=request("id")
ReplyID=pID

If ReplyID="" or IsNumeric(ReplyID)=False Then
	response.Redirect("error.asp")
	response.End
end if
if id<>"" then
	strsql="select * from bbs where PostID="&id
	set rs=conn.execute(strsql)
	If rs("PostUser")=Session("UserName") or session("usergroup")=3 Then
		PostID=trim(rs("PostID"))
		PostTitle=trim(rs("PostTitle"))
		PostText=trim(rs("PostText"))
	Else
		response.Redirect("error.asp")
	End If
end if
%>


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<title><%=classname%>同学录--发表留言</title>
<link href="css/class.css" type=text/css rel=stylesheet>
<script language="JavaScript">
<!--
function checkform()
	if  (document.post.MssgText.value.length==0) {
	alert("内容不能为空!");
	document.post.MssgText.focus();
	return false;
	}
	return true
	}
//-->
</script>
<script language="JavaScript" src="js/ubb.js"></script>

</head>

<body background="images/1.GIF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="776" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td colspan="3"><img src="images/top_t.gif" width="776" height="43"></td>
  </tr>
  <tr> 
    <td width="138"><img src="images/top_l.gif" width="138" height="39"></td>
    <td width="584" align="right" bgcolor="#666B52"><a href="index.asp"><img src="images/toplogo.gif" alt="<%=classname%>同学录" width="200" height="39" border="0"></a></td>
    <td width="54"><img src="images/top_r.gif" width="54" height="39"></td>
  </tr>
  <tr> 
    <td colspan="3"><table width="776" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="120" rowspan="2" valign="top" background="images/left_x.gif"><img src="images/left_img.gif" width="120" height="480"></td>
          <td rowspan="2" valign="top" bgcolor="#F2F2EA"> <div align="center"> 
              <!--#include file="top.asp" -->
            </div>
            <table width="618" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td valign="top"> <div align="center"><br>
                    <!--#include file="left.asp" -->
                  </div></td>
                <td width="10">&nbsp;</td>
                <td width="418" valign="top"><table width="400" border="0" align="center" cellpadding="2" class="font1">
                    <tr> 
                      <td width="459">您的位置&gt;回复主题</td>
                      <td width="27"> </td>
                    </tr>
                  </table>
                  <div align="center"> 
                    <table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td><table width="400" border="0" cellpadding="0" cellspacing="0" background="images/bjbj.gif">
                            <tr> 
                              <td width="135"><img src="images/bjlt.gif" width="135" height="36"></td>
                              <td>&nbsp;</td>
                              <td width="85"><img src="images/hfht2.gif" width="85" height="36"></td>
                            </tr>
                          </table></td>
                      </tr>
                      <tr> 
                        <td><table width="400" border="0" cellpadding="0" cellspacing="0" background="images/n_bk.gif">
                            <tr> 
                              <td valign="top"> <table border="0" cellpadding="2" width="400" cellspacing="2">
                                  <tr> 
                                    <td> <div align="center"> 
                                        <form action="postreply.asp" method="post" name="post" id="post" onSubmit="return checkform()">
                                          <table border="0" cellpadding="2" width="388">
                                            <tr> 
                                              <td width="380"> <table width="380" border="0" cellpadding="0" cellspacing="0" bgcolor="#666B52">
                                                  <tr> 
                                                    <td><table width="100%" border="0" cellspacing="1" cellpadding="2">
                                                        <tr> 
                                                          <td bgcolor="E3E3CF"> 
                                                            <div align="center"><strong>字体</strong> 
                                                              <SELECT onchange=showfont(this.options[this.selectedIndex].value) name=font>

⌨️ 快捷键说明

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