Exemplo n.º 1
0
 public function bind($pin_id)
 {
     $req = new JO_Http_Async();
     $request = $this->getRequest();
     $user_login_buttons = $this->getByMethod('pin_oncomplete');
     foreach ($user_login_buttons as $id => $login) {
         $req->curl_get_async($request->getBaseUrl(), array('controller' => 'modules_' . $login . '_pinoncomplete', 'user' => JO_Session::get('user[user_id]'), 'pin' => $pin_id, 'type' => 'edit'));
     }
 }
Exemplo n.º 2
0
 public function indexAction()
 {
     $request = $this->getRequest();
     if (!JO_Session::get('user[user_id]')) {
         $this->redirect(WM_Router::create($request->getBaseUrl() . '?controller=users&action=login'));
     }
     $request = $this->getRequest();
     ///////////// boards
     $this->view->createBoard = WM_Router::create($request->getBaseUrl() . '?controller=boards&action=createboardwithoutcategory');
     $boards = new Model_Boards_BoardsWithShared(array('filter_user_id' => JO_Session::get('user[user_id]')));
     $this->view->boards = array();
     if ($boards->count()) {
         foreach ($boards as $board) {
             $this->view->boards[] = array('board_id' => $board['board_board_id'], 'title' => $board['board_title']);
         }
     }
     /////// add media
     $this->view->add_media_href = WM_Router::create($this->getRequest()->getBaseUrl() . '?controller=modules_instagram_media&action=pinMediaCheck');
     //$this->initInstagram();
     $this->view->checkLoginInstagram = WM_Router::create($this->getRequest()->getBaseUrl() . '?controller=modules_instagram_media&action=isInstagramUser');
     $this->view->getMediaInstagramFirst = WM_Router::create($this->getRequest()->getBaseUrl() . '?controller=modules_instagram_media&action=getMedias&first=true');
     $this->view->getMediaInstagram = WM_Router::create($this->getRequest()->getBaseUrl() . '?controller=modules_instagram_media&action=getMedias');
     /////////////curl request to get instagram media's
     /*$curl = new JO_Http();
     		$curl->initialize(array(
     				'target' => WM_Router::create( $this->getRequest()->getBaseUrl() . '?controller=modules_instagram_media&action=cronfirst&user='******'user[user_id]') ),
     				'method' => 'GET',
     				'timeout' => 2
     		));
     		$curl->useCurl(true);
     		$curl->execute();*/
     $req = new JO_Http_Async();
     $req->curl_get_async($this->getRequest()->getBaseUrl(), array('controller' => 'modules_instagram_media', 'action' => 'cronfirst', 'user' => JO_Session::get('user[user_id]')));
     // 					var_dump($curl->result); exit;
     $this->view->children = array('header_part' => 'layout/header_part', 'footer_part' => 'layout/footer_part');
 }