function get_power_arr() { $arr = array(); $obj = new menu(); $obj->set_where(''); $obj->set_where("left(men_type,6) = 'admin_'"); $list = $obj->get_list(); for ($i = 0; $i < count($list); $i++) { $arr[$i]['name'] = $list[$i]['men_name']; $arr[$i]['url'] = '/' . $list[$i]['men_url']; $arr[$i]['set'] = 0; } return $arr; }
function module_footer() { global $smarty; $obj = new menu(); $obj->set_where("men_type = 'footer'"); $smarty->assign('footer_nav', $obj->get_list()); $obj = new varia(); $site['domain'] = $obj->get_value('site_domain'); $site['record'] = $obj->get_value('site_record'); $site['record_url'] = $obj->get_value('site_record_url'); $site['tech'] = $obj->get_value('site_tech'); $site['tech_url'] = $obj->get_value('site_tech_url'); $site['statistical_code'] = im_filter($obj->get_value('statistical_code', true)); $smarty->assign('site', $site); }
function module_left() { global $global, $smarty; if ($global['channel'] == 'about' || $global['channel'] == 'recruit' || $global['channel'] == 'download') { $type = 'article'; } else { $type = $global['channel']; } $obj = new menu(); $obj->set_field('men_name,men_url'); $obj->set_where(''); $obj->set_where("men_lang = 'none'"); $obj->set_where("men_type = 'admin_" . $type . "'"); $obj->set_where("men_show = 1"); $smarty->assign('nav_left', $obj->get_list()); }
function module_nav_list() { global $smarty; $obj = new varia(); $obj->set_where("left(var_name,10) = 'nav_stage_'"); $arr = $obj->get_list(); for ($i = 0; $i < count($arr); $i++) { $name = substr($arr[$i]['var_name'], 10); $obj = new menu(); $obj->set_where("men_type = '{$name}'"); $list[$name] = $obj->get_list(); $nav[$i]['type'] = $name; $nav[$i]['name'] = $arr[$i]['var_value']; } $smarty->assign('nav', $nav); $smarty->assign('list', $list); }
function module_header() { global $smarty; $obj = new varia(); $obj->set_where("var_name = 'languages'"); $list = $obj->get_list(); for ($i = 0; $i < count($list); $i++) { $arr = explode('{v}', $list[$i]['var_value']); $list[$i]['pack_name'] = $arr[0]; $list[$i]['index_entrance'] = $arr[1]; $list[$i]['admin_entrance'] = $arr[2]; $list[$i]['chinese_name'] = $arr[3]; $list[$i]['foreign_name'] = $arr[4]; } $smarty->assign('lang_pack', $list); $obj = new menu(); $obj->set_where("men_type = 'header'"); $obj->set_field('men_name,men_url'); $smarty->assign('nav', $obj->get_list()); }