Просмотр файла modules/share/index.php

Размер файла: 1.17Kb
<?php
/**********************************
*	@package: PerfCMS			  *
*	@year: 2012					  *
*	@author: Artas				  *
*	@link: http://perfcms.pp.ua	  *
**********************************/
$locate	= 'in_share';
$title = $lang->word('share');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('share'));
$share_r = $db->query("SELECT * FROM `share`")->rowCount();
if($share_r == 0) {
	echo $tpl->div('menu', $lang->word('no_folders'));
} 
else {
	$share_q = $db->query("SELECT * FROM `share` ORDER BY name");
	while($share = $share_q->fetch()) {
		$tpl->div('menu', img('folder.png') . ' <a href="/share/'. $share['id'] .'/">'. $share['name'] .'</a> ('. $db->query("SELECT * FROM `share_c` WHERE `rid` = '". $share['id'] ."'")->rowCount() .') ' . ($user['level'] >= 6 ? ' [<a href="/share/delete_dir/'.$share['id'].'/">'.img('delete.png').'</a> | <a href="/share/edit_dir/'.$share['id'].'/">'.img('edit.png').'</a>]' : NULL) .'<br/>');
	}
}
$tpl->div('block', ($user['level'] >=6 ? NAV.' <a href="/share/add_dir/">'. $lang->word('create_dir') .'</a><br/>' : NULL) . HICO .' <a href="/">'. $lang->word('home') .'</a>');
require_once(SYS.'/view/footer.php');
?>