data = $data; $this->cleanQuery(); } else { $this->makeClean($data); } } else { $this->makeClean($_GET); $this->makeClean($_POST); $this->makeClean($_SESSION); } } function makeClean(&$data) { if (is_array($data)) { foreach ($data as $key => $value) { $data[$key] = stripslashes($value); } } else { $data[$key] = stripslashes($value); } } function cleanQuery() { $this->data = ltrim($this->data); $this->data = rtrim($this->data); if (strlen($this->data) > 131072) { $this->data = ""; } else { $this->data = mysql_real_escape_string($this->data); } } } ?>