Размер файла: 3Kb
<?php
/**
* @name SHCMS Engine
* @copyright Shamsik © 2012
* Данный код защищен авторскими правами
* http://shcms.ru
*/
class menu_index
{
//Функция вывода главного меню
public function menu() {
$post = mysql_query("SELECT * FROM `menu_list` ORDER BY `mes`");
while($posts = mysql_fetch_array($post)) {
$mysql_menu = mysql_fetch_array(mysql_query("SELECT * FROM `menu_list` WHERE `id` = '$posts[id]'"));
if($mysql_menu['close'] == 0){
echo '<div class="table_posts">
<a href="'.$posts['dir'].'" class="posts_gl hig">
<table cellspacing="0" callpadding="0" width="100%">
<tbody><tr><td class="icons">
<img src="template/icon/'.$posts['icons'].'" alt="">
</td><td class="name">'.$posts['name'].'<span class="menu_count">'.menu_widget::count($posts['count']).'</span></td>
</tr></tbody></table></a>';
if($posts['dir'] == '/shouts/') {
menu_widget::shouts();
}
if($posts['dir'] == '/uncos/') {
menu_widget::uncos();
}
if($posts['dir'] == '/forum/new.themes.php') {
menu_widget::new_them();
}
echo '</div>';
}
}
}
//Функция вывода левого меню
public function left_menu() {
$block_while = mysql_query("SELECT * FROM `left_menu` ORDER BY `mesto`");
while($while_block = mysql_fetch_array($block_while)) {
//Вывод всех разделов с иконками
if($while_block['razdel'] == 'razd' or $while_block['razdel'] == 'link') {
if($while_block['razdel'] == 'razd') {
echo '<div class="maintitle2 mainrazd">'.$while_block['name'].'</div>';
}else {
echo '<div class="posts"><a href="'.$while_block['link'].'">'.$while_block['name'].'</a></div>';
}
}
}
}
public function language() {
global $user4,$user_id,$settings_shcms;
echo '<br/>';
if(isset($user_id)) {
echo '<div class="maintitle mainrazd">'.Lang::get('Язык').' <span style="float:right;font-size:11px;"><a href="/shcms/language.php">'.Lang::get('Сменить').'</a></span></div>
<div class="maintext">';
$config = parse_ini_file(H.'system/lang/'.$user4['language'].'/lang_config.ini',true);
echo '<img src="/template/icon/language/'.$user4['language'].'.png"> <span style="font-size:12px;" class="mainrazd">'.$config['lang_config']['name'].'</div>';
echo '</div>';
}elseif(!$user_id) {
echo '<div class="maintitle mainrazd">'.Lang::get('Язык').'</span></div><div class="maintext">';
$config1 = parse_ini_file(H.'system/lang/'.$settings_shcms['language'].'/lang_config.ini',true);
echo '<img src="/template/icon/language/'.$settings_shcms['language'].'.png">
<span style="font-size:12px;" class="mainrazd">'.$config1['lang_config']['name'].'</div>';
echo '</div>';
}
}
}
?>