define('GX_THEME', GX_PATH . '/inc/themes/'); define('GX_ASSET', GX_PATH . '/assets/'); require "../autoload.php"; try { new System(); } catch (Exception $e) { echo $e->getMessage(); } Session::start(); System::gZip(); if (isset($_POST['login'])) { if (!isset($_POST['token']) || !Token::isExist($_POST['token'])) { // VALIDATE ALL $alertred[] = TOKEN_NOT_EXIST; } if (Xaptcha::isEnable()) { if (!isset($_POST['g-recaptcha-response']) || $_POST['g-recaptcha-response'] == '') { $alertred[] = "Please insert the Captcha"; } if (!Xaptcha::verify($_POST['g-recaptcha-response'])) { $alertred[] = "Your Captcha is not correct."; } } if (!isset($alertred)) { /*check if username is exist or not */ $username = Typo::cleanX(Typo::strip($_POST['username'])); $sql = sprintf("SELECT `userid`,`status`,`activation` FROM `user` WHERE `userid` = '%s'", $username); $usr = Db::result($sql); $c = Db::$num_rows; //echo $c; //print_r($usr);