Exemple #1
0
/**
 *
 * 폴더의 총 파일크기를 알아옴
 *
 * @param string 폴더 경로
 * @return array 파일크기와 개수를 담은 배열 array(파일크기, 파일사이즈)
 */
function wiki_dir_filesize($path){

	if(!file_exists($path)) return array(0, 0);
	if(is_file($path)) {
		return array(filesize($path), 1);
	}

	$file_count = 0;
	$file_size = 0;
	foreach(glob($path."/*") as $fn) {
		list($fsize, $fcount) = wiki_dir_filesize($fn);
		$file_size += $fsize;
		$file_count += $fcount;
	}

	return array($file_size, $file_count);
}
Exemple #2
0
 *
 * 위키 관리 : 썸네일 페이지 스크립트
 *
 * @package	narinwiki
 * @subpackage admin
 * @license GPL2 (http://narinwiki.org/license)
 * @author	byfun (http://byfun.com)
 * @filesource
 */

$pageid = "cache";

include_once("_common.php");
include_once "admin.head.php";

list($file_size, $file_count) = wiki_dir_filesize(WIKI_PATH.'/data/'.$bo_table.'/thumb');
?>
<style type="text/css">
#admbasic th {
	text-align: right;
	width: 150px;
	padding-right: 10px;
}

#admbasic td {
	padding-left: 5px;
}

#progress { position:absolute;margin-top:5px;margin-left:10px; color:#0000AA}
</style>