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

📄 ly.asp

📁 体育商城
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%> 
<!--#include file="Connections/conn.asp" -->
<%
' *** Edit Operations: declare variables

MM_editAction = CStr(Request("URL"))
If (Request.QueryString <> "") Then
  MM_editAction = MM_editAction & "?" & Request.QueryString
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) <> "") Then

  MM_editConnection = MM_conn_STRING
  MM_editTable = "guestbook"
  MM_editRedirectUrl = "lyok.asp"
  MM_fieldsStr  = "v_name|value|v_email|value|v_qq|value|v_url|value|select|value|v_coneint|value|ip|value"
  MM_columnsStr = "lyname|',none,''|lyemail|',none,''|lyqq|',none,''|lyurl|',none,''|face|',none,''|lyneirong|',none,''|lyip|',none,''"

  ' create the MM_fields and MM_columns arrays
  MM_fields = Split(MM_fieldsStr, "|")
  MM_columns = Split(MM_columnsStr, "|")
  
  ' set the form values
  For i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_fields(i+1) = CStr(Request.Form(MM_fields(i)))
  Next

  ' append the query string to the redirect URL
  If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
      MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
    Else
      MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
    End If
  End If

End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it

If (CStr(Request("MM_insert")) <> "") Then

  ' create the sql insert statement
  MM_tableValues = ""
  MM_dbValues = ""
  For i = LBound(MM_fields) To UBound(MM_fields) Step 2
    FormVal = MM_fields(i+1)
    MM_typeArray = Split(MM_columns(i+1),",")
    Delim = MM_typeArray(0)
    If (Delim = "none") Then Delim = ""
    AltVal = MM_typeArray(1)
    If (AltVal = "none") Then AltVal = ""
    EmptyVal = MM_typeArray(2)
    If (EmptyVal = "none") Then EmptyVal = ""
    If (FormVal = "") Then
      FormVal = EmptyVal
    Else
      If (AltVal <> "") Then
        FormVal = AltVal
      ElseIf (Delim = "'") Then  ' escape quotes
        FormVal = "'" & Replace(FormVal,"'","''") & "'"
      Else
        FormVal = Delim + FormVal + Delim
      End If
    End If
    If (i <> LBound(MM_fields)) Then
      MM_tableValues = MM_tableValues & ","
      MM_dbValues = MM_dbValues & ","
    End if
    MM_tableValues = MM_tableValues & MM_columns(i)
    MM_dbValues = MM_dbValues & FormVal
  Next
  MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"

  If (Not MM_abortEdit) Then
    ' execute the insert
    Set MM_editCmd = Server.CreateObject("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_editConnection
    MM_editCmd.CommandText = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    If (MM_editRedirectUrl <> "") Then
      Response.Redirect(MM_editRedirectUrl)
    End If
  End If

End If
%>
<html>
<head>
<title>访客留言</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="ddd.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="top.asp" -->
<table width="771" border="0" cellspacing="0" cellpadding="0" align="center" height="76" class="bk1">
  <tr> 
    <td height="517" valign="top"> 
      <p align="center"><font size="3"><b><font color="#000000"><br>
        <script language="JavaScript">
<!--

function Juge(theForm)
{
  if (theForm.v_name.value == "")
  {
    alert("不是吧!你没有名字?帅哥美女都可以啦!");
    theForm.v_name.focus();
    return (false);
  }
  if (theForm.v_name.value.length>8)
  {
    alert("名字不得超过8个字!");
    theForm.v_name.focus();
    return (false);
  }
	if (theForm.v_email.value == "")
  {
    alert("没有邮箱我怎么联系你呀!");
    theForm.v_email.focus();
    return (false);
  }
	if (theForm.v_coneint.value == "")
	{
		alert("有没有搞错?你没有话和我说吗?");
		theForm.v_coneint.focus();
		return (false);
	}
		if (theForm.v_coneint.value.length>100)
	{
		alert("太多啦。我看不了,还是段点吧,100个字内!");
		theForm.v_coneint.focus();
		return (false);
	}


	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_@.";
	var checkStr = theForm.v_email.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
			allValid = false;
			break;
		}
	}

	if (theForm.v_email.value.length < 6)
	{
			allValid = false;
	}

	if (!allValid)
	{
		alert("您输入的 \"电子邮件地址\" 无效!");
		theForm.v_email.focus();
		return (false);
	}

	address=theForm.v_email.value;
    if(address.length>0)
	{
        i=address.indexOf("@");
        if(i==-1)
		{
			window.alert("对不起!您输入的电子邮件地址是错误的!")
			theForm.v_email.focus();
			return false
        }
       ii=address.indexOf(".")
        if(ii==-1)
		{
			window.alert("对不起!您输入的电子邮件地址是错误的!")
			theForm.v_email.focus();
			return false
        }

    }
	if (checktext(theForm.v_email.value))
	{
		alert("请您输入有效的\"email\"!");
		theForm.v_email.select();
		theForm.v_email.focus();
		return (false);
	}
	
}


function checktext(text)
{
			allValid = true;

		for (i = 0;  i < text.length;  i++)
		{
			if (text.charAt(i) != " ")
			{
				allValid = false;
				break;
			}
		}

return allValid;
}

//-->
</script>
        <img src="images/fkly.gif" width="286" height="37"></font></b></font></p>
      <form name="frmAnnounce" method="POST" action="<%=MM_editAction%>" onSubmit="return Juge(this)">
        <table width="58%" border="1" cellspacing="1" cellpadding="0" class="dfont" bordercolor="#FFFFFF" align="center">
          <tr bgcolor="#99CC00"> 
            <td bordercolor="#000000" colspan="2" height="21"> 
              <div align="center"><b>留言内容</b></div>
            </td>
          </tr>
          <tr> 
            <td bordercolor="#000000" width="25%" bgcolor="#EEF5E9">您的姓名:</td>
            <td bordercolor="#000000" width="75%"> <font color="#FFFFFF"> 
              <input type="text" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-COLOR: #ffffff" name="v_name" onFocus="this.select()" onMouseOver="this.focus()" size="20" value="8个字以内" class="anniu" >
              </font></td>
          </tr>
          <tr> 
            <td bordercolor="#000000" width="25%" bgcolor="#EEF5E9">您的邮箱:</td>
            <td bordercolor="#000000" width="75%"> <font color="#FFFFFF"> 
              <input type="text" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-COLOR: #ffffff" name="v_email" onFocus="this.select()" onMouseOver="this.focus()" size="30" value="@" class="anniu" >
              </font></td>
          </tr>
          <tr> 
            <td bordercolor="#000000" width="25%" bgcolor="#EEF5E9">您的QQ:</td>
            <td bordercolor="#000000" width="75%"> <font color="#FFFFFF"> 
              <input type="text" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-COLOR: #ffffff" name="v_qq" onFocus="this.select()" onMouseOver="this.focus()" size="15" class="anniu" >
              </font></td>
          </tr>
          <tr> 
            <td bordercolor="#000000" width="25%" bgcolor="#EEF5E9">主页地址:</td>
            <td bordercolor="#000000" width="75%"> <font color="#FFFFFF"> 
              <input type="text" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-COLOR: #ffffff" name="v_url" onFocus="this.select()" onMouseOver="this.focus()" size="15" value="http://" class="anniu" >
              </font></td>
          </tr>
          <tr> 
            <td bordercolor="#000000" width="25%" bgcolor="#EEF5E9" height="24">选择头像:</td>
            <td bordercolor="#000000" width="75%" height="24"> <img src="images/face/01.gif" width="21" height="18" id=tx> 
              <select name="select" onChange="document.images['tx'].src=options[selectedIndex].value;" size="1" class="anniu">
                <option value="images/face/01.gif">01</option>
                <option value="images/face/02.gif">02</option>
                <option value="images/face/03.gif">03</option>
                <option value="images/face/04.gif">04</option>
                <option value="images/face/05.gif">05</option>
                <option value="images/face/06.gif">06</option>
                <option value="images/face/07.gif">07</option>
                <option value="images/face/08.gif">08</option>
                <option value="images/face/09.gif">09</option>
                <option value="images/face/10.gif">10</option>
                <option value="images/face/11.gif">11</option>
                <option value="images/face/12.gif">12</option>
                <option value="images/face/13.gif">13</option>
                <option value="images/face/14.gif">14</option>
                <option value="images/face/15.gif">15</option>
                <option value="images/face/16.gif">16</option>
                <option value="images/face/17.gif">17</option>
                <option value="images/face/18.gif">18</option>
                <option value="images/face/19.gif">19</option>
                <option value="images/face/20.gif">20</option>
              </select>
              <a href="face.htm"> 头像列表</a></td>
          </tr>
          <!--#include file="ubb/js.asp" -->
          <!--#include file="ubb/ubb.asp" -->
          <tr> 
            <td bordercolor="#000000" colspan="2" bgcolor="#EEF5E9">留言内容:</td>
          </tr>
          <tr> 
            <td height="44" bordercolor="#000000" colspan="2">&nbsp; 
              <div align="center"><img border="0" onClick=showsize() src="ubb/font.gif" alt="改变字体大小" width="23" height="22"> 
                <img border="0" onClick=bold() src="ubb/bold.gif" alt="粗体" width="23" height="22"> 
                <img border="0" onClick=italicize() src="ubb/italicize.gif" alt="斜体" width="23" height="22"> 
                <img border="0" onClick=underline() src="ubb/underline.gif" alt="下划线" width="23" height="22"> 
                <img border="0" onClick=showcode() src="ubb/code.gif" alt="插入代码" width="23" height="22"> 
                <img border="0" onClick=quote() src="ubb/quote1.gif" alt="引用" width="23" height="22"> 
                <img border="0" onClick=setfly() src="ubb/fly.gif" alt="飞行字" width="23" height="22"> 
                <img border="0" onClick=glow() src="ubb/glow.gif" alt="发光字" width="23" height="22"> 
                <img border="0" onClick=move() src="ubb/move.gif" alt="移动字" width="23" height="22"> 
                <img border="0" onClick=shadow() src="ubb/shadow.gif" alt="阴影字" width="23" height="22"><br>
                <img border="0" onClick=list() src="ubb/list.gif" alt="列表" width="23" height="22"> 
                <img border="0" onClick=center() src="ubb/center.gif" alt="居中" width="23" height="22"> 
                <img border="0" onClick=hyperlink() src="ubb/url1.gif" alt="插入连接" width="23" height="22"> 
                <img border="0" onClick=image() src="ubb/image.gif" alt="插入图片" width="23" height="22"> 
                <img border="0" onClick=flash() src="ubb/swf.gif" alt="插入FLASH" width="23" height="22"> 
                <img border="0" onClick=email() src="ubb/email1.gif" alt="插入E-mail" width="23" height="22"> 
                <img border="0" onClick=mp() src="ubb/media.gif" alt="Media Player视频文件" width="23" height="22"> 
                <img border="0" onClick=rm() src="ubb/rm.gif" alt="realplay视频文件" width="23" height="22"> 
                <img border="0" onClick=qt() src="ubb/qt.gif" alt="QuickTime视频文件" width="23" height="22"> 
                <img border="0" onClick=sk() src="ubb/shockwave.gif" alt="Shockwave文件" width="23" height="22"></div>
            </td>
          </tr>
          <tr> 
            <td height="44" bordercolor="#000000" colspan="2"> 
              <div align="center"><font color="#FFFFFF"> 
                <textarea style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-COLOR: #ffffff" name="v_coneint" onFocus="this.select()" onMouseOver="this.focus()" cols="70" rows="7" class="anniu">内容不得超过100字</textarea>
                </font></div>
            </td>
          </tr>
          <tr bgcolor="#99CC00"> 
            <td height="27" bordercolor="#000000" colspan="2"> 
              <div align="center"> 
                <input type="hidden" name="ip" value="<%= request.servervariables("remote_addr") %>">
                <input type="image" border="0" name="imageField" src="images/ly.gif" width="36" height="18">
              </div>
            </td>
          </tr>
        </table>
        <input type="hidden" name="MM_insert" value="true">
      </form>
      <p align="center">&nbsp;</p>
    </td>
  </tr>
</table>
<br>
<!--#include file="bottom.asp" -->
</body>
</html>

⌨️ 快捷键说明

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