📄 dir_list.jsp
字号:
if (ctlTable.style.display=="none") {
ctlTable.style.display = "";
addform.webedit.height = "173px";
btnObj.value = "隐 藏";
}
else {
ctlTable.style.display = "none";
//addform.webedit.height = "0px";
//alert("test")
btnObj.value = "上 传";
}
}
function findObj(theObj, theDoc)
{
var p, i, foundObj;
if(!theDoc) theDoc = document;
if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
{
theDoc = parent.frames[theObj.substring(p+1)].document;
theObj = theObj.substring(0,p);
}
if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
for (i=0; !foundObj && i < theDoc.forms.length; i++)
foundObj = theDoc.forms[i][theObj];
for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++)
foundObj = findObj(theObj,theDoc.layers[i].document);
if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
return foundObj;
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" onLoad="window_onload()" style="overflow:auto">
<%
if (!privilege.isUserLogin(request))
{
out.println(SkinUtil.makeErrMsg(request, SkinUtil.LoadString(request, "pvg_invalid")));
return;
}
%>
<%
String orderBy = ParamUtil.get(request, "orderBy");
if (orderBy.equals(""))
orderBy = "name";
String sort = ParamUtil.get(request, "sort");
if (sort.equals(""))
sort = "asc";
%>
<TABLE width="100%" BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
<TR valign="top" bgcolor="#FFFFFF">
<TD width="" height="430" colspan="2" style="background-attachment: fixed; background-image: url(images/bg_bottom.jpg); background-repeat: no-repeat">
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD class=head>
<%
Leaf dlf = new Leaf();
if (doc!=null) {
dlf = dlf.getLeaf(doc.getDirCode());
}
if (doc!=null && dlf.getType()==2) {%>
<a href="cms/document_list_m.jsp?dir_code=<%=StrUtil.UrlEncode(dir_code)%>&dir_name=<%=StrUtil.UrlEncode(dir_name)%>"><%=dlf.getName()%></a>
<%}else{%>
<%=dir_name%>
<%}%>
<%
UserDb ud = new UserDb();
ud = ud.getUserDb(userName);
String strDiskAllow = NumberUtil.round((double)ud.getDiskSpaceAllowed()/1024000, 3);
String strDiskHas = NumberUtil.round((double)(ud.getDiskSpaceAllowed()-ud.getDiskSpaceUsed())/1024000, 3);
%>
磁盘份额:<%=strDiskAllow%>M 剩余空间:<%=strDiskHas%>M <a href="dir_priv_m.jsp?dirCode=<%=dir_code%>">共享管理</a></TD>
</TR>
</TBODY>
</TABLE>
<table border="0" cellspacing="0" width="100%" cellpadding="0" align="center">
<form name="addform" action="fwebedit_do.jsp" method="post">
<tr align="center">
<td width="90%" align="left" valign="top" bgcolor="#F2F2F2" class="unnamed2"> </td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="D6D3CE">
<tr>
<td width="40%" align="center"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#aaaaaa" borderColorDark="#ffffff" bgcolor="D6D3CE">
<tr>
<td style="cursor:hand" onClick="doSort('name')"> 名称
<%if (orderBy.equals("name")) {
if (sort.equals("asc"))
out.print("<img src='images/arrow_up.gif' width=8px height=7px>");
else
out.print("<img src='images/arrow_down.gif' width=8px height=7px>");
}%>
</td>
</tr>
</table></td>
<td width="13%" bgcolor="#EAE9E6"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#aaaaaa" borderColorDark="#ffffff" bgcolor="D6D3CE">
<tr>
<td style="cursor:hand" onClick="doSort('file_size')"> 大小 <span style="cursor:hand">
<%if (orderBy.equals("file_size")) {
if (sort.equals("asc"))
out.print("<img src='images/arrow_up.gif' width=8px height=7px>");
else
out.print("<img src='images/arrow_down.gif' width=8px height=7px>");
}%>
</span></td>
</tr>
</table></td>
<td width="20%" bgcolor="#EAE9E6"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#aaaaaa" borderColorDark="#ffffff" bgcolor="D6D3CE">
<tr>
<td style="cursor:hand" onClick="doSort('uploadDate')"> 上传时间 <span style="cursor:hand">
<%if (orderBy.equals("uploadDate")) {
if (sort.equals("asc"))
out.print("<img src='images/arrow_up.gif' width=8px height=7px>");
else
out.print("<img src='images/arrow_down.gif' width=8px height=7px>");
}%>
</span></td>
</tr>
</table></td>
<td width="27%" bgcolor="#EAE9E6"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#aaaaaa" borderColorDark="#ffffff" bgcolor="D6D3CE">
<tr>
<td> 操作</td>
</tr>
</table></td>
</tr>
</table>
<%if (!leaf.getParentCode().equals(Leaf.PARENT_CODE_NONE)) {%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="3%" align="center"><img src="images/parent.gif" width="20" height="20" align="absmiddle"></td>
<td width="37%"><a href="dir_list.jsp?op=editarticle&dir_code=<%=leaf.getParentCode()%>" onMouseUp="curAttachId=''">上级目录</a></td>
<td width="13%"> </td>
<td width="22%"> </td>
<td width="25%"> </td>
</tr>
</table>
<%}%>
<%
Iterator irch = leaf.getChildren().iterator();
while (irch.hasNext()) {
Leaf plf = (Leaf)irch.next();
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="3%" align="center"><img src="images/folder.gif" width="20" height="20" align="absmiddle"></td>
<td width="37%"><a href="dir_list.jsp?op=editarticle&dir_code=<%=plf.getCode()%>" onMouseUp="curAttachId=''"><%=plf.getName()%></a></td>
<td width="13%"> </td>
<td width="22%"> </td>
<td width="25%"> </td>
</tr>
</table>
<%}%>
<%
String strcurpage = StrUtil.getNullString(request.getParameter("CPages"));
if (strcurpage.equals(""))
strcurpage = "1";
if (!StrUtil.isNumeric(strcurpage)) {
out.print(StrUtil.makeErrMsg("标识非法!"));
return;
}
Attachment am = new Attachment();
long fileLength = -1;
int pagesize = 30;
int curpage = Integer.parseInt(strcurpage);
String sql = "SELECT id FROM netdisk_document_attach WHERE doc_id=" + doc.getID() + " and page_num=1 order by ";
sql += orderBy + " " + sort;
ListResult lr = am.listResult(sql, curpage, pagesize);
int total = lr.getTotal();
Paginator paginator = new Paginator(request, total, pagesize);
// 设置当前页数和总页数
int totalpages = paginator.getTotalPages();
if (totalpages==0)
{
curpage = 1;
totalpages = 1;
}
if (doc!=null) {
// Vector attachments = doc.getAttachments(1);
Vector attachments = lr.getResult();
Iterator ir = attachments.iterator();
while (ir.hasNext()) {
am = (Attachment) ir.next();
fileLength = (long)am.getSize()/1024;
if(fileLength == 0 && (long)am.getSize() > 0)
fileLength = 1;
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" onMouseOver="this.style.backgroundColor='#FFD6DE'" onMouseOut="this.style.backgroundColor='#ffffff'">
<tr>
<td width="4%" align="center"><a title="打开文件" target=_blank href="netdisk_getfile.jsp?id=<%=doc.getID()%>&attachId=<%=am.getId()%>"><img src="images/<%=am.getIcon()%>" border="0"></a></td>
<td width="37%">
<span id="span<%=am.getId()%>" name="span<%=am.getId()%>"><a target=_blank title="打开文件" class="mainA" href="netdisk_getfile.jsp?id=<%=doc.getID()%>&attachId=<%=am.getId()%>" onmouseup='onMouseUp("<%=am.getId()%>", "<%=am.getName()%>")'><%=am.getName()%></a></span></td>
<td width="13%"><%=fileLength%>KB</td>
<td width="19%"><%=DateUtil.format(am.getUploadDate(), "yyyy-MM-dd HH:mm")%></td>
<td width="27%"> <a href="dir_change.jsp?attachId=<%=am.getId()%>"><img src="images/rename.gif" alt="重命名或移动文件" width="16" height="16" border="0" align="absmiddle"></a> <a href="javascript:delAttach('<%=am.getId()%>', '<%=doc.getID()%>')"><img src="images/del.gif" alt="删除" width="16" height="16" border="0" align="absmiddle"></a> <a target="_blank" href="netdisk_downloadfile.jsp?id=<%=am.getDocId()%>&attachId=<%=am.getId()%>"><img src="images/download.gif" alt="下载" width="16" height="16" border="0" align="absmiddle"></a>
<%if (!StrUtil.getNullStr(am.getPublicShareDir()).equals("")) {%>
<a href="netdisk_public_share.jsp?attachId=<%=am.getId()%>"><img src="images/share_public_yes.gif" alt="已发布" width="16" height="16" border="0" align="absmiddle"></a>
<%}else{%>
<a href="netdisk_public_share.jsp?attachId=<%=am.getId()%>"><img src="images/share_public.gif" alt="发布" width="16" height="16" border="0" align="absmiddle"></a>
<%}%>
<%if (am.getExt().equals("doc") || am.getExt().equals("xls")) {%>
<a href="javascript:editdoc('<%=id%>', '<%=am.getId()%>')" title="编辑Office文件"><img src="images/btn_edit_office.gif" width="16" height="16" border="0" align="absmiddle"></a>
<%}%></td>
</tr>
</table>
<%}
}
%></td>
</tr>
<tr>
<td align=center bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0" name-"ctlTable" id="ctlTable" style="display:none">
<tr>
<td><table border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#FFFFFF"><%
Calendar cal = Calendar.getInstance();
String year = "" + (cal.get(cal.YEAR));
String month = "" + (cal.get(cal.MONTH) + 1);
com.redmoon.oa.Config cfg = new com.redmoon.oa.Config();
String filepath = cfg.get("file_netdisk") + "/" + userName + "/" + year + "/" + month;
%>
<div style="width:400;height:0"><object classid="CLSID:DE757F80-F499-48D5-BF39-90BC8BA54D8C" codebase="<%=request.getContextPath()%>/activex/webedit.cab#version=4,0,1,1" width=400 height=0 align="middle" id="webedit">
<param name="Encode" value="utf-8">
<param name="MaxSize" value="<%=Global.MaxSize%>">
<!--上传字节-->
<param name="ForeColor" value="(0,0,0)">
<param name="BgColor" value="(245,248,247)">
<param name="ForeColorBar" value="(255,255,255)">
<param name="BgColorBar" value="(0,0,255)">
<param name="ForeColorBarPre" value="(0,0,0)">
<param name="BgColorBarPre" value="(200,200,200)">
<param name="FilePath" value="<%=filepath%>">
<param name="Relative" value="1">
<!--上传后的文件需放在服务器上的路径-->
<param name="Server" value="<%=request.getServerName()%>">
<param name="Port" value="<%=request.getServerPort()%>">
<param name="VirtualPath" value="<%=Global.virtualPath%>">
<param name="PostScript" value="<%=Global.virtualPath%>/netdisk/dir_list_do.jsp">
<param name="PostScriptDdxc" value="<%=Global.virtualPath%>/ddxc.jsp">
<param name="SegmentLen" value="204800">
</object></div></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" height="40">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -