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

📄 gbookadd.asp

📁 程序名称:酷虎网校友录 V1.0 (商业版)*(修改版) * 本软体为商业软件
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<%
IF Request.Form.Count<>0 Then
Suc=True
Name=Trim(Request.Form("Name"))
Sex=Request.Form("Sex")
Email=Trim(Request.Form("Email"))
Homepage=Trim(Request.Form("Homepage"))
Title=Trim(Request.Form("Title"))
Content=Trim(Request.Form("Content"))
OICQ=Trim(Request.Form("OICQ"))
FormWhere=Request.Form("FormWhere")
IF Name="" Then
	ErrInfo=ErrInfo & "·请填写您的姓名<BR>"
	Suc=False
End IF
IF Title="" Then
	ErrInfo=ErrInfo & "·请填写留言主题<BR>"
	Suc=False
End IF
IF Content="" Then
	ErrInfo=ErrInfo & "·请填写留言内容<BR>"
	Suc=False
End IF
IF OICQ="" Then
OICQ=0
Else
IF Not IsNumeric(OICQ)  Then
	ErrInfo=ErrInfo & "·请填写正确的OICQ<BR>"
	Suc=False
End IF
End IF
IF Email="" Then
Email="no"
Else
	IF Instr(Email,"@")=0 Then
		ErrInfo=ErrInfo & "·请填写正确的Email<BR>"
		Suc=False
	End IF
End IF
IF Homepage="" Then
Homepage="no"
End IF
IF LEN(Title)>25 Then
	ErrInfo=ErrInfo & "·标题的长度不能超过25个字符<BR>"
	Suc=False
End IF
IF Suc Then
SQL="Select * From 留言信息"
Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open SQL,Connstr,3,2
IF Session("Add")=True Then
RS.Addnew
RS("姓名")=Name
RS("性别")=Sex
RS("OICQ")=OICQ
RS("电子邮箱")=Email
RS("主题")=Title
RS("来自")=FormWhere
RS("主页")=Homepage
RS("内容")=Content
RS("发布时间")=Date
RS.Update
Session("Add")=False
End IF
End IF

End IF
%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<%IF Request.Form.Count<>0 And Suc=True Then%>
<meta http-equiv="refresh" content="3;url=gbookindex.asp">
<%End IF%>
<!--#include file="inc/css.asp"-->
<title><%=WebsiteName%></title>
</head>
<body topmargin="0" background="images/bg.gif">
<!--#include file="top.asp"-->
<div align="center">
  <center>
  <table border="0" width="755" cellspacing="0" cellpadding="0">
    <tr>
      <td width="189" style="background-color: #FFFFFF; border-left: 1 solid #000000; border-top: 1 solid #000000; border-bottom: 1 solid #000000" valign="top"> 
		<!--#include file="left.asp"-->
      </td>
      <td width="562" style="background-color: #FFFFFF; border: 1 solid #000000" valign="top">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
		<!--#include file="navigation.asp"-->
          <tr>
            <td width="27%" valign="top">
              <img border="0" src="images/guestbook.gif" width="150" height="124">
            </td>
            <td width="73%" valign="top">
            <p style="line-height: 150%; margin-left: 50"><br>
            <font color="#990000">如果你对我们有什么意见或建议的话,请您在此留下您的意<br>
            见。我们的发展离不开您的参与。我仅代表我校全体师生祝<br>
            您身体健康、万事如意!<br>
            </font>[ <a href="gbookadd.asp">发布新的留言</a> ]&nbsp; [ <a href="gbookindex.asp">刷新留言本</a>                                                          
            ]                                                               
            </td>
          </tr>
          <tr>
            <td width="100%" valign="top" colspan="2">
            </td>
          </tr>
          <%IF Request.Form.Count=0 Then%>
          <%Session("Add")=True%>
          <form action="" method="post">
          <tr>
            <td width="100%" valign="top" colspan="2" height="10"><div align="center">
                <center>
                <table border="0" width="90%" cellspacing="0" cellpadding="0" style="border: 1 solid #000000" height="136">
                  <tr>
                    <td width="500" background="images/bg2.gif" height="22" colspan="2">
                      <p align="center"><b>签 写 新 留 言</b></td>                                                              
                  </tr>
                </center>
                  <%
                  IF Session("User")<>"" Then
                  SQL="Select * From 注册信息 Where 姓名='" & Session("User") & "'"
                  Set RS=Server.CreateObject("ADODB.Recordset")
                  RS.Open SQL,Connstr,1,1
                  IF Not RS.EOF Then
                  Name=RS("姓名")
                  Sex=RS("性别")
                  Email=RS("电子邮件")
                  HomePage=RS("个人主页")
                  OICQ=RS("OICQ")
                  End IF
                  Set RS=Nothing
                  End IF
                  %>                  
                  <tr>
                    <td width="125" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
                    <p align="center">姓&nbsp; 名</p>                                                              
                    </td>
                    <td width="377" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc" valign="middle">
                    <p style="margin-left: 5">
                    <input type=text name="Name" size=12 maxlength=6 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 109; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%" value="<%=Name%>">
                    </td>
                  </tr>
                  <tr>
                    <td width="125" height="22" bgcolor="#F6F6F6" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
                    <p align="center">性&nbsp; 别                                                         
                    </td>
                    <td width="377" height="22" bgcolor="#F6F6F6" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
                    &nbsp;<select size="1" name="Sex" style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 23; width: 109; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%">
                      <option value="男" <%IF Sex="男" Then%>selected<%End IF%>>我是男生</option>
                      <option value="女" <%IF Sex="女" Then%>selected<%End IF%>>我是女生</option>
                    </select>
                    </td>

⌨️ 快捷键说明

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