<?php



class LinkAction extends UserAction

{

    public $where;

    public $modules;

    public function _initialize()

    {

        parent::_initialize();

        $this->where = array('token' => $this->token);

        $this->modules = array('Home' => '首页', 'Classify' => '网站分类', 'Img' => '图文回复', 'Company' => 'LBS信息', 'Adma' => 'DIY宣传页', 'Photo' => '相册', 'Selfform' => '万能表单', 'Host' => '商家订单', 'Groupon' => '团购', 'Shop' => '商城', 'Dining' => '订餐', 'Xt' => '喜帖', 'Vote' => '投票', 'Panorama' => '全景手动','Qj' => '全景接口', 'Lottery' => '大转盘', 'Guajiang' => '刮刮卡', 'Coupon' => '优惠券', 'MemberCard' => '会员卡', 
		'Estate' => '微房产','Car_pp' => '微汽车','Medical'=>'微医疗','Reservation'=>'微美容','Shipin'=>'微食品','Jianshen'=>'微健身','Zhengwu'=>'微政务','Lvyou'=>'微旅游','Jiaoyu'=>'微教育','Huadian'=>'微花店','Wuye'=>'微物业','Ktv'=>'微KTV','Jiuba'=>'微酒吧','Zhuangxiu'=>'微装修','Hunqing'=>'微婚庆');

    }

    public function insert()

    {

        $modules = $this->modules();

        $this->assign('modules', $modules);

        $this->display();

    }

    public function modules()

    {

return array(array('module' => 'Home', 'linkcode' => ('/index.php?g=Wap&m=Index&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => '微站首页', 'sub' => 0, 'canselected' => 1, 'linkurl' => '', 'keyword' => $this->modules['Home'], 'askeyword' => 1), 
array('module' => 'Classify', 'linkcode' => ('/index.php?g=Wap&m=Index&a=lists&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Classify'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 0), 
array('module' => 'Img', 'linkcode' => ('/index.php?g=Wap&m=Index&a=content&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Img'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1), 
array('module' => 'Company', 'linkcode' => ('/index.php?g=Wap&m=Company&a=map&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Company'], 'sub' => 1, 'canselected' => 1, 'linkurl' => '', 'keyword' => '地图', 'askeyword' => 1), 
array('module' => 'Adma', 'linkcode' => '/index.php/show/' . $this->token, 'name' => $this->modules['Adma'], 'sub' => 0, 'canselected' => 1, 'linkurl' => '', 'keyword' => '', 'askeyword' => 0), 
array('module' => 'Photo', 'linkcode' => ('/index.php?g=Wap&m=Photo&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Photo'], 'sub' => 1, 'canselected' => 1, 'linkurl' => '', 'keyword' => '相册', 'askeyword' => 1), 
array('module' => 'Selfform', 'linkcode' => ('/index.php?g=Wap&m=Selfform&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Selfform'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1), 
array('module' => 'Host', 'linkcode' => ('/index.php?g=Wap&m=Host&a=detail&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Host'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1), 
array('module' => 'Groupon', 'linkcode' => ('/index.php?g=Wap&m=Groupon&a=grouponIndex&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Groupon'], 'sub' => 0, 'canselected' => 1, 'linkurl' => '', 'keyword' => '团购', 'askeyword' => 1), 
array('module' => 'Shop', 'linkcode' => ('/index.php?g=Wap&m=Product&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Shop'], 'sub' => 0, 'canselected' => 1, 'linkurl' => '', 'keyword' => '商城', 'askeyword' => 1), 
array('module' => 'Dining', 'linkcode' => ('/index.php?g=Wap&m=Product&a=dining&dining=1&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Dining'], 'sub' => 0, 'canselected' => 1, 'linkurl' => '', 'keyword' => '订餐', 'askeyword' => 1), 
array('module' => 'Vote', 'linkcode' => ('/index.php?g=Wap&m=Vote&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Vote'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1), 
array('module' => 'Panorama', 'linkcode' => ('/index.php?g=Wap&m=Panorama&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Panorama'], 'sub' => 1, 'canselected' => 1, 'linkurl' => '', 'keyword' => $this->modules['Panorama'], 'askeyword' => 1),
array('module' => 'Qj', 'linkcode' => ('/index.php?g=Wap&m=Qj&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Qj'], 'sub' => 1, 'canselected' => 1, 'linkurl' => '', 'keyword' => $this->modules['Qj'], 'askeyword' => 1),  
array('module' => 'Lottery', 'linkcode' => '', 'name' => $this->modules['Lottery'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1), 
array('module' => 'Guajiang', 'linkcode' => '', 'name' => $this->modules['Guajiang'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1), 
array('module' => 'Coupon', 'linkcode' => '', 'name' => $this->modules['Coupon'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1), 
array('module' => 'MemberCard', 'linkcode' => ('/index.php?g=Wap&m=Card&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['MemberCard'], 'sub' => 0, 'canselected' => 1, 'linkurl' => '', 'keyword' => '会员卡', 'askeyword' => 1), 
array('module' => 'Xt', 'linkcode' => '', 'name' => $this->modules['Xt'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1), 
/*array('module' => 'Estate', 'linkcode' => ('/index.php?g=Wap&m=Estate&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&sgssz=mp.weixin.qq.com', 'name' => $this->modules['Estate'], 'sub' => 1, 'canselected' => 1, 'linkurl' => '', 'keyword' => '微房产', 'askeyword' => 1));
*/
array('module' => 'Estate', 'linkcode' =>'', 'name' => $this->modules['Estate'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1)
,array('module' => 'Car_pp', 'linkcode' =>'', 'name' => $this->modules['Car_pp'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1)
,array('module' => 'Medical', 'linkcode' => ('/index.php?g=Wap&m=Medical&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Medical'], 'sub' => 0, 'canselected' => 1, 'linkurl' => '', 'keyword' => '微医疗', 'askeyword' => 1)
,array('module' => 'Reservation', 'linkcode' => ('/index.php?g=Wap&m=Reservation&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'name' => $this->modules['Reservation'], 'sub' => 0, 'canselected' => 1, 'linkurl' => '', 'keyword' => '微美容', 'askeyword' => 1)
,array('module' => 'Shipin', 'linkcode' =>'', 'name' => $this->modules['Shipin'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1)
,array('module' => 'Jianshen', 'linkcode' =>'', 'name' => $this->modules['Jianshen'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1)
,array('module' => 'Zhengwu', 'linkcode' =>'', 'name' => $this->modules['Zhengwu'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1)
,array('module' => 'Lvyou', 'linkcode' =>'', 'name' => $this->modules['Lvyou'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1)
,array('module' => 'Jiaoyu', 'linkcode' =>'', 'name' => $this->modules['Jiaoyu'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1)
,array('module' => 'Huadian', 'linkcode' =>'', 'name' => $this->modules['Huadian'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1)

,array('module' => 'Wuye', 'linkcode' =>'', 'name' => $this->modules['Wuye'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1)
,array('module' => 'Ktv', 'linkcode' =>'', 'name' => $this->modules['Ktv'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1)
,array('module' => 'Jiuba', 'linkcode' =>'', 'name' => $this->modules['Jiuba'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1)
,array('module' => 'Zhuangxiu', 'linkcode' =>'', 'name' => $this->modules['Zhuangxiu'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1)
,array('module' => 'Hunqing', 'linkcode' =>'', 'name' => $this->modules['Hunqing'], 'sub' => 1, 'canselected' => 0, 'linkurl' => '', 'keyword' => '', 'askeyword' => 1)


);


    }

    public function Classify()

    {

        $this->assign('moduleName', $this->modules['Classify']);

        $db = M('Classify');

        $where = $this->where;

        $count = $db->where($where)->count();

        $Page = new Page($count, 5);

        $show = $Page->show();

        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();

        $items = array();

        if ($list) {

            foreach ($list as $item) {

                array_push($items, array('id' => $item['id'], 'name' => $item['name'], 'linkcode' => (('/index.php?g=Wap&m=Index&a=lists&token=' . $this->token) . '&wecha_id={wechat_id}&classid=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));

            }

        }

        $this->assign('list', $items);

        $this->assign('page', $show);

        $this->display('detail');

    }

    public function Img()

    {

        $this->assign('moduleName', $this->modules['Img']);

        $db = M('Img');

        $where = $this->where;

        $count = $db->where($where)->count();

        $Page = new Page($count, 5);

        $show = $Page->show();

        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();

        $items = array();

        if ($list) {

            foreach ($list as $item) {

                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Index&a=content&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));

            }

        }

        $this->assign('list', $items);

        $this->assign('page', $show);

        $this->display('detail');

    }

    public function Company()

    {

        $this->assign('moduleName', $this->modules['Company']);

        $db = M('Company');

        $where = $this->where;

        $count = $db->where($where)->count();

        $Page = new Page($count, 5);

        $show = $Page->show();

        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();

        $items = array();

        if ($list) {

            foreach ($list as $item) {

                array_push($items, array('id' => $item['id'], 'name' => $item['name'], 'linkcode' => (('/index.php?g=Wap&m=Company&a=map&token=' . $this->token) . '&wecha_id={wechat_id}&companyid=') . $item['id'], 'linkurl' => '', 'keyword' => '地图'));

            }

        }

        $this->assign('list', $items);

        $this->assign('page', $show);

        $this->display('detail');

    }

    public function Photo()

    {

        $this->assign('moduleName', $this->modules['Photo']);

        $db = M('Photo');

        $where = $this->where;

        $count = $db->where($where)->count();

        $Page = new Page($count, 5);

        $show = $Page->show();

        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();

        $items = array();

        if ($list) {

            foreach ($list as $item) {

                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Photo&a=plist&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));

            }

        }

        $this->assign('list', $items);

        $this->assign('page', $show);

        $this->display('detail');

    }

    public function Selfform()

    {

        $this->assign('moduleName', $this->modules['Selfform']);

        $db = M('Selfform');

        $where = $this->where;

        $count = $db->where($where)->count();

        $Page = new Page($count, 5);

        $show = $Page->show();

        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();

        $items = array();

        if ($list) {

            foreach ($list as $item) {

                array_push($items, array('id' => $item['id'], 'name' => $item['name'], 'linkcode' => (('/index.php?g=Wap&m=Selfform&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));

            }

        }

        $this->assign('list', $items);

        $this->assign('page', $show);

        $this->display('detail');

    }

    public function Host()

    {

        $moduleName = 'Host';

        $this->assign('moduleName', $this->modules[$moduleName]);

        $db = M($moduleName);

        $where = $this->where;

        $count = $db->where($where)->count();

        $Page = new Page($count, 5);

        $show = $Page->show();

        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();

        $items = array();

        if ($list) {

            foreach ($list as $item) {

                array_push($items, array('id' => $item['id'], 'name' => $item['name'], 'linkcode' => (('/index.php?g=Wap&m=Host&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&hid=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));

            }

        }

        $this->assign('list', $items);

        $this->assign('page', $show);

        $this->display('detail');

    }

    public function Panorama()

    {

        $this->assign('moduleName', $this->modules['Panorama']);

        $db = M('Panorama');

        $where = $this->where;

        $count = $db->where($where)->count();

        $Page = new Page($count, 5);

        $show = $Page->show();

        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('time DESC')->select();

        $items = array();

        if ($list) {

            foreach ($list as $item) {

                array_push($items, array('id' => $item['id'], 'name' => $item['name'], 'linkcode' => (('/index.php?g=Wap&m=Panorama&a=item&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));

            }

        }

        $this->assign('list', $items);

        $this->assign('page', $show);

        $this->display('detail');

    }


 public function Qj()

    {

        $this->assign('moduleName', $this->modules['Qj']);

        $db = M('Qj');

        $where = $this->where;

        $count = $db->where($where)->count();

        $Page = new Page($count, 5);

        $show = $Page->show();

        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();

        $items = array();

        if ($list) {

            foreach ($list as $item) {

                array_push($items, array('id' => $item['id'], 'name' => $item['name'], 'linkcode' => (('/index.php?g=Wap&m=Qj&a=item&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));

            }

        }

        $this->assign('list', $items);

        $this->assign('page', $show);

        $this->display('detail');

    }


    public function Xt()

    {

        $moduleName = 'Xt';

        $this->assign('moduleName', $this->modules[$moduleName]);

        $db = M($moduleName);

        $where = $this->where;

        $count = $db->where($where)->count();

        $Page = new Page($count, 5);

        $show = $Page->show();

        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();

        $items = array();

        if ($list) {

            foreach ($list as $item) {

                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Xt&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));

            }

        }

        $this->assign('list', $items);

        $this->assign('page', $show);

        $this->display('detail');

    }

    public function Lottery()

    {

        $moduleName = 'Lottery';

        $this->assign('moduleName', $this->modules[$moduleName]);

        $db = M($moduleName);

        $where = $this->where;

        $where['type'] = 1;

        $count = $db->where($where)->count();

        $Page = new Page($count, 5);

        $show = $Page->show();

        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();

        $items = array();

        if ($list) {

            foreach ($list as $item) {

                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Lottery&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));

            }

        }

        $this->assign('list', $items);

        $this->assign('page', $show);

        $this->display('detail');

    }

    public function Guajiang()

    {

        $moduleName = 'Guajiang';

        $this->assign('moduleName', $this->modules[$moduleName]);

        $db = M('Lottery');

        $where = $this->where;

        $where['type'] = 2;

        $count = $db->where($where)->count();

        $Page = new Page($count, 5);

        $show = $Page->show();

        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();

        $items = array();

        if ($list) {

            foreach ($list as $item) {

                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Guajiang&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));

            }

        }

        $this->assign('list', $items);

        $this->assign('page', $show);

        $this->display('detail');

    }

    public function Coupon()

    {

        $moduleName = 'Coupon';

        $this->assign('moduleName', $this->modules[$moduleName]);

        $db = M('Lottery');

        $where = $this->where;

        $where['type'] = 3;

        $count = $db->where($where)->count();

        $Page = new Page($count, 5);

        $show = $Page->show();

        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();

        $items = array();

        if ($list) {

            foreach ($list as $item) {

                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Coupon&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));

            }

        }

        $this->assign('list', $items);

        $this->assign('page', $show);

        $this->display('detail');

    }

    public function Vote()

    {

        $moduleName = 'Vote';

        $this->assign('moduleName', $this->modules[$moduleName]);

        $db = M($moduleName);

        $where = $this->where;

        $count = $db->where($where)->count();

        $Page = new Page($count, 5);

        $show = $Page->show();

        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();

        $items = array();

        if ($list) {

            foreach ($list as $item) {

                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Vote&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));

            }

        }

        $this->assign('list', $items);

        $this->assign('page', $show);

        $this->display('detail');

    }

    public function Estate()
    {	
		  $moduleName = 'Estate';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $db = M($moduleName);
        $where = $this->where;
        $count = $db->where($where)->count();
        $Page = new Page($count, 5);
        $show = $Page->show();
        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();
        $items = array();
        if ($list) {
            foreach ($list as $item) {
                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Estate&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));
            }
        }
        $this->assign('list', $items);
        $this->assign('page', $show);
        $this->display('detail');
      /*  $moduleName = 'Estate';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $items = array();
        array_push($items, array('id' => 1, 'name' => '楼盘介绍', 'linkcode' => ('/index.php?g=Wap&m=Estate&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&sgssz=mp.weixin.qq.com', 'linkurl' => '', 'keyword' => '微房产'));
        array_push($items, array('id' => 2, 'name' => '楼盘相册', 'linkcode' => ('/index.php?g=Wap&m=Estate&a=album&token=' . $this->token) . '&wecha_id={wechat_id}&sgssz=mp.weixin.qq.com', 'linkurl' => '', 'keyword' => '微房产'));
        array_push($items, array('id' => 3, 'name' => '户型全景', 'linkcode' => ('/index.php?g=Wap&m=Estate&a=housetype&token=' . $this->token) . '&wecha_id={wechat_id}&sgssz=mp.weixin.qq.com', 'linkurl' => '', 'keyword' => '微房产'));
        array_push($items, array('id' => 4, 'name' => '专家点评', 'linkcode' => ('/index.php?g=Wap&m=Estate&a=impress&token=' . $this->token) . '&wecha_id={wechat_id}&sgssz=mp.weixin.qq.com', 'linkurl' => '', 'keyword' => '微房产'));
        $Estate = M('Estate')->where(array('token' => $this->token))->find();
        $rt = M('Reservation')->where(array('id' => $Estate['res_id']))->find();
        array_push($items, array('id' => 5, 'name' => '看房预约', 'linkcode' => ((('/index.php?g=Wap&m=Reservation&a=index&rid=' . $Estate['res_id']) . '&token=') . $this->token) . '&wecha_id={wechat_id}&sgssz=mp.weixin.qq.com', 'linkurl' => '', 'keyword' => $rt['keyword']));
        $this->assign('list', $items);
        $this->display('detail');*/
    }
	public function Shipin()
    {	
		  $moduleName = 'Shipin';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $db = M($moduleName);
        $where = $this->where;
        $count = $db->where($where)->count();
        $Page = new Page($count, 5);
        $show = $Page->show();
        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();
        $items = array();
        if ($list) {
            foreach ($list as $item) {
                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Shipin&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));
            }
        }
        $this->assign('list', $items);
        $this->assign('page', $show);
        $this->display('detail');
    }
	public function Jianshen()
    {	
		  $moduleName = 'Jianshen';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $db = M($moduleName);
        $where = $this->where;
        $count = $db->where($where)->count();
        $Page = new Page($count, 5);
        $show = $Page->show();
        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();
        $items = array();
        if ($list) {
            foreach ($list as $item) {
                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Jianshen&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));
            }
        }
        $this->assign('list', $items);
        $this->assign('page', $show);
        $this->display('detail');
    }
	public function Zhengwu()
    {	
		  $moduleName = 'Zhengwu';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $db = M($moduleName);
        $where = $this->where;
        $count = $db->where($where)->count();
        $Page = new Page($count, 5);
        $show = $Page->show();
        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();
        $items = array();
        if ($list) {
            foreach ($list as $item) {
                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Zhengwu&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));
            }
        }
        $this->assign('list', $items);
        $this->assign('page', $show);
        $this->display('detail');
    }
	public function Lvyou()
    {	
		  $moduleName = 'Lvyou';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $db = M($moduleName);
        $where = $this->where;
        $count = $db->where($where)->count();
        $Page = new Page($count, 5);
        $show = $Page->show();
        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();
        $items = array();
        if ($list) {
            foreach ($list as $item) {
                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Lvyou&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));
            }
        }
        $this->assign('list', $items);
        $this->assign('page', $show);
        $this->display('detail');
    }
	public function Jiaoyu()
    {	
		  $moduleName = 'Jiaoyu';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $db = M($moduleName);
        $where = $this->where;
        $count = $db->where($where)->count();
        $Page = new Page($count, 5);
        $show = $Page->show();
        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();
        $items = array();
        if ($list) {
            foreach ($list as $item) {
                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Jiaoyu&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));
            }
        }
        $this->assign('list', $items);
        $this->assign('page', $show);
        $this->display('detail');
    }
	public function Huadian()
    {	
		  $moduleName = 'Huadian';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $db = M($moduleName);
        $where = $this->where;
        $count = $db->where($where)->count();
        $Page = new Page($count, 5);
        $show = $Page->show();
        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();
        $items = array();
        if ($list) {
            foreach ($list as $item) {
                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Huadian&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));
            }
        }
        $this->assign('list', $items);
        $this->assign('page', $show);
        $this->display('detail');
    }
	public function Wuye()
    {	
		  $moduleName = 'Wuye';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $db = M($moduleName);
        $where = $this->where;
        $count = $db->where($where)->count();
        $Page = new Page($count, 5);
        $show = $Page->show();
        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();
        $items = array();
        if ($list) {
            foreach ($list as $item) {
                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Wuye&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));
            }
        }
        $this->assign('list', $items);
        $this->assign('page', $show);
        $this->display('detail');
    }
	public function Ktv()
    {	
		  $moduleName = 'Ktv';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $db = M($moduleName);
        $where = $this->where;
        $count = $db->where($where)->count();
        $Page = new Page($count, 5);
        $show = $Page->show();
        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();
        $items = array();
        if ($list) {
            foreach ($list as $item) {
                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Ktv&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));
            }
        }
        $this->assign('list', $items);
        $this->assign('page', $show);
        $this->display('detail');
    }
	public function Jiuba()
    {	
		  $moduleName = 'Jiuba';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $db = M($moduleName);
        $where = $this->where;
        $count = $db->where($where)->count();
        $Page = new Page($count, 5);
        $show = $Page->show();
        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();
        $items = array();
        if ($list) {
            foreach ($list as $item) {
                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Jiuba&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));
            }
        }
        $this->assign('list', $items);
        $this->assign('page', $show);
        $this->display('detail');
    }	
	public function Zhuangxiu()
    {	
		  $moduleName = 'Zhuangxiu';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $db = M($moduleName);
        $where = $this->where;
        $count = $db->where($where)->count();
        $Page = new Page($count, 5);
        $show = $Page->show();
        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();
        $items = array();
        if ($list) {
            foreach ($list as $item) {
                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Zhuangxiu&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));
            }
        }
        $this->assign('list', $items);
        $this->assign('page', $show);
        $this->display('detail');
    }
	public function Hunqing()
    {	
		  $moduleName = 'Hunqing';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $db = M($moduleName);
        $where = $this->where;
        $count = $db->where($where)->count();
        $Page = new Page($count, 5);
        $show = $Page->show();
        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();
        $items = array();
        if ($list) {
            foreach ($list as $item) {
                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Hunqing&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));
            }
        }
        $this->assign('list', $items);
        $this->assign('page', $show);
        $this->display('detail');
    }

	
	
	
public function Car_pp()
    {	
		  $moduleName = 'Car_pp';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $db = M($moduleName);
        $where = $this->where;
        $count = $db->where($where)->count();
        $Page = new Page($count, 5);
        $show = $Page->show();
        $list = $db->where($where)->limit(($Page->firstRow . ',') . $Page->listRows)->order('id DESC')->select();
        $items = array();
        if ($list) {
            foreach ($list as $item) {
                array_push($items, array('id' => $item['id'], 'name' => $item['title'], 'linkcode' => (('/index.php?g=Wap&m=Car_pp&a=index&token=' . $this->token) . '&wecha_id={wechat_id}&id=') . $item['id'], 'linkurl' => '', 'keyword' => $item['keyword']));
            }
        }
        $this->assign('list', $items);
        $this->assign('page', $show);
        $this->display('detail');
      $moduleName = 'Car_pp';
        $this->assign('moduleName', $this->modules[$moduleName]);
        $items = array();
        array_push($items, array('id' => 1, 'name' => '品牌管理', 'linkcode' => ('/index.php?g=Wap&m=Car_pp&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'linkurl' => '', 'keyword' => '品牌管理'));
        array_push($items, array('id' => 2, 'name' => '车系管理', 'linkcode' => ('/index.php?g=Wap&m=Car_cx&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'linkurl' => '', 'keyword' => '车系管理'));
        array_push($items, array('id' => 3, 'name' => '车型管理', 'linkcode' => ('/index.php?g=Wap&m=Car_cxing&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'linkurl' => '', 'keyword' => '车型管理'));
        array_push($items, array('id' => 4, 'name' => '销售管理', 'linkcode' => ('/index.php?g=Wap&m=Car_sale&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'linkurl' => '', 'keyword' => '销售管理'));
        array_push($items, array('id' => 4, 'name' => '预约管理', 'linkcode' => ('/index.php?g=Wap&m=Car_baoyang&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'linkurl' => '', 'keyword' => '预约管理'));
        array_push($items, array('id' => 4, 'name' => '车主关怀', 'linkcode' => ('/index.php?g=Wap&m=Car_guanhuai&a=index&token=' . $this->token) . '&wecha_id={wechat_id}', 'linkurl' => '', 'keyword' => '车主关怀'));
	    $this->assign('list', $items);
        $this->display('detail');
    }
}
?>