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

📄 add.asp

📁 夏茂政府网站
💻 ASP
字号:
<!--#include file="setting.asp"-->
<!--#include file="../include/Conn.asp"-->
<!--#include file="../include/char.asp" -->
<!--#include file="../Include/check.asp"-->
<!--#include FILE="../Include/Admin_Function.asp"-->
<%CheckAdmin3%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>广告发布_中国站长俱乐部Club.Cn0797.Cn</title>
<link href="COAD.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript" src="images/js.js"></SCRIPT>
<style type="text/css">
<!--
.STYLE1 {color: #FFFFFF}
-->
</style>
</head>

<body>

<map name="Map">
  <area shape="rect" coords="10,4,62,19" href="add.asp" onFocus="if(this.blur)this.blur()">
  <area shape="rect" coords="83,4,135,19" href="list.asp" onFocus="if(this.blur)this.blur()">
  <area shape="rect" coords="155,3,206,20" href="list.asp?action=stop" onFocus="if(this.blur)this.blur()">
  <area shape="rect" coords="227,3,279,19" href="code.asp" onFocus="if(this.blur)this.blur()">
  <area shape="rect" coords="300,3,349,19" href="config.asp" onFocus="if(this.blur)this.blur()">
  <area shape="rect" coords="371,3,398,19" href="index.asp" onFocus="if(this.blur)this.blur()">
</map>
<br>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr>
    <td ><%
Dim rs,sql
if Request.Form("AddAD")<> "" then

'加入数据
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from [ad] where ADID='"&DangerEncode(Request.Form("ADID"))&"'"
rs.Open sql,conn,1,3
If not rs.eof Then
	Response.Write ("<script>alert(' 操作错误! \n\n 广告ID重复,请使用其他ID !');history.back();</script>")
	Response.end
End iF
rs.AddNew 
rs("ADID")=DangerEncode(Request.Form("ADID"))
rs("ADType")=TRIM(Request.Form("ADType"))
rs("ADSrc")=DangerEncode(Request.Form("ADSrc"))
rs("ADHeight")=TRIM(Request.Form("ADHeight"))
rs("ADWidth")=TRIM(Request.Form("ADWidth"))
rs("ADLink")=DangerEncode(Request.Form("ADLink"))
rs("ADAlt")=DangerEncode(Request.Form("ADAlt"))
rs("ADStopViews")=TRIM(Request.Form("ADStopViews"))
rs("ADStopHits")=TRIM(Request.Form("ADStopHits"))
rs("ADStopDate")=TRIM(Request.Form("ADStopDate"))
rs("ADNote")=TRIM(Request.Form("ADNote"))
rs.Update
rs.Close

set rs=nothing
conn.Close
set conn=nothing
Response.Write "<font color=red>加入成功!"
end if

Rem 过滤可能出错误的符号
Function DangerEncode(fString)
If not isnull(fString) Then
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10), "")
	fString = replace(fString, "'", """")
    fString = Trim(fString)
    DangerEncode = fString
End If
End Function
%>      <br>
	<table width="500" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#e3e3e3">
      <form name=form action=add.asp  method=post onSubmit="return chkinput()">
        <tr align="center" bgcolor="#ff9900">
          <td height="22" colspan="2"><span class="STYLE1">添 加 新 广 告</span></td>
        </tr>
        <tr>
          <td width="100" align="right" bgcolor="#ffffff">广告&nbsp; ID:</td>
          <td width="400" bgcolor="#ffffff">
              <INPUT name=ADID type="text" class="input1" size="10" maxlength="20"> 不能重名</td>
        </tr>
        <tr>
          <td align="right" bgcolor="#ffffff">广告类型:</td>
          <td bgcolor="#ffffff">
              <select size="1" name="ADType" class="input1" onChange="ChangeType(this.options[this.selectedIndex].value)">
                <option selected value="1">普通显示</option>
                <option value="2">满屏浮动显示</option>
                <option value="3">上下浮动显示-右</option>
                <option value="4">上下浮动显示-左</option>
                <option value="5">全屏幕渐隐消失</option>
                <option value="6">普通网页对话框 </option>
                <option value="7">可移动透明对话框 </option>
                <option value="8">打开新窗口</option>
                <option value="9">弹出新窗口</option>
				<option value="10">对联式广告</option>
              </select></td>
        </tr>
        <tr>
          <td align="right" bgcolor="#ffffff" id="adsrc_text">广告地址:</td>
          <td height="17" bgcolor="#ffffff">
              <INPUT name=ADSrc type="text" class="input1" value="http://" size=30> <a href="#" onclick=openhelp("ext")>图片或FLASH地址?</a></td>
        </tr>
        <tr>
          <td align="right" bgcolor="#ffffff">广告规格:</td>
          <td height="17" bgcolor="#ffffff">
              <INPUT name=ADWidth type="text" class="input1" onKeyPress="return Num();" value="468" size=8 maxlength=4>
              ×
              <INPUT name=ADHeight type="text" class="input1" onKeyPress="return Num();" value="60" size=8 maxlength=4></td>
        </tr>
        <tr>
          <td align="right" bgcolor="#ffffff">链接地址:</td>
          <td height="17" bgcolor="#ffffff">
              <INPUT name=ADLink type="text" class="input1" size=30 maxlength=100></td>
        </tr>
        <tr>
          <td align="right" bgcolor="#ffffff">提示文字:</td>
          <td height="17"bgcolor="#ffffff">
              <INPUT name=ADAlt type="text" class="input1" size=30 maxlength=50></td>
        </tr>
        <tr>
          <td align="right" bgcolor="#ffffff">投放限制:</td>
          <td height="18" bgcolor="#ffffff">
            <INPUT name=ADStopViews type="text" class="input1" onKeyPress="return Num();" value="0" size=8 maxlength=10>
            ·
            <INPUT name=ADStopHits type="text" class="input1" onKeyPress="return Num();" value="0" size=8 maxlength=10>
            ·
            <INPUT name=ADStopDate type="text" class="input1" value="<%=year(date())%>-<%=month(date())+1%>-<%=day(date())%>" size=8 maxlength=19> <a href="#" onclick=openhelp("stop")>显示·点击·日期?</a></td>
        </tr>
        <tr>
          <td align="right" bgcolor="#ffffff">简单注释:</td>
          <td height="17" bgcolor="#ffffff">
              <INPUT name=ADNote type="text" class="input1" size=30 maxlength=100> 备注不显示在广告中</td>
        </tr>
        <tr bgcolor="ff9900">
          <td height="25" colspan="2" align="center">
            <INPUT name="AddAD" type="submit" class="input1" value="确 定">          </td>
        </tr>
      </form>
    </table>
    <br></td>
  </tr>
</table>
<br>

</body>
</html>

⌨️ 快捷键说明

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