Exemple #1
0
 /**
  * При создании объекта делаем инициализацию
  *
  */
 protected function __construct()
 {
     $this->iTimeInit = microtime(true);
     if (get_magic_quotes_gpc()) {
         func_stripslashes($_REQUEST);
         func_stripslashes($_GET);
         func_stripslashes($_POST);
         func_stripslashes($_COOKIE);
     }
 }
/**
 * stripslashes умеющая обрабатывать массивы
 *
 * @param unknown_type $data
 */
function func_stripslashes(&$data)
{
    if (is_array($data)) {
        foreach ($data as $sKey => $value) {
            if (is_array($value)) {
                func_stripslashes($data[$sKey]);
            } else {
                $data[$sKey] = stripslashes($value);
            }
        }
    } else {
        $data = stripslashes($data);
    }
}