?? adsedit.asp
字號:
?<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
'┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
'┊ ┊
'┊ 互連在線企業網站管理系統(NWEB) ┊
'┊ ┊
' 版權所有 csys.com.cn
'
' 程序制作 互連在線工作室
' Q Q:61128110
'
' 相關網址 [產品介紹]http://www.csys.com.cn
' [支持論壇]http://www.csys.com.cn/bbs
'
' 演示網址 http://www.csys.com.cn
'┊ ┊
'└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
%>
<% Option Explicit %>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<META NAME="copyright" CONTENT="Copyright 2004-2008 - csys.com.cn-STUDIO" />
<META NAME="Author" CONTENT="互連在線網絡技術工作室,www.csys.com.cn" />
<META NAME="Keywords" CONTENT="" />
<META NAME="Description" CONTENT="" />
<TITLE>編輯廣告</TITLE>
<link rel="stylesheet" href="Images/CssAdmin.css">
<script language="javascript" src="../Script/Admin.js"></script>
</HEAD>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<!--#include file="CheckAdmin.asp"-->
<%
if Instr(session("AdminPurview"),"|82,")=0 then
response.write ("<font color='red')>你不具有該管理模塊的操作權限,請返回!</font>")
response.end
end if
'========判斷是否具有管理權限
%>
<BODY>
<%
dim Result
Result=request.QueryString("Result")
dim ID,ADsName,ViewFlag,Content
dim ADsWidth,ADsHeight
ID=request.QueryString("ID")
call ADsEdit()
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
<tr>
<td height="24" nowrap><font color="#FFFFFF"><img src="Images/Explain.gif" width="18" height="18" border="0" align="absmiddle"> <strong>彈窗廣告:添加,修改彈窗廣告相關的內容</strong></font></td>
</tr>
<tr>
<td height="24" align="center" nowrap bgcolor="#EBF2F9"><a href="ADsEdit.asp?Result=Add" onClick='changeAdminFlag("添加彈窗廣告")'>添加彈窗廣告</a><font color="#0000FF"> | </font><a href="ADsList.asp" onClick='changeAdminFlag("彈窗廣告列表")'>查看彈窗廣告</a></td>
</tr>
</table>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
<form name="editForm" method="post" action="ADsEdit.asp?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
<tr>
<td height="24" nowrap bgcolor="#EBF2F9"><table width="100%" border="0" cellpadding="0" cellspacing="0" id=editProduct idth="100%">
<tr>
<td width="120" height="20" align="right"> </td>
<td> </td>
</tr>
<tr>
<td height="20" align="right">廣告標題:</td>
<td><input name="ADsName" type="text" class="textfield" id="ADsName" style="WIDTH: 240;" value="<%=ADsName%>" maxlength="100"> 發布:<input name="ViewFlag" type="checkbox" style='HEIGHT: 13px;WIDTH: 13px;' value="1" <%if ViewFlag then response.write ("checked")%>>
* 不少于3個字符</td>
</tr>
<tr>
<td height="20" align="right">彈窗尺寸:</td>
<td><input name="ADsWidth" type="text" class="textfield" id="ADsWidth" style="WIDTH: 60;" value="<%=ADsWidth%>" maxlength="4" onKeyDown="if(event.keyCode==13)event.returnValue=false" onChange="if(/\D/.test(this.value)){alert('寬度和高度只能輸入整數!');this.value='150';}"> 寬×高 <input name="ADsHeight" type="text" class="textfield" id="ADsHeight" style="WIDTH: 60;" value="<%=ADsHeight%>" maxlength="4" onKeyDown="if(event.keyCode==13)event.returnValue=false" onChange="if(/\D/.test(this.value)){alert('寬度和高度只能輸入整數!');this.value='100';}"> * 至少150×100像素</td>
</tr>
<tr>
<td height="20" align="right" valign="top">簡體內容:<br>
<img title="點擊進入可視化查看、編輯環境..." src="Images/Edit.gif" width="51" height="20" style="cursor:hand" onClick="OpenDialog('../Editor/EditorDialog.html?lnk=Content&file=Editor_1.html',800,520);">
<td><textarea name="Content" rows="12" class="textfield" id="Content" style="WIDTH: 86%;" readonly><%=Content%></textarea></td>
</tr>
<tr>
<td height="30" align="right"> </td>
<td valign="bottom"><input name="submitSaveEdit" type="submit" class="button" id="submitSaveEdit" value="保存" style="WIDTH: 80;" ></td>
</tr>
<tr>
<td height="20" align="right"> </td>
<td valign="bottom"> </td>
</tr>
</table></td>
</tr>
</form>
</table>
</BODY>
</HTML>
<%
sub ADsEdit()
dim Action,rsCheckAdd,rs,sql
Action=request.QueryString("Action")
if Action="SaveEdit" then '保存編輯管理員信息
set rs = server.createobject("adodb.recordset")
if len(trim(request.Form("ADsName")))<3 then
response.write ("<script language=javascript> alert('廣告標題為必填項目!');history.back(-1);</script>")
response.end
end if
if trim(request.Form("ADsWidth"))="" or trim(request.Form("ADsHeight"))="" then
response.write ("<script language=javascript> alert('彈窗廣告規格必須為150×100像素以上!');history.back(-1);</script>")
response.end
end if
if trim(request.Form("ADsWidth"))<150 or trim(request.Form("ADsHeight"))<100 then
response.write ("<script language=javascript> alert('彈窗廣告規格必須為150×100像素以上!');history.back(-1);</script>")
response.end
end if
if Result="Add" then '創建網站管理員
sql="select * from Csys_ADs"
rs.open sql,conn,1,3
rs.addnew
rs("ADsName")=trim(Request.Form("ADsName"))
if Request.Form("ViewFlag")=1 then
rs("ViewFlag")=Request.Form("ViewFlag")
else
rs("ViewFlag")=0
end if
rs("Content")=Request.Form("Content")
rs("ADsWidth")=trim(Request.Form("ADsWidth"))
rs("ADsHeight")=trim(Request.Form("ADsHeight"))
rs("AddTime")=now()
end if
if Result="Modify" then '修改網站管理員
sql="select * from Csys_ADs where ID="&ID
rs.open sql,conn,1,3
rs("ADsName")=trim(Request.Form("ADsName"))
if Request.Form("ViewFlag")=1 then
rs("ViewFlag")=Request.Form("ViewFlag")
else
rs("ViewFlag")=0
end if
rs("Content")=Request.Form("Content")
rs("ADsWidth")=trim(Request.Form("ADsWidth"))
rs("ADsHeight")=trim(Request.Form("ADsHeight"))
end if
rs.update
rs.close
set rs=nothing
response.write "<script language=javascript> alert('成功編輯彈窗廣告!');changeAdminFlag('彈窗廣告列表');location.replace('ADsList.asp');</script>"
else '提取管理員信息
if Result="Modify" then
set rs = server.createobject("adodb.recordset")
sql="select * from Csys_ADs where ID="& ID
rs.open sql,conn,1,1
ADsName=rs("ADsName")
ViewFlag=rs("ViewFlag")
ADsWidth=rs("ADsWidth")
ADsHeight=rs("ADsHeight")
Content=rs("Content")
rs.close
set rs=nothing
end if
end if
end sub
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -