<?php

//Bds mới nhất
$xhtmlMoiNhat = '';
if (!empty($this->itemRealestateMoiNhat)) {
    foreach ($this->itemRealestateMoiNhat as $key => $item) {
        $id = $item['id'];
        $title = $item['title'];
        $image = TEMPLATE_URL . '/default/images/nha_mat_tien_100x75.png';
        $name_type = $item['name_type'];
        $area = $item['area'];
        $price_m2 = $item['price_m2'];
        $cat_id = $item['cat_id'];
        $price = $item['price'];
        $date_modifi = $item['date_modifi'];
        $content = \ZendVN\Filter\ReadMore::create($item['content'], 0, 250);
        if (!empty($item['images'])) {
            $images = \Zend\Json\Json::decode($item['images']);
            $image = current($images);
            $image = UPLOAD_URL . '/real-estate/' . $image;
        }
        $linkDetail = $this->url('DetailBatDongSanRoute', array('module' => 'home', 'controller' => 'realestate', 'action' => 'detail', 'namecategory' => \ZendVN\Url\FriendlyLink::filter($name_type), 'title' => \ZendVN\Url\FriendlyLink::filter($title), 'cid' => $cat_id, 'id' => $id, 'extension' => 'html'));
        $xhtmlMoiNhat .= '<div>
            					<div class="dv-item">
            						<div class="dv-img">
            							<a title="' . $title . '" href="' . $linkDetail . '">
            								<img alt="' . $title . '" src="' . $image . '" />
            							</a>
            						</div>
            						<div class="dv-txt">
            							<a class="a-titleVIP" title="' . $title . '" href="' . $linkDetail . '">' . $title . '</a>
    public function businessAction()
    {
        $view = new ViewModel();
        //Tiêu đề
        $title = 'Doanh nghiệp Bất động sản';
        $this->headTitle($title)->setSeparator(" - ")->append("Website bất động sản");
        $totalItem = $this->getTable()->countItem();
        //List Loại doanh nghiêp
        $itemsTypeBusiness = $this->getTable()->itemInselectBox($this->_arrParam, array('task' => 'list-item-type-business'));
        $itemsCategory = $this->getTable()->listItem($this->_arrParam, array('task' => 'list-item-type-business'));
        //Thành phố
        $itemsCity = $this->getTable()->itemInselectBox($this->_arrParam, array('task' => 'list-item-city'));
        $listCity = array_slice($itemsCity, 1, count($itemsCity) - 1);
        //Doanh nghiệp nổi bật
        $itemBusinessHighlight = $this->getTable()->listItem($this->_arrParam, array('task' => 'list-items-business-highlight'));
        $statisticsBusiness = $this->getTable()->listItem($this->_arrParam, array('task' => 'statistics-type-business'));
        //list
        $router = $this->getEvent()->getRouter();
        $xhtml = '';
        foreach ($statisticsBusiness as $key => $item) {
            $urlCategory = $router->assemble(array('action' => 'category', 'name' => \ZendVN\Url\FriendlyLink::filter($item['name']), 'page' => 1, 'id' => $item['id']), array('name' => 'CategoryBusinessRoute'));
            $xhtml .= ' <li><h2><span>' . $item['name'] . '</span><a href="' . $urlCategory . '" title="Xem thêm các sàn giao dịch bất động sản">(' . $item['count'] . ') Doanh nghiệp</a></h2>';
            $business = $this->getTable()->listItem($item, array('task' => 'list-items-business'));
            foreach ($business as $val) {
                $logo = !empty($val['logo']) ? UPLOAD_URL . '/logo-business/' . $val['logo'] : TEMPLATE_URL . '/admin/images/NoImage.jpg';
                $linkIntro = $router->assemble(array('action' => 'detail', 'alias' => $val['alias']), array('name' => 'IntroBusinessRoute'));
                $xhtml .= ' <div class="content">
                                    <div class="infoGroup" onmouseover="javascript:$(\'#div_enb0000027\').show();" onmouseout="javascript:$(\'#div_enb0000027\').hide();">
                                            <a href="' . $linkIntro . '" title="' . $val['name'] . '" class="avatar">
                                            <img src="' . $logo . '" width="95" alt="' . $val['name'] . '" title="' . $val['name'] . '">
                                            </a>
                                            <div class="text">
                                            <h3>
                                              <a href="' . $linkIntro . '" title="' . $val['name'] . '">' . $val['name'] . '</a>
                                              <span>' . $val['address'] . '</span>
                                              <span>ĐT: ' . $val['phone'] . ' &nbsp;&nbsp;|&nbsp;&nbsp; Fax: ' . $val['fax'] . '</span>
                                            </h3>
                                            <p>
                                             ' . \ZendVN\Filter\ReadMore::create($val['intro'], 0, 300) . '<a href="' . $val['website'] . '" title="' . $val['website'] . '">' . $val['website'] . '</a>
                                            </p>
                                            </div>
                                    </div>

                                </div>';
            }
            $xhtml . '</li>';
        }
        //nested
        $view->setTemplate('home/business/business');
        $formSearchBusiness = new ViewModel(array('totalItem' => $totalItem, 'itemsTypeBusiness' => $itemsTypeBusiness, 'itemsCity' => $itemsCity, 'itemsCategory' => $itemsCategory));
        $formSearchBusiness->setTemplate('home/business/nested-form-search-business');
        $view->addChild($formSearchBusiness, 'formSearchBusiness');
        //end nested
        $view->setVariables(array('title' => $title, 'arrParam' => $this->_arrParam, 'currentController' => $this->_currentController, 'listCity' => $listCity, 'itemBusinessHighlight' => $itemBusinessHighlight, 'xhtmlBusiness' => $xhtml));
        return $view;
    }
Example #3
0
<?php

if (!empty($this->arrParams['itemSkin'])) {
    $menuHome = $this->url('home', array('module' => 'home', 'controller' => 'index', 'action' => 'index'));
    $arrConfigLogo = \Zend\Json\Json::decode($this->arrParams['itemSkin']->config_logo);
    $image = !empty($arrConfigLogo->logo) ? UPLOAD_URL . '/skin/' . $arrConfigLogo->logo : TEMPLATE_URL . '/admin/images/NoImage.jpg';
    $slogan = $arrConfigLogo->slogan;
}
$linkCpanel = $this->url('MVC_AdminRouter/action', array('module' => 'admin', 'controller' => 'index', 'action' => 'index'));
$actionUser = '';
if (!empty($this->identity()->id)) {
    $linkEditUser = $this->url('MVC_AdminRouter/action', array('module' => 'admin', 'controller' => 'user', 'action' => 'edit', 'id' => $this->identity()->id));
    $linkLogout = $this->url('MVC_HomeRouter/action', array('module' => 'home', 'controller' => 'user', 'action' => 'logout'));
    $actionUser = '******' . $this->identity()->fullname . '" href="' . $menuHome . '" target="_blank"><img src="' . TEMPLATE_URL . '/admin/images/inav.png" width="10" height="10"> <font color="red"><b>' . \ZendVN\Filter\ReadMore::create($this->identity()->fullname, 0, 10) . '</font></b></a>
            <ul class="hidden-topmenu">
                <li><a class="" href="' . $linkEditUser . '" target="_blank">
                    <div class="perMenuItem">
                        Chỉnh sửa</div>
                </a></li>
                <li><a class="" href="' . $linkLogout . '" target="_blank">
                    <div class="perMenuItem">
                        Đăng xuất</div>
                </a></li>
               
            </ul>
        </li>';
}
?>
  
<div class="LogoHeader" >
<?php

//Doanh nghiệp nổi bật
$itemBusinessHighlight = '';
if (!empty($this->itemBusinessHighlight)) {
    foreach ($this->itemBusinessHighlight as $item) {
        $linkDetail = $this->url('IntroBusinessRoute', array('action' => 'detail', 'alias' => $item['alias']));
        $title = $item['name'];
        $logo = !empty($item['logo']) ? UPLOAD_URL . '/logo-business/' . $item['logo'] : TEMPLATE_URL . '/admin/images/NoImage.jpg';
        $date_time = $item['date_time'];
        $intro = \ZendVN\Filter\ReadMore::create($item['intro'], 0, 250);
        $phone = $item['phone'];
        $fax = $item['fax'];
        //$itemBusinessHighlight      .= '<li><a href="'.$linkIntro.'" title="'.$item['name'].'"><img src="'.$logo.'" width="113" alt="'.$item['name'].'" title="'.$item['name'].'"></a><h3><a href="'.$linkIntro.'" title="'.$item['name'].'">'.\ZendVN\Filter\ReadMore::create($item['name'],0,30).'</a></h3></li>';
        $itemBusinessHighlight .= '<div>
                    					<div class="dv-item">
                    						<div class="dv-img">
                    							<a title="' . $title . '" href="' . $linkDetail . '">
                    								<img alt="' . $title . '" src="' . $logo . '" />
                    							</a>
                    						</div>
                    						<div class="dv-txt">
                    							<a class="a-titleVIP" title="' . $title . '" href="' . $linkDetail . '">' . $title . '</a>
                    							<p><i class="ico-sty i-time-bla"></i>' . $date_time . '</p>
                    							<label class="lb-des">' . $intro . '</label>
                    							<p>
                    								<span>
                        								<label class="lb-title">Phone:</label>
                        								<a href="javascript:;" title="' . $phone . '" rel="nofollow" class="a-txt-cl1"> <strong>' . $phone . '</strong></a>
                    								</span>
                    								<span>
Example #5
0
        $linkIntro = $this->url('IntroProjectRoute', array('module' => 'home', 'controller' => 'project', 'action' => 'intro', 'title' => \ZendVN\Url\FriendlyLink::filter($item['name']), 'id' => $item['id'], 'extension' => 'html'));
        $image = TEMPLATE_URL . '/admin/images/NoImage.jpg';
        $i = 1;
        if (!empty($item['images'])) {
            $images = \Zend\Json\Json::decode($item['images']);
            $image = current($images);
            $image = UPLOAD_URL . '/project/' . $image;
        }
        $listItemHighlight .= '<div>
                					<div class="frm-item-httt">
                						<a title="' . $item['name'] . '" class="a-titleVIP" href="' . $linkIntro . '">
        							         <img style="border: 1px solid #CCC; padding: 2px; width: 200px; height: 130px;" class="imageduan" src="' . $image . '" alt="' . $item['name'] . '" />
                						</a>
                						<div>
                							<strong>
                							    <a title="' . $linkIntro . '" class="a-titleVIP" href="' . $linkIntro . '">' . \ZendVN\Filter\ReadMore::create($item['name'], 0, 30) . '</a>
                							</strong>
                						</div>
                					</div>
                    			</div>';
    }
}
?>
<div class="dv-ct-frm-l">
	<div class="dv-tabs">
		<div class="dv-ico">
			<i class="ico-sty ttbds"></i>
		</div>
		<div class="dv-ct-tabs-vip">
			<a class="a-title" title="WebOne Mới nhất" href="javascript:;">DỰ ÁN NỔI BẬT</a>
		</div>