You the code that makes $_POST['projects'] into $SITE->input['projects'] ?
Sure, here it is:
PHP Code:
//-----------------------------------------------------------------------------
// parseIncoming
//
// Inserts $_GET and $_POST into some more usable array and returns it
//-----------------------------------------------------------------------------
function parseIncoming()
{
global $PATHVARS, $_GET, $_POST, $HTTP_CLIENT_IP, $_REQUEST, $REMOTE_ADDR, $HTTP_PROXY_USER, $HTTP_X_FORWARDED_FOR;
$return = array();
if( get_magic_quotes_gpc() )
{
$_GET = array_map( 'stripslashes', $_GET );
$_POST = array_map( 'stripslashes', $_POST );
$_COOKIE = array_map( 'stripslashes', $_COOKIE );
}
if( is_array($_GET) )
{
while( list($k, $v) = each($_GET) )
{
if( is_array( $_GET[$k] ) )
{
while( list( $k2, $v2 ) = each( $_GET[$k] ) )
{
$return[$k][ $this->cleanKey( $k2 ) ] = $this->cleanValue( $v2 );
}
}
else
{
$return[$k] = $this->cleanValue( $v );
}
}
}
$i = 0;
while ($var = $PATHVARS->fetch())
{
$return[$i] = $this->cleanValue( $var );
$i += 1;
}
// Overwrite GET data with post data
if( is_array( $_POST ) )
{
while( list( $k, $v ) = each( $_POST ) )
{
if ( is_array( $_POST[$k] ) )
{
while( list( $k2, $v2 ) = each($_POST[$k] ) )
{
$return[$k][ $this->cleanKey( $k2 ) ] = $this->cleanValue( $v2 );
}
}
else
{
$return[$k] = $this->cleanValue( $v );
}
}
}
return $return;
}
There is also the code for my PATHVARS (mod_rewrite) and $_GET. Ignore it.
Bookmarks