Revision 1443
Added by Dietmar over 13 years ago
class.wb.php | ||
---|---|---|
377 | 377 |
// Print a success message which then automatically redirects the user to another page |
378 | 378 |
function print_success( $message, $redirect = 'index.php' ) { |
379 | 379 |
global $TEXT; |
380 |
if(is_array($message)) { |
|
381 |
$message = implode ('<br />',$message); |
|
382 |
} |
|
380 | 383 |
// fetch redirect timer for sucess messages from settings table |
381 | 384 |
$redirect_timer = ((defined( 'REDIRECT_TIMER' )) && (REDIRECT_TIMER <= 10000)) ? REDIRECT_TIMER : 0; |
382 | 385 |
// add template variables |
... | ... | |
402 | 405 |
// Print an error message |
403 | 406 |
function print_error($message, $link = 'index.php', $auto_footer = true) { |
404 | 407 |
global $TEXT; |
408 |
if(is_array($message)) { |
|
409 |
$message = implode ('<br />',$message); |
|
410 |
} |
|
405 | 411 |
$success_template = new Template(THEME_PATH.'/templates'); |
406 | 412 |
$success_template->set_file('page', 'error.htt'); |
407 | 413 |
$success_template->set_block('page', 'main_block', 'main'); |
... | ... | |
461 | 467 |
} |
462 | 468 |
|
463 | 469 |
} |
464 |
?> |
Also available in: Unified diff
remove auto including YUI Framework in backend for modules, enable with
>print_footer(true)
>print_error and ->print_success too accept a message as arrayauto validate in frontend if style block inside body tag
captcha now XHTML valide