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

📄 gly_w.asp

📁 Art2008 CMS是一款具有强大的功能的基于ASP语言的网站管理软件
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file=admin_conn.asp-->
<!--#include file=admin/titleb.asp-->
<!--#include file=include/config.asp -->
<%

if request("send")="ok" then

	username=trim(request.form("username"))
	usermail=trim(request.form("usermail"))
	title=trim(request.Form("title"))

	if username="" or request.form("Comments")="" or title="" then
	response.write "<script language='javascript'>"
	response.write "alert('填写资料不完整,请检查后重新输入!');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

	if checktxt(request.form("username"))<>request.form("username") then
	response.write "<script language='javascript'>"
	response.write "alert('您输入的用户名中含有非法字符,请检查后重新输入!');"
	response.write "location.href='javascript:history.go(-1)';"							
	response.write "</script>"	
	response.end
	end if

	if mailyes=0 then		'邮箱为必填时检查邮箱是否合法

	if checktxt(request.form("usermail"))<>request.form("usermail") then
	response.write "<script language='javascript'>"
	response.write "alert('您输入的邮箱中含有非法字符,请检查后重新输入!');"
	response.write "location.href='javascript:history.go(-1)';"							
	response.write "</script>"	
	response.end
	end if

	if Instr(usermail,".")<=0 or Instr(usermail,"@")<=0 or len(usermail)<10 or len(usermail)>50 then
	response.write "<script language='javascript'>"
	response.write "alert('您输入的电子邮件地址格式不正确,请检查后重新输入!');"
	response.write "location.href='javascript:history.go(-1)';"							
	response.write "</script>"	
	response.end
	end if

	end if

	if len(request.form("Comments"))>maxlength then
	response.write "<script language='javascript'>"
	response.write "alert('留言内容太长了,请不要超过"&maxlength&"个字符!');"
	response.write "location.href='javascript:history.go(-1)';"
	response.write "</script>"
	response.end
	end if

	Comments1=request.form("Comments")
	bad1=split(bad,"/")		'过滤脏话
	for t=0 to ubound(bad1)
	Comments1=replace(Comments1,bad1(t),"***")
	next

	if request.form("Comments")<>Comments1 then
	response.write "<script language='javascript'>"
	response.write "alert('出错了,您的留言包含禁止提交的内容!');"
	response.write "location.href='javascript:history.go(-1)';"							
	response.write "</script>"	
	response.end
	end if
	haogeyzm=chkhtm(trim(Request("haogeyzm")))
    
   if haogeyzm=cstr(session("haogeyzm")) then

	set rs=Server.CreateObject("ADODB.RecordSet")
	sql="select * from gbook where online='1' order by Postdate desc"
	rs.open sql,conn,1,3

			rs.Addnew
			rs("username")=Request("username")
			rs("title")=Request("title")
			rs("comments")=Request("comments")
			rs("usermail")=Request("usermail")
			rs("face")=Request("face")
			rs("pic")=Request("pic")
			rs("url")=Request("url")
			rs("qq")=Request("qq")
			online=Request("online")
			view=cstr(view)			
			if view<>"0" and online<>"2" then view="1"			
			rs("online")=view
			if online="2" then
			rs("online")=online
			end if
			rs("IP")=Request.serverVariables("REMOTE_ADDR")
			rs.Update
			
		rs.close
		set rs=nothing
		else
     response.write "<script>alert('输入的验证码不正确!');history.back();</Script>"
     Response.end
    end if 
	response.write "<script language='javascript'>"	
	if view="0" then
	response.write "alert('留言提交成功,留言须经管理员审核才能发布。');"
	else
	response.write "alert('留言提交成功,单击“确定”返回留言列表!');"
	end if
	response.write "location.href='gly.asp';"	
	response.write "</script>"
	response.end

end if

GuestPath="images/gbook/guestbook/"
GuestPathface="images/gbook/face/"
%>

<HTML><HEAD><TITLE>发表留言-</TITLE>
<META content=   name=description>
<META content=   name=keywords>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="images/gbook/style.css" type=text/css rel=stylesheet>

<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<style type="text/css">
<!--
.h10 {LINE-HEIGHT: 10px
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function bookcount(message,total,used,remain)
{
	var max;
	max = total.value;
	if (message.value.length > max) {
	message.value = message.value.substring(0,max);
	used.value = max;
	remain.value = 0;
	alert("内容不能超过" +max+ "个字!");
	}
	else {
	used.value = message.value.length;
	remain.value = max - used.value;
	}
}
//-->
</script>
</HEAD>
<BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<TABLE id=__01 cellSpacing=0 cellPadding=0 width=585 align=center 
            border=0>
      <TBODY>
        <TR>
          <TD width="1%"><IMG id=in_01 height=7 alt="" 
                  src="images/gbook/in_01.jpg" width=7></TD>
          <TD width="60%" background=images/gbook/in_02.jpg><IMG id=in_02 height=7 
                  alt="" src="images/gbook/in_02.jpg" width=185></TD>
          <TD width="39%"><IMG id=in_03 height=7 alt="" 
                  src="images/gbook/in_03.jpg" width=8></TD>
        </TR>
        <TR>
          <TD background=images/gbook/in_04.jpg><IMG id=in_04   height=40 alt="" src="images/gbook/in_04.jpg" width=7></TD>
          <TD><table width="570" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td><table width="100%" border=0 cellspacing=0 cellpadding=0 align=center  class="grayline">
                <tr>
                  <td align=center height=50><img src=images/gbook/wly.jpg width="120" height="30" border=0>&nbsp;&nbsp;&nbsp;&nbsp;<a href=gly.asp><img src=images/gbook/gly.jpg width="120" height="30" border=0 title="我要看留言"></a> </td>
                </tr>
                <tr>
                  <td><form action=gly_w.asp method=post name="book">
                      <table width="530" border="1" align="center" cellPadding="4" cellSpacing="1" bordercolor="#000000" borderColorLight="#000000" borderColorDark="#ffffff">
                        <tr>
                          <td   width="15%" align=right><div align="center" class="coolscrollbar">您的姓名:</div></td>
                          <td width="58%" ><input name="UserName" type=text class="UserLogin_a" size="30" maxlength=16>
                              <font color="#FF0000">*</font></td>
                          <td width="20%" height="100" rowspan="4" ><TABLE width="75" height="100" border=0 align="center" cellPadding=1 cellSpacing=0>
                         <TR><TD height="100" align=middle style="padding:4px"><img src="images/gbook/pic/pic(00).gif" width="85" height="120" border=1  id=pic_v ></TD>
                         </TR></TABLE></td>
                        </tr>
                        <tr>
                          <td   width="15%" align=right><div align="center" class="coolscrollbar">您的邮箱:</div></td>
                          <td ><input type=text name="UserMail" size="30"  maxlength=50>
                              <%if mailyes=0 then%>
                              <font color="#FF0000">*</font>
                              <%end if%></td>
                        </tr>
                        <tr>
                          <td   width="15%" align=right><div align="center" class="coolscrollbar">您的网站:</div></td>
                          <td><input type=text value="http://" name="url" size="30"  maxlength=100></td>
                        </tr>
                        <tr>
                          <td   width="15%" align=right><div align="center" class="coolscrollbar">联系方式:</div></td>
                          <td><input type=text value="" name="QQ" size="30"  maxlength=50>
                              <font color="#999999">(如QQ、MSN等)</font></td>
                        </tr>
						 <tr>
						   <td width="15%" align=right><div align="center" class="coolscrollbar">选择头像:</div></td>
						   <td colspan="2"><select name="pic" size="1" id="pic" onChange="document.images['pic_v'].src=options[selectedIndex].value;" >												
							<%
							'取出目录中的图标
							  icon_path=Server.MapPath("images/gbook/pic/")
				              'on error resume next
							  set fso=server.CreateObject("scripting.filesystemobject")  
                              set objFolder=fso.GetFolder(icon_path)
							   
                              set  objFiles=objFolder.Files    
                               for  each  objFile  in  objFiles    
                                    if right(objFile.name,3)="gif" or right(objFile.name,3)="jpg" or right(objFile.name,3)="bmp" then
                                    response.write "<option value='images/gbook/pic/"&trim(objFile.name)&"' "									
									response.write ">""请选择图像->"&trim(objFile.name)&"</option>"&vbcrlf
									end if 
                               next    
                              set  objFolder=nothing    
                              set  fso=nothing    
							'结束取出目录中的图标							
							%>
							</select></td>
					    </tr>
						 <tr>
                          <td   width="15%" align=right><div align="center" class="coolscrollbar">留言标题:</div></td>
                          <td colspan="2"><input type=text value="" name="title" size="52"  maxlength=50>
                              <font color="#FF0000">*</font></td>
                        </tr>
						<tr>
                          <td   width="15%" align=right><div align="center" class="coolscrollbar">Ubb标签:</div></td>
                          <td colspan="2"><% call showubb()%></td>
                        </tr>
                        <tr>
                          <td   width="15%" align=right><div align="center" class="coolscrollbar">留言内容:</td>
                          <td colspan="2"><textarea name="Comments" rows="7" cols="59"  style="overflow:auto;"
						   onkeydown="bookcount(this.form.Comments,this.form.total,this.form.used,this.form.remain);" 
                           onkeyup="bookcount(this.form.Comments,this.form.total,this.form.used,this.form.remain);"></textarea>
                          &nbsp;最多字数:<input disabled maxLength="4" size="3" value="<%=maxlength%>" name="total" >&nbsp;&nbsp;已用字数:<input disabled maxLength="4" size="3" value="0" name="used">剩余字数:<input disabled maxLength="4" size="3" value="<%=maxlength%>" name="remain" >&nbsp;
</td>
                        </tr>
                        <tr>
                          <td   width="15%" align=right><div align="center" class="coolscrollbar">请选择表情:</div></td>
                          <td colspan="2"><%
					for i=1 to 20
					response.write "<input type=""radio"" name=""Face"" value="&i&" checked"
					response.write " style=""BORDER:0px;width:18;"">"
					response.write "<img src="""&GuestPathface&"face"&i&".gif"" width=""19"" height=""19"">"& vbcrlf
					if i mod 10 =0 then response.write "<br>"
				    next
				            %></td>
                        </tr>
                       	<tr>
                          <td   width="15%" align=right><div align="center" class="coolscrollbar">是否保密:</div></td>
                          <td colspan="2"> <input type="radio" value="2"  name="online"> 保密 
                              <input checked type="radio" value="1" name="online">不保密  <font color="#999999">(保密仅工作人员可以查看)</font></td>
                        </tr>
                        <tr>
                          <td colSpan="3"><div align="center">
						  提交前输入验证码:
							  <input name="haogeyzm" size="9" maxlength="5" style="font-size: 9pt; font-family: 宋体,MingLiU, Arial; color: #000000">
							<%
								Randomize
								an=""
								an= int((99999-11111+1) * RND +11111)
								session("haogeyzm")=an
								Response.Write an
							%> &nbsp;&nbsp;
                             <input type="submit" value="提交留言" name="Submit">
                              <input type="reset" value="重新填写" name="Submit2">
                              <input type=hidden name=send value=ok>
                          </div></td>
                        </tr>
                      </table>
                  </form>
                </table></td>
            </tr>
          </table></TD>
          <TD background=images/gbook/in_06.jpg><IMG id=in_06 
                  height=40 alt="" src="images/gbook/in_06.jpg" width=8></TD>
        </TR>
        <TR>
          <TD><IMG id=in_07 height=7 alt="" 
                  src="images/gbook/in_07.jpg" width=7></TD>
          <TD background=images/gbook/in_08.jpg><IMG id=in_08 height=7 
                  alt="" src="images/gbook/in_08.jpg" width=185></TD>
          <TD><IMG id=in_09 height=7 alt="" 
                  src="images/gbook/in_09.jpg" width=8></TD>
        </TR>
      </TBODY>
</TABLE>
</BODY></HTML>
<%
sub ShowUbb()
%>
<script language=JavaScript>
helpstat = false;
stprompt = true;
basic = false;
function thelp(swtch){
	if (swtch == 1){
		basic = false;
		stprompt = false;
		helpstat = true;
	} else if (swtch == 0) {
		helpstat = false;
		stprompt = false;
		basic = true;
	} else if (swtch == 2) {
		helpstat = false;
		basic = false;
		stprompt = true;
	}

⌨️ 快捷键说明

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