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

📄 addfile.asp

📁 结合了某度和AH的个人主页 功能比较完整
💻 ASP
字号:
<%
if session("admin")<>"admin" then
Response.Redirect"../admin/index.asp"
end if
%>
<!--#include file="config.asp" -->
<!--#include file="mdb/conn.asp" -->
<html>
<head>
<script language="Javascript">
function openScript(url, width, height){
	var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
}
function openem()
{ 
openScript('upload.asp',350,200); 
}
</script>
<%
typeid=Request.QueryString("typeid")
if Request.QueryString("cz")="editfile" then
id=Request.QueryString("id")
sql = "SELECT * FROM desktop where id="&id 
Set rs = Server.CreateObject("ADODB.Recordset")
rs.OPEN sql,Conn,1,1
name=rs("name")
dx=rs("dx")
typeid=rs("typeid")
lx=rs("lx")
minipic=rs("minipic")
pic=rs("pic")
url=rs("url")
hot=rs("hot")
jj=html_1(rs("jj"))
rs.close
Set rs=Nothing
function html_1(fString)
	fString = Replace(fString, "</P><P>" , CHR(10) & CHR(10))
	fString = Replace(fString, "<BR>" , CHR(10))
	html_1= fString
end function
title="编辑文件"
cz="editfile"
else
title="添加文件"
cz="addfile"
end if
%>
<title><%=title%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
-->
</style>
</head>

<body  background="../img/dnacebg2.jpg" text="#86540c">
<div align="center">
  <center>
  <table width="800" border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" bgcolor="#E4C59A" style="border-collapse: collapse">
    <tr>
      <td width="100" background="../gb/images/main/left.gif"> </td>
      <td width="600" bgcolor="#E4C59A">
       
        <table width="600" border="0" align="center" cellpadding="5" cellspacing="0" bgcolor="#CEA772" class="xzy">
  <tr> 
  <td>管理选项:<a href="adminfile.asp">文件管理</a> </td>  
 </tr>
</table>
<table width="600" border="0" align="center" cellpadding="5" cellspacing="0">
  <form name="form" method="post" action="savefile.asp?cz=<%=cz%>&typeid=<%=typeid%>&id=<%=id%>">
    <tr> 
      <td height="5" colspan="2"></td>
    </tr>
    <tr> 
      <td class="sxz" width="115" align="right">文件名称:</td>
      <td width="565"> 
        <input type="text" name="name" class="an" maxlength="50" value="<%=name%>" size="20">
        <input type="submit" name="Submit2" value="添加" class="an">  
        * </td>  
    </tr>
    <tr> 
      <td class="zx" width="115" align="right">文件大小:</td>
      <td width="565" class="xzy"> 
        <input type="text" name="dx" class="an" maxlength="50" value="<%=dx%>" size="20">
      </td>
    </tr>
    <tr> 
      <td class="zx" width="115" align="right">所属分类:</td>
      <td class="xzy" width="565"> 
        <select name="typeid">
          <%
sql = "SELECT * FROM type" 
Set rs = Server.CreateObject("ADODB.Recordset")
rs.OPEN sql,Conn,1,1
if rs.eof and rs.bof then
Response.Write"<option>还没有任何分类</option>"
else
do while not rs.eof
Response.Write"<option value='"&rs("id")&"'"
if typeid=rs("id") then Response.Write" selected"
Response.Write">"&rs("name")&"</option>"
rs.movenext
loop
end if
rs.close
set rs=nothing
conn.close
Set conn=Nothing
%>
        </select>
        * </td>  
    </tr>
    <tr> 
      <td class="zx" width="115" align="right">文件类型:</td>
      <td class="xzy" width="565"> 
        <select name="lx">
          <%
if lx=1 then
Response.Write"<option value='1' selected>Flash</option><option value='0'>照片</option>"
else
Response.Write"<option value='1'>Flash</option><option value='0' selected>照片</option>"
end if
%>
        </select>
        * </td>  
    </tr>
    <tr> 
      <td class="zx" width="115" align="right">缩略图:</td>
      <td class="xzy" width="565"> 
        <input type="text" name="minipic" class="an" maxlength="200" value="<%=minipic%>" size="20">
        [<a href="JavaScript:openem()">上传图片</a>] </td>  
    </tr>
    <tr> 
      <td class="zx" width="115" align="right">放大图或FLASH文件:</td>
      <td class="xzy" width="565"> 
        <input type="text" name="pic" class="an" maxlength="200" value="<%=pic%>" size="20">
        * </td>  
    </tr>
    <tr> 
      <td class="zx" width="115" align="right">供下载文件:</td>
      <td class="xzy" width="565"> 
        <input type="text" name="url" class="sxz" maxlength="200" value="<%=url%>" size="20">
      </td>
    </tr>
    <tr> 
      <td class="zx" valign="top" width="115" align="right">文件简介:</td>
      <td width="565" valign="top" class="xzy"> 
        <textarea name="jj" cols="40" rows="5" class="an"><%=jj%></textarea>
      </td>
    </tr>
  </form>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="5" align="center">
  <tr> 
    <td height="5"></td>
  </tr>
  
  <tr> 
   
    <td bgcolor="#CEA772" class="bk">请注意,必须填写带有“*”项目,缩略图如果不填写则使用默认图片</td>
  </tr>
</table></td>
      <td width="100" background="../gb/images/main/right.gif"> </td>
    </tr>
  </table>
  </center>
</div>

</body>
</html>

⌨️ 快捷键说明

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