📄 edit.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
echo "\r\n<html>\r\n<head>\r\n<title>编辑共享目录</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n\r\n<script Language=\"JavaScript\">\r\nfunction CheckForm()\r\n{\r\n if(document.form1.DISK_NAME.value==\"\")\r\n { alert(\"共享目录名称不能为空!\");\r\n return (false);\r\n }\r\n\r\n if(document.form1.DISK_PATH.value==\"\")\r\n { alert(\"共享目录路径不能为空!\");\r\n return (false);\r\n }\r\n\r\n if(document.form1.DISK_TYPE.value==\"2\" && document.form1.TO_ID.value==\"\")\r\n { alert(\"请指定部门!\");\r\n return (false);\r\n }\r\n\r\n return (true);\r\n}\r\n\r\nfunction clear_dept()\r\n{\r\n document.form1.TO_NAME.value=\"\";\r\n document.form1.TO_ID.value=\"\";\r\n}\r\n\r\nfunction LoadWindow()\r\n{\r\n URL=\"/module/dept_select\";\r\n loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;\r\n loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;\r\n window.showModalDialog(URL,self,\"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:400px;dialogHeight:330px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\" onload=\"document.form1.DISK_NAME.focus();\">\r\n\r\n";
$query = "SELECT * from NETDISK where DISK_ID=".$DISK_ID;
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$DISK_ID = $ROW['DISK_ID'];
$DISK_NAME = $ROW['DISK_NAME'];
$DISK_PATH = $ROW['DISK_PATH'];
$DISK_TYPE = $ROW['DISK_TYPE'];
$DEPT_ID = $ROW['DEPT_ID'];
$DISK_NO = $ROW['DISK_NO'];
$SPACE_LIMIT = $ROW['SPACE_LIMIT'];
$ORDER_BY = $ROW['ORDER_BY'];
$ASC_DESC = $ROW['ASC_DESC'];
$FILE_TYPE = $ROW['FILE_TYPE'];
$query = "select DEPT_ID,DEPT_NAME from DEPARTMENT";
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$DEPT_ID1 = $ROW['DEPT_ID'];
$DEPT_NAME = $ROW['DEPT_NAME'];
if ( find_id( $DEPT_ID, $DEPT_ID1 ) )
{
$TO_NAME .= $DEPT_NAME.",";
}
}
if ( $TO_ID == "ALL_DEPT" )
{
$TO_NAME = "全体部门";
}
}
echo "\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n <td class=\"Big\"><img src=\"/images/edit.gif\" WIDTH=\"22\" HEIGHT=\"20\" align=\"absmiddle\"><span class=\"big3\"> 编辑共享目录</span>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<br>\r\n <table border=\"0\" width=\"580\" cellpadding=\"2\" cellspacing=\"1\" align=\"center\" bgcolor=\"#000000\" class=\"small\">\r\n <form action=\"update.php\" method=\"post\" name=\"form1\" onsubmit=\"return CheckForm();\">\r\n <tr>\r\n <td nowrap class=\"TableData\"> 排序号:</td>\r\n <td class=\"TableData\">\r\n <input type=\"text\" name=\"DISK_NO\" size=\"4\" class=\"BigInput\" value=\"";
echo $DISK_NO;
echo "\">\r\n </td>\r\n </tr> \r\n <tr>\r\n <td nowrap class=\"TableData\"> 共享目录名称:</td>\r\n <td class=\"TableData\">\r\n <input type=\"text\" name=\"DISK_NAME\" size=\"30\" class=\"BigInput\" value=\"";
echo $DISK_NAME;
echo "\">\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\"> 共享目录路径(OA服务器的文件路径):</td>\r\n <td class=\"TableData\">\r\n <input type=\"text\" name=\"DISK_PATH\" size=\"30\" class=\"BigInput\" value=\"";
echo $DISK_PATH;
echo "\">\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\"> 共享目录开放范围:</td>\r\n <td class=\"TableData\">\r\n <select name=\"DISK_TYPE\" class=\"BigSelect\">\r\n <option value=\"1\" ";
if ( $DISK_TYPE == "1" )
{
echo "selected";
}
echo ">全体</option>\r\n <option value=\"2\" ";
if ( $DISK_TYPE == "2" )
{
echo "selected";
}
echo ">指定部门</option>\r\n <option value=\"3\" ";
if ( $DISK_TYPE == "3" )
{
echo "selected";
}
echo ">指定人员</option>\r\n </select>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\">选择部门(对指定部门开放):</td>\r\n <td class=\"TableData\">\r\n <input type=\"hidden\" name=\"TO_ID\" value=\"";
echo $DEPT_ID;
echo "\">\r\n <textarea cols=30 name=TO_NAME rows=3 class=\"BigStatic\" wrap=\"yes\" readonly>";
echo $TO_NAME;
echo "</textarea>\r\n <input type=\"button\" value=\"添 加\" class=\"SmallButton\" onClick=\"LoadWindow()\" title=\"添加部门\" name=\"button\">\r\n <input type=\"button\" value=\"清 空\" class=\"SmallButton\" onClick=\"clear_dept()\" title=\"清空部门\" name=\"button\">\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\"> 最大容量:</td>\r\n <td class=\"TableData\">\r\n <input type=\"text\" name=\"SPACE_LIMIT\" size=\"10\" class=\"BigInput\" value=\"";
echo $SPACE_LIMIT;
echo "\"> MB (0为不限制)\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\"> 上传文件类型:</td>\r\n <td class=\"TableData\">\r\n <input type=\"text\" name=\"FILE_TYPE\" size=\"20\" class=\"BigInput\" value=\"";
echo $FILE_TYPE;
echo "\"> (类型用 '|' 隔开,为空不限制)\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\"> 默认排序:</td>\r\n <td class=\"TableData\">\r\n <select name=\"ORDER_BY\" class=\"BigSelect\">\r\n <option value=\"nom\"";
if ( $ORDER_BY == "nom" )
{
echo " selected";
}
echo ">名称</option>\r\n <option value=\"taille\"";
if ( $ORDER_BY == "taille" )
{
echo " selected";
}
echo ">大小</option>\r\n <option value=\"type\"";
if ( $ORDER_BY == "type" )
{
echo " selected";
}
echo ">类型</option>\r\n <option value=\"mod\"";
if ( $ORDER_BY == "mod" )
{
echo " selected";
}
echo ">最后修改时间</option>\r\n </select>\r\n <select name=\"ASC_DESC\" class=\"BigSelect\">\r\n <option value=\"0\"";
if ( $ASC_DESC == "0" )
{
echo " selected";
}
echo ">升序</option>\r\n <option value=\"1\"";
if ( $ASC_DESC == "1" )
{
echo " selected";
}
echo ">降序</option>\r\n </select>\r\n </td>\r\n </tr>\r\n <tr align=\"center\" class=\"TableControl\">\r\n <td colspan=\"2\" nowrap>\r\n <input type=\"hidden\" value=\"";
echo $DISK_ID;
echo "\" name=\"DISK_ID\">\r\n <input type=\"submit\" value=\"确定\" class=\"BigButton\"> \r\n <input type=\"button\" value=\"返回\" class=\"BigButton\" onClick=\"location='index.php'\">\r\n </td>\r\n </tr>\r\n </table>\r\n</form>\r\n\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -