📄 cz-upfileedit.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="CZ-UPFILEConfig.asp"-->
<%
if session("admin_name")="" then
response.redirect "../login.asp"
response.end
end if
Dim ID,Msg
ID = Request("ID")
If Request("Action") = "Save" Then SaveData ID
Sub SaveData(ID)
If ID < 1 Then
Response.Write("参数错误")
Response.End()
End If
sql="update info set FILETITLE='"&Request.Form("fname")&"',FILEDESC='"&Request.Form("fdesc")&"',FILETYPE='"&Request.Form("ftype")&"',FILEPATH='"&Request.Form("fpath")&"'"
if request.Form("fsize")<>"" then sql=sql&",FILESIZE="&Request.Form("fsize")
sql=sql&" where ID="&ID
myConn.execute sql
Msg = "<font size=2>成功修改了文件数据信息"
End Sub
If msg <> "" Then
Response.Write("<meta http-equiv=refresh content='3;URL=cz-upfilelist.asp'>"&Msg&"<font size=2><br>本页将在3秒内返回<BR>如果你的浏览器没有反应,请<a href=cz-upfilelist.asp>点击此处返回</a></font>")
Response.End()
End If
%>
<%
set frst = Server.CreateObject("adodb.recordset")
sql = "select * from info Where Id="&ID
frst.open sql,myconn,1,1
If not frst.Eof then
fid = frst("id").Value
ftitle = frst("fileTitle").Value
fdesc = frst("fileDesc").Value
ftype = frst("fileType").Value
fpath = frst("filePath").Value
fsize = frst("filesize").Value
fhits = frst("hits").Value
fuploadtime = frst("uploadTime").Value
'FileNameStr=Server.Mappath(fpath)
'Isize.GetImgSize Cstr(FileNameStr)
%>
<html>
<head>
<title>up-filelist</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet" type="text/css">
<script src="czUpfile.Js"></script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center"> <br>
<br><form method="post" action="cz-upfileEdit.asp?Action=Save&ID=<%=ID%>" name="Edit">
<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="336699" id="AutoNumber1" style="border-collapse: collapse">
<tr>
<td width="20%" height="25" background="../images/pics/tile_sub.gif">
<p align="center"><font color="#FFFFFF"><b> 文件名称:</b></font></td>
<td width="40%" background="../images/pics/tile_sub.gif"> <input type="text" name="fname" class="TextBoxT" value="<%=ftitle%>" size="20" style="color: #333333; border: 1px solid #999999">
</td>
<td width="40%" background="../images/pics/tile_sub.gif"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25"> <p align="center"><font color="333333"><b> 文件类型:</b></font></td>
<td> <select name="ftype" class="TextBoxT" id="filetype" style="color: #333333">
<option value="素材图片"<%if ftype="素材图片" then%> selected<% end if %>>素材图片</option>
<option value="常用工具"<%if ftype="常用工具" then%> selected<% end if %>>常用工具</option>
<option value="程序源码"<%if ftype="程序源码" then%> selected<% end if %>>程序源码</option>
</select></td>
<td> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25"> <p align="center"><font color="333333"><b> 文件路径:</b></font></td>
<td> <input name="fpath" type="text" class="TextBoxT" value="<%=fpath%>" size="35" style="color: #333333; border: 1px solid #333333"></td>
<td> <%
Set Fs = Server.CreateObject("Scripting.FileSystemObject")
If Fs.FileExists(server.mappath(fPath)) Then
Response.Write("<img src=../images/isexists.gif><font color='ff3300'> 文件存在</font>")
else
response.write "<font color='ff3300'>*该文件路径有误</font>"
End If
%> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25"> <p align="center"><font color="333333"><b> 文件说明:</b></font></td>
<td> <input type="text" name="fdesc" class="TextBoxT" value="<%=fdesc%>" size="20" style="color: #333333; border: 1px solid #333333"></td>
<td> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25"> </td>
<td> <INPUT name="image" type=image src="../images/pics/s_button000.gif" align=absMiddle width="45" height="20" border=0>
<a href="cz-upfilelist.asp"><img src="../images/pics/back.gif" border="0"></a>
</td>
<td> <%
else
%>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="3"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="3"> <p align="center"><b><font color="333333">对不起.没有相对应的数据信息!</font></b></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="3"> <%
end if
frst.close
set frst = nothing
myconn.close
set myconn = nothing
%>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -