ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/netphim/include/block/ |
<?php function showCategories($categories, $parent_id = 0, $char = '',$total_manga_report,$total_comment_report,$total_comment_locked) { $cate_child = array(); foreach ($categories as $key => $item) { if ($item['module_category_parentid'] == $parent_id) { $cate_child[] = $item; unset($categories[$key]); } } if ($cate_child) { foreach ($cate_child as $key => $item) { $txt_menu_open=''; $txt_active = ''; if(!empty($item['modules'])) { foreach ($item['modules'] as $key2 => $val2) { if($_SERVER['QUERY_STRING']==htmlspecialchars_decode($val2['module_url'])){ $txt_menu_open='menu-open'; $txt_active='active'; } } } echo '<li class="nav-item '.$txt_menu_open.'"><a href="#" class="nav-link '.$txt_active.'">'.$char.' '.html_entity_decode($item['module_category_icon']).' <p>'.$item['module_category_name'].' <i class="right fas fa-angle-left"></i></p></a>'; if(!empty($item['modules'])) { echo '<ul class="nav nav-treeview">'; foreach ($item['modules'] as $key2 => $val2) { $txt_total_report_manga = $txt_total_comment_report = $txt_total_comment_locked=''; if(strpos($val2['module_url'],'code=report_manga')!==false){ $txt_total_report_manga = '('.$total_manga_report.')'; } if(strpos($val2['module_url'],'code=comment_report')!==false){ $txt_total_comment_report = '('.$total_comment_report.')'; } if(strpos($val2['module_url'],'code=comment_locked')!==false){ $txt_total_comment_locked = '('.$total_comment_locked.')'; } if($_SERVER['QUERY_STRING']==htmlspecialchars_decode($val2['module_url'])){ echo '<li class="nav-item"><a href="?' . $val2['module_url'] . '" class="nav-link active"><i class="fas fa-angle-right nav-icon"></i><p>' . $val2['module_name'] .' '.$txt_total_report_manga.$txt_total_comment_report.$txt_total_comment_locked.'</p></a></li>'; }else { echo '<li class="nav-item"><a href="?' . $val2['module_url'] . '" class="nav-link"><i class="fas fa-angle-right nav-icon"></i><p>' . $val2['module_name'] . ' '.$txt_total_report_manga.$txt_total_comment_report.$txt_total_comment_locked.'</p></a></li>'; } unset($item['modules'][$key2]); } echo '</ul>'; } showCategories($categories, $item['module_category_id'], $char.' ',$total_manga_report,$total_comment_report,$total_comment_locked); echo '</li>'; } } } $query_menu = $DB->query("SELECT * FROM tb_module_category ORDER BY module_category_pos"); while($rows_menu = $DB->fetch_row($query_menu)) { if($v_lang=='en') { $rows_menu['module_category_name'] = $rows_menu['module_category_ename']; } $arr_id_cat[] = $rows_menu['module_category_id']; $categories_module[] = $rows_menu; } $list_module = array(); if(!empty($arr_id_cat)) { $txt_id_cat = implode(',', $arr_id_cat); /*$q_company_module = $mydb->query_my("SELECT module_id FROM tb_company_module WHERE company_id='".$CORE->v_company_id."'"); while ($r_company_module = $mydb->fetch_row($q_company_module)){ $list_company_module[] = $r_company_module['module_id']; } $txt_list_company_module = implode(',',$list_company_module);*/ $q_modules = $DB->query("SELECT module_cat,module_url,module_name,module_ename FROM tb_module WHERE module_cat IN (" . $txt_id_cat . ") AND module_status='active' ORDER BY module_pos"); while ($r_modules = $DB->fetch_row($q_modules)) { if ($v_lang == 'en') { $r_modules['module_name'] = $r_modules['module_ename']; } $list_module[] = $r_modules; } } foreach ($categories_module as $val=>$item){ foreach ($list_module as $val2=>$item2){ if($item['module_category_id']==$item2['module_cat']){ $categories_module[$val]['modules'][] = $list_module[$val2]; } } } $r_manga_report = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_error ")); $total_manga_report = $r_manga_report['total']; $r_comment_report = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_comment WHERE have_report is not NULL AND have_report>0 ")); $total_comment_report = $r_comment_report['total']; $r_comment_locked = $DB->fetch_row($DB->query("SELECT count(*) as total FROM tb_comment WHERE comment_status='locked' ")); $total_comment_locked = $r_comment_locked['total']; ?> <div class="sidebar"> <!-- Sidebar Menu --> <nav class="mt-2"> <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false"> <?php showCategories($categories_module,0,'',$total_manga_report,$total_comment_report,$total_comment_locked);?> </ul> </nav> <!-- /.sidebar-menu --> </div>