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

📄 add.asp

📁 讲的是网络编程
💻 ASP
字号:
<!--#Include file="../../Common/Inc_DatConn.asp"-->
<!--#Include file="../Common/Inc_Config.asp"-->
<!--#Include file="../../Common/Inc_Function.asp"-->
<!--#Include file="../Common/Inc_Function.asp"-->
<%
'┌─  风云ASP在线  ────────────────────────┐
'│                                                                 │
'│  作者:赵振波.	http://www.fyasp.com	    				    │
'│                                                                 │
'│   Q Q:185623333  										   	    │
'│                                                                 │
'│ Email:fy96@163.com                                             │
'│                                                                 │
'│ 程序定做,系统开发,网站制作,提供高质量的网络产品、技术和服务!│
'│                                                                 │
'│【版权声明】                                                     │
'│                                                                 │
'│     本程序版权归坐看风云所有,未经授权擅自修改、复制或散布本程序│
'│                                                                 │
'│的部分或全部,将承受严厉的民事和刑事处罚,对已知的违反者将给予法 │
'│                                                                 │
'│律范围内的全面制裁。对非法使用此程序所造成的一切后果本人概不负责!│
'│                                                                 │
'└───────────────────  http://www.fyasp.com ──┘
strml="../"
%>
<%if IsTimeOut(Session("strAccount"),Session("strPassWord")) then Response.Redirect "index.asp"%>
<html>
<head>
<title><% = strSiteName%> - 网站后台管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../Common/Site.css" type="text/css">
<SCRIPT LANGUAGE="JavaScript" src="images/js.js"></SCRIPT>
</head>
<body leftMargin="0" topMargin="2">
<!--#Include file="../Common/inc_Top.asp"-->
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td width="105" valign="top" style="border-left: 1px solid rgb(0,0,0); border-right: 1px solid rgb(0,0,0)" class="bottom"><br>
	<!--#Include file="../Common/Inc_Button.asp"-->
    </td>
    <td valign="top" style="border-right: 1px solid rgb(0,0,0)" align="center"><br>
<%
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>
	<div align="center">
	<table width="500" border="0" cellpadding="3" cellspacing="1" bgcolor="#9BB375">
      <form name=form action=add.asp  method=post onsubmit="return chkinput()">
        <tr align="center" bgcolor="c0c0c0">
          <td height="22" colspan="2"  class="bottom">添 加 新 广 告</td>
        </tr>
        <tr>
          <td  class="banma1" width="100" align="right" class="banma1">广告&nbsp; ID:</td>
          <td width="400" bgcolor="#E6F8C9">
              <INPUT name=ADID type="text" class="input1" size="10" maxlength="20"> 不能重名</td>
        </tr>
        <tr>
          <td align="right" class="banma1">广告类型:</td>
          <td bgcolor="#E6F8C9">
              <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" class="banma1" id="adsrc_text">广告地址:</td>
          <td height="17" bgcolor="#E6F8C9">
              <INPUT name=ADSrc type="text" class="input1" value="http://" size=30> <a href="#" onclick=openhelp("ext")>图片或FLASH地址?</a></td>
        </tr>
        <tr>
          <td align="right" class="banma1">广告规格:</td>
          <td height="17" bgcolor="#E6F8C9">
              <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" class="banma1">链接地址:</td>
          <td height="17" bgcolor="#E6F8C9">
              <INPUT name=ADLink type="text" class="input1" size=30 maxlength=100></td>
        </tr>
        <tr>
          <td align="right" class="banma1">提示文字:</td>
          <td height="17" bgcolor="#E6F8C9">
              <INPUT name=ADAlt type="text" class="input1" size=30 maxlength=50></td>
        </tr>
        <tr>
          <td align="right" class="banma1">投放限制:</td>
          <td height="18" bgcolor="#E6F8C9">
            <INPUT name=ADStopViews type="text" class="input1" onkeypress="return Num();" value="0" size=7 maxlength=10>
            ·
            <INPUT name=ADStopHits type="text" class="input1" onkeypress="return Num();" value="0" size=7 maxlength=10>
            ·
            <INPUT name=ADStopDate type="text" class="input1" value="<%=date()%>" size=13 maxlength=19> <a href="#" onclick=openhelp("stop")>显示·点击·日期?</a></td>
        </tr>
        <tr>
          <td align="right" class="banma1">简单注释:</td>
          <td height="17" bgcolor="#E6F8C9">
              <INPUT name=ADNote type="text" class="input1" size=30 maxlength=100> 备注不显示在广告中</td>
        </tr>
        <tr>
          <td height="25" colspan="2" align="center"  class="bottom">
            <INPUT name="AddAD" type="submit" class="button" value="确 定">          </td>
        </tr>
      </form>
    </table>
    </div>
    </td>
  </tr>
<!--#Include file="../Common/Inc_Bottom.asp"-->
</body>
</html>

⌨️ 快捷键说明

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