Размер файла: 1.45Kb
<?php
/**********************************
* @package: PerfCMS *
* @year: 2012 *
* @author: Artas *
* @link: http://perfcms.ru *
**********************************/
$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()) {
$catalagos_c = $db->query("SELECT * FROM `share_c` WHERE `rid` = '". $share['id'] ."'")->rowCount();
$files_c = $db->query("SELECT * FROM `share_files` WHERE `cat_id` = '". $catalagos_c ."'")->rowCount();
$tpl->div('menu', img('folder.png') . ' <a href="/share/'. $share['id'] .'/">'. $share['name'] .'</a> ('. $catalagos_c .'/'.$files_c.') ' . ($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/>
<span style="font-size: xx-small;">'. $share['desc'] .'</span>');
}
}
$tpl->div('block', NAV .' <a href="/share/search">'. $lang->word('search') .'</a><br/> ' . ($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');
?>