<?php
$menu_arr = array(
    'qa_manage'  => array('class'=>'a01', 'title'=>'待解决问题', 'url'=>'/ask/to_answer/','statistics'=>'1480','statistics_title'=>'待解决'),
    'qa_manage1'      => array('class'=>'a02', 'title'=>'全部问题', 'url'=>'/ask/all_qa/','statistics'=>'1481','statistics_title'=>'全部问题'),
    'qa_manage2'       => array('class'=>'a03', 'title'=>'我的问答', 'url'=>'/ask/my_qa/','statistics'=>'1482','statistics_title'=>'我的问答'),
    'sell_modify'      => array('class'=>'a04', 'title'=>'发布出售', 'url'=>'/sell/add/','statistics'=>'1454','statistics_title'=>'发布出售'),
    'sell_manage'       => array('class'=>'a05', 'title'=>'管理出售', 'url'=>'/sell/manage/active/','statistics'=>'1455','statistics_title'=>'管理出售'),
    'sell_manage_invalid' => array('class'=>'a05', 'title'=>'管理出售', 'url'=>'/sell/manage/invalid/'),
    'sell_manage_frozen' => array('class'=>'a05', 'title'=>'管理出售', 'url'=>'/sell/manage/frozen/'),
    'buy_match_manage'   => array('class'=>'a06', 'title'=>'求购匹配', 'url'=>'/house_demands/buy/'),
    'rent_modify'      => array('class'=>'a07', 'title'=>'发布出租', 'url'=>'/rent/add/','statistics'=>'1456','statistics_title'=>'发布出租'),
    'rent_manage'       => array('class'=>'a08', 'title'=>'管理出租', 'url'=>'/rent/manage/active/','statistics'=>'1457','statistics_title'=>'管理出租'),
    'rent_manage_invalid' => array('class'=>'a08', 'title'=>'管理出租', 'url'=>'/rent/manage/invalid/'),
    'rent_manage_frozen' => array('class'=>'a08', 'title'=>'管理出租', 'url'=>'/rent/manage/frozen/'),
    'rent_match_manage'  => array('class'=>'a09', 'title'=>'求租匹配', 'url'=>'/house_demands/rent/'),
    'exchange_gift'     => array('class'=>'a10', 'title'=>'礼品兑换', 'url'=>''),
    'personal_house'    => array('class'=>'a11', 'title'=>'本区个人房源', 'url'=>'/personal_house/sell/','statistics'=>'1464','statistics_title'=>'本区个人房源'),
    'market/block_expert'      => array('class'=>'a12', 'title'=>'小区专家', 'url'=>'/market_block_expert/'),
    'market/block_expert_apply_not'      => array('class'=>'a12', 'title'=>'小区专家', 'url'=>'/market_block_expert/'),
    'shop_house_recommend'    => array('class'=>'a13', 'title'=>'店铺房源推荐', 'url'=>'/shop/shop_house_recommend/','statistics'=>'1466','statistics_title'=>'房源推荐'),
    'shop_set_basic'          => array('class'=>'a14', 'title'=>'店铺基本设置', 'url'=>'/shop/shop_set_basic/','statistics'=>'1465','statistics_title'=>'基本设置'),
    'ucenter/my_growth'         => array('class'=>'a15', 'title'=>'我的成长', 'url'=>'/ucenter_growth/','statistics'=>'1467','statistics_title'=>'我的成长'),
    'statistics_analysis/today'        => array('class'=>'a16', 'title'=>'使用概况', 'url'=>'/statistics_analysis/today/','statistics'=>'1473','statistics_title'=>'使用概况'),
    'statistics_analysis/log'           => array('class'=>'a17', 'title'=>'使用日志', 'url'=>'/statistics_analysis/log/','statistics'=>'1474','statistics_title'=>'使用日志'),
    'statistics_analysis/label'           => array('class'=>'a17', 'title'=>'使用日志', 'url'=>'/statistics_analysis/label/'),
    'statistics_analysis/login_history'           => array('class'=>'a17', 'title'=>'使用日志', 'url'=>'/statistics_analysis/login_history/'),
    'statistics_analysis/violation'           => array('class'=>'a17', 'title'=>'使用日志', 'url'=>'/statistics_analysis/violation/'),
    'statistics_analysis/click'        => array('class'=>'a18', 'title'=>'点击统计', 'url'=>'/statistics_analysis/click/','statistics'=>'1475','statistics_title'=>'点击统计'),
    'statistics_analysis/refresh'      => array('class'=>'a19', 'title'=>'刷新统计', 'url'=>'/statistics_analysis/refresh/','statistics'=>'1476','statistics_title'=>'刷新统计'),
    'market_analysis'   => array('class'=>'a20', 'title'=>'市场分析', 'url'=>''),
    'statistics_analysis/checkport' => array('class'=>'a21', 'title'=>'端口自检', 'url'=>'/statistics_analysis/checkport/'),
    'ucenter/my_information'   => array('class'=>'a22', 'title'=>'基本资料管理', 'url'=>'/ucenter_information/index/','statistics'=>'1468','statistics_title'=>'资料管理'),
    'ucenter/my_message_list'=> array('class'=>'a23', 'title'=>'消息管理', 'url'=>'/ucenter_message/index/','statistics'=>'1469','statistics_title'=>'消息管理'), 
    'manage_credit'     => array('class'=>'a24', 'title'=>'房豆查看', 'url'=>''),
    'market_index'      => array('class'=>'a25', 'title'=>'营销中心', 'url'=>'/market_index/','statistics'=>'1458','statistics_title'=>'首页'),
    'house_auction'     => array('class'=>'a26', 'title'=>'房源竞投', 'url'=>''),
    'supply_block'      => array('class'=>'a27', 'title'=>'小区完善', 'url'=>''),
    //'ucenter/my_history'=> array('class'=>'a28', 'title'=>'成长足迹', 'url'=>'/ucenter_history/exp/'),
    'my_medal'          => array('class'=>'a29', 'title'=>'我的勋章', 'url'=>''),
    'market_bid_block_expert/index'      => array('class'=>'a12', 'title'=>'小区专家', 'url'=>'/market_bid_block_expert/index/'),
    'market_bid_block_expert/history'      => array('class'=>'a12', 'title'=>'小区专家', 'url'=>'/market_bid_block_expert/history/','statistics'=>'1460','statistics_title'=>'小区专家'),
    'market_bid_house_manage/all'      => array('class'=>'a37', 'title'=>'二手房房源竞投', 'url'=>'/market_bid_house_manage/all/','statistics'=>'1461','statistics_title'=>'二手房竞投'),
    'market_bid_house_manage/on'      => array('class'=>'a37', 'title'=>'二手房房源竞投', 'url'=>'/market_bid_house_manage/on/'),
    'market_bid_house_manage/history'      => array('class'=>'a37', 'title'=>'二手房房源竞投', 'url'=>'/market_bid_house_manage/history/'),
    'market_bid_rent_manage/all'      => array('class'=>'a38', 'title'=>'租房房源竞投', 'url'=>'/market_bid_rent_manage/all/','statistics'=>'1462','statistics_title'=>'租房竞投'),
    'market_bid_rent_manage/on'      => array('class'=>'a38', 'title'=>'租房房源竞投', 'url'=>'/market_bid_rent_manage/on/'),
    'market_bid_rent_manage/history'      => array('class'=>'a38', 'title'=>'租房房源竞投', 'url'=>'/market_bid_rent_manage/history/'),
    'payment_index' => array('class'=>'a30', 'title'=>'首页', 'url'=>'/payment/','statistics'=>'1477','statistics_title'=>'首页'),   
    'payment_recharge' => array('class'=>'a31', 'title'=>'立即充值', 'url'=>'/payment/recharge/','statistics'=>'1478','statistics_title'=>'在线充值'),   
    'payment_transaction' => array('class'=>'a32', 'title'=>'交易记录', 'url'=>'/payment/transaction/','statistics'=>'1479','statistics_title'=>'交易记录'),

    'realHouse_marginAccount' => array('class'=>'marginAccount', 'title'=>'保证金账户', 'url'=>'/realHouse/marginAccount/'),
    'realHouse_reportRecord' => array('class'=>'reportRecord', 'title'=>'举报记录', 'url'=>'/realHouse/reportRecord/'),

    'vas/vas_packing' => array('class'=>'a33', 'title'=>'房源包装', 'url'=>'/vas_packing_house/','statistics'=>'1463','statistics_title'=>'房源包装'),
    //'vas/school_house' => array('class'=>'a34', 'title'=>'定投推广', 'url'=>'/vas_set_promot/schoolHouse/'),
    'loan_index' => array('class'=>'a35', 'title'=>'鑫蕴通贷款', 'url'=>'/my_loan/index/','statistics'=>'1470','statistics_title'=>'金融贷款'),  
	'complain/complain' => array('class'=>'a36', 'title'=>'举报有奖', 'url'=>'/my_complain/complain/','statistics'=>'1471','statistics_title'=>'举报有奖'), 
	'feedback' => array('class'=>'yz1', 'title'=>'意见反馈', 'url'=>'/my_feedback/feedback/','statistics'=>'1472','statistics_title'=>'意见反馈'), 
	'tag_index' => array('class'=>'bq1', 'title'=>'标签零售', 'url'=>'/tag_index/','statistics'=>'1459','statistics_title'=>'零售标签'),
	'tag_index/record' => array('class'=>'bq1', 'title'=>'标签零售记录', 'url'=>'/tag_index/record/'),
    'personal_house/loupan_talent' => array('class'=>'collect', 'title'=>'楼盘达人征集', 'url'=>'/personal_house/loupan_talent/'),
    'personal_house/loupan_talent_building' => array('class'=>'collect', 'title'=>'楼盘达人征集', 'url'=>'/personal_house/loupan_talent_building/'),
    'personal_house/loupan_my_contribution' => array('class'=>'collect', 'title'=>'楼盘达人征集', 'url'=>'/personal_house/loupan_my_contribution/'),
    'personal_house/loupan_read' => array('class'=>'collect', 'title'=>'楼盘达人征集', 'url'=>'/personal_house/loupan_read/'),

    'guide_project/guide_project_extension' => array('class'=>'build', 'title'=>'房源推广', 'url'=>'/guide_project/guide_project_extension/'),
    'guide_project/my_apply' => array('class'=>'build', 'title'=>'房源推广', 'url'=>'/guide_project/my_apply/'),
    'guide_project/guide_apply' => array('class'=>'build', 'title'=>'房源推广', 'url'=>'/guide_project/guide_apply/'),
);
?>


<?php 
	// 屏蔽不需要的菜单
	$config = $this->config->item('no_menu');
	if($config === false){
		$config = array();
	}
	foreach($menu_left_arr as $key => $value){
		if(is_array($value)){
			foreach($value as $key1 => $value1){
				if(in_array($value1, $config)){
					unset($menu_left_arr[$key][$key1]);
				}
			}
			if(empty($menu_left_arr[$key])){
				unset($menu_left_arr[$key]);
			}
		}else{
			if(in_array($value, $config)){
				unset($menu_left_arr[$key]);
			}
		}
	}
	//var_dump($menu_left_arr);exit;
?>
<!--左边 导航 开始 itemOn-->
<div id="asideBox">
<div class="layout asideBox">
    <div class="aside">
        <dl class="list">
            <?php

            foreach($menu_left_arr as $menu)
            {
                $selected = '';
                if(is_array($menu)&& !empty($menu)) 
                {
                    $menuKey = $menu[0];
                    $selected = in_array($page_key, $menu) ? 'on':'';

                } else {
                    $menuKey = $menu;
                    $selected = $menuKey == $page_key ? 'on':'';
                }
                if(isset($menu_arr[$menuKey]))
                {
            ?>
                <dd class="dd <?=$selected?>">
				<?php if(empty($menu_arr[$menuKey]['statistics'])): ?>
                    <a class="a <?=$menu_arr[$menuKey]['class']?>" href="<?=$menu_arr[$menuKey]['url']?>">
				<?php else: ?>
					<a class="a <?=$menu_arr[$menuKey]['class']?>" href="<?=$menu_arr[$menuKey]['url']?>" onclick="stat_onclick('<?php echo $menu_arr[$menuKey]["statistics"]; ?>', '<?php echo $menu_arr[$menuKey]["statistics_title"]; ?>')">
				<?php endif; ?>
                        <?=$menu_arr[$menuKey]['title']?>
                    </a>
                </dd>
            <?php
                }
            }
            ?>
        </dl>
    </div>
</div>
</div>
<!--左边 导航 结束-->