?? edit.asp
字號(hào):
<!--#include file="../../conn/conn.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>
<%
On Error Resume Next
Dim rs,sql,id
If Request.QueryString("id")<> "" Then
id=Request.QueryString("id")
'打開(kāi)/更新廣告數(shù)據(jù)
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select ADID,ADType,ADSrc,ADHeight,ADWidth,ADLink,ADAlt,ADStopViews,ADStopHits,ADStopDate,ADNote,ADViews,ADHits from [ad] where id=" & id
rs.Open sql,conn,1,3
'是否更新
If Request.Form("ChangeAD") <> "" Then
rs("ADID")=DangerEncode(Request.Form("ADID"))
rs("ADType")=DangerEncode(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")=DangerEncode(Request.Form("ADNote"))
If Request.Form("ADRESET")="YES" Then
rs("ADViews")=0
rs("ADHits")=0
End If
rs.Update
response.write "<script language='javascript'>"
response.write "alert('修改廣告成功!');"
response.write"this.location.href='list.asp';</SCRIPT>"
response.end
End If
If Err <> 0 Then
Response.Write "<font color=red size=2>錯(cuò)誤:"&Err.Description
Response.End
End If
%>
<table width="500" border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
<form name=form action=edit.asp?id=<%=id%> method=post onsubmit="return chkinput()"><tr align="center" bgcolor="c0c0c0">
<th colspan="2" class="tableHeaderText">修 改 廣 告</th>
</tr>
<tr>
<td height="25" align="right" class="forumRow">廣告 ID:</td>
<td width="80%" class="forumRow"><INPUT name=ADID type="text" class="input1" value="<%=rs("ADID")%>" size=20 maxlength=20> 不能重名</td>
</tr>
<tr>
<td height="25" align="right" class="forumRowHighlight">廣告類型:</td>
<td class="forumRowHighlight"><select name="ADType" size="1" class="input1" onChange="ChangeType(this.options[this.selectedIndex].value)">
<option <%If rs("ADType")=1 Then Response.Write"selected"%> value="1">普通顯示</option>
<option <%If rs("ADType")=2 Then Response.Write"selected"%> value="2">滿屏浮動(dòng)顯示</option>
<option <%If rs("ADType")=3 Then Response.Write"selected"%> value="3">上下浮動(dòng)顯示 - 右</option>
<option <%If rs("ADType")=4 Then Response.Write"selected"%> value="4">上下浮動(dòng)顯示 - 左</option>
<option <%If rs("ADType")=5 Then Response.Write"selected"%> value="5">全屏幕漸隱消失</option>
<option <%If rs("ADType")=6 Then Response.Write"selected"%> value="6">普通網(wǎng)頁(yè)對(duì)話框 </option>
<option <%If rs("ADType")=7 Then Response.Write"selected"%> value="7">可移動(dòng)透明對(duì)話框 </option>
<option <%If rs("ADType")=8 Then Response.Write"selected"%> value="8">打開(kāi)新窗口</option>
<option <%If rs("ADType")=9 Then Response.Write"selected"%> value="9">彈出新窗口</option>
<option <%If rs("ADType")=10 Then Response.Write"selected"%> value="10">對(duì)聯(lián)式廣告</option>
</select></td>
</tr>
<tr>
<td height="25" align="right" class="forumRow" id="adsrc_text">廣告地址:</td>
<td class="forumRow">
<%If rs("ADType")= 6 Then
Response.Write ("<textarea rows=3 name=ADSrc cols=27 class=input2>"&server.HTMLencode(rs("ADSrc"))&"</textarea>")
else%>
<INPUT name="ADSrc" type="text" class="input1" value="<%=rs("ADSrc")%>" size=50>
<%end if%> <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") title="點(diǎn)擊查看幫助">圖片或FLASH地址?</a></td>
</tr>
<tr>
<td height="25" align="right" class="forumRowHighlight">廣告規(guī)格:</td>
<td class="forumRowHighlight"><INPUT name=ADWidth type="text" class="input1" onkeypress="return Num();" value="<%=rs("ADWidth")%>" size=15 maxlength=4>
× <INPUT name=ADHeight type="text" class="input1" onkeypress="return Num();" value="<%=rs("ADHeight")%>" size=15 maxlength=4></td>
</tr>
<tr style="visibility:hide;">
<td height="25" align="right" class="forumRow">鏈接地址:</td>
<td class="forumRow"><INPUT name=ADLink type="text" class="input1" value="<%=rs("ADLink")%>" size=50 maxlength=150></td>
</tr>
<tr>
<td height="25" align="right" class="forumRowHighlight">提示文字:</td>
<td class="forumRowHighlight"><INPUT name=ADAlt type="text" class="input1" value="<%=rs("ADAlt")%>" size=50 maxlength=50></td>
</tr>
<tr>
<td height="25" align="right" class="forumRow">投放限制:</td>
<td class="forumRow"><INPUT name=ADStopViews type="text" class="input1" onkeypress="return Num();" value="<%=rs("ADStopViews")%>" size=10 maxlength=10>
·<INPUT name=ADStopHits type="text" class="input1" onkeypress="return Num();" value="<%=rs("ADStopHits")%>" size=10 maxlength=10>
·<INPUT name=ADStopDate type="text" class="input1" value="<%=rs("ADStopDate")%>" size=18 maxlength=19 onfocus="calendar()">
<a href="#" onclick=openhelp("stop") title="點(diǎn)擊查看幫助">顯示·點(diǎn)擊·日期?</a></td>
</tr>
<tr>
<td height="25" align="right" class="forumRowHighlight">重新統(tǒng)計(jì):</td>
<td class="forumRowHighlight"><input type="checkbox" name="ADRESET" value="YES"> 重置顯示和點(diǎn)擊次數(shù)</td>
</tr>
<tr>
<td height="25" align="right" class="forumRow">簡(jiǎn)單注釋:</td>
<td class="forumRow"><INPUT name=ADNote type="text" class="input1" value="<%=rs("ADNote")%>" size=50 maxlength=100>
備注不顯示在廣告中</td>
</tr>
<tr bgcolor="c0c0c0">
<td height="25" colspan="2" align="center" class="forumRow">
<INPUT name="ChangeAD" type="submit" class="input1" value="確 定"> </td>
</tr></form>
</table>
<%
Response.Write "<Script language=javascript>ChangeType('"&rs("ADType")&"')</Script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
Else
Response.Write "沒(méi)有指明要編輯的ID。"
End If
Rem 過(guò)濾可能出錯(cuò)誤的符號(hào)
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>
<!--#include file="../copy.asp" -->
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -