public function ShowLogin($is_https, &$msg) { $timedout = UIBase::GrabInput('get', 'timedout', 'int'); $logoff = UIBase::GrabInput('get', 'logoff', 'int'); $msg = ''; if ($timedout == 1 || $logoff == 1) { $this->clear(); if ($timedout == 1) { $msg = DMsg::Err('err_sessiontimeout'); } else { $msg = DMsg::Err('err_loggedoff'); } } else { if ($this->IsValid()) { return FALSE; } } $userid = NULL; $pass = NULL; if (isset($_POST['jCryption'])) { $jCryption = new jCryption(); $var = $jCryption->decrypt($_POST['jCryption'], $_SESSION['d_int'], $_SESSION['n_int']); unset($_SESSION['d_int']); unset($_SESSION['n_int']); parse_str($var, $result); $userid = $result['userid']; $pass = $result['pass']; } else { if ($is_https && isset($_POST['userid'])) { $userid = UIBase::GrabGoodInput('POST', 'userid'); $pass = UIBase::GrabInput('POST', 'pass'); } } if ($userid != NULL) { if ($this->authenticate($userid, $pass) === TRUE) { return FALSE; } else { $msg = DMsg::Err('err_login'); } } return TRUE; }
public function extractPost($parent) { if ($this->_type == 'checkboxOr') { $value = $this->extractCheckBoxOr(); } else { $value = UIBase::GrabInput("post", $this->_key); if (get_magic_quotes_gpc()) { $value = stripslashes($value); } } $key = $this->_key; $node = $parent; while (($pos = strpos($key, ':')) > 0) { $key0 = substr($key, 0, $pos); $key = substr($key, $pos + 1); if ($node->HasDirectChildren($key0)) { $node = $node->GetChildren($key0); } else { $child = new CNode($key0, '', CNode::T_KB); $node->AddChild($child); $node = $child; } } if ($this->_multiInd == 2 && $value != NULL) { $v = preg_split("/\n+/", $value, -1, PREG_SPLIT_NO_EMPTY); foreach ($v as $vi) { $node->AddChild(new CNode($key, trim($vi))); } } elseif ($this->_type == 'checkboxOr') { $node->AddChild(new CNode($key, $value)); } else { if ($this->_multiInd == 1 && $value != NULL) { $this->extractSplitMultiple($value); } $node->AddChild(new CNode($key, $value)); } return TRUE; }
private function validate_step3() { $php_version = UIBase::GrabGoodInput('ANY', 'buildver'); if ($php_version == '') { echo "missing php_version"; return FALSE; } $this->pass_val['php_version'] = $php_version; $next = UIBase::GrabInput('ANY', 'next'); if ($next == 0) { $this->next_step = 2; return TRUE; } if (!isset($_SESSION['progress_file'])) { echo "missing progress file"; return FALSE; } $progress_file = $_SESSION['progress_file']; if (!isset($_SESSION['log_file'])) { echo "missing log file"; return FALSE; } $log_file = $_SESSION['log_file']; if (!file_exists($log_file)) { echo "logfile does not exist"; return FALSE; } $manual_script = UIBase::GrabGoodInput('ANY', 'manual_script'); if ($manual_script == '' || !file_exists($manual_script)) { echo "missing manual script"; return FALSE; } $this->pass_val['progress_file'] = $progress_file; $this->pass_val['log_file'] = $log_file; $this->pass_val['manual_script'] = $manual_script; $this->pass_val['extentions'] = UIBase::GrabGoodInput('ANY', 'extentions'); $this->next_step = 4; return TRUE; }