Файл: modules/domens/index.php
Строк: 32
<?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="/domens/'. $share['id'] .'/">'. $share['name'] .'</a> ['. $catalagos_c .'/'.$files_c.'] ' . ($user['level'] >= 6 ? ' <span style="float:right">( <a href="/domens/delete_dir/'.$share['id'].'/">'.img('delete_11.png').'</a> | <a href="/domens/edit_dir/'.$share['id'].'/">'.img('edit_11.png').'</a> )</span>' : NULL) .'<br/>
<span style="font-size: xx-small;">'. $share['desc'] .'</span>');
}
}
$tpl->div('block', NAV .' <a href="/domens/search">'. $lang->word('search') .'</a><br/> ' . ($user['level'] >=6 ? NAV.' <a href="/domens/add_dir/">'. $lang->word('create_dir') .'</a><br/>' : NULL) . HICO .' <a href="/">'. $lang->word('home') .'</a>');
require_once(SYS.'/view/footer.php');
?>