public function cekAction()
 {
     $this->_helper->layout()->disableLayout();
     $this->_helper->viewRenderer->setNoRender(true);
     $table_related_article_attraction = new Model_DbTable_RelatedArticleAttraction();
     $ralated_article = $table_related_article_attraction->getByArticleId2(68);
     //print_r($ralated_article);
     $label = "bandungs";
     $link = "http://www.c.com.indo";
     $counter = 1;
     foreach ($ralated_article as $key => $row) {
         //if (!in_array($row['label'], $os)) {
         //    echo $value;
         //
         //    //$key = array_search($value, $os);
         //    //array_splice($os, $key,1);
         //}
         if ($row['label'] == $label and $row['link'] == $link) {
             //echo 'ada';
             break;
         } else {
             if ($counter <= 1) {
                 echo 'ga';
                 $counter++;
             }
             //echo $key;
             //break;
         }
         //echo $row['link'] .'<br />';
     }
     $link = array('http://www.c.com', 'http://www.c.com.indo');
     $label = array('a', 'bbb');
     //$res_db = count($ralated_article);
     //
     //$data = array("bandung","cimahi");
     //$data2 = array("http://www.c.com.indo","http://www.c.com.net");
     //foreach($ralated_article as $row)
     //{
     //    //if (in_array($row->label, $data) AND in_array($row->link, $data2)) {
     //    //    //echo $row->label .' - ';
     //    //    //echo $row->link.'<br />';
     //    //
     //    //}
     //}
     //
     //$os = array("Mac", "NT", "Irix", "Linux");
     //
     //$b = array("Mac","Ubuntu");
     ////
     //foreach($b as $key=>$value)
     //{
     //    if (!in_array($value, $os)) {
     //        echo $value;
     //
     //        //$key = array_search($value, $os);
     //        //array_splice($os, $key,1);
     //    }
     //
     //}
     //print_r($os);
 }
 /**
  * IS: Parameter articleId terdeklarasi
  * FS: Mengirimkan ke viewer: article, pageTitle
  * Desc: Fungsi untuk menampilkan attraction
  */
 public function detailInDestAction()
 {
     $this->_helper->layout->setLayout('one-column');
     //$this->_helper->layout()->disableLayout();
     //$this->_helper->viewRenderer->setNoRender(true);
     $exurl = explode('/', $this->view->currentUrl());
     $newUrl = array_splice($exurl, 0, 9);
     $url = implode("/", $newUrl);
     //echo $url;
     //print_r($newUrl);
     //echo $url;
     // Param
     $articleId = $this->_getParam('articleId');
     $destId = $this->_getParam('destId');
     $this->view->pageViewer = $this->countView($destId);
     // Model
     $articleDb = new Model_DbTable_Article();
     // Data
     $article = $articleDb->getAllWithDescByLanguageId($articleId, $this->_languageId, true);
     //if content is empty, will be redirecting to list of article
     if ($article['description']) {
         $article['description'] = str_replace("../../../../", "../../../../../../", $article['content']);
         // Breadrumb
         $pageTitle = $this->view->HtmlDecode($article['name']);
         $this->_generateDescBreadcrumb($pageTitle);
         // Passing ke view
         $this->view->pageTitle = $pageTitle;
         $this->view->article = $article;
         $this->view->main_images = $article['image'];
         //realated link
         $linkModel = new Model_DbTable_RelatedArticleAttraction();
         $this->view->related_link = $linkModel->getByArticleId($articleId, $this->_languageId);
     } else {
         $this->_redirector->gotoUrl($url);
     }
 }