📄 index.php
字号:
<?
include_once 'inc/auth.php';
echo '
<html>
<head>
<title>网络硬盘设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function delete_disk(DISK_ID)
{
msg=\'确认要取消该共享目录么?这不会删除该路径下的文件。\';
if(window.confirm(msg))
{
URL="delete.php?DISK_ID="+DISK_ID;
window.location=URL;
}
}
function menu_code(TYPE,ID)
{
window.open("/module/menu_code?TYPE="+TYPE+"&ID="+ID,"MENU_CODE","height=270,width=500,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=10,left=10,resizable=yes");
}
</script>
</head>
<body class="bodycolor" topmargin="5">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/notify_new.gif" align="absmiddle"><span class="big3"> 新建共享目录</span><br>
</td>
</tr>
</table>
<div align="center">
<input type="button" value="新建共享目录" class="BigButton" onClick="location=\'new\';" title="新建共享目录">
</div>
<br>
<table width="95%" border="0" cellspacing="0" cellpadding="0" height="3">
<tr>
<td background="/images/dian1.gif" width="100%"></td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/notify_open.gif" align="absmiddle"><span class="big3"> 管理共享目录</span>
</td>
</tr>
</table>
<br>
';
$query = 'SELECT * from NETDISK order by DISK_NO,DISK_TYPE desc';
$cursor = exequery ($connection, $query);
$DISK_COUNT = 0;
while ($ROW = mysql_fetch_array ($cursor))
{
++$DISK_COUNT;
$DISK_ID = $ROW['DISK_ID'];
$DISK_NAME = $ROW['DISK_NAME'];
$DISK_TYPE = $ROW['DISK_TYPE'];
$DISK_PATH = $ROW['DISK_PATH'];
$DEPT_ID = $ROW['DEPT_ID'];
$DISK_NO = $ROW['DISK_NO'];
$DISK_NAME = htmlspecialchars ($DISK_NAME);
if ($DEPT_ID != '0')
{
if ($DEPT_ID != '')
{
$query1 = 'SELECT * from DEPARTMENT where DEPT_ID=' . $DEPT_ID;
$cursor1 = exequery ($connection, $query1);
if ($ROW = mysql_fetch_array ($cursor1))
{
$DEPT_NAME = $ROW['DEPT_NAME'];
}
}
}
switch ($DISK_TYPE)
{
case '1':
{
$DISK_TYPE_DESC = '全体';
break;
}
case '2':
{
$DISK_TYPE_DESC = $DEPT_NAME;
break;
}
case '3':
{
$DISK_TYPE_DESC = '指定人员';
}
}
if ($DISK_COUNT == 1)
{
echo '
<table border="0" cellspacing="1" width="90%" class="small" bgcolor="#000000" cellpadding="3" align="center">
<tr class="TableHeader">
<td nowrap align="center">序号</td>
<td nowrap align="center">目录名称</td>
<td nowrap align="center">目录路径</td>
<td nowrap align="center">目录开放范围</td>
<td nowrap align="center">操作</td>
</tr>
';
}
if ($DISK_COUNT % 2 == 1)
{
$TableLine = 'TableLine1';
}
else
{
$TableLine = 'TableLine2';
}
echo ' <tr class="';
echo $TableLine;
echo '">
<td nowrap align="center">';
echo $DISK_NO;
echo '</td>
<td nowrap align="center">';
echo $DISK_NAME;
echo '</td>
<td nowrap>';
echo $DISK_PATH;
echo '</td>
<td nowrap align="center">';
echo $DISK_TYPE_DESC;
echo '</td>
<td nowrap align="center">
';
if ($DISK_TYPE == '3')
{
echo ' <a href="set_user.php?DISK_ID=';
echo $DISK_ID;
echo '"> 指定可访问人员</a> <br>
';
}
echo ' <a href="edit.php?DISK_ID=';
echo $DISK_ID;
echo '"> 编辑</a>
<a href="javascript:delete_disk(';
echo $DISK_ID;
echo ');"> 删除</a>
<a href="set_manage.php?DISK_ID=';
echo $DISK_ID;
echo '"> 指定管理权限</a>
<a href="set_new.php?DISK_ID=';
echo $DISK_ID;
echo '"> 指定上传权限</a>
<a href="javascript:menu_code(\'NETDISK\',\'';
echo $DISK_ID;
echo '\')">菜单定义指南</a>
</td>
</tr>
';
}
if ($DISK_COUNT == 0)
{
message ('', '尚无目录');
exit ();
}
echo ' </table>
';
echo '
</body>
</html>
';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -