Exemplo n.º 1
0
 public function get_from_sql($tsql)
 {
     $queryString = $this->query($tsql);
     $class = get_class($this);
     $enarray = array();
     while ($entities = mysql_fetch_object($queryString, $class)) {
         $enarray[] = Core_Helper_Sanitize::html($entities);
     }
     return $enarray;
 }
Exemplo n.º 2
0
 public static function html($string)
 {
     if (is_object($string)) {
         $r = $string;
         foreach ($string as $k => $v) {
             $r->{$k} = Core_Helper_Sanitize::html($v);
         }
     } elseif (is_array($string)) {
         $r = $string;
         foreach ($string as $k => $v) {
             $r[$k] = Core_Helper_Sanitize::html($v);
         }
     } else {
         $r = htmlentities($string, ENT_QUOTES, "UTF-8", true);
     }
     return $r;
 }
Exemplo n.º 3
0
 public function clean_globals()
 {
     $_POST = Core_Helper_Sanitize::html($_POST);
     $_REQUEST = Core_Helper_Sanitize::html($_REQUEST);
     $_GET = Core_Helper_Sanitize::html($_GET);
 }