File size: 2.61Kb
<?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='$posts[style]'><img src='template/icon/$posts[icons]'/> <a class='vt' href='$posts[dir]'>$posts[name]</a>";
echo '<span class="menu_count"> ';
include_once H. 'system/counts/'.$posts['count'];
echo '</span>';
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>';
}
}
}
?>