<?php

	/***************************************************************\
	|																|
	|	开单大师（专业的房产ERP管理系统）								|
	|																|
	|	© 2019 http://www.kaidandashi.com All rights reserved.		|
	|																|
	|	本系统由淮南市银泰软件科技有限公司提供技术支持					|
	|																|
	|	QQ号：984784483												|
	|																|
	\***************************************************************/

	namespace Admin\Controller;
	use Think\Controller;
	class FydayinController extends CommonController {
		function index() {
			$fybh = I('fybh');
			$fy = M('Fangyuan')->where(array('bianhao'=>$fybh))->find();
			$is_rbac = _rbac_btn_show(213,$fy['zhuangtai'],$fy['weihurenid']);
			if (!$is_rbac) {
				$this->redirect('Index/error');
			}
			//输出当前模板
			$Mb = M('Fydayin');
			$mb = $Mb->where(array('id'=>I('mbid')))->find();
			$this->assign('mb',$mb);
			//输出房源信息
			$this->assign('fy',$fy);
			$this->wuyedz = M('xiaoqu')->where(array('id'=>$fy['xiaoqu']))->getField('wuyedz');
			$photo = M('Photo')->where(array('fybh'=>$fybh))->select();
			$this->assign('photo',$photo);  
			$this->display();
		}
		function mblist() {
			//输出当前模板列表
			$Mb = M('Fydayin');
			$mb = $Mb->where(array('mbleixing'=>I('mblx')))->order('id desc')->select();
			$this->assign('mb',$mb);
			$this->display();
		}
	}