本文整理汇总了PHP中XoopsTree::setGroupAccessFilter方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsTree::setGroupAccessFilter方法的具体用法?PHP XoopsTree::setGroupAccessFilter怎么用?PHP XoopsTree::setGroupAccessFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsTree
的用法示例。
在下文中一共展示了XoopsTree::setGroupAccessFilter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Template
require_once $_CONF['path_html'] . 'filemgmt/include/xoopstree.php';
require_once $_CONF['path_html'] . 'filemgmt/include/textsanitizer.php';
// Setup how many categories you want to show in the category row display
$numCategoriesPerRow = 2;
$numSubCategories2Show = 5;
if (SEC_hasRights('filemgmt.user') or $mydownloads_publicpriv == 1) {
$p = new Template($_CONF['path'] . 'plugins/filemgmt/templates');
$p->set_file(array('page' => 'filelisting.thtml', 'records' => 'filelisting_record.thtml', 'category' => 'filelisting_category.thtml'));
$p->set_var('layout_url', $_CONF['layout_url']);
$p->set_var('site_url', $_CONF['site_url']);
$p->set_var('site_admin_url', $_CONF['site_admin_url']);
$p->set_var('xhtml', XHTML);
$p->set_var('target', $CONF_FM['ignore_target'] ? '' : 'target="_blank"');
$myts = new MyTextSanitizer();
$mytree = new XoopsTree($_DB_name, $_FM_TABLES['filemgmt_cat'], "cid", "pid");
$mytree->setGroupAccessFilter($_GROUPS);
$display = '';
//@@@@@20090602update urlrewrite ---->
//$lid = COM_applyFilter($_GET['id'],true);
COM_setArgNames(array('id'));
$lid = COM_applyFilter(COM_getArgument('id'), true);
//@@@@@20090602update urlrewrite<-----
if ($lid == 0) {
// Check if the script is being called from the commentbar
$lid = str_replace('fileid_', '', $_POST['id']);
}
$groupsql = filemgmt_buildAccessSql();
$sql = "SELECT COUNT(*) FROM {$_FM_TABLES['filemgmt_filedetail']} a ";
$sql .= "LEFT JOIN {$_FM_TABLES['filemgmt_cat']} b ON a.cid=b.cid ";
$sql .= "WHERE a.lid='{$lid}' {$groupsql} AND a.status > 0";
list($fileAccessCnt) = DB_fetchArray(DB_query($sql));