コード例 #1
0
 public function __invoke($items, $options = null)
 {
     //
     $urlHelper = $this->getView()->plugin('url');
     $result = '<ul>';
     $result .= sprintf('<li><a title="Trang chủ" href="%s">Trang chủ</a></li>', $urlHelper('home'));
     //Dữ liệu database
     if ($options['task'] == 'data') {
         $total = $items->count();
         if (!empty($items)) {
             $i = 1;
             foreach ($items as $item) {
                 $linkCategory = $urlHelper('CategoryNiceHouseRoute', array('controller' => 'nicehouse', 'action' => 'category', 'name' => \ZendVN\Url\FriendlyLink::filter($item->name), 'page' => 1, 'id' => $item->id));
                 if ($i == $total) {
                     $result .= sprintf('<li class="li-active"><a title="%s" href="%s">%s</a>&raquo;</li>', $item->name, 'javascript:;', $item->name);
                 } else {
                     $result .= sprintf('<li><a title="%s" href="%s">%s</a>&raquo;</li>', $item->name, $linkCategory, $item->name);
                 }
                 $i++;
             }
         }
     }
     //Dữ liệu tĩnh
     if ($options['task'] == 'no-data' && !empty($items)) {
         $result .= sprintf('<li><a title="No data" href="javascript:;">&gt</a></li>', $items);
     }
     $result .= '</ul>';
     return $result;
 }
コード例 #2
0
<?php

//BDS chính chủ
$xhtmlChinhChu = '';
$xhtmlChinhChuToolTip = '';
if (!empty($this->itemRealestateChinhChu)) {
    foreach ($this->itemRealestateChinhChu as $key => $item) {
        $id = $item['id'];
        $title = $item['title'];
        $name_type = $item['name_type'];
        $cat_id = $item['cat_id'];
        $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'));
        $xhtmlChinhChu .= '<tr>
            					<td>
            						<table>
            							<tr>
            								<td>»</td>
            								<td>
                                                <a title="' . $title . '" class="TieudiemFull" href="' . $linkDetail . '">' . $title . '</a>
            							    </td>
            							</tr>
            						</table>
            					</td>
            				</tr>';
    }
}
?>
<div class="dv-box-ttbds">
	<div class="dv-tabs-ttbds">
		<div class="dv-ico-ttbds">
			<i class="ico-sty nha-dat-ban"></i>
コード例 #3
0
    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;
    }
コード例 #4
0
<?php

//nhà đất theo thành phố
$xhtml = '';
if (!empty($this->arrParams['listCity'])) {
    $total = count($this->arrParams['listCity']);
    $i = 1;
    $j = 1;
    $num = ceil($total / 5);
    foreach ($this->arrParams['listCity'] as $item) {
        $urlCity = $this->url('CityBatDongSanRoute', array('controller' => 'realestate', 'action' => 'city', 'cityname' => \ZendVN\Url\FriendlyLink::filter($item['name']), 'page' => 1, 'cityid' => $item['id']));
        if ($i == 1) {
            $xhtml .= '<td valign="top" width="20%" rowspan="2">
                        <table id="ContentPlaceHolder4_getLinkSearch3_DataList1" cellspacing="0" style="width: 100%; border-collapse: collapse;">
						  <tbody>';
        }
        $xhtml .= '<tr><td><a title="BĐS ' . $item['name'] . '" href="' . $urlCity . '">BĐS ' . $item['name'] . '</a></td></tr>';
        if ($i == $num || $j == $total) {
            $i = 0;
            $xhtml .= '</tbody></table></td>';
        }
        $i++;
        $j++;
    }
}
?>
<div class="dv-ft-dm">
	<div class="ft-dm-in">
		<table class="table">
			<tr>
				<?php 
コード例 #5
0
            $xhtmlLegalHousingCategory .= '<li class="nav-submenu-item"><a title="' . $item['name'] . '" href="' . $urlCategory . '">' . $item['name'] . ' cho thuê</a></li>';
            $xhtmlItemLegalHousingCategory .= '<li><a title="' . $item['name'] . '" href="' . $urlCategory . '">' . $item['name'] . '</a></li>';
        } else {
            break;
        }
        $i++;
    }
}
//============Menu nhà đẹp=================
$menuNiceHouse = $this->url('ListNiceHouseRoute', array('module' => 'home', 'controller' => 'nicehouse', 'action' => 'index'));
$xhtmlNiceHouseCategory = '';
$xhtmlItemNiceHouseCategory = '';
if (!empty($this->arrParams['listCategoryNiceHouse'])) {
    $i = 1;
    foreach ($this->arrParams['listCategoryNiceHouse'] as $item) {
        $urlCategory = $this->url('CategoryNiceHouseRoute', array('module' => 'home', 'controller' => 'nicehouse', 'action' => 'category', 'name' => \ZendVN\Url\FriendlyLink::filter($item['name']), 'page' => '1', 'id' => $item['id'], 'extension' => 'html'));
        if ($i <= 16) {
            $xhtmlNiceHouseCategory .= '<li class="nav-submenu-item"><a title="' . $item['name'] . '" href="' . $urlCategory . '">' . $item['name'] . ' cho thuê</a></li>';
            $xhtmlItemNiceHouseCategory .= '<li><a title="' . $item['name'] . '" href="' . $urlCategory . '">' . $item['name'] . '</a></li>';
        } else {
            break;
        }
        $i++;
    }
}
$menuDangBds = $this->url('MVC_UserRouter/action', array('module' => 'user', 'controller' => 'real-estate', 'action' => 'add'));
?>
<div class="header-f">
	<div class="header-in-f">
		<div class="hd-mnu-top">
			<nav class="nav">
コード例 #6
0
<?php

//dự án nổi bật
$listItemHighlight = '';
if (!empty($this->listItemHighlight)) {
    foreach ($this->listItemHighlight as $item) {
        $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">
コード例 #7
0
 public function indexAction()
 {
     $view = new ViewModel();
     //Tiêu đề
     $title = 'Nhà đẹp';
     $this->headTitle($title)->setSeparator(" - ")->append("Website bất động sản");
     //Danh mục
     $listItemsCategory = $this->getTable()->listItem($this->_arrParam, array('task' => 'list-items-category'));
     //list
     $statisticsNiceHouse = $this->getTable()->listItem($this->_arrParam, array('task' => 'statistics-type-nicehouse'));
     $router = $this->getEvent()->getRouter();
     $xhtml = '';
     foreach ($statisticsNiceHouse as $key => $item) {
         $urlCategory = $router->assemble(array('action' => 'category', 'name' => \ZendVN\Url\FriendlyLink::filter($item['name']), 'page' => 1, 'id' => $item['id']), array('name' => 'CategoryNiceHouseRoute'));
         $this->_arrParam['arrChildId'] = $this->getTable()->recusive($item['id'], array('task' => 'list-child-of-parent-nice-house-cat'));
         $this->_arrParam['id'] = $item['id'];
         $xhtml .= ' <li><h2><span>' . $item['name'] . '</span><a href="' . $urlCategory . '" title="Xem thêm">Xem thêm</a></h2><div class="content">';
         $nicehouse = $this->getTable()->listItem($this->_arrParam, array('task' => 'list-items-nicehouse'));
         foreach ($nicehouse as $val) {
             $image = !empty($val['images']) ? UPLOAD_URL . '/nice-house/' . $val['images'] : TEMPLATE_URL . '/admin/images/NoImage.jpg';
             $linkIntro = $router->assemble(array('controller' => 'nicehouse', 'action' => 'detail', 'namecategory' => \ZendVN\Url\FriendlyLink::filter($val['name_category']), 'title' => \ZendVN\Url\FriendlyLink::filter($val['title']), 'cid' => $val['cat_id'], 'id' => $val['id'], 'extension' => 'html'), array('name' => 'DetailNiceHouseRoute'));
             $xhtml .= '
                             <h3><a href="' . $linkIntro . '" title="' . $val['title'] . '">
                             <img src="' . $image . '" width="204" height="153" alt="' . $val['title'] . '" title="' . $val['title'] . '"></a>
                             <a href="' . $linkIntro . '" title="' . $val['title'] . '">' . $val['title'] . '</a></h3>
                             ';
         }
         $xhtml . '</li></div>';
     }
     $view->setVariables(array('title' => $title, 'arrParam' => $this->_arrParam, 'currentController' => $this->_currentController, 'listItemsCategory' => $listItemsCategory, 'xhtmlList' => $xhtml));
     return $view;
 }