?? downloadmanageedit.asp
字號:
<!--#include file="CheckAdminLogined.asp"-->
<!--#include file="../include/connstr.asp"-->
<% set rs=conn.execute("select * from tDownload where ID="&request("EditID"))
if rs.eof and rs.bof then
response.write "<script>alert('讀取數據時出錯,請與管理員聯系!');history.back();</script>"
response.end
end if
'--------------------------------
if request("cur_action")="DelDownFile" then
set rs_oldpic=conn.execute("select * from tDownload where ID="&request("EditID"))
OldFileTemp=rs_oldpic("DownFile")
sql_delete="update tDownload set DownFile='' where ID="&request("EditID")
conn.execute sql_delete
delfname=server.mappath("/UploadFile/Download") & "/" &OldFileTemp
set TestFileObject=Server.Createobject("Scripting.FileSystemObject")
if TestFileObject.FileExists(delfname) then
set NewFile=TestFileObject.getfile(delfname)
Newfile.delete
end if
response.write "<script>location.replace('?Editid="&request("EditID")&"&PageNo="&request("PageNo")&"&ClassID="&request("ClassID")&"&ClassName="&request("ClassName")&"')</script>"
response.end
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Images/AdminCss.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function check_data(){
document.form1.Content.value = frames.message.document.body.innerHTML;
if(document.form1.viewhtml.checked == true){
alert("對不起,請取消“查看HTML源代碼”后再添加!")
document.form1.viewhtml.focus()
return false
}
if(document.form1.T_Title.value==""){
alert("產品內容為必填項,請填寫!")
document.form1.T_Title.focus();
return(false)
}
if(document.form1.Content.value==""){
alert("產品介紹為必填項,請填寫")
document.form1.viewhtml.focus()
return(false)
}
if(document.form1.T_AddTime.value==""){
alert("添加時間為必填項,請填寫")
document.form1.T_AddTime.focus()
return(false)
}
}
</script>
</head>
<body leftmargin="0" topmargin="0">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="8" colspan="2"></td>
</tr>
<tr>
<td width="76" height="20" rowspan="2"><img src="Images/TopBt.gif" width="67" height="36"></td>
<td width="897" height="10"></td>
</tr>
<tr>
<td>我的位置:后臺管理系統._下載資料管理._修改下載資料</td>
</tr>
<tr>
<td height="4" colspan="2"></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="E7E7E7">
<tr>
<td height="20"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="159" height="20" align="center" background="images/title1.gif" class="fontwintitle"><strong>下載資料新聞</strong>
</td>
<td align="right" background="images/title2.gif"> </td>
<td width="10"><img src="images/title3.gif" width="10" height="20"></td>
</tr>
</table></td>
</tr>
<tr valign="top">
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="6" background="images/midder1.gif"><img src="images/midder1.gif" width="6" height="3"></td>
<td height="100%" align="center" valign="top"><br>
<table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<form action="DownLoadManageEditSave.asp" method="post" enctype="multipart/form-data" name="form1" onsubmit="return check_data()">
<tr bgcolor="#FFFFFF">
<td width="20%" height="22" align="right" bgcolor="ECF2D6">*
下載資料標題:</td>
<td width="80%"> <input name="T_Title" type="text" size="50" value="<%=rs("Title")%>">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="22" align="right" bgcolor="ECF2D6">* 所屬類別:</td>
<td> <select name="S_ClassID" id="S_ClassID">
<%set rs_ClassID=conn.execute("select * from tSystemSmallClass where BigClassID='Download' order by AddTime desc")
do while not rs_ClassID.eof
if cstr(rs("ClassID"))=cstr(rs_ClassID("ID")) then
response.write "<option value='"&rs_ClassID("ID")&"' selected>"&rs_ClassID("SClassName")&"</option>"
else
response.write "<option value='"&rs_ClassID("ID")&"'>"&rs_ClassID("SClassName")&"</option>"
end if
rs_ClassID.movenext
loop
rs_ClassID.close
set rs_ClassID=nothing
%>
</select> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="119" align="right" bgcolor="ECF2D6">* 下載資料圖片:</td>
<td align="center"> <table width="98%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="19%" align="center" class="box2"><a href="/UploadFile/Download/<%=rs("DownFile")%>" target="_blank">點擊查看</a></td>
<td width="81%" valign="top"> <% if rs("DownFile")<>"" then response.write " 更改為:<br> "%> <input name="T_DownFile" type="file" class="box" size="40">
<br> <% if rs("DownFile")<>"" then %> <br>
<a href="?cur_action=DelDownFile&EditID=<%=rs("ID")%>&PageNo=<%=PageNo%>&ClassID=<%=request("ClassID")%>&ClassName=<%=request("ClassName")%>" onclick="{if(confirm('確定刪除該條文件嗎?')){return true;}return false;}"><--
刪除原先圖片</a> <% end if %> <br> <font color="#999999">(圖片要求:文件小于100K,JPG格式或GIF格式均可)
</font> </td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="22" align="right" bgcolor="ECF2D6">* 資料介紹:</td>
<td align="center"> <table width="97%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" height="3"></td>
</tr>
<tr>
<td> <%UploadFilePathTemp="/UploadFile/Download"%> <!--#include file="ArticleEditor/ArticleEdit.asp"--> <script language="javascript">
document.write ('<iframe src="ArticleEditor/Textbox.asp?cur_action=Download_edit&EditID=<%=rs("ID")%>" id="message" width="100%" height="250"></iframe>')
frames.message.document.designMode = "On";
</script> <input type="hidden" name="Content" value="">
<input name="UploadFile" type="hidden" id="UploadFile" value="<%=rs("UploadFile")%>">
</td>
</tr>
<tr>
<td colspan="2" height="3"></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="22" align="right" bgcolor="ECF2D6">* 添加時間:</td>
<td bgcolor="#FFFFFF"> <input name="T_AddTime" type="text" id="T_AddTime" value="<%=rs("AddTime")%>"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="40" colspan="2" align="center" bgcolor="#FFFFFF"><input name="EditID" type="hidden" id="EditID" value="<%=request("EditID")%>">
<input name="Key" type="hidden" id="Key" value="<%=request("Key")%>">
<input name="PageNo" type="hidden" id="PageNo" value="<%=request("PageNo")%>">
<input name="ClassID" type="hidden" id="ClassID" value="<%=request("ClassID")%>">
<input name="ClassName" type="hidden" id="ClassName" value="<%=request("ClassName")%>">
<input type="submit" name="Submit" value="確定發布"> <input type="reset" name="Submit2" value="重新填寫"></td>
</tr>
</form>
</table>
<br>
<br> </td>
<td width="2" background="images/midder2.gif"><img src="images/midder2.gif" width="2" height="3"></td>
</tr>
<tr>
<td valign="top"><img src="images/bottom1.gif" width="6" height="14"></td>
<td height="14" valign="top" background="images/bottom2.gif"><img src="images/bottom2.gif" width="2" height="14"></td>
<td valign="top"><img src="images/bottom3.gif" width="2" height="14"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<script src="ArticleEditor/Edit.js" type="text/javascript"></script>
<!--#include file="../include/PicShow.asp"-->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -