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

📄 edit.asp

📁 XXX档案美女图片站适合给图片广告的站长下载使用
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#Include File="session.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Manage System V3.0</title>
<link href="COAD.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript" src="images/js.js"></SCRIPT>
</head>
<%if session("userkey")<>4 then%>
<script language=javascript>  
alert( "错误:您无权进行版面管理!"  );
location.href = "javascript:history.back()"  
</script>
<%end if%>
<body>
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#999999">
  <tr> 
    <td height="20" bgcolor="#eeeeee">当前位置:<a href=main.asp>管理首页</a> >> <a href=list.asp>插件管理</a> 
                           =-<a href="config.asp">修改插件登陆密码</a>=-</td>
  </tr>
</table>
<table width="95%" bgcolor=#999999 cellspacing="1"  cellpadding="5" align=center>
  <tr bgcolor=#eeeeee> 
    <td colspan=2 align=right bgcolor="#eeeeee"> { <a href="../Manage/Admin_FriendSite.asp?Action=Add">增加友情连接</a> 
      | <a href="../Manage/Admin_FriendSite.asp">管理友情连接</a><a href="vote/votecode.asp"></a> 
      }&nbsp;*&nbsp; { <a href="../Vote/votestep1.asp">增加投票</a> | <a href="../Vote/votelist.asp">管理投票</a> 
      | <a href="../Vote/votecode.asp">调用代码</a> }&nbsp;*&nbsp; { <a href="add.asp">添加广告</a> 
      | <a href="list.asp">广告列表</a> | <a href="list.asp?action=stop">过期广告</a> 
      | <a href="code.asp">广告代码</a> }</td>
  </tr>
</table>
<br>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="f1f1f1">
  <tr>
    <td>
	<br>
	<%
On Error Resume Next
Dim rs,sql,id
If Request.QueryString("id")<> "" Then

id=Request.QueryString("id")

'打开/更新广告数据
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")=TRIM(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 "<font color=red>更改成功!"
End If
If Err <> 0 Then
			Response.Write "<font color=red size=2>错误:"&Err.Description
			Response.End
End If
%>
<br>
<table width="500" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#999999">
  <form name=form action=edit.asp?id=<%=id%>  method=post onsubmit="return chkinput()"><tr align="center" bgcolor="c0c0c0">
    <td colspan="2">修 改 广 告</td>  
  </tr>
  <tr>
    <td width="100" height="25" align="right" bgcolor="e1e1e1">广告 &nbsp;ID:</td>                                                          
    <td width="400" bgcolor="e6e6e6"><INPUT name=ADID type="text" class="input1" value="<%=rs("ADID")%>" size=10 maxlength=20> 不能重名</td>                                                         
  </tr>
  <tr>
    <td height="25" align="right" bgcolor="e1e1e1">广告类型:</td>
    <td bgcolor="e6e6e6"><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">满屏浮动显示</option>
  <option <%If rs("ADType")=3 Then Response.Write"selected"%> value="3">上下浮动显示 - 右</option>
  <option <%If rs("ADType")=4 Then Response.Write"selected"%> value="4">上下浮动显示 - 左</option>
  <option <%If rs("ADType")=5 Then Response.Write"selected"%> value="5">全屏幕渐隐消失</option>
  <option <%If rs("ADType")=6 Then Response.Write"selected"%> value="6">普通网页对话框 </option>
  <option <%If rs("ADType")=7 Then Response.Write"selected"%> value="7">可移动透明对话框 </option>
  <option <%If rs("ADType")=8 Then Response.Write"selected"%> value="8">打开新窗口</option>
  <option <%If rs("ADType")=9 Then Response.Write"selected"%> value="9">弹出新窗口</option>
  <option <%If rs("ADType")=10 Then Response.Write"selected"%> value="10">对联式广告</option>
</select></td>                                                         
  </tr>
  <tr>
    <td height="25" align="right" bgcolor="e1e1e1" id="adsrc_text">广告地址:</td>
	<td bgcolor="e6e6e6">
	<%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=30>                                                      
	<%end if%>   
    *<a href="#" onclick=openhelp("ext") title="点击查看帮助">图片或FLASH地址?</a></td>   
  </tr>
  <tr>
    <td height="25" align="right" bgcolor="e1e1e1">广告规格:</td>
    <td bgcolor="e6e6e6"><INPUT name=ADWidth type="text" class="input1" onkeypress="return Num();" value="<%=rs("ADWidth")%>" size=8 maxlength=4>  
      × <INPUT name=ADHeight type="text" class="input1" onkeypress="return Num();" value="<%=rs("ADHeight")%>" size=8 maxlength=4></td>                     
  </tr>
  <tr style="visibility:hide;">
    <td height="25" align="right" bgcolor="e1e1e1">链接地址:</td>
    <td bgcolor="e6e6e6"><INPUT name=ADLink type="text" class="input1" value="<%=rs("ADLink")%>" size=30 maxlength=150></td>                      
  </tr>
  <tr>
    <td height="25" align="right" bgcolor="e1e1e1">提示文字:</td>
    <td bgcolor="e6e6e6"><INPUT name=ADAlt type="text" class="input1" value="<%=rs("ADAlt")%>" size=30 maxlength=50></td>                      
  </tr>
  <tr>
    <td height="25" align="right" bgcolor="e1e1e1">投放限制:</td>
    <td bgcolor="e6e6e6"><INPUT name=ADStopViews type="text" class="input1" onkeypress="return Num();" value="<%=rs("ADStopViews")%>" size=8 maxlength=10>
      ·<INPUT name=ADStopHits type="text" class="input1" onkeypress="return Num();" value="<%=rs("ADStopHits")%>" size=8 maxlength=10>
      ·<INPUT name=ADStopDate type="text" class="input1" value="<%=rs("ADStopDate")%>" size=8 maxlength=19> <a href="#" onclick=openhelp("stop") title="点击查看帮助">显示·点击·日期?</a></td>      
  </tr>
  <tr>
    <td height="25" align="right" bgcolor="e1e1e1">重新统计:</td>
    <td bgcolor="e6e6e6"><input type="checkbox" name="ADRESET" value="YES"> 重置显示和点击次数</td>                     
  </tr>
  <tr>
    <td height="25" align="right" bgcolor="e1e1e1">简单注释:</td>
    <td bgcolor="e6e6e6"><INPUT name=ADNote type="text" class="input1" value="<%=rs("ADNote")%>" size=30 maxlength=100> 备注不显示在广告中</td>                     
  </tr>
  <tr bgcolor="c0c0c0">
    <td height="25" colspan="2" align="center">
      <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 "没有指明要编辑的ID。"
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>	</td>
  </tr>
</table>
<br>
<table width="95%" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" bgcolor="f1f1f1"><div align="center"><!--#Include file="end.asp" -->
</div> </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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