コード例 #1
0
ファイル: Sort.php プロジェクト: riteshsahu1981/Weadvance
 public function sort($colname, $options = '')
 {
     $url = "/" . $this->view->module . "/" . $this->view->controllerName . "/" . $this->view->actionName;
     $params = $this->view->params;
     if (isset($params['col']) && $params['col'] == $colname && $params['order'] == "asc") {
         $url .= "/col/" . $colname . "/order/desc";
     } else {
         if (isset($params['col']) && $params['col'] == $colname && $params['order'] == "desc") {
             $url .= "/col/" . $colname . "/order/asc";
         } else {
             $url .= "/col/" . $colname . "/order/desc";
         }
     }
     foreach ($options as $k => $v) {
         $url .= "/" . $k . "/" . $v;
     }
     $seoUrl = new Base_View_Helper_SeoUrl();
     $url = $seoUrl->seoUrl($url);
     $cdnUri = new Base_View_Helper_CdnUri();
     if (isset($params['col']) && $params['col'] == $colname && $params['order'] == "desc") {
         $arrowImage = $cdnUri->cdnUri() . "/images/arrow.gif";
     } else {
         if (isset($params['col']) && $params['col'] == $colname && $params['order'] == "asc") {
             $arrowImage = $cdnUri->cdnUri() . "/images/arrow_up.gif";
         } else {
             $arrowImage = $cdnUri->cdnUri() . "/images/arrow.gif";
         }
     }
     $str = "<a href='{$url}'>";
     $str .= "<img src='{$arrowImage}' align='right' alt='' />";
     $str .= "</a>";
     return $str;
 }
コード例 #2
0
ファイル: Page.php プロジェクト: riteshsahu1981/we
 public function getFooterLinks()
 {
     $links = "";
     $pages = $this->fetchAll("status='1'");
     $seoUrl = new Base_View_Helper_SeoUrl();
     $site_url = Zend_Registry::get('siteurl');
     foreach ($pages as $p) {
         $links .= "<a href='" . $site_url . $seoUrl->seoUrl("/employee/page/identifire/" . $p->getIdentifire()) . "'>";
         $links .= $p->getTitle();
         $links .= "</a> | ";
     }
     $links = substr($links, 0, strlen($links) - 2);
     return $links;
 }