📄 复件 (2) dir_list.jsp
字号:
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page import="cn.js.fan.security.*"%>
<%@ page import="cn.js.fan.util.*"%>
<%@ page import="cn.js.fan.db.*"%>
<%@ page import="java.util.*"%>
<%@ page import="cn.js.fan.web.*"%>
<%@ page import="com.redmoon.oa.pvg.*"%>
<%@ page import="com.redmoon.oa.person.UserDb"%>
<%@ page import="java.util.Calendar" %>
<%@ page import="cn.js.fan.db.Paginator"%>
<%@ page import="com.redmoon.oa.netdisk.*"%>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="common.css" rel="stylesheet" type="text/css">
<%@ include file="../inc/nocache.jsp"%>
<style>
.skin0 {
padding-top:2px;
cursor:default;
font:menutext;
position:absolute;
text-align:left;
font-family: "宋体";
font-size: 9pt;
width:80px; /*宽度,可以根据实际的菜单项目名称的长度进行适当地调整*/
background-color:menu; /*菜单的背景颜色方案,这里选择了系统默认的菜单颜色*/
border:1 solid buttonface;
visibility:hidden; /*初始时,设置为不可见*/
border:2 outset buttonhighlight;
}
/*定义菜单条的显示样式*/
.menuitems {
padding:2px 1px 2px 10px;
}
</style>
<jsp:useBean id="strutil" scope="page" class="cn.js.fan.util.StrUtil"/>
<jsp:useBean id="docmanager" scope="page" class="com.redmoon.oa.netdisk.DocumentMgr"/>
<jsp:useBean id="dir" scope="page" class="com.redmoon.oa.netdisk.Directory"/>
<%
String dir_code = ParamUtil.get(request, "dir_code");
String dir_name = "";
int id = 0;
Privilege privilege = new Privilege();
String userName = privilege.getUser(request);
String correct_result = "操作成功!";
Document doc = new Document();
Document template = null;
System.out.print("dir_list.jsp dir_code=" + dir_code + " id=" + id);
Leaf leaf = dir.getLeaf(dir_code);
dir_name = leaf.getName();
LeafPriv lp = new LeafPriv(dir_code);
if (!lp.canUserSee(privilege.getUser(request))) {
out.print(StrUtil.Alert(SkinUtil.LoadString(request, "pvg_invalid")));
return;
}
String strtemplateId = ParamUtil.get(request, "templateId");
String op = ParamUtil.get(request, "op");
String work = ParamUtil.get(request, "work"); // init modify
if (op.equals("editarticle")) {
op = "edit";
try {
doc = docmanager.getDocumentByCode(request, dir_code, privilege);
dir_code = doc.getDirCode();
} catch (ErrMsgException e) {
out.print(strutil.makeErrMsg(e.getMessage(), "red", "green"));
return;
}
}
String action = ParamUtil.get(request, "action");
if (action.equals("changeName")) {
boolean re = false;
try {
re = docmanager.updateAttachmentName(request);
}
catch (ErrMsgException e) {
out.print(StrUtil.Alert(e.getMessage()));
}
}
if (doc!=null) {
id = doc.getID();
Leaf lfn = new Leaf();
lfn = lfn.getLeaf(doc.getDirCode());
dir_name = lfn.getName();
}
%>
<title><%=doc!=null?doc.getTitle():""%></title>
<script language=JavaScript src='formpost.js'></script>
<script language="JavaScript">
<!--
<%
if (doc!=null) {
out.println("var id=" + doc.getID() + ";");
}
%>
var id = "<%=id%>"; // 用于右键菜单
var curAttachId = "";
var curAttachName = "";
var op = "<%=op%>";
var work = "<%=work%>";
function SubmitWithFileDdxc() {
addform.webedit.isDdxc = 1;
if (document.addform.title.value.length == 0) {
alert("请输入文章标题.");
document.addform.title.focus();
return false;
}
loadDataToWebeditCtrl(addform, addform.webedit);
addform.webedit.MTUpload();
// 因为Upload()中启用了线程的,所以函数在执行后,会立即反回,使得下句中得不到ReturnMessage的值
// 原因是此时服务器的返回信息还没收到
// alert("ReturnMessage=" + addform.webedit.ReturnMessage);
}
function SubmitWithFileThread() {
if (document.addform.title.value.length == 0) {
alert("请输入文章标题.");
document.addform.title.focus();
return false;
}
loadDataToWebeditCtrl(addform, addform.webedit);
addform.webedit.Upload();
// 因为Upload()中启用了线程的,所以函数在执行后,会立即反回,使得下句中得不到ReturnMessage的值
// 原因是此时服务器的返回信息还没收到
// alert("ReturnMessage=" + addform.webedit.ReturnMessage);
}
function SubmitWithoutFile() {
if (document.addform.title.value.length == 0) {
alert("请输入文章标题.");
document.addform.title.focus();
return false;
}
addform.isuploadfile.value = "false";
loadDataToWebeditCtrl(addform, addform.webedit);
addform.webedit.UploadMode = 0;
addform.webedit.UploadArticle();
addform.isuploadfile.value = "true";
if (addform.webedit.ReturnMessage == "<%=correct_result%>")
doAfter(true);
else
doAfter(false);
}
function ClearAll() {
document.addform.title.value=""
oEdit1.putHTML(" ");
}
function doAfter(isSucceed) {
if (isSucceed) {
if (op=="edit")
{
if (work=="modify")
location.href = "dir_list.jsp?op=editarticle&dir_code=<%=StrUtil.UrlEncode(dir_code)%>";
else
location.href = "dir_list.jsp?op=editarticle&dir_code=<%=StrUtil.UrlEncode(dir_code)%>";
}
else {
location.href = "dir_list.jsp?op=editarticle&dir_code=<%=StrUtil.UrlEncode(dir_code)%>";
}
}
else {
alert(addform.webedit.ReturnMessage);
}
}
function showvote(isshow)
{
if (addform.isvote.checked)
{
addform.vote.style.display = "";
}
else
{
addform.vote.style.display = "none";
}
}
function window_onload() {
}
function displayCtlTable(btnObj) {
if (ctlTable.style.display=="none") {
ctlTable.style.display = "";
addform.webedit.height = "173px";
btnObj.value = "隐 藏";
}
else {
ctlTable.style.display = "none";
addform.webedit.height = "0px";
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">
<%
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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -