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

📄 downloadmanageedit.asp

📁 这个也是一个功能强大的企业整站的ASP源代码
💻 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">&nbsp;</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%">&nbsp; <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>&nbsp; <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 "&nbsp;更改为:<br> &nbsp;&nbsp;&nbsp;"%> &nbsp; <input name="T_DownFile" type="file" class="box" size="40"> 
                                <br> <% if rs("DownFile")<>"" then %> <br> &nbsp;&nbsp;&nbsp; 
                                <a href="?cur_action=DelDownFile&EditID=<%=rs("ID")%>&PageNo=<%=PageNo%>&ClassID=<%=request("ClassID")%>&ClassName=<%=request("ClassName")%>" onclick="{if(confirm('确定删除该条文件吗?')){return true;}return false;}">&lt;-- 
                                删除原先图片</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">&nbsp; <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 + -