📄 addfile.asp
字号:
<!--#include file="../function1/DBOpen.asp"-->
<%
if session("purview")="" then
Response.Redirect"../login.asp?id=0"
end if
%>
<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>
<%
dim classid,cover,ownername,w,h,exif
ownername=session("name")
if request("classid")="" or isnull(request("classid")) then
else
classid=Cint(trim(Request("classid")))
end if
if Request.QueryString("cz")="editfile" then
id=Request.QueryString("id")
sql = "SELECT * FROM photo where id="&id
Set rs = Server.CreateObject("ADODB.Recordset")
rs.OPEN sql,Conn,1,1
name=rs("title")
dx=rs("size")
w=rs("w")
h=rs("h")
classid=rs("classid")
minipic=rs("small")
pic=rs("big")
jj=rs("content")
exif=rs("exif")
cover1=rs("cover")
function html_1(fString)
if fString<>"" then
fString = Replace(fString, "</P><P>" , CHR(10) & CHR(10))
fString = Replace(fString, "<BR>" , CHR(10))
end if
html_1= fString
end function
title="编辑文件"
cz="editfile"
rs.close
sql = "SELECT * FROM class where id="&classid&" "
rs.OPEN sql,Conn,0,1
if not rs.eof and not rs.bof then
owner=rs("owner")
if session("name")<>owner and session("purview")<>"99999" then
Response.Write"你不是超极管理员或者该相册不是你所有,你不能编辑该相片!"
Response.end
end if
end if
rs.close
Set rs=Nothing
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" background="images/bg4.gif">
<table width="76%" border="0" cellspacing="0" cellpadding="5" align="center">
<form name="form" method="post" action="savefile.asp?cz=<%=cz%>&id=<%=id%>">
<tr>
<td height="5" colspan="3"></td>
</tr>
<tr>
<td class="sxz" width="122" align="right">相片名称:</td>
<td colspan="2" class="bk">
<input name="name" type="text" class="an" value="<%=name%>" size="48" maxlength="50">
<input type="submit" name="Submit2" value="添加" class="an">
* </td>
</tr>
<tr>
<td class="zx" width="122" align="right">文件大小:</td>
<td colspan="2" class="xzy">
<input name="dx" type="text" class="an" value="<%=dx%>" size="10" maxlength="50" readonly="ture">
K 分辨率:
<input name="w" type="text" class="an" id="w" value="<%=w%>" size="5" maxlength="50" readonly="ture">
× <input name="h" type="text" class="an" id="h" value="<%=h%>" size="5" maxlength="50" readonly="ture"></td>
</tr>
<tr>
<td class="zx" width="122" align="right">所属分类:</td>
<td class="xzy" width="162">
<select name="classid" size="1">
<%
if session("purview")="99999" then
sql="select * from class"
else
sql="select * from class where owner='" & trim(ownername) & "'"
end if
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 classid=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>
<td class="xzy" width="438">作为相册封面:
<input name="cover" type="radio" value="1" <%if cz="editfile" then
if cover1="1" then
response.write "checked"
end if
end if%>>
是
<input name="cover" type="radio" value="0" <%if cz="editfile" then
if cover1="0" then
response.write "checked"
end if
else
response.write "checked"
end if%>>
否</td>
</tr>
<tr>
<td class="zx" width="122" align="right">图片位置:</td>
<td colspan="2" class="xzy">
<input name="pic" type="text" class="an" value="<%=pic%>" size="48" maxlength="200">
*
[<a href="JavaScript:openem()">上传图片</a>] </td>
</tr>
<tr>
<td width="122" align="right" class="zx">缩 略 图:</td>
<td colspan="2" class="xzy"><input name="pic2" type="text" class="an" value="<%=minipic%>" size="48" maxlength="200"></td>
</tr>
<tr>
<td class="zx" valign="top" width="122" align="right">文件简介:</td>
<td colspan="2" valign="top" class="xzy">
<textarea name="jj" class="an" cols="48" rows="5"><%=jj%></textarea>
</td>
</tr>
<tr>
<td class="zx" valign="top" align="right"><div align="center">拍摄参数:</div></td>
<td colspan="2" valign="top" class="xzy"><textarea name="exif" cols="48" rows="5" readonly="ture" class="an" id="exif"><%=exif%></textarea></td>
</tr>
</form>
</table>
<table width="76%" 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 + -