كود
/**
* Get sections list from cache and show it.
*/
/**
* Get sections list from cache and show it.
*/
function _GetSections()
{
global $PowerBB;
$SecArr = array();
$SecArr['get_from'] = 'db';
$SecArr['proc'] = array();
$SecArr['proc']['*'] = array('method'=>'clean','param'=>'html');
$SecArr['order'] = array();
$SecArr['order']['field'] = 'sort';
$SecArr['order']['type'] = 'ASC';
$SecArr['where'] = array();
$SecArr['where'][0]['name'] = 'parent';
$SecArr['where'][0]['oper'] = '=';
$SecArr['where'][0]['value'] & nbsp; = '0';
// Get main sections
$cats = $PowerBB->section->GetSectionsList($SecArr);
// We will use forums_list to store list of forums which will view in main page
$PowerBB->_CONF['template']['foreach']['forums_list'] = array();
// Loop to read the information of main sections
foreach ($cats as $cat)
{
// Get the groups information to know view this section or not
$groups = unserialize(base64_decode($cat['sectiongroup_cache']));
if (is_array($groups[$PowerBB->_CONF['group_info']['id']]))
{
if ($groups[$PowerBB->_CONF['group_info']['id']]['view_section'])
{
$PowerBB->_CONF['template']['foreach']['forums_list'][$cat['id'] . '_m'] = $cat;
}
}


عرض نسخة صالحة للطباعة
أرسل هذا الموضوع إلى صديق




