00001 <?php 00002 // --------------------------------------------------------------------------- 00003 // $Id$ 00004 // --------------------------------------------------------------------------- 00005 // DaCMS Content Management System 00006 // Copyright (C) 2002 Jan Dankert, jandankert@jandankert.de 00007 // 00008 // This program is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU General Public License 00010 // as published by the Free Software Foundation; either version 2 00011 // of the License, or (at your option) any later version. 00012 // 00013 // This program is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 // GNU General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU General Public License 00019 // along with this program; if not, write to the Free Software 00020 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 // --------------------------------------------------------------------------- 00022 // $Log$ 00023 // Revision 1.5 2007-11-09 00:01:44 dankert 00024 // Bugfix: Request-Variablen k?nnen Arrays sein. 00025 // 00026 // Revision 1.4 2007-05-14 23:29:06 dankert 00027 // Falls REGISTER_GLOBALS aktiviert ist, dann alle REQUEST-Variablen aus dem globalen G?ltigkeitsraum entfernen. 00028 // 00029 // Revision 1.3 2004/12/19 21:16:43 dankert 00030 // Workaround, falls magic_quotes_gpc eingeschaltet ist 00031 // 00032 // Revision 1.2 2004/11/10 22:44:36 dankert 00033 // *** empty log message *** 00034 // 00035 // Revision 1.1 2004/05/02 19:27:22 dankert 00036 // Initiale Version 00037 // 00038 // --------------------------------------------------------------------------- 00039 00040 00041 00042 $REQ = array_merge($HTTP_GET_VARS,$HTTP_POST_VARS,$_GET,$_POST); 00043 00044 // Zur Sicherheit: 00045 // Falls REGISTER_GLOBALS aktiviert ist, dann alle REQUEST-Variablen aus dem 00046 // globalen Gültigkeitsraum entfernen. 00047 if ( ini_get('register_globals') ) 00048 { 00049 foreach( $REQ as $reqVar=>$reqValue ) 00050 unset( $$reqVar ); 00051 } 00052 00053 if ( get_magic_quotes_gpc() == 1 ) 00054 { 00055 foreach( $REQ as $p=>$v ) 00056 if ( !is_array($v) ) 00057 $REQ[$p] = stripslashes($v); 00058 } 00059 00060 function request_into_session( $name ) 00061 { 00062 global $REQ,$SESS; 00063 00064 if (isset($REQ[$name])) 00065 { 00066 $SESS[$name] = $REQ[$name]; 00067 } 00068 } 00069 00070 ?>
1.5.8