public function __construct() { $this->start_time = microtime(1) * 1000; parent::__construct(false); parent::makeTemplate("index.html"); $filterArgs = array('jid' => array('filter' => FILTER_SANITIZE_NUMBER_INT), 'password' => array('filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH), 'start' => array('filter' => FILTER_SANITIZE_NUMBER_INT), 'page' => array('filter' => FILTER_SANITIZE_NUMBER_INT)); $getInput = (object) filter_input_array(INPUT_GET, $filterArgs); $this->jid = $getInput->jid; $this->password = $getInput->password; $this->start_from = $getInput->start; $this->page = $getInput->page; $this->job = Chunks_ChunkDao::getByIdAndPassword($this->jid, $this->password); if (isset($_GET['step'])) { $this->step = $_GET['step']; } else { $this->step = 1000; } if (is_null($this->page)) { $this->page = 1; } if (is_null($this->start_from)) { $this->start_from = ($this->page - 1) * $this->step; } if (isset($_GET['filter'])) { $this->filter_enabled = true; } else { $this->filter_enabled = false; } $this->downloadFileName = ""; $this->doAuth(); $this->generateAuthURL(); }
/** * Class Constructor * * @throws LogicException * */ public function __construct() { if (empty($this->review_order_page)) { throw new LogicException("Property 'review_order_page' can not be EMPTY"); } if (empty($this->tokenName)) { throw new LogicException("Property 'tokenName' can not be EMPTY"); } //SESSION ENABLED $this->sessionStart(); parent::__construct(false); $filterArgs = array($this->tokenName => array('filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH), $this->dataKeyName => array('filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH)); $__getInput = filter_input_array(INPUT_GET, $filterArgs); /* * * Do something with Token ( send it for authentication on confirm ) * * $__getInput['tk'] * */ $this->tokenAuth = $__getInput[$this->tokenName]; $this->data_key_content = $__getInput[$this->dataKeyName]; Log::doLog($_GET); Log::doLog($_SERVER['QUERY_STRING']); }
public function __construct() { //SESSION ENABLED parent::sessionStart(); parent::__construct(); parent::makeTemplate("oauth_response_handler.html"); $this->user_logged = true; $this->client = OauthClient::getInstance()->getClient(); $plus = new Google_Service_Oauth2($this->client); $filterArgs = array('code' => array('filter' => FILTER_SANITIZE_STRING), 'error' => array('filter' => FILTER_SANITIZE_STRING)); $__postInput = filter_input_array(INPUT_GET, $filterArgs); $code = $__postInput['code']; $error = $__postInput['error']; if (isset($code) && $code) { $this->client->authenticate($code); $_SESSION['access_token'] = $this->client->getAccessToken(); $user = $plus->userinfo->get(); //get response from third-party $this->userData['email'] = $user['email']; $this->userData['first_name'] = $user['givenName']; $this->userData['last_name'] = $user['familyName']; } else { if (isset($error)) { $this->user_logged = false; } } //get url to redirect to //add default if not set if (!isset($_SESSION['incomingUrl']) or empty($_SESSION['incomingUrl'])) { $_SESSION['incomingUrl'] = '/'; } $this->redirectUrl = $_SESSION['incomingUrl']; //remove no more used var unset($_SESSION['incomingUrl']); }
public function __construct() { parent::__construct(false); parent::makeTemplate("upload.html"); $this->guid = Utils::create_guid(); $this->lang_handler = Langs_Languages::getInstance(); $this->subject_handler = Langs_LanguageDomains::getInstance(); $this->subjectArray = $this->subject_handler->getEnabledDomains(); }
public function __construct() { parent::__construct(); parent::makeTemplate("editlog.html"); $filterArgs = array('jid' => array('filter' => FILTER_SANITIZE_NUMBER_INT), 'password' => array('filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH)); $__postInput = filter_input_array(INPUT_GET, $filterArgs); $this->jid = $__postInput["jid"]; $this->password = $__postInput["password"]; $this->thisUrl = $_SERVER['REQUEST_URI']; }
public function __construct() { parent::__construct(false); parent::makeTemplate("upload.html"); $filterArgs = array('project_name' => array('filter' => FILTER_SANITIZE_STRING), 'private_tm_key' => array('filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH)); $__postInput = filter_input_array(INPUT_GET, $filterArgs); $this->project_name = $__postInput["project_name"]; $this->private_tm_key = $__postInput["private_tm_key"]; $this->guid = Utils::create_guid(); $this->lang_handler = Langs_Languages::getInstance(); $this->subject_handler = Langs_LanguageDomains::getInstance(); $this->subjectArray = $this->subject_handler->getEnabledDomains(); }
public function __construct() { parent::__construct(true); parent::makeTemplate("manage.html"); $filterArgs = array('page' => array('filter' => array(FILTER_SANITIZE_NUMBER_INT)), 'filter' => array('filter' => array(FILTER_VALIDATE_BOOLEAN), 'options' => array(FILTER_NULL_ON_FAILURE))); $postInput = filter_input_array(INPUT_GET, $filterArgs); $this->page = $postInput['page']; if ($this->page == null || empty($this->page)) { $this->page = 1; } $this->lang_handler = Langs_Languages::getInstance(); if ($postInput['filter'] !== null && $postInput['filter']) { $this->filter_enabled = true; } else { $this->filter_enabled = false; } }
public function __construct() { //SESSION ENABLED parent::sessionStart(); parent::__construct(); parent::makeTemplate("login.html"); $filterArgs = array('incomingUrl' => array('filter' => FILTER_SANITIZE_URL)); $__postInput = filter_input_array(INPUT_GET, $filterArgs); $this->incomingUrl = $__postInput['incomingUrl']; //if nothing is specified by user if (empty($this->incomingUrl)) { //open session to pull put information about incoming url $this->incomingUrl = $_SESSION['incomingUrl']; } else { //else, update session $_SESSION['incomingUrl'] = $this->incomingUrl; } }
public function __construct() { parent::sessionStart(); parent::__construct(false); $filterArgs = array('pid' => array('filter' => FILTER_SANITIZE_NUMBER_INT), 'jid' => array('filter' => FILTER_SANITIZE_NUMBER_INT), 'password' => array('filter' => FILTER_SANITIZE_STRING, 'flags' => FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH)); $postInput = filter_input_array(INPUT_GET, $filterArgs); $this->pid = $postInput['pid']; $this->jid = $postInput['jid']; $pass = $postInput['password']; if (!empty($this->jid)) { parent::makeTemplate("jobAnalysis.html"); $this->jpassword = $pass; $this->ppassword = null; } else { parent::makeTemplate("analyze.html"); $this->jid = null; $this->jpassword = null; $this->ppassword = $pass; } }