Esempio n. 1
0
 public function clickAction()
 {
     $this->_helper->layout()->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     $request = $this->getRequest();
     $click = App_Model_Mongodb_RequestLog::click($request->getParam('periode'));
     foreach ($click['result'] as $key => $val) {
         $furl = $val['_id'];
         $url = pathinfo($furl);
         $guid = basename($url['dirname']);
         $title = basename($val['_id']);
         $catalogDb = App_Model_Show_Catalog::show()->getCatalogByGuid($guid);
         if ($catalogDb) {
             if ($catalogDb['profileGuid'] == 'klinik') {
                 $title = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($guid, 'fixedCommentTitle');
             } else {
                 $title = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($guid, 'fixedTitle');
             }
         }
         $click['result'][$key]['title'] = $title;
     }
     $this->getResponse()->setBody(Zend_Json::encode($click));
 }
Esempio n. 2
0
 public function referralAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender(TRUE);
     $db = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application-cli.ini', 'mongodb');
     Shanty_Mongo::addConnections($db);
     $ref = App_Model_Mongodb_RequestLog::referral();
     print_r($ref);
 }