📄 addfile.asp
字号:
<%
if session("admin")<>"on" then
Response.Redirect"login.asp"
end if
%>
<!--#include file="config.asp" -->
<!--#include file="mdb/conn.asp" -->
<html>
<head>
<%
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
%>
<title><%=title%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
a { font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none; color: <%=fontcolor%>; text-decoration: none}
a:hover { font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none; color: <%=fontcolor%>; text-decoration: underline}
td { font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none; color: <%=fontcolor%>}
br { font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none; color: <%=fontcolor%>}
.bk { font-size: 9pt; border: 1px <%=xcolor%> solid}
body { font-family: "宋体"; font-size: 9pt; font-style: normal; line-height: 13pt; font-weight: normal; font-variant: normal; text-transform: none}
.an { font-family: "宋体"; font-size: 9pt; background-color: <%=bgcolor%>; border: 1px <%=xcolor%> solid; color: <%=fontcolor%>}
.xzy { border: <%=xcolor%> solid; border-width: 0px 1px 1px}
.zx { border: <%=xcolor%> solid; border-width: 0px 0px 1px 1px}
.sxz { border: <%=xcolor%> solid; border-width: 1px 0px 1px 1px}
.s { border: <%=xcolor%>; border-style: solid; border-top-width: 1px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px}
.y { border: <%=xcolor%>; border-style: solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 0px; border-left-width: 0px}
.font { font-family: "Arial Black"; font-size: 14pt; color: <%=fontcolor%>}
.x { border: <%=xcolor%>; border-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px}
.z { border: <%=xcolor%>; border-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 1px}
.sx { border: <%=xcolor%>; border-style: solid; border-top-width: 1px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px}
-->
</style>
</head>
<body bgcolor="<%=bgcolor%>" text="#000000">
<!--#include file="top.asp" -->
<table width="750" border="0" cellspacing="0" cellpadding="5" bgcolor="<%=titlecolor%>" class="xzy" align="center">
<tr>
<td>管理选项:<a href="admin.asp">管理首页</a> | <a href="adminfile.asp">管理文件</a> | <a href="loginout.asp">退出管理</a></td>
</tr>
</table>
<table width="750" border="0" cellspacing="0" cellpadding="5" align="center">
<form name="form1" 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%>">
<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%>">
</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%>">
</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%>">
* </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%>">
</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="750" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td height="5"></td>
</tr>
<tr>
<td class="bk" bgcolor="<%=titlecolor%>">请注意,必须填写带有“*”项目,缩略图如果不填写则使用默认图片</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -