public static function getInstance() { if (self::$_instance == NULL) { self::$_instance = new App_Models_PagelikeModel(); self::$_instance->_db = App_Storage_Mysql_Connector::getInstance(); } return self::$_instance; }
public function luotlikeuserAction() { $this->_helper->viewRenderer->setNoRender(true); $this->_helper->layout->disableLayout(); $pageLike = App_Models_PagelikeModel::getInstance(); $idUserFB = $_SESSION['idUserFB']; $idpage = $_SESSION['idpage']; $pageLike->addUserLikepage($idUserFB, $idpage); }
public function indexAction() { if (!isset($this->_SESSION->iduseradmin)) { $link_login = APP_DOMAIN . "/admin/login"; header("Location:{$link_login}"); } $pageLike = App_Models_PagelikeModel::getInstance(); $listPage = $pageLike->getPageLike(); $this->view->listPage = $listPage; }
public function indexAction() { if (!isset($this->_SESSION->iduseradmin)) { $link_login = APP_DOMAIN . "/admin/login"; header("Location:{$link_login}"); } $store = $this->view->info = App_Models_StoreModel::getInstance(); $sql = "select * from ishali_noidung_chiase order by idnoidung desc"; $data = $store->SelectQuery($sql); $this->view->noidungchiase = $data; $pageLike = App_Models_PagelikeModel::getInstance(); $listPageLike = $pageLike->getPageLike(); $this->view->listPageLike = $listPageLike; }
public function luupagelikeAction() { $pageLike = App_Models_PagelikeModel::getInstance(); $listPage = $_POST['pagelike']; //print_r($listPage); $data = $pageLike->luuPageLike($listPage); //echo $data; if ($data == 1) { $link = ROOT_DOMAIN . '/admin/chonpagelike'; echo "<script>ThongBaoDongY('Lưu Thành Công.', '{$link}');</script>"; } else { echo "<script>ThongBaoDongY('Lưu không thành công<br/>Vui Lòng thực hiện lại thao tác.', '{$link}');</script>"; } }
public function indexAction() { if (!isset($this->_SESSION->iduseradmin)) { $link_login = APP_DOMAIN . "/admin/login"; header("Location:{$link_login}"); } $store = $this->view->info = App_Models_StoreModel::getInstance(); $sql = "SELECT inp.id, inp.idpage, ip.page_name, inc.tieude "; $sql .= "FROM ishali_noidung_page inp, ishali_noidung_chiase inc, ishali_pages ip "; $sql .= "WHERE inp.idpage = ip.id_fb_page AND inc.idnoidung = inp.idnoidung"; $data = $store->SelectQuery($sql); $this->view->baivietcuapage = $data; $pageLike = App_Models_PagelikeModel::getInstance(); $listPageLike = $pageLike->getPageLike(); $this->view->listPageLike = $listPageLike; }
public function preDispatch() { $this->_SESSION = new Zend_Session_Namespace(); $facebook = new Ishali_Facebook(); $config = Zend_Registry::get(APPLICATION_CONFIG); $pageLike = App_Models_PagelikeModel::getInstance(); if ($facebook->getpageid() != "") { $idpage = $facebook->getpageid(); $_SESSION['idpage'] = $idpage; } else { $idpage = $_SESSION['idpage']; } if (!isset($_SESSION['userLike'])) { $_SESSION['userLike'] = time(); $userLike = $_SESSION['userLike']; } else { $userLike = $_SESSION['userLike']; } /* $infoPage = $pageLike->thongTinTrang($idpage); $linkPage = $infoPage[0]['link_page']; $appId = $config->facebook->appid; if($facebook->getParameterUrl() == "") { $appData = ""; $linkPageApp = $linkPage . '/app_' . $appId; } else { $appData = $facebook->getParameterUrl(); $linkPageApp = $linkPage . '/app_' . $appId . '?app_data=' . $appData; } */ /* $idUserFB = $facebook->getuserfbid(); if($idUserFB == 0) { $facebook->userlogin($linkPageApp); } $_SESSION['idUserFB'] = $idUserFB; */ //Cau hinh Layout $option = array('layout' => 'layout', 'layoutPath' => LAYOUT_PATH . '/tmplikepage'); Zend_Layout::startMvc($option); }
public function yeucaulikeAction() { $pageLike = App_Models_PagelikeModel::getInstance(); $data = $pageLike->getConfig(); $this->view->config = $data; }