function run() { parent::run(); $this->nofooter = true; $this->noheader = true; $this->wf->cp->ogimage = WRA::base_url() . 'images/500.png'; $adminmark = ''; if (wra_userscontext::hasright('adminpage')) { $adminmark = time(); } $cache0 = new wra_cacheflow('p' . $this->wf->requestedpage . $adminmark, true); if ($cache0->begin()) { if (!empty($this->wf->currouteindex[0]['index'])) { if (count($this->wf->currouteindex) > 1) { $this->linky = addslashes($this->wf->currouteindex[0]['index'] . '/' . $this->wf->currouteindex[1]['index']); $id = wra_foursqvenues::getidbylink($this->linky); if ($id) { $this->cpid = $id; } } else { $this->cpid = intval($this->wf->currouteindex[0]['index']); if ($this->cpid > wra_foursqvenues::$linknumber) { $this->cpid = 0; } } } $this->wf->cp->ogtitle = 'Fresh ukrainian news on the map '; $this->wf->cp->ogname = 'Map of war in Ukraine'; $this->wf->cp->header = 'Map of Unrest in Ukraine'; $this->wf->cp->description = 'Fresh news from Ukraine on the map, event of summer 2014, war between Russia and Ukraine, beginning of Third World War. 2014 pro-Russian conflict in Ukraine '; $this->wf->cp->keywords = 'Ukraine, Russia, Donetsk, war, artillery, war games, provocations, intelligence, USA, Eastern Europe'; if ($this->cpid != 0) { $this->venue = new wra_foursqvenues(); $this->venue->load($this->cpid); $this->wf->cp->header = $this->venue->name; $this->wf->cp->ogtitle = $this->venue->name; $this->wf->cp->pagehead = $this->venue->name; } if (!empty($_REQUEST['ll'])) { ini_set('display_errors', 'Off'); $this->ll = explode(';', $_REQUEST['ll']); $this->ll[0] = floatval($this->ll[0]); $this->ll[1] = floatval($this->ll[1]); } if (!empty($_REQUEST['zoom'])) { $this->zoom = intval($_REQUEST['zoom']); } $this->cats = wra_cats::get_list(); $this->venues = wra_foursqvenues::get_l30(time()); $this->wf->includeheader(); include WRA_Path . '/template/index.php'; $this->wf->includefooter(); // $this->lastupdate= wra_foursqvenues::lastupdate(); } $cache0->end(); // $this->wf->nicedie(); }
function run() { parent::run(); if ($_REQUEST['oauth_token']) { $connection = new TwitterOAuth(WRA_CONF::$twiappid, WRA_CONF::$twiappsecret, $_REQUEST['oauth_token'], $_REQUEST['oauth_verifier']); $token_credentials = $connection->getAccessToken($_REQUEST['oauth_verifier']); $connection = new TwitterOAuth(WRA_CONF::$twiappid, WRA_CONF::$twiappsecret, $token_credentials['oauth_token'], $token_credentials['oauth_token_secret']); $account = $connection->get('account/verify_credentials'); // WRA::debug($ctwe); if ($account) { // WRA::debug($user); $nu = new wra_twu(); $nu->display_name = htmlspecialchars($account->screen_name, ENT_QUOTES); //$user->name; $nu->regdate = WRA::getcurtime(); $nu->twuserid = $account->id; // $nu->userid = $usr; $nu->username = htmlspecialchars($account->name, ENT_QUOTES); $nu->usersurname = htmlspecialchars($user['last_name'], ENT_QUOTES); $nu->link = $account->url; //$user->link; $nu->user_agent = wra_fbu::getbrowser(); $nu->access_token = $token_credentials['oauth_token']; $nu->email = $token_credentials['oauth_token_secret']; $nu->photo = $account->profile_image_url; if ($account->notifications) { $nu->gender = 0; } else { $nu->gender = 1; } $nu->phone = ''; if (!empty($nu->twuserid)) { if (!wra_twu::istwexist($nu->twuserid)) { $nu->userid = $this->addUsr($nu->username, $nu->usersurname, $nu->phone, $nu->email, "asdf" . time(), $nu->photo); $nu->add(); } else { $nu->loadbytw($nu->twuserid); $nu->update(); } wra_twu::twd($nu->twuserid, $nu->userid); } if (empty($_SESSION['lastpage'])) { WRA::gotopage(WRA::base_url() . '?from=tw&show=no'); } else { WRA::gotopage(WRA::base_url() . $_SESSION['lastpage']); } $_SESSION['lastpage'] = ''; } } else { ?> <a href="<?php WRA::e(wra_twitter::loginLink()); ?> ">login</a><?php } }
function run() { parent::run(); $this->wf->cp->ogtitle = 'History of war in Ukraine '; $this->wf->cp->ogname = 'History map of war in Ukraine'; $this->wf->cp->header = 'Map of Unrest in Ukraine'; $this->wf->cp->bodyclass = 'longpage'; $this->wf->cp->description = 'History of Ukraine on the map, event of summer 2014, war between Russia and Ukraine, beginning of Third World War. 2014 pro-Russian conflict in Ukraine '; $this->wf->cp->keywords = 'Ukraine, Russia, Donetsk, war, artillery, war games, provocations, intelligence, USA, Eastern Europe'; // $this->lastupdate= wra_foursqvenues::lastupdate(); }
function run() { parent::run(); if (wra_userscontext::isloged($this->wf) || wra_u::islogin()) { WRA::gotopage(WRA::base_url()); return; } $this->wf->cp->ogtitle = 'Fresh ukrainian news on the map '; $this->wf->cp->ogname = 'Map of war in Ukraine'; $this->wf->cp->header = 'Map of Unrest in Ukraine'; $this->wf->cp->description = 'Fresh news from Ukraine on the map, event of summer 2014, war between Russia and Ukraine, beginning of Third World War. 2014 pro-Russian conflict in Ukraine '; $this->wf->cp->keywords = 'Ukraine, Russia, Donetsk, war, artillery, war games, provocations, intelligence, USA, Eastern Europe'; // $this->lastupdate= wra_foursqvenues::lastupdate(); }
function run() { parent::run(); $this->nofooter = true; $this->noheader = true; }
function run() { parent::run(); $code = $_REQUEST["code"]; if (!empty($code)) { // WRA::debug("get fb data"); $token_url = "https://graph.facebook.com/oauth/access_token?" . "client_id=" . WRA_CONF::$fbappid . "&redirect_uri=" . urlencode(WRA_CONF::$fbauthlink . '') . "&client_secret=" . WRA_CONF::$fbappsecret . "&code=" . $code; // $usr = $_REQUEST['state']; $response = @file_get_contents($token_url); // WRA::debug($response); $params = null; parse_str($response, $params); // WRA::debug($params); $graph_url = "https://graph.facebook.com/me?fields=id,picture,name,first_name,location,hometown,gender,last_name,link,email&type=large&access_token=" . $params['access_token']; // WRA::debug($graph_url); $user = @json_decode(@file_get_contents($graph_url)); // WRA::debug('asdasda'); // wra_fbu::fbd($user->id); $nu = new wra_fbu(); $nu->display_name = htmlspecialchars($user->name, ENT_QUOTES); $nu->regdate = WRA::getcurtime(); $nu->fbuserid = $user->id; // $nu->userid = $usr; $nu->username = htmlspecialchars($user->first_name, ENT_QUOTES); $nu->usersurname = htmlspecialchars($user->last_name, ENT_QUOTES); $nu->link = htmlspecialchars($user->link, ENT_QUOTES); $nu->user_agent = wra_fbu::getbrowser(); $nu->access_token = $params['access_token']; $nu->email = htmlspecialchars($user->email, ENT_QUOTES); $nu->photo = str_replace("_q", "_n", $user->picture->data->url); if ($user->gender == 'female') { $nu->gender = 1; } else { $nu->gender = 0; } $nu->phone = ''; if (isset($nu->hometown)) { $nu->adres = htmlspecialchars($nu->hometown->name, ENT_QUOTES); } if (isset($nu->location)) { $nu->adres = htmlspecialchars($nu->location->name, ENT_QUOTES); } // WRA::debug($nu);die(); if (!empty($nu->fbuserid)) { if (!wra_fbu::isfbexist($user->id)) { $nu->userid = $this->addUsr($nu->display_name, $nu->usersurname, $nu->phone, $nu->email, "asdf" . time(), $nu->photo); $nu->add(); } else { $nu->loadbyfb($nu->fbuserid); $nu->update(); } wra_fbu::fbd($nu->fbuserid, $nu->userid); // try{ // }catch(Exception $ex){} //print_r($fb); } } // if(empty($_SESSION['lastpage'])){ WRA::gotopage(WRA::base_url() . '?from=fb'); // }else{ // WRA::gotopage(WRA::base_url().$_SESSION['lastpage']); // } $_SESSION['lastpage'] = ''; }
function run() { parent::run(); }