📄 add.asp
字号:
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
<%
if Request.Cookies("globalec")("globalecmaster")="" or Request.Cookies("globalec")("masterflag")="" then
response.write "<script language='javascript'>"
response.write"this.location.href='../login.asp';</SCRIPT>"
response.end
end if
if instr(Request.Cookies("globalec")("masterflag"),"113")=0 then
response.redirect "../err.asp"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>GlobalEC 广告管理</title>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../../js/calendar.js"> </script>
<SCRIPT LANGUAGE="JavaScript" src="../../ad/images/js.js"></SCRIPT>
</head>
<body>
<%
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")=Request.Form("ADStopDate")
rs("ADNote")=TRIM(Request.Form("ADNote"))
rs.Update
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.write "<script language='javascript'>"
response.write "alert('添加广告成功!');"
response.write"this.location.href='list.asp';</SCRIPT>"
response.end
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
%>
<table border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
<form name=form action=add.asp method=post onsubmit="return chkinput()">
<tr>
<th height="22" colspan="2" class="tableHeaderText" align="center">添 加 新 广 告</th>
</tr>
<tr>
<td class="forumRow" align="right">广告 ID:</td>
<td width="80%" class="forumRow">
<INPUT name=ADID type="text" class="input1" size="20" maxlength="20"> 不能重名</td>
</tr>
<tr>
<td align="right" class="forumRowHighlight">广告类型:</td>
<td class="forumRowHighlight"">
<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="forumRow" id="adsrc_text">广告地址:</td>
<td height="17" class="forumRow">
<INPUT name=ADSrc type="text" class="input1" value="http://" size=50>
<input name="pic_on" type="button" id="pic_on" onClick=window.open("AdvUploadPicture.asp?type="+value,"",'toolbar=no,directories=no,scrollbars=0,resizable=1,status=no,menubar=0,width=400,height=50'); value="上传"> <a href="#" onclick=openhelp("ext")>图片或FLASH地址?</a></td>
</tr>
<tr>
<td align="right" class="forumRowHighlight">广告规格:</td>
<td height="17" class="forumRowHighlight">
<INPUT name=ADWidth type="text" class="input1" onkeypress="return Num();" value="468" size=15 maxlength=4>
×
<INPUT name=ADHeight type="text" class="input1" onkeypress="return Num();" value="60" size=15 maxlength=4></td>
</tr>
<tr>
<td align="right" class="forumRow">链接地址:</td>
<td height="17" class="forumRow">
<INPUT name=ADLink type="text" class="input1" size=50 maxlength=100></td>
</tr>
<tr>
<td align="right" class="forumRowHighlight">提示文字:</td>
<td height="17" class="forumRowHighlight">
<INPUT name=ADAlt type="text" class="input1" size=50 maxlength=50></td>
</tr>
<tr>
<td align="right" class="forumRow">投放限制:</td>
<td height="18" class="forumRow">
<INPUT name=ADStopViews type="text" class="input1" onkeypress="return Num();" value="0" size=10 maxlength=10>
·
<INPUT name=ADStopHits type="text" class="input1" onkeypress="return Num();" value="0" size=10 maxlength=10>
·
<INPUT name=ADStopDate type="text" class="input1" value="<%=year(date())%>-<%=month(date())+1%>-<%=day(date())%>" size=18 maxlength=19 onfocus="calendar()">
<a href="#" onclick=openhelp("stop")>显示·点击·日期?</a></td>
</tr>
<tr>
<td align="right" class="forumRowHighlight">简单注释:</td>
<td height="17" class="forumRowHighlight">
<INPUT name=ADNote type="text" class="input1" size=50 maxlength=100>
备注不显示在广告中</td>
</tr>
<tr>
<td height="25" colspan="2" align="center" class="forumRow">
<INPUT name="AddAD" type="submit" class="input1" value="确 定"> </td>
</tr>
</form>
</table>
<br>
<!--#include file="../copy.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -