require_once "../../webassist/security_assist/helper_php.php";
if (!WA_Auth_RulePasses("Logged in to pcms2_users")) {
    WA_Auth_RestrictAccess("../user-admin/login.php");
}
require_once "../../webassist/database_management/wa_appbuilder_php.php";
if (isset($_POST["Registration_submit"])) {
    $WAFV_Redirect = "" . htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES) . "?invalid=true";
    $_SESSION['WAVT_registration_Errors'] = "";
    if ($WAFV_Redirect == "") {
        $WAFV_Redirect = $_SERVER["PHP_SELF"];
    }
    $WAFV_Errors = "";
    $WAFV_Errors .= WAValidateRQ((isset($_POST["Registration_group_Email"]) ? $_POST["Registration_group_Email"] : "") . "", true, 1);
    $WAFV_Errors .= WAValidateUnique("bikes_db", $bikes_db, $database_bikes_db, "pcms2_users", "UserID", "none,none,NULL", "" . (isset($_SESSION["SecurityAssist_UserID"]) ? $_SESSION["SecurityAssist_UserID"] : "0") . "", "UserEmail", "',none,''", "" . (isset($_POST["Registration_group_Email"]) ? $_POST["Registration_group_Email"] : "") . "", true, 2);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["Registration_group_Password"]) ? $_POST["Registration_group_Password"] : "") . "", true, 3);
    $WAFV_Errors .= WAValidateEL((isset($_POST["Registration_group_Password"]) ? $_POST["Registration_group_Password"] : "") . "", 6, 500, true, 4);
    $WAFV_Errors .= WAValidateLE((isset($_POST["Registration_group_Confirm"]) ? $_POST["Registration_group_Confirm"] : "") . "", (isset($_POST["Registration_group_Confirm"]) ? $_POST["Registration_group_Confirm"] : "") . "", true, 5);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["Registration_group_Username"]) ? $_POST["Registration_group_Username"] : "") . "", true, 6);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["Registration_group_Last_Name"]) ? $_POST["Registration_group_Last_Name"] : "") . "", true, 7);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["Registration_group_Address"]) ? $_POST["Registration_group_Address"] : "") . "", true, 8);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["Registration_group_Address_2"]) ? $_POST["Registration_group_Address_2"] : "") . "", true, 9);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["Registration_group_City"]) ? $_POST["Registration_group_City"] : "") . "", true, 10);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["Registration_group_State"]) ? $_POST["Registration_group_State"] : "") . "", true, 11);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["Registration_group_10_Postcode"]) ? $_POST["Registration_group_10_Postcode"] : "") . "", true, 12);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["Registration_group_1_Fax"]) ? $_POST["Registration_group_1_Fax"] : "") . "", true, 13);
    $WAFV_Errors .= WAValidateLE(strtolower(isset($_POST["Security_Code"]) ? $_POST["Security_Code"] : "") . "", (isset($_SESSION["captcha_Security_Code"]) ? strtolower($_SESSION["captcha_Security_Code"]) : "") . "", true, 14);
    $WAFV_Errors .= WAValidateLE(strtolower(isset($_POST["Security_Answer"]) ? $_POST["Security_Answer"] : "") . "", (isset($_SESSION["random_answer"]) ? strtolower($_SESSION["random_answer"]) : "") . "", true, 15);
    $WAFV_Errors .= WAValidateRX((isset($_POST["Hidden_Field"]) ? $_POST["Hidden_Field"] : "") . "", "/.* /", false, 16);
    if ($WAFV_Errors != "") {
        PostResult($WAFV_Redirect, $WAFV_Errors, "registration");
    }
示例#2
0
//ini_set('display_errors', 1)
@session_start();
require_once '../../Connections/bikes_db.php';
require_once "../../webassist/form_validations/wavt_scripts_php.php";
require_once "../../webassist/form_validations/wavt_validatedform_php.php";
require_once "../../webassist/security_assist/helper_php.php";
if (isset($_POST["LogIn_submit"])) {
    $WAFV_Redirect = "" . htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES) . "?invalid=true";
    $_SESSION['WAVT_login_Errors'] = "";
    if ($WAFV_Redirect == "") {
        $WAFV_Redirect = $_SERVER["PHP_SELF"];
    }
    $WAFV_Errors = "";
    $WAFV_Errors .= WAValidateRQ((isset($_POST["Log_In_group_Username"]) ? $_POST["Log_In_group_Username"] : "") . "", true, 1);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["Log_In_group_Password"]) ? $_POST["Log_In_group_Password"] : "") . "", true, 2);
    $WAFV_Errors .= WAValidateEL((isset($_POST["Log_In_group_Password"]) ? $_POST["Log_In_group_Password"] : "") . "", 6, 500, true, 3);
    if ($WAFV_Errors != "") {
        PostResult($WAFV_Redirect, $WAFV_Errors, "login");
    }
}
if (isset($_POST["LogIn_submit"]) && !isset($_POST["Log_In_group_Remember_my_information"]) && $_POST["LogIn_submit"] != "") {
    setcookie("RememberMePWD", "", time() + 60 * 60 * 24 * 30, "/", "", 0);
}
if (isset($_POST["LogIn_submit"]) && !isset($_POST["Log_In_group_Remember_my_information"]) && $_POST["LogIn_submit"] != "") {
    setcookie("RememberMeUN", "", time() + 60 * 60 * 24 * 30, "/", "", 0);
}
if (isset($_POST["LogIn_submit"]) && isset($_POST["Log_In_group_Remember_my_information"]) && $_POST["Log_In_group_Remember_my_information"] != "") {
    setcookie("RememberMePWD", "" . (isset($_POST["Log_In_group_Password"]) ? $_POST["Log_In_group_Password"] : "") . "", time() + 60 * 60 * 24 * 30, "/", "", 0);
}
if (isset($_POST["LogIn_submit"]) && isset($_POST["Log_In_group_Remember_my_information"]) && $_POST["Log_In_group_Remember_my_information"] != "") {
    setcookie("RememberMeUN", "" . (isset($_POST["Log_In_group_Username"]) ? $_POST["Log_In_group_Username"] : "") . "", time() + 60 * 60 * 24 * 30, "/", "", 0);
require_once '../../Connections/bikes_db.php';
require_once "../../webassist/form_validations/wavt_scripts_php.php";
require_once "../../webassist/form_validations/wavt_validatedform_php.php";
require_once "../../webassist/security_assist/helper_php.php";
require_once "../../webassist/database_management/wa_appbuilder_php.php";
if (isset($_POST["UserUpdate_submit"])) {
    $WAFV_Redirect = "" . htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES) . "?invalid=true";
    $_SESSION['WAVT_userupdate_Errors'] = "";
    if ($WAFV_Redirect == "") {
        $WAFV_Redirect = $_SERVER["PHP_SELF"];
    }
    $WAFV_Errors = "";
    $WAFV_Errors .= WAValidateRQ((isset($_POST["User_Update_group_Email"]) ? $_POST["User_Update_group_Email"] : "") . "", true, 1);
    $WAFV_Errors .= WAValidateUnique("bikes_db", $bikes_db, $database_bikes_db, "pcms2_users", "UserID", "none,none,NULL", "" . (isset($_SESSION["SecurityAssist_UserID"]) ? $_SESSION["SecurityAssist_UserID"] : "0") . "", "UserEmail", "',none,''", "" . (isset($_POST["User_Update_group_Email"]) ? $_POST["User_Update_group_Email"] : "") . "", true, 2);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["User_Update_group_Password"]) ? $_POST["User_Update_group_Password"] : "") . "", true, 3);
    $WAFV_Errors .= WAValidateEL((isset($_POST["User_Update_group_Password"]) ? $_POST["User_Update_group_Password"] : "") . "", 6, 500, true, 4);
    $WAFV_Errors .= WAValidateLE((isset($_POST["User_Update_group_Confirm"]) ? $_POST["User_Update_group_Confirm"] : "") . "", (isset($_POST["User_Update_group_Confirm"]) ? $_POST["User_Update_group_Confirm"] : "") . "", true, 5);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["User_Update_group_Username"]) ? $_POST["User_Update_group_Username"] : "") . "", true, 6);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["User_Update_group_Last_Name"]) ? $_POST["User_Update_group_Last_Name"] : "") . "", true, 7);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["User_Update_group_Address"]) ? $_POST["User_Update_group_Address"] : "") . "", true, 8);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["User_Update_group_Address_2"]) ? $_POST["User_Update_group_Address_2"] : "") . "", true, 9);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["User_Update_group_City"]) ? $_POST["User_Update_group_City"] : "") . "", true, 10);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["User_Update_group_State"]) ? $_POST["User_Update_group_State"] : "") . "", true, 11);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["User_Update_group_10_Postcode"]) ? $_POST["User_Update_group_10_Postcode"] : "") . "", true, 12);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["User_Update_group_1_Fax"]) ? $_POST["User_Update_group_1_Fax"] : "") . "", true, 13);
    if ($WAFV_Errors != "") {
        PostResult($WAFV_Redirect, $WAFV_Errors, "userupdate");
    }
}
if (isset($_POST["UserUpdate_submit"]) && isset($_COOKIE["RememberMePWD"]) && isset($_POST["User_Update_group_Password"]) && $_POST["User_Update_group_Password"] != "") {
    setcookie("RememberMePWD", "" . (isset($_POST["User_Update_group_Password"]) ? $_POST["User_Update_group_Password"] : "") . "", time() + 60 * 60 * 24 * 30, "/", "", 0);