[心缘地方]同学录 |
首页 | 功能说明 | 站长通知 | 最近更新 | 编码查看转换 | 代码下载 | 常见问题及讨论 | 《深入解析ASP核心技术》 | 王小鸭自动发工资条VBA版 |
发表人 | 主题:管理员能删除照片资料 |
魔幻屋 身份:user 发帖:36 登陆次数:24 |
1F
发表于 2005/9/17 18:50:19
头,好像管理员不能删除照片,班级宝库的资料也不能删除,点击删除后,无法找到该网页! |
嘎嘎,是我 身份:admin 发帖:1438 登陆次数:3287 |
2F
发表于 2005/9/20 10:34:48
你是从 代码下载 那里down的代码吗? 应该没问题的。看看你的文件齐全吗? 无法找到该网页的时候,地址栏显示的什么? |
魔幻屋 身份:user 发帖:36 登陆次数:24 |
3F
发表于 2005/9/24 12:54:17
用的师范的代码 地址栏显示http://****/file_doAction.asp 系统提示:参数parentFloderID错误 |
嘎嘎,是我 身份:admin 发帖:1438 登陆次数:3287 |
4F
发表于 2005/9/25 12:58:09
文件这一块,他以前没有改。 现在好像有改动了。 我down手里没有他的代码,干脆你把你的代码贴在这里吧,我看看。 file_doAction.asp,还有前一个页面。 |
魔幻屋 身份:user 发帖:36 登陆次数:24 |
5F
发表于 2005/10/27 12:25:26
麻烦站长了!!!! file_doAction.asp的代码如下: <%@CODEPAGE="936"%> <!--#include File="session.asp" --> <!--#include File="conn.asp" --> <% if session("userLevel")<>"member" and session("userLevel")<>"admin" then call showMsg("对不起,您不是班级成员!") end if myAction=replace(trim(request("myAction")),"''","''''") folderID=trim(request("folderID")) ''删除、改名时要操作的folder的ID folderName=replace(trim(request("folderName")),"''","''''") ''新建、改名时必须输入 parentFolderID=trim(request("parentFolderID")) ''上级folder的ID,新建时需要用。返回时也要用 fileID=trim(request("fileID")) ''删除、改名时要操作的文件的ID fileName=replace(trim(request("fileName")),"''","''''") ''改名时必须输入 if parentFolderID="" or NOT IsNumeric(parentFolderID) then call showMsg("参数parentFolderID错误!") end if SUB deleteFolder(folderID) dim rs,sql,haveFile haveFile=true echoLn "in deleteFolder:"&folderID ''==删除当前文件夹下的所有物理文件 set rs=server.CreateObject("adodb.recordset") sql="select fileName,fileExtension,realFileName from TBL_ClassFile where classNumber=''"&session("classNumber")&"'' and folderID="&folderID rs.open sql,conn,0,1 if not (rs.bof and rs.eof) then do while not rs.eof call deleteFile(rs("realFileName")) ''删除文件 echoLn "in deleteFile:"+rs("realFileName") ''==写入LOG信息 if trim(rs("fileExtension"))="" then sql="insert into TBL_ClassFileLog(classNumber,userName,fileName,userAction,logTime) values(''"&session("classNumber")&"'',''"&session("userName")&"'',''"&rs("fileName")&"'',''deleteFile'',''"&NOW()&"'')" else sql="insert into TBL_ClassFileLog(classNumber,userName,fileName,userAction,logTime) values(''"&session("classNumber")&"'',''"&session("userName")&"'',''"&rs("fileName")+"."+rs("fileExtension")&"'',''deleteFile'',''"&NOW()&"'')" end if conn.execute sql rs.movenext loop else haveFile=false end if rs.close ''==删除数据库记录 if haveFile then sql="delete from TBL_ClassFile where classNumber=''"&session("classNumber")&"'' and folderID="&folderID echoLn sql conn.execute sql end if ''==删除当前文件夹下的所有子文件夹 sql="select folderID from TBL_ClassFolder where classNumber=''"&session("classNumber")&"'' and parentFolderID="&folderID rs.open sql,conn,0,1 if not (rs.bof and rs.eof) then do while not rs.eof echoLn "begin deleteFolder:"&rs("folderID") call deleteFolder(rs("folderID")) ''递归调用此过程 rs.movenext loop end if rs.close set rs=nothing ''==删除当前文件夹本身 sql="delete from TBL_ClassFolder where classNumber=''"&session("classNumber")&"'' and folderID="&folderID echoLn sql+"OK" conn.execute sql END SUB SUB deleteFile(realFileName) filePath=Server.MapPath(".")+"\classFiles\"+session("classNumber")+"\"+realFileName Set fso = CreateObject("Scripting.FileSystemObject") if fso.FileExists(filePath) then Set f = fso.GetFile(filePath) f.delete true ''强制删除 Set f = nothing end if Set fso = nothing END SUB SUB checkFolder(folderID,checkType) ''==1.检查接收的folderID是否是当前班级的2.检查当前用户是否有权限 dim rs,sql set rs=server.CreateObject("adodb.recordset") sql="select userName from TBL_ClassFolder where classNumber=''"&session("classNumber")&"'' and folderID="&folderID rs.open sql,conn,0,1 if rs.bof and rs.eof then rs.close set rs=nothing call showMsg("该folderID不属于当前班级!") else if Cint(checkType)=2 then ''如果参数是2,才检查是否是主人 if rs("userName")<>session("userName") then call showMsg("你没有权限进行此操作!") end if end if end if rs.close set rs=nothing END SUB Function checkFile(fileID,checkType) ''==1.检查接收的fileID是否是当前班级的2.检查当前用户是否有权限,返回文件名 dim rs,sql,realFileName set rs=server.CreateObject("adodb.recordset") sql="select userName,realFileName from TBL_ClassFile where classNumber=''"&session("classNumber")&"'' and fileID="&fileID rs.open sql,conn,0,1 if rs.bof and rs.eof then rs.close set rs=nothing call showMsg("该fileID不属于当前班级!") else if Cint(checkType)=2 then ''如果参数是2,才检查是否是主人 if rs("userName")<>session("userName") then call showMsg("你没有权限进行此操作!") end if end if realFileName=rs("realFileName") end if rs.close set rs=nothing checkFile=realFileName END Function select case myAction case "createFolder" if folderName="" then call showMsg("参数folderName错误!") end if if parentFolderID<>0 then ''parentFolderID=0将成为当前班级的根目录下的文件夹,所以不用检查 if session("userLevel")="admin" then call checkFolder(parentFolderID,1) ''管理员不检查权限 else call checkFolder(parentFolderID,2) ''其他人检查是否是主人 end if end if ''==下面检查是否有同名目录存在 set rs=server.CreateObject("adodb.recordset") sql="select 1 from TBL_ClassFolder where classNumber=''"&session("classNumber")&"'' and parentFolderID="&parentfolderID&" and folderName=''"&folderName&"''" rs.open sql,conn,0,1 if not (rs.bof and rs.eof ) then rs.close set rs=nothing call showMsg("该文件夹已经存在!") end if rs.close set rs=nothing ''==检查OK,执行插入动作 sql="insert into TBL_ClassFolder(folderName,classNumber,parentFolderID,folderCreateTime,userName) values(''"&folderName&"'',''"&session("classNumber")&"'',"&parentFolderID&",''"&NOW()&"'',''"&session("userName")&"'')" conn.execute sql case "changeFolderName" if folderID="" or NOT IsNumeric(folderID) then ''要改名的folderID call showMsg("参数folderID错误!") end if if folderName="" then call showMsg("参数folderName错误!") end if if folderID<>0 then '' folderID=0是当前班级的根目录,不可改名,其他的要检查 if session("userLevel")="admin" then call checkFolder(folderID,1) ''管理员不检查权限 else call checkFolder(folderID,2) ''其他人检查是否是主人 end if else call showMsg("根目录不可改名!") end if ''==下面检查是否有同名目录存在 set rs=server.CreateObject("adodb.recordset") sql="select 1 from TBL_ClassFolder where classNumber=''"&session("classNumber")&"'' and parentFolderID="&parentfolderID&" and folderName=''"&folderName&"'' and folderID<>"&folderID rs.open sql,conn,0,1 if not (rs.bof and rs.eof ) then rs.close set rs=nothing call showMsg("该文件夹已经存在!") end if rs.close set rs=nothing ''==更新数据库 sql="update TBL_ClassFolder set folderName=''"&folderName&"'' where classNumber=''"&session("classNumber")&"'' and folderID="&folderID conn.execute sql case "deleteFolder" if folderID="" or NOT IsNumeric(folderID) then ''要删除的folderID call showMsg("参数folderID错误!") end if if folderID<>0 then '' folderID=0是当前班级的根目录,不可删除,其他的要检查 if session("userLevel")="admin" then call checkFolder(folderID,1) ''管理员不检查权限 else call checkFolder(folderID,2) ''其他人检查是否是主人 end if else call showMsg("根目录不可删除!") end if call deleteFolder(folderID) case "changeFileName" if fileID="" or NOT IsNumeric(fileID) then ''要改名的fileID call showMsg("参数fileID错误!") end if if fileName="" then call showMsg("参数fileName错误!") end if if session("userLevel")="admin" then ''检查文件是否属于当前班级,检查权限,并返回文件名 getFileName=checkFile(fileID,1) ''管理员不检查权限========文件名没用。 else getFileName=checkFile(fileID,2) ''其他人检查是否是主人 end if ''==下面检查是否有同名文件存在 set rs=server.CreateObject("adodb.recordset") sql="select fileExtension from TBL_ClassFile where classNumber=''"&session("classNumber")&"'' and fileID="&fileID rs.open sql,conn,0,1 if not (rs.bof and rs.eof ) then fileExtension=rs("fileExtension") ''==取得扩展名 end if rs.close sql="select 1 from TBL_ClassFile where classNumber=''"&session("classNumber")&"'' and folderID="&parentfolderID&" and fileName+''.''+fileExtension=''"&fileName+"."+fileExtension&"'' and fileID<>"&fileID rs.open sql,conn,0,1 if not (rs.bof and rs.eof ) then rs.close set rs=nothing call showMsg("该文件名已经存在!") end if rs.close set rs=nothing ''===更新数据库记录 sql="update TBL_ClassFile set fileName=''"&fileName&"'' where classNumber=''"&session("classNumber")&"'' and fileID="&fileID conn.execute sql case "deleteFile" if fileID="" or NOT IsNumeric(fileID) then ''要删除的fileID call showMsg("参数fileID错误!") end if if session("userLevel")="admin" then ''检查文件是否属于当前班级,检查权限,并返回文件名 getFileName=checkFile(fileID,1) ''管理员不检查权限 else getFileName=checkFile(fileID,2) ''其他人检查是否是主人 end if call deleteFile(getFileName) ''删除文件 ''==取得文件全名,写入LOG信息 set rs=server.CreateObject("adodb.recordset") sql="select fileName,fileExtension from TBL_ClassFile where classNumber=''"&session("classNumber")&"'' and fileID="&fileID rs.open sql,conn,0,1 if not (rs.bof and rs.eof ) then ''==写入LOG信息 if trim(rs("fileExtension"))="" then sql="insert into TBL_ClassFileLog(classNumber,userName,fileName,userAction,logTime) values(''"&session("classNumber")&"'',''"&session("userName")&"'',''"&rs("fileName")&"'',''deleteFile'',''"&NOW()&"'')" else sql="insert into TBL_ClassFileLog(classNumber,userName,fileName,userAction,logTime) values(''"&session("classNumber")&"'',''"&session("userName")&"'',''"&rs("fileName")+"."+rs("fileExtension")&"'',''deleteFile'',''"&NOW()&"'')" end if conn.execute sql end if rs.close set rs=nothing ''删除数据库记录 sql="delete from TBL_ClassFile where classNumber=''"&session("classNumber")&"'' and fileID="&fileID conn.execute sql case "deleteLinkFile" if fileID="" or NOT IsNumeric(fileID) then ''要删除的fileID call showMsg("参数fileID错误!") end if if session("userLevel")="admin" then ''检查文件是否属于当前班级,检查权限,并返回文件名 getFileName=checkFile(fileID,1) ''管理员不检查权限 else getFileName=checkFile(fileID,2) ''其他人检查是否是主人 end if sql="delete from TBL_ClassFile where classNumber=''"&session("classNumber")&"'' and fileID="&fileID conn.execute sql sql="delete from TBL_ClassFileLink where fileID="&fileID conn.execute sql end select ''关闭连接,返回 call closeConn() response.redirect "file_listFile.asp?folderID="&parentfolderID %> |
魔幻屋 身份:user 发帖:36 登陆次数:24 |
6F
发表于 2005/10/27 12:29:30
前一页 file_listFile.asp代码如下: <%@ CODEPAGE="936"%> <% Response.Buffer = True Response.ExpiresAbsolute = Now() - 1 Response.Expires = 0 Response.CacheControl = "no-cache" %> <!--#include File="session.asp" --> <!--#include File="conn.asp" --> <% if session("classNumber")="" or session("classNumber")="all" then call showMsg("对不起,你当前没有选择具体项目!") end if %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML><!-- InstanceBegin template="/Templates/index.dwt" codeOutsideHTMLIsLocked="false" --> <HEAD> <!-- InstanceBeginEditable name="doctitle" --> <TITLE><%=className%></TITLE> <!-- InstanceEndEditable --><META http-equiv="Content-Type" content="text/html; charset=gb2312"> <LINK href="wang.css" rel="stylesheet" type="text/css"> <SCRIPT language="JavaScript" src="js/main.js"></SCRIPT> <!-- InstanceBeginEditable name="head" --> <script language="javascript"> function check(str){ var SPECIAL_STR = "~!@%^&*;''\"?><{}\\|,:/=+—“”‘"; for(var i=0;i<SPECIAL_STR.length;i++) if (str.indexOf(SPECIAL_STR.charAt(i)) !=-1){ alert("你的输入包含非法字符:"+SPECIAL_STR.charAt(i)); return false;} return true; } function createFolder() { var myInput=prompt("请输入新建文件夹的名字,长度小于30字!","新文件夹"); if(myInput!="" && myInput!=null && myInput.length<30 && check(myInput)) { myForm.myAction.value="createFolder"; myForm.folderName.value=myInput; myForm.submit(); } } function changeFolderName(folderID,folderName) { var myInput=prompt("请输入文件夹的新名字,长度小于30字!",folderName); if(myInput!="" && myInput!=null && myInput.length<30 && check(myInput)) { myForm.myAction.value="changeFolderName"; myForm.folderID.value=folderID; myForm.folderName.value=myInput; myForm.submit(); } } function deleteFolder(folderID) { if(confirm(''确认要删除此文件夹吗?\n此动作将删除此文件夹下所有子文件夹及文件!'')) { myForm.myAction.value="deleteFolder"; myForm.folderID.value=folderID; myForm.submit(); } } function downFile(fileID) { window.open("file_downFile.asp?fileID="+fileID,"","left=0,top=0,width=400,height=300"); } function deleteFile(fileID) { if(confirm(''确认要删除此文件吗?'')) { myForm.myAction.value="deleteFile"; myForm.fileID.value=fileID; myForm.submit(); } } function deleteLinkFile(fileID) { if(confirm(''确认要删除此文件吗?'')) { myForm.myAction.value="deleteLinkFile"; myForm.fileID.value=fileID; myForm.submit(); } } function changeFileName(fileID,FileName) { var myInput=prompt("请输入文件的新名字,长度小于50字!",FileName); if(myInput!="" && myInput!=null && myInput.length<50 && check(myInput)) { myForm.myAction.value="changeFileName"; myForm.fileID.value=fileID; myForm.fileName.value=myInput; myForm.submit(); } } function changeFileIntro(fileID) { window.open("file_changeFileIntro.asp?fileID="+fileID,"","left=0,top=0,width=400,height=250"); } function showHideInfo(fileID) { var infoID="info"+fileID; eval("var obj="+infoID+".style"); if(obj.display=="none") obj.display=""; else obj.display="none"; } </script> <!-- InstanceEndEditable --> </HEAD> <BODY> <!--#include file="include/top.asp" --> <TABLE width="760" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#B61F1F"> <TD width="487" bgcolor="#FBF0F0" class="bottomline"> 当前位置:<A href="index.asp">首页</A><SPAN id="myLocation"><!-- InstanceBeginEditable name="location" -->--班级宝库<!-- InstanceEndEditable --></SPAN></TD> <TD width="238" bgcolor="#FBF0F0" class="bottomline"> 在线:<SCRIPT id="js_scroll_content" language="JavaScript" src="online_js.asp"> </SCRIPT><SCRIPT language="JavaScript" src="js/online_scroll.js"> </SCRIPT></TD> <TD width="23" bgcolor="#FBF0F0" class="bottomline" align="right"><IMG src="images/show-hide.gif" alt="打开/关闭功能菜单" width="15" height="14" border="0" id="show_hide" onClick="showBar();"></TD> </TR> </TABLE> <TABLE width="760" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF"> <TR> <TD width="180" valign="top" class="rightline" id="leftBar" > <!--#include file="include/leftbar.asp" --> </TD> <TD valign="top"><!-- InstanceBeginEditable name="mainEdit" --> <script language="JavaScript" type="text/JavaScript"> leftBar.style.display=''none''; </script> <%folderID=trim(request("folderID")) if folderID="" or NOT IsNumeric(folderID) then ''默认为当前项目的根目录,取parentFolderID=0的。 folderID=0 end if ''==下面取出当前路径================================= set rs=server.CreateObject("adodb.recordset") currentPath="" if folderID=0 then currentPath="/" else loopFolderID=folderID do while NOT (loopFolderID=0) sql="select folderName,parentFolderID from TBL_ClassFolder where classNumber=''"&session("classNumber")&"'' and folderID="&loopFolderID rs.open sql,conn,0,1 if not (rs.bof and rs.eof) then if loopFolderID=folderID then currentPath=rs("folderName")+"/"+currentPath else currentPath="<a href=''file_listFile.asp?folderID="&loopFolderID&"''>"&rs("folderName")&"</a>/"+currentPath end if end if loopFolderID=rs("parentFolderID") rs.close loop currentPath="/"+currentPath end if Function showFileIcon(fileType) ''文件图标 dim myIcon myIcon="asp|avi|bat|bmp|chm|css|dll|doc|exe|gif|hlp|htm|inf|jpg|js|mdb|mid|mp3|nfo|pdf|png|rar|reg|rm|swf|txt|vbs|xml|xsl|zip" if Instr(myIcon,fileType)>0 then showFileIcon=fileType else showFileIcon="no" end if End Function %> <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1"> <form name="myForm" action="file_doAction.asp" method="post"> <input type="hidden" name="myAction" value=""><input type="hidden" name="parentFolderID" value="<%=folderID%>"> <input type="hidden" name="folderID" value=""><input type="hidden" name="folderName" value=""> <input type="hidden" name="fileID" value=""><input type="hidden" name="fileName" value=""> <tr> <td width="20%"><B>文件列表</B></td> <td><input type="button" value="后退一步" onClick="history.go(-1)" class="myButton"> <% if folderID<>0 then ''取出当前文件夹的主人和上级文件夹ID sql="select userName,parentFolderID from TBL_ClassFolder where classNumber=''"&session("classNumber")&"'' and folderID="&folderID rs.open sql,conn,0,1 if not(rs.bof and rs.eof) then dim parentFolderID parentFolderID=rs("parentFolderID") if rs("userName")=session("userName") or session("userLevel")="admin" then ''==可以上传文件,建立文件夹%> <input type="button" value="新建文件夹" onClick="createFolder()" class="myButton"> <input type="button" id="addItemButton" value="上传文件" onClick="window.location.href=''file_uploadFile.asp?folderID=<%=folderID%>''" class="myButton"> <input type="button" value="添加文件链接" onClick="window.location.href=''file_addLinkFile.asp?folderID=<%=folderID%>''" class="myButton"> <% end if end if rs.close else ''folderID=0是根目录 %> <input type="button" value="新建文件夹" onClick="createFolder()" class="myButton"> <input type="button" id="addItemButton" value="上传文件" onClick="window.location.href=''file_uploadFile.asp?folderID=<%=folderID%>''" class="myButton"> <input type="button" value="添加文件链接" onClick="window.location.href=''file_addLinkFile.asp?folderID=<%=folderID%>''" class="myButton"> <%end if%> </td> </tr></form> </table> <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1"> <tr bgcolor="#F7DBDB"><td align="center" bgcolor="#F7DBDB"><b>名称</b></td> <td width="10%" align="center"><b>大小</b></td> <td width="10%" align="center"><b>类型</b></td> <td width="10%" align="center"><b>主人</b></td> <td width="20%" align="center"><b>更新日期</b></td> <td width="20%" align="center" bgcolor="#F7DBDB"><b>功能</b></td> </tr> <% echo "当前路径:"+currentPath if parentFolderID<>"" then %> <tr onMouseOver=''this.style.backgroundColor="#FDF7F7"'' onMouseOut=''this.style.backgroundColor=""''> <td><img src="images/fileIcon/folder.gif" width="18" height="18" border="0" align="absmiddle"> <a href="file_listFile.asp?folderID=<%=parentFolderID%>"><b>..返回上级目录..</b></a></td> <td align=''center''>-</td> <td align=''center''>-</td> <td>-</td> <td align=''center''>-</td> <td align=''center''>-</td> </tr> <% end if sql="select F.folderID,F.folderName,F.folderCreateTime,F.userName,U.realName from TBL_ClassFolder F left join TBL_USER U on F.userName=U.userName where F.classNumber=''"&session("classNumber")&"'' and F.parentFolderID="&folderID&" order by F.folderName" ''取得当前folderID的子文件夹信息 rs.open sql,conn,0,1 if not(rs.bof and rs.eof) then do while not rs.eof %> <tr onMouseOver=''this.style.backgroundColor="#FDF7F7"'' onMouseOut=''this.style.backgroundColor=""''> <td><img src="images/fileIcon/folder.gif" width="18" height="18" border="0" align="absmiddle"> <a href="file_listFile.asp?folderID=<%=rs("folderID")%>"><%=Server.HTMLEncode(rs("folderName"))%></a></td> <td align=''center''>0</td> <td align=''center''>文件夹</td> <td align=''center''><a href="member.asp?userName=<%=Server.URLEncode(rs("userName"))%>"><%=rs("realName")%></a></td> <td align=''center''><%=rs("folderCreateTime")%></td> <td align=''center''><%if rs("userName")=session("userName") or session("userLevel")="admin" then%><input type="button" value="改名" onClick="changeFolderName(<%=rs("folderID")%>,''<%=rs("folderName")%>'')" class="myButton"> <input type="button" value="删除" onClick="deleteFolder(<%=rs("folderID")%>)" class="myButton"><%end if%></td> </tr> <% rs.movenext loop end if rs.close sql="select F.*,U.realName from TBL_ClassFile F left join TBL_USER U on F.userName=U.userName where F.classNumber=''"&session("classNumber")&"'' and F.FolderID="&folderID&" and F.isLink=''N'' order by F.fileName" ''所有文件信息 rs.open sql,conn,0,1 if not(rs.bof and rs.eof) then do while not rs.eof %> <tr onMouseOver=''this.style.backgroundColor="#FDF7F7"'' onMouseOut=''this.style.backgroundColor=""''> <td><img src="images/fileIcon/<%=showFileIcon(rs("fileExtension"))%>.gif" width="18" height="18" border="0" align="absmiddle"> <a href="javascript:showHideInfo(<%=rs("fileID")%>)"><%=Server.HTMLEncode(rs("fileName"))%></a></td> <td align=''center''><%=rs("fileSize")%></td> <td align=''center''><%=rs("fileExtension")%></td> <td align=''center''><a href="member.asp?userName=<%=Server.URLEncode(rs("userName"))%>"><%=rs("realName")%></a></td> <td align=''center''><%=rs("fileAddTime")%></td> <td align=''center''><%if rs("userName")=session("userName") or session("userLevel")="admin" then%><input type="button" value="改名" onClick="changeFileName(<%=rs("fileID")%>,''<%=rs("fileName")%>'')" class="myButton"> <input type="button" value="删除" onClick="deleteFile(<%=rs("fileID")%>)" class="myButton"> <%end if%><input type="button" value="下载" onClick="downFile(<%=rs("fileID")%>)" class="myButton"></td> </tr> <tr><td id="info<%=rs("fileID")%>" colspan="6" class="td-roundline" style="display:none"> <%if rs("userName")=session("userName") or session("userLevel")="admin" then%> <a href="javascript:changeFileIntro(<%=rs("fileID")%>)"><b>[修改注释]</b></a> <%end if%> <% if session("userLevel")="member" or session("userLevel")="admin" then%> 文件下载地址:[<a href="http://<%=Request.ServerVariables("HTTP_HOST")%><%=Mid(Request.ServerVariables("SCRIPT_NAME"),1,InStrRev(Request.ServerVariables("SCRIPT_NAME"),"/"))%>classFiles/<%=rs("classNumber")%>/<%=Server.URLEncode(rs("realFileName"))%>" target="_blank">http://<%=Request.ServerVariables("HTTP_HOST")%><%=Mid(Request.ServerVariables("SCRIPT_NAME"),1,InStrRev(Request.ServerVariables("SCRIPT_NAME"),"/"))%>classFiles/<%=rs("classNumber")%>/<%=Server.URLEncode(rs("realFileName"))%></a>]<br><%end if%> <%=Server.HTMLEncode(rs("fileIntro"))%></td> </tr> <% rs.movenext loop end if rs.close sql="select F.*,U.realName,L.fileLinkAddress from (TBL_ClassFile F left join TBL_USER U on F.userName=U.userName) left join TBL_classFileLink L on F.fileID=L.fileID where F.classNumber=''"&session("classNumber")&"'' and F.FolderID="&folderID&" and F.isLink=''Y'' order by F.fileName" ''所有链接文件信息 rs.open sql,conn,0,1 if not(rs.bof and rs.eof) then do while not rs.eof %> <tr onMouseOver=''this.style.backgroundColor="#FDF7F7"'' onMouseOut=''this.style.backgroundColor=""''> <td><img src="images/fileIcon/<%=showFileIcon(rs("fileExtension"))%>.gif" width="18" height="18" border="0" align="absmiddle"> <a href="javascript:showHideInfo(<%=rs("fileID")%>)"><%=Server.HTMLEncode(rs("fileName"))%></a></td> <td align=''center''><%=rs("fileSize")%></td> <td align=''center''><%=rs("fileExtension")%></td> <td align=''center''><a href="member.asp?userName=<%=Server.URLEncode(rs("userName"))%>"><%=rs("realName")%></a></td> <td align=''center''><%=rs("fileAddTime")%></td> <td align=''center''><%if rs("userName")=session("userName") or session("userLevel")="admin" then%><input type="button" value="改名" onClick="changeFileName(<%=rs("fileID")%>,''<%=rs("fileName")%>'')" class="myButton"> <input type="button" value="删除" onClick="deleteLinkFile(<%=rs("fileID")%>)" class="myButton"> <%end if%><input type="button" value="下载" onClick="downFile(<%=rs("fileID")%>)" class="myButton"></td> </tr> <tr><td id="info<%=rs("fileID")%>" colspan="6" class="td-roundline" style="display:none"> <%if rs("userName")=session("userName") or session("userLevel")="admin" then%> <a href="javascript:changeFileIntro(<%=rs("fileID")%>)"><b>[修改注释]</b></a> <%end if%>文件下载地址:[<a href="<%=rs("fileLinkAddress")%>" target="_blank"><%=rs("fileLinkAddress")%></a>]<br> <%=Server.HTMLEncode(rs("fileIntro"))%></td> </tr> <% rs.movenext loop end if rs.close set rs=nothing call closeConn() %></table> <!-- InstanceEndEditable --></TD> </TR> </TABLE> <!--#include file="include/foot.asp" --> </BODY> <!-- InstanceEnd --></HTML> |
嘎嘎,是我 身份:admin 发帖:1438 登陆次数:3287 |
7F
发表于 2005/10/27 21:25:32
文件好像是对的哦,晕,只是单引号怎么都变成两个了?难道是这里的帖子转的吗? 偶也不知道咋回事啦。只是不能删除吗?其他都没有问题? |
魔幻屋 身份:user 发帖:36 登陆次数:24 |
8F
发表于 2005/11/8 10:30:12
恩 没其他问题 只是不能删东西 |
CopyRight © 心缘地方 2005-2999. All Rights Reserved |