ÿØÿà 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/thietkewebvumi.com/code/ |
<?php class global_site { function global_site(){ global $CORE, $INFO, $smarty; switch($CORE->input['act']){ case 'pages' : $modules = 'pages'; break; case 'contact' : $modules = 'contact'; break; case 'login': $modules = 'login'; break; case 'gallery': $modules = 'gallery'; break; case 'album': $modules = 'album'; break; case 'user' : $modules = 'user'; break; case 'formdk' : $modules = 'formdk'; break; case 'website' : $modules = 'website'; break; default : $modules = 'home'; break; } $module = ROOT_PATH."code/".$modules.".php"; include($module); $smarty->assign('module', $modules); $func_view = ''; $show_sub_tpl = 0; if(!empty($CORE->input['code'])){ $func_view = '_'.$CORE->input['code']; if(file_exists(ROOT_PATH.'skin/'.$INFO['skin_folder'].'/'.$modules.$func_view.'.tpl')){ $show_sub_tpl = 1; } } $smarty->assign('func_view', $func_view); $smarty->assign('show_sub_tpl', $show_sub_tpl); $smarty->assign('setting_page',$CORE->vars); $this->goMenu(); $this->goBanner(); $this->goBlockRight(); $this->goLogin(); } function goLogin(){ global $smarty,$logoutUrl; if($_SESSION['user']['id']!=''){ $smarty->assign('logged',1); $smarty->assign('user_info',$_SESSION['user']); if($_SESSION['user']['login_local']=='facebook.com'){ $smarty->assign('logout',$logoutUrl); }else{ $smarty->assign('logout','index.php?act=login&code=logout'); } } } function sub_menu(){ global $DB,$CORE; $txt = ''; $ftitle = isset($CORE->input['ftitle']) ? $CORE->input['ftitle'] : 'trang-chu'; $action = isset($CORE->input['act']) ? $CORE->input['act'] : ''; $q1 = $DB->query("SELECT * FROM NNCCMS_menu WHERE parent_id='0' AND show_top_menu='1' ORDER BY `pos`"); while($r1 = $DB->fetch_row($q1)){ if($CORE->lang_type=='en'){ $r1['title'] = $r1['etitle']; } $q2 = $DB->query("SELECT * FROM NNCCMS_menu WHERE parent_id='".$r1['id']."' AND show_top_menu='1' ORDER BY `pos`"); $active = $active_website = ''; if($ftitle==$r1['ftitle'] && $action!='website' && $action!='contact'){ $active = 'active'; $active_website = ''; $active_lienhe = ''; } if($r1['ftitle']=='thiet-ke-website' && $action=='website'){ $active = ''; $active_website = 'active'; $active_lienhe = ''; } if($r1['ftitle']=='lien-he' && $action=='contact'){ $active = ''; $active_website = ''; $active_lienhe = 'active'; } if($DB->get_num_rows($q2)>0){ /*$txt .= '<li><a href="'.$r1['ftitle'].'/">'.$r1['title'].' <img src="'.$INFO['home_url'].'skin/'.$INFO['skin_folder'].'/images/menuplus.png" width="5" height="6" /></a>';*/ $txt .= '<li class="p-relative '.$active.$active_website.$active_lienhe.'"><a href="'.$r1['ftitle'].'/" class="dropdown-toggle" data-toggle="dropdown"> '.$r1['title'].' <b class="caret"></b></a>'; $txt .= '<ul class="dropdown-menu">'; while($r2 = $DB->fetch_row($q2)){ if($CORE->lang_type=='en'){ $r2['title'] = $r2['etitle']; } $txt .= '<li><a href="'.$r2['ftitle'].'/">'.$r2['title'].'</a>'; } $txt .= '</ul>'; $txt .= '</li>'; }else{ $txt .= '<li class="dropdown '.$active.$active_website.$active_lienhe.'"><a href="'.$r1['ftitle'].'/">'.$r1['title'].'</a>'; $txt .= '</li>'; } } return $txt; } function goMenu(){ global $smarty,$CORE; $ftitle = $CORE->input['ftitle']=='' ? $CORE->input['act']:$CORE->input['ftitle']; if($ftitle=='contact'){ $ftitle='lien-he'; } if($ftitle==''){ $ftitle='trang-chu'; } $smarty->assign('ftitle',$ftitle); $menu = $this->sub_menu(); $smarty->assign('menu',$menu); $arr_txt = array( array('t1'=>'"Trẻ sÆ¡ sinh đến ngà y thứ ba má»›i bắt đầu dạy dá»— là đã cháºm mất hai ngà y."','t2'=>'Ivan Petrovich Palov'), array('t1'=>'"Khai mở tiá»m năng trà tuệ của trẻ."','t2'=>'Mầm non iSchool'), array('t1'=>'"Tri thức là sức mạnh."','t2'=>'F.Bacon'), ); $slogan = ''; $slogan .= '<ul class="bjqs">'; shuffle($arr_txt); foreach($arr_txt as $val){ $slogan .= '<li>'.$val['t1'].' <span>'.$val['t2'].'</span></li>'; } $slogan .= '</ul>'; $smarty->assign('slogan',$slogan); } function goBanner(){ global $DB,$smarty,$CORE; $q2 = $DB->query("SELECT * FROM NNCCMS_collect WHERE `type`='main_banner' ORDER BY `time` DESC LIMIT 10"); while($r2 = $DB->fetch_row($q2)){ if($CORE->lang_type=='en'){ $r2['img'] = $r2['eimg']; } $banner2[] = $r2; } $smarty->assign('banner2',$banner2); $q3 = $DB->query("SELECT * FROM NNCCMS_collect WHERE `type`='logo' ORDER BY `time` DESC LIMIT 1"); while($r3 = $DB->fetch_row($q3)){ $banner3[] = $r3; } $smarty->assign('banner3',$banner3); } function goBlockRight(){ global $DB,$smarty,$CORE; $block_home = $DB->query("SELECT * FROM `NNCCMS_block` WHERE `module`='home' AND `x` = '3' OR `pos`='home_1_2'"); while($row_block = $DB->fetch_row($block_home)){ if($CORE->lang_type=='en'){ $row_block['title'] = $row_block['etitle']; } if($row_block['type']=='id_block' and !empty($row_block['block_detail'])){ $arr_pages_id = explode('@',$row_block['block_detail']); $str_id = implode(',',$arr_pages_id); $q_pages = $DB->query("SELECT * FROM NNCCMS_pages WHERE id IN ($str_id) AND status = '1'"); while($r_pages = $DB->fetch_row($q_pages)){ $r_menu = $DB->fetch_row($DB->query("SELECT ftitle FROM NNCCMS_menu WHERE id IN (SELECT menu_id FROM NNCCMS_menu_pages WHERE pages_id='".$r_pages['id']."') LIMIT 1")); if($CORE->lang_type=='en'){ $r_pages['title'] = $r_pages['etitle']; $r_pages['ftitle'] = $r_pages['fetitle']; $r_pages['intro'] = $r_pages['eintro']; } $r_pages['ftitle_menu'] = $r_menu['ftitle']; $row_block['list_pages'][] = $r_pages; } } if($CORE->lang_type=='en' and $row_block['type']!='id_block' and !empty($row_block['block_detail'])){ $row_block['block_detail'] = $row_block['eblock_detail']; } $list_block[] = $row_block; } $smarty->assign('list_block_right',$list_block); } } ?>