📄 index.php
字号:
<?php
include_once( "inc/auth.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";
echo "<s";
echo "cript>\r\nfunction delete_disk(DISK_ID)\r\n{\r\n msg='确认要取消该共享目录么?这不会删除该路径下的文件。';\r\n if(window.confirm(msg))\r\n {\r\n URL=\"delete.php?DISK_ID=\"+DISK_ID;\r\n window.location=URL;\r\n }\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n <tr class=\"tablehead1\">\r\n <td ><img src=\"/images/manage/work_plan_new.g";
echo "if\" align=\"absmiddle\"> 新建共享空间</td>\r\n </tr>\r\n <tr class=\"tablehead2\">\r\n <td> <a href=\"new\"><img src=\"../../../images/button/newsharefolder.gif\" width=\"105\" height=\"20\" border=\"0\"></a></td>\r\n </tr>\r\n</table>\r\n<div align=\"center\"></div>\r\n\r\n<hr width=\"95%\" height=\"1\" align=\"left\" color=\"#ffffff\">\r\n";
$connection = openconnection( );
$querys = "SELECT * from NETDISK";
$cursors = exequery( $connection, $querys );
while ( $rows = mysql_fetch_array( $cursors ) )
{
$disk_path = $rows['DISK_PATH'];
if ( is_dir( $disk_path ) )
{
}
else
{
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr>\r\n <td nowrap style=\"color:#FF0000\">红色字体的空间地址不存在或者不正确!</td>\r\n </tr>\r\n</table>\r\n";
break;
}
}
$connection = openconnection( );
$query = "SELECT * from NETDISK";
$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_NAME = str_replace( "<", "<", $DISK_NAME );
$DISK_NAME = str_replace( ">", ">", $DISK_NAME );
$DISK_NAME = stripslashes( $DISK_NAME );
if ( $DEPT_ID != "0" && $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 "\r\n <table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\" cellpadding=\"5\">\r\n <tr class=\"TableHeader\">\r\n <td nowrap>空间名</td>\r\n <td nowrap>空间地址</td>\r\n <td nowrap>共享权限</td>\r\n <td nowrap>操作</td>\r\n </tr>\r\n";
}
if ( $DISK_COUNT % 2 == 1 )
{
$TableLine = "TableLine1";
}
else
{
$TableLine = "TableLine2";
}
echo " <tr class=\"";
echo $TableLine;
echo "\">\r\n <td nowrap>";
echo $DISK_NAME;
echo "</td>\r\n <td nowrap>";
if ( is_dir( $DISK_PATH ) )
{
echo $DISK_PATH;
}
else
{
echo "<span style=\"color:#FF0000;\">".$DISK_PATH."</span>";
}
echo "</td>\r\n <td nowrap>";
echo $DISK_TYPE_DESC;
echo "</td>\r\n <td nowrap>\r\n";
if ( $DISK_TYPE == "3" )
{
echo " <a href=\"set_user.php?DISK_ID=";
echo $DISK_ID;
echo "\"> 指定可访问人员</a> <br>\r\n";
}
echo " <a href=\"edit.php?DISK_ID=";
echo $DISK_ID;
echo "\"> 编辑</a> \r\n <a href=\"javascript:delete_disk(";
echo $DISK_ID;
echo ");\"> 删除</a> \r\n <a href=\"set_manage.php?DISK_ID=";
echo $DISK_ID;
echo "\"> 指定管理权限</a> \r\n\r\n <a href=\"set_new.php?DISK_ID=";
echo $DISK_ID;
echo "\"> 指定上传权限</a> </td>\r\n </tr>\r\n";
}
if ( $DISK_COUNT == 0 )
{
message( "", "尚无目录" );
exit( );
}
else
{
echo "</table>\r\n";
}
echo "</body>\r\n</html>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -