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

📄 say.asp

📁 超炫电台程序开发了两个版本了
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/9pt.css" rel="stylesheet" type="text/css">
<title>UP!RADIO全球网络电台-主持人现场互动</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style></head>
<script language="JavaScript">
function FormCheck() 
{ 
if (document.form1.yourname.value=="")
{
alert ("请输入你的名字!")
 
document.form1.yourname.focus()
return false;
}
if (document.form1.yourname.value.length < 2)
{
alert ("名字过短!")
 
document.form1.yourname.focus()
return false;
}
if (document.form1.yourname.value.length > 20)
{
alert ("名字过长!") 
document.form1.yourname.focus()
return false;
}

if (document.form1.hisname.value=="") 
  {
  alert("请输入对方名字!");
  document.form1.hisname.focus();
  return false; 
  }
if (document.form1.hisname.value.length < 2)
{
alert ("名字过短!")
 
document.form1.hisname.focus()
return false;
}
if (document.form1.hisname.value.length > 20)
{
alert ("名字过长!") 
document.form1.hisname.focus()
return false;
}

if(document.form1.getto.value=="")
  {
   alert("你不想说些什么吗?");
   document.form1.getto.focus();
   return false;
   }
 
  return true
}
</script>
<body>
<%if request("action")="submit" then

if trim(request("yourname"))="" then
response.Write("<script language=javascript>alert('请输入你的名字');")
response.write("javascript:history.go(-1)</script>")
end if

if trim(request("hisname"))="" then
response.Write("<script language=javascript>alert('请输入主持人名字,不知道?听听节目^_^');")
response.write("javascript:history.go(-1)</script>")
end if

if trim(request("getto"))="" then
response.Write("<script language=javascript>alert('你不想说些什么吗?');")
response.write("javascript:history.go(-1)</script>")
end if

if len(trim(request("yourname")))<2 or len(trim(request("yourname")))>20 then
response.Write("<script language=javascript>alert('名字长度不能小于2个汉字或大于20汉字');")
response.write("javascript:history.go(-1)</script>")
end if

if len(trim(request("hisname")))<2 or len(trim(request("hisname")))>20 then
response.Write("<script language=javascript>alert('名字长度不能小于2个汉字或大于20汉字');")
response.write("javascript:history.go(-1)</script>")
end if

if len(trim(request("getto")))<2 or len(trim(request("getto")))>50 then
response.Write("<script language=javascript>alert('祝福语不能小于2个汉字或大于50汉字');")
response.write("javascript:history.go(-1)</script>")
end if
  ip=request.ServerVariables("HTTP_X_FORWARDED_FOR")
  if ip="" then
  ip=request.ServerVariables("REMOTE_ADDR")
  end if 
 
 sql="select * from saytoyou where yourname='"&trim(request("yourname"))&"' and hisname='"&trim(request("hisname"))&"' and getto='"&trim(request("getto"))&"'"
  set rs=server.CreateObject("adodb.recordset")
  rs.open sql,conn,1,1
  if not(rs.bof and rs.eof) then
  response.Write("<script language=javascript>alert('不能重复发布了哇,请返回!');")
  response.write("javascript:history.go(-1)</script>")
  response.end
  end if
  rs.close
  set rs=nothing 
  
set rs=server.createobject("adodb.recordset")
sql="select * from saytoyou"
rs.open sql,conn,1,3
rs.addnew
rs("yourname")=trim(request("yourname"))
rs("yourqq")=trim(request("yourqq"))
rs("hisname")=trim(request("hisname"))
rs("hisqq")=trim(request("hisqq"))
rs("getto")=trim(request("getto"))
rs("ip")=ip
rs("time")=date()
rs.update
response.Write("<script language=javascript>alert('UP!RADIO声音工厂提示您:信息已送到主持的播出平台!谢谢您的支持!刷新首页后能看到您的留言');")
response.write("javascript:window.close()</script>")
rs.close
set rs=nothing
else
%>
<table width="420" border="0" cellpadding="2" cellspacing="1" bgcolor="#f6f6f6" class="style2">
  <form name="form1" action="say.asp" method="post" onsubmit="return FormCheck();">
    <tr> 
      <td colspan="4">&nbsp;</td>
    </tr>
    <tr> 
      <td colspan="4"><div align="center"><font color="#333333" size="2"><strong>UP!RADIO全球网络电台-主持人现场互动平台</strong></font></div></td>
    </tr>
    <tr> 
      <td colspan="4"><div align="center"><font color="#333333" size="2"><strong>UP!RADIO</strong></font><font color="#333333">|声音工厂提示您:</font></div></td>
    </tr>
    <tr> 
      <td colspan="4"><div align="center"><font color="#333333">您可以通过此平台,向正在直播的主持人畅所欲言</font></div></td>
    </tr>
    <tr> 
      <td colspan="4"><div align="center"><font color="#333333">我们的主持人将在</font>第一时间看到您的留言</div></td>
    </tr>
    <tr> 
      <td colspan="4"><div align="center"><font color="#990000">带 * 号为必填项,不带 * 
          号可以免填</font></div></td>
    </tr>
    <tr> 
      <td colspan="4" height="10"><font color="#990000">&nbsp;</font></td>
    </tr>
    <tr> 
      <td width="78"><div align="right"><font color="#990000">您的名字:</font></div></td>
      <td width="142"><font color="#990000"> 
        <input name="yourname" type="text" id="yourname" size="20">
        *</font></td>
      <td width="53"><div align="right"><font color="#990000">您的QQ:</font></div></td>
      <td width="126"><font color="#990000"> 
        <input name="yourqq" type="text" id="yourqq" size="16">
        </font></td>
    </tr>
    <tr> 
      <td><div align="right"><font color="#990000">主持人:</font></div></td>
      <td><font color="#990000"> 
        <input name="hisname" type="text" id="hisname" size="20">
        *</font></td>
      <td><div align="right"><font color="#990000">现场QQ:</font></div></td>
      <td><font color="#990000"> 
        <input name="hisqq" type="text" id="hisqq" value="15728539" size="16">
        </font></td>
    </tr>
    <tr> 
      <td><div align="right"><font color="#990000">想说的话:</font></div></td>
      <td colspan="3"><font color="#990000"> 
        <input name="getto" type="text" id="getto" value="" size="52">
        *</font></td>
    </tr>
    <tr> 
      <td colspan="4"><div align="center"><font color="#990000">您的话语限制为 50 个汉字以内</font></div></td>
    </tr>
    <tr> 
      <td colspan="4"><div align="center"><font color="#990000"> 
          <input type="submit" name="Submit" value="发送">
          <input type="reset" name="Submit2" value="重写">
          <input type="hidden" name="action" value="submit">
          </font></div></td>
    </tr>
    <tr> 
      <td colspan="4">&nbsp;</td>
    </tr>
  </form>
</table>
<%end if
call conn.close()%>
</body>
</html>

⌨️ 快捷键说明

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