Пример #1
0
function field_input_audit()
{
    global $_STATE;
    $errors = "";
    foreach ($_STATE->fields as $name => $field) {
        if (($msg = $field->audit()) === true) {
            continue;
        }
        $errors .= "<br>" . $name . ": " . $msg;
    }
    if ($errors != "") {
        $_STATE->msgStatus = "Error:" . $errors;
        return false;
    }
    if ($_STATE->fields["Password"]->value() != "") {
        if ($_STATE->fields["Password"]->value() != $_STATE->fields["RePassword"]->value()) {
            $_STATE->msgStatus = "Passwords do not match!";
            return FALSE;
        }
    }
    foreach ($_STATE->fields as $name => $field) {
        $field->disabled = true;
    }
    if ($_POST["txtEmail"] != "") {
        //save the "@" that common::input_edit() took out
        $email = explode("@", $_POST["txtEmail"]);
        foreach ($email as &$part) {
            $part = string_decode($part);
        }
        $_STATE->fields["Email"]->value(implode("@", $email));
    }
    return TRUE;
}
Пример #2
0
function string_check($value)
{
    return string_decode($value);
}