Location: PHPKode > projects > WB News > includes/common.php
<?php

/*========================================================*\
||########################################################||
||#                                                      #||
||#     WB News v2.0.0                                   #||
||# ---------------------------------------------------- #||
||#     Copyright (c) 2004-2008                          #||
||#     Created:  2nd August 2005                        #||
||#     Filename: common.php                             #||
||#                                                      #||
||########################################################||
/*========================================================*/

/**
 *  @author $Author: pmcilwaine $
 *	@version $Id: common.php,v 1.2.2.1 2008/02/03 09:43:52 pmcilwaine Exp $
 */

/* Check if the get_magic_quotes_gpc() is on we need to remove slashes */
if (get_magic_quotes_gpc())
{
	function remove_slashes($arr)
	{
		if ( is_array($arr) )
		{
			foreach( $arr as $_arrykey => $_arryval )
			{
				if ( is_string($_arryval) )
				{
					$arr["$_arrykey"] = stripslashes( $_arryval );
				}
				else if ( is_array($_arryval) )
				{
					$arr["$_arrykey"] = remove_slashes( $_arryval );
				}
			}
		}
		return $arr;
	}
	
	$_GET = remove_slashes($_GET);
	$_POST = remove_slashes($_POST);
	$_COOKIE = remove_slashes($_COOKIE);
	$_REQUEST = array_merge($_GET, $_POST, $_COOKIE);
}

?>
Return current item: WB News