Просмотр файла system/inc/classes/menu.class.php

Размер файла: 1.29Kb
<?php

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 href='$posts[dir]'>$posts[name]</a>";
                    echo '<span class="menu_count">&nbsp;';
                    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>';
					}
				
					}


			}
		}
	}


?>