= v4.3.0 if( $new_enough_php ) { // PHP v4.3.0 or higher // undo any magic quote effects so mysql_real_escape_string can do the work if( $magic_quotes_active ) { $value = stripslashes( $value ); } } else { // before PHP v4.3.0 // if magic quotes aren't already on then add slashes manually if( !$magic_quotes_active ) { $value = addslashes( $value ); } // if magic quotes are active, then the slashes already exist } $value = trim($value); $value = stripslashes($value); $value = stripslashes_deep($value); return $value; } // function yydev_redirect_mysql_prep( $value ) { // ================================================================== // This function will display error message if there was something wrong // $error_message will be the name of the string we define and if it's exists // it will echo the message to the page // if $display_inline is set to 1 it will have style of display: inline // ================================================================== function yydev_redirect_show_error_message($error_message, $display_inline = "") { if($display_inline == 1) { $display_inline_echo = "display-inline"; } // if($display_inline == 1) { if( isset($error_message) ) { ?>
" . htmlentities($_GET['message']) . " "; } // if(isset($_GET['message'])) { if(isset($_GET['error-message'])) { echo "
Error: " . htmlentities($_GET['error-message']) . "
"; } // if(isset($_GET['error-message'])) { } // function yydev_redirect_echo_message_if_exists() { function yydev_redirect_echo_success_message_if_exists($success) { if(isset($success) && !empty($success) ) { echo "
" . htmlentities($success) . "
"; } // if(isset($success) && !empty($success) ) { } // function yydev_redirect_echo_success_message_if_exists($success) { function yydev_redirect_echo_error_message_if_exists($error) { if(isset($error) && !empty($error) ) { echo "
Error: " . htmlentities($error) . "
"; } // if(isset($_GET['error-message'])) { } // function yydev_redirect_echo_error_message_if_exists() { // ================================================================== // redirect the page using the path you provided // ================================================================== function yydev_redirect_redirections_page($link) { header("Location: {$link}"); exit; } // function yydev_redirect_redirections_page($path) {