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

📄 primsgsend.asp

📁 单班同学录 一个非常漂亮的同学录 哦
💻 ASP
字号:
<%@LANGUAGE="VBScript" CODEPAGE="936"%>
<!--#include file="session.asp" -->
<!--#include file="conn.asp" -->
<%
id=request.QueryString("id")
'response.Write(primsguser)
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
	primsguser=request.Form("primsguser")
	if primsguser="" then 
		response.Write("error!")
		response.End	
	end if

	primsgtitle=trim(request.Form("primsgtitle"))
	PrimsgText=trim(request.Form("PrimsgText"))
	strsql="insert into primsg(primsguser,primsgtitle,PrimsgText,primsgtime,primsgsender,primsgtype) values('"&primsguser&"','"&primsgtitle&"','"&PrimsgText&"',now(),'"&session("username")&"',1)"
	conn.execute(strsql)
	response.Redirect("primsg.asp")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=classname%>同学录</title>
<link href="css/class.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function checkform(){
if (document.form1.primsgtitle.value.length==0){
	alert("标题不能为空!");
	document.form1.primsgtitle.focus();
	return false;
	}
if (document.form1.PrimsgText.value.length==0){
	alert("内容不能为空!");
	document.form1.PrimsgText.focus();
	return false;
	}
	return true;
	}
//-->
</script>
</head>

<body bgcolor="#F2F2EA">
<table width="360" border="0" cellpadding="0" cellspacing="0" background="images/dxbj.gif">
  <tr> 
    <td><table width="360" border="0" cellpadding="0" cellspacing="0" background="images/gnymtbz.gif">
        <tr> 
          <td width="135"><img src="images/dxxx.gif" width="135" height="36"></td>
          <td>&nbsp;</td>
          <td width="100"><img src="images/gnymtyb.gif" width="100" height="36"></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td> 
      <form name="form1" method="post" action="primsgsend.asp" onSubmit="return checkform()">
        <br>
        <table width="350" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#666B52">
          <%
	set rs=conn.execute("select userid,username,realname from [user] where isvalid=true order by username")%>
          <tr> 
            <td bgcolor="#E3E3CF"><strong>成员姓名</strong>:</td>
            <td bgcolor="#Fafbf2">
				<select name="primsguser" id="primsguser">
                <%do while not rs.eof%>
                <option value="<%=rs("username")%>" <%if rs("username")=id then%>selected<%end if%>><%=rs("realname")%></option>
                <%rs.movenext
				loop
				rs.close%>
              </select>
            </td>
          </tr>
          <tr> 
            <td bgcolor="#E3E3CF"><strong>标题:</strong></td>
            <td bgcolor="#Fafbf2"> 
              <input name="primsgtitle" type="text" id="primsgtitle" size="36" height="20">
            </td>
          </tr>
          <tr> 
            <td valign="top" bgcolor="#E3E3CF"><strong><br>
              内容:</strong></td>
            <td bgcolor="#Fafbf2"> 
              <textarea name="PrimsgText" cols="40" rows="8" id="PrimsgText"></textarea>
            </td>
          </tr>
          <tr bgcolor="#Fafbf2"> 
            <td colspan="2"> 
              <div align="center"> 
                <input type="submit" name="Submit" value="提交">
                <input type="reset" name="Submit2" value="重置">
              </div></td>
          </tr>
        </table>
      </form> </td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><img src="images/dxfoot.gif" width="360" height="10"></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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