public function datalistAction() { $videos = new Application_Model_Videos(); // echo '<pre>'; print_r($videos->getPdfs()); // exit(); $this->view->data = $videos->getPdfs(); }
public function myStreams($ruserid) { if (isset($this->authIdentity)) { $sql = $this->_db->select()->from('activity', array('activityid', 'userid', 'ruserid', 'contentid', 'title', 'contenttype', 'contenturl', 'alternate_contentid', 'date'))->joinLeft('freniz', 'freniz.userid=activity.ruserid', array('ruserid' => 'userid', 'rusername' => 'username', 'ruserurl' => 'url'))->joinLeft('image', 'image.imageid=freniz.propic', 'image.url as ruserimageurl')->where('ruserid=?', $ruserid)->where('(contenttype=\'post\' and activity.title=\'posted on\') or (contenttype=\'video\' and activity.title=\'post a video on\') or (contenttype=\'image\' and activity.title=\'post image\' and activity.userid!=?) or (contenttype in (\'propic\',\'basicinfo\',\'personalinfo\',\'mood\',\'city\'))', $ruserid); $results = $this->_db->fetchAssoc($sql); $myStreamsMapper = array(); foreach ($results as $id => $values) { switch ($values['contenttype']) { case 'post': $myStreamsMapper['posts'][$id] = $values['contentid']; break; case 'image': $myStreamsMapper['images'][$id] = $values['contentid']; break; case 'video': $myStreamsMapper['videos'][$id] = $values['contentid']; break; } } if (!empty($myStreamsMapper['posts'])) { $posts = new Application_Model_Post($this->_db); $myStream_results['post'] = $posts->getPosts($myStreamsMapper['posts']); } if (!empty($myStreamsMapper['images'])) { $images = new Application_Model_Images($this->_db); $myStream_results['image'] = $images->getArrayOfImages($myStreamsMapper['images']); } if (!empty($myStreamsMapper['videos'])) { $videos = new Application_Model_Videos($this->_db); $myStream_results['video'] = $videos->getVideos($myStreamsMapper['videos']); } $final_results['mystream'] = $results; $final_results['results'] = $myStream_results; $sql = $this->_db->select()->from('commentactivity', 'max(id) as maxcomment'); $result = $this->_db->fetchRow($sql); $final_results['maxcomment'] = $result['maxcomment']; return $final_results; } }
public function viewAction() { $videos = new Application_Model_Videos(); $videoList = $videos->getVideos(); $videoInfo = array(); $videoCat = ""; foreach ($videoList as $fK => $fV) { if ($videoCat != $fV["category"]) { $videoInfo[$fV["category"]][] = $fV; } } //echo "<pre>";print_r($faqInfo); $this->view->videos = $videoInfo; $faqs = new Application_Model_Faqs(); $ddl_category_list = $faqs->fetchCategoryNameList(2); $this->view->ddl_category_list = $ddl_category_list; }
public function getcommentsAction() { $videoid = $this->getRequest()->getParam('videoid'); $from = $this->getRequest()->getParam('from'); if (empty($from) && !(is_int($from) || ctype_digit($from))) { $from = 0; } $videomodel = new Application_Model_Videos($this->registry->DB); $this->view->videoid = $videoid; $this->view->results = $videomodel->getComments($videoid, $from); }
public function datalistAction() { $user = new Application_Model_User($this->user); // $dickSubaccounts = $user->getUserSubaccounts(1174); $videos = new Application_Model_Videos(); $this->view->data = $videos->getPdfs(); $this->view->userID = $this->user->getId(); // $this->view->dickSubusers = $dickSubaccounts; // $this->view->prUsers = array('1174'); $this->view->userObj = $user; }