📄 addfile.asp
字号:
<!--壹加壹在线--www.10000cn.com-->
<%
if session("admin")<>"on" then
Response.Redirect"login.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>
<%
classid=Request.QueryString("classid")
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")
classid=rs("classid")
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
%>
<!--#include file="intop.asp" -->
<TABLE border=0 cellPadding=0 cellSpacing=0 width=750 align=center>
<TBODY>
<TR>
<TD vAlign=top width=49 bgcolor=#ffffff> </TD>
<TD align=middle bgColor=#f2f2f2 vAlign=top width=100%>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="88%">
<TBODY>
<tr>
<td BGCOLOR="#f2f2f2" width="100%">管理选项:<a href="admin.asp">管理首页</a>
| <a href="adminfile.asp">管理文件</a> | <a href="loginout.asp">退出管理</a>
| <a href="http://www.10000cn.com" target="_blank">壹加壹主页</a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
<form name="form" method="post" action="savefile.asp?cz=<%=cz%>&classid=<%=classid%>&id=<%=id%>">
<tr>
<td height="5" colspan="2"></td>
</tr>
<tr>
<td class="sxz" width="115" align="right">文件名称:</td>
<td class="bk" 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 class="xzy" width="565">
<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">
<select name="hot">
<%
if hot=1 then
Response.Write"<option value='1' selected>推荐</option><option value='0'>不推荐</option>"
else
Response.Write"<option value='1'>推荐</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="an" maxlength="200" value="<%=url%>" size="20">
</td>
</tr>
<tr>
<td class="zx" valign="top" width="115" align="right">文件简介:</td>
<td class="xzy" valign="top" width="565">
<textarea name="jj" class="an" cols="40" rows="5"><%=jj%></textarea>
</td>
</tr>
</form>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td height="5"></td>
</tr>
<tr>
<td>请注意,必须填写带有“*”项目,缩略图如果不填写则使用默认图片</td>
</tr>
<TR>
<TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<!--#include file="infoot.asp" -->
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -