📄 urlpicmng.asp
字号:
<%@LANGUAGE="VBScript"%>
<!--#include file="../public/wxl_conn.asp"-->
<!--#include file="../public/PublicFunction.asp"-->
<%
response.expires = 0
'/////////////////
Const PageSize=18
Page=request("Page")
if not IsNumeric(Page) then Page=1
Page=CInt(Page)
if Page<=0 then Page=1
'/////////////////
wxl=request("wxl")
PicId=request("PicId")
KindId=request("KindId")
%>
<script language="javascript">
function confirmDel(id){
if ( confirm("你确定要删除吗?")) {
window.location.href = <%response.write("'"&UrlName&"?KindId="&KindId&"&wxl=del&PicId=")%>' + id
}
}
</script>
<body topmargin="0" leftmargin="0" bgcolor="#FFFFFF">
<%
if wxl="" then
ShowLookHtml
elseif wxl="ShowHtml" then
dim sql1(10)
sql1(1)=request("UpFilePath")
ShowAddHtml(sql1)
elseif wxl="Add" then
NUrlName=html(request("NUrlName"))
NUrl=html(request("NUrl"))
NUrlPath=html(request("NUrlPath"))
PicBegin=request("Byy")&"-"&request("Bmm")&"-"&request("Bdd")
PicEnd=request("Eyy")&"-"&request("Emm")&"-"&request("Edd")
set sql=Server.Createobject("ADODB.Recordset")
if PicId<>"" then
sql.open "select * from web_AdPic where PicId="&PicId,conn,3,2
else
PicId=GetID("select max(PicId)+1 from web_AdPic")
sql.open "select * from web_AdPic where PicId="&PicId,conn,3,2
sql.AddNew
sql("PicId")=PicId
sql("PicKind")=KindId
sql("AddTime")=now
sql("PicOper")=UserInfo("int_sOleUserID")
end if
sql("PicPath")=NUrlPath
sql("PicAbout")=NUrlName
sql("PicUrl")=NUrl
sql("PicBegin")=now
sql("PicEnd")=now
sql("PicHeight")=60
sql("PicWidth")=160
sql.update
sql.close
%>
<script language='javascript'>
alert('栏目广告保存成功!');
window.location.href = "<%=UrlFile&"?KindId="&KindId%>";
</script>
<%
'修改组信息
elseif wxl="Modi" then
Query="select * from web_AdPic where PicId="&PicId
set sql=conn.Execute(Query)
ShowAddHtml sql
elseif wxl="roll" then
response.write "<FORM NAME='form' METHOD=POST ACTION='"&FileName&"'>"
GetDrives
elseif wxl="LookDir" then
response.write "<FORM NAME='form' METHOD=POST ACTION='"&FileName&"'>"
GetDrives
GetMng
GetDir(Root)
response.write "</form>"
elseif wxl="IsTop" then
Query="Update web_AdPic set AddTime=#"&Now&"# where PicId="&PicId
conn.Execute(Query)
%>
<script language='javascript'>
alert('指定栏目广告成功发布!');
window.location.href = "<%=UrlFile&"?KindId="&KindId%>";
</script>
<%
elseif wxl="del" then
Query="delete from web_AdPic where PicId="&PicId
conn.Execute(Query)
%>
<script language='javascript'>
alert('指定栏目广告成功删除');
window.location.href = "<%=UrlFile&"?KindId="&KindId%>";
</script>
<%
end if
sub ShowAddHtml(sql)
HtmlHead "新增栏目广告"
%>
<SCRIPT language=JavaScript>
<!--
function checkvalue() {
aa=document.form1
if (aa.NUrlPath.value==0) {
window.alert ("请输入图片地址!若是本机文件,请先上传到服务器上"); aa.NUrlPath.focus();return false}
if (aa.NUrlName.value==0) {
window.alert ("请输入名称!"); aa.NUrlName.focus();return false}
if (aa.NUrl.value=="") {
window.alert ("请输入网址!"); aa.NUrl.focus();return false}
}
//-->
</SCRIPT>
<table border="1" width="650" cellpadding="3" cellspacing="0" bgcolor="#D6D3CE" bordercolordark="#FFFFFF" bordercolorlight="#808080" align="center" >
<form name="formpic" method="post" action="uploadsave.asp" enctype="multipart/form-data">
<tr >
<td class="pt1">文件地址:</td>
<td colspan=3>
<input type="file" name="UpFile" class="text2" size="52" value=''> <input type='submit' name='submit' value='上传文件'>
<input type='hidden' value='<%=UrlFile&"?KindId="&KindId&"&wxl=ShowHtml&PicId="&PicId%>' name='ReUrl'>
</td>
</tr>
<tr><td colspan=4>注意:只能上传gif、jpg图片或FLASH格式的文件</td></tr>
<tr height=1 bgcolor=#000000><td colspan=4></td></tr>
</form>
<form name="form1" method="post" action="<%=UrlFile%>" onSubmit="return checkvalue()">
<tr >
<td class="pt1">图片地址:</td>
<td colspan=3>
<input type="text" name="NUrlPath" class="text2" size="58" value='<%=UnHtml(sql(1))%>'>
</td>
</tr>
<tr >
<td class="pt1">链接名称:</td>
<td colspan=3><input type="text" name="NUrlName" class="text2" size="58" value='<%=UnHtml(sql(2))%>'>
</td>
</tr>
<tr >
<td class="pt1">链接网址:</td>
<td colspan=3>
<input type="text" name="NUrl" class="text2" size="58" value='<%=UnHtml(sql(3))%>'>
</td>
</tr>
<!--
<tr >
<td class="pt1">显示大小:</td>
<td colspan=3 class="pt3"> 高:<input type="text" name='PicHeight' value='<%=UnHtml(sql(7))%>' size=10> 宽:<input type='text' name='PicWidth' value='<%=UnHtml(sql(8))%>' size=10></td>
</tr>
<tr >
<td class="pt1">有效时间:</td>
<td colspan=3 class="pt3">从<%ShowDate "B",5,0,Month(now)%> 至 <%ShowDate "E",5,0,Month(now)+1%></td>
</tr>
-->
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#D6D3CE">
<tr>
<td height="6"></td>
</tr>
<tr>
<td height="2" align="center">
<%if PicId<>"" then
'dim Byy()
'dim Eyy()
Byy=split(sql(5),"-")
Eyy=split(sql(6),"-")
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
// document.form1.Byy.values='<%=Byy(0)%>';
//document.form1.Bmm.values='<%=Byy(1)%>';
// document.form1.Bdd.values='<%=Byy(2)%>';
// document.form1.Eyy.values='<%=Eyy(0)%>';
// document.form1.Emm.values='<%=Eyy(1)%>';
// document.form1.Edd.values='<%=Eyy(2)%>';
//-->
</SCRIPT>
<input type="submit" value=" 修 改" name="B1" class="submit" style="width:60; height:25;">
<%else%>
<input type="submit" value=" 确 认" name="B1" class="submit" style="width:60; height:25;">
<%end if%>
<input type="reset" value=" 返 回" name="B2" class="submit" style="width:60; height:25;" onClick="history.back(-1);"></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -