Esempio n. 1
0
function set_errors($message, $kind = 'common')
{
    clear_errors();
    add_errors($message, $kind);
}
//test for failure second post
second_form_test_failure();
//$errors = array();
clear_errors();
//test for success second post
second_form_test_success();
//$errors = array();
clear_errors();
//create_new_user()
create_new_user_success();
create_new_user_failure();
//process_login_form()
process_login_form_failure();
clear_errors();
process_login_form_success();
clear_errors();
//attempt_login()
attempt_login_success();
attempt_login_failure();
//process_search_form()
process_search_form_success();
process_search_form_failure();
//get_price()
get_price_success();
get_price_failure();
//process_filter_form()
process_filter_form_not_empty();
process_filter_form_empty();
//retrieve_seller_auctions()
retrieve_seller_auctions_success();
retrieve_seller_auctions_failure();
Esempio n. 3
0
function get_content()
{
    $content =& content();
    $errors =& errors();
    if (count($errors) > 0) {
        $fatal = false;
        $errmsg = array();
        foreach ($errors as $err) {
            $errmsg[] = $err['message'];
            if ($err['kind'] == 'fatal') {
                $fatal = true;
                break;
            }
        }
        $errmsg = implode('', $errmsg);
        if ($fatal) {
            $content = $errmsg;
        } else {
            $content = $errmsg . $content;
        }
        clear_errors();
    }
    return $content;
}