⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.inc.php

📁 创建虚拟磁盘。用户可以创建磁盘
💻 PHP
字号:
<?php 
##
#	Project: PHPDisk
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: main.inc.php 232 2009-03-08 04:54:57Z along $
#
#	Copyright (C) 2008-2009 PHPDisk Team. All Rights Reserved.
#
##

if(!defined('IN_PHPDISK') || !defined('IN_MYDISK')) {
	exit('[PHPDisk] Access Denied');
}
phpdisk_user();
define('SCRIPT_NAME',$item);

require_once lang(SCRIPT_NAME);

$lang = array_merge($pub_lang,$lang);

switch($action){
	case 'index':
		$rs = $db->fetch_one_array("select count(*) as disk_total from pd_disks where userid='$pd_uid'");
		$stats['total_disks'] = (int)$rs['disk_total'];
		
		$rs = $db->fetch_one_array("select count(*) as folder_total from pd_folders where userid='$pd_uid'");
		$stats['total_folders'] = (int)$rs['folder_total'];
		
		$rs = $db->fetch_one_array("select count(*) as total_share_folders from pd_folders where userid='$pd_uid' and in_share=1");
		$stats['total_share_folders'] = (int)$rs['total_share_folders'];
		
		$rs = $db->fetch_one_array("select count(*) as total_share_disks from pd_disks where userid='$pd_uid' and in_share=1");
		$stats['total_share_disks'] = (int)$rs['total_share_disks'];
		
		$rs = $db->fetch_one_array("select count(*) as file_total from pd_files where userid='$pd_uid'");
		$stats['total_files'] = (int)$rs['file_total'];
		
		$q = $db->query("select file_size from pd_files where userid='$pd_uid'");
		while($rs = $db->fetch_array($q)){
			$stats['file_size_total'] += $rs['file_size'];
		}
		$db->free($q);
		$stats['file_size_total'] = get_size($stats['file_size_total']);
		
		$rs = $db->fetch_one_array("select reg_time,reg_ip,email from pd_users where userid='$pd_uid'");
		$stats['reg_time'] = date("Y-m-d H:i:s",$rs['reg_time']);
		$stats['reg_ip'] = $rs['reg_ip'];
		$stats['email'] = $rs['email'];
		
		unset($rs);
		
		require_once template(SCRIPT_NAME,TPL_NAME);
		
	break;
}
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -