convertlog recreatelog potions plantes stats_clan zn_distance stats_kill cartfidel common_function sources outils

Source du fichier common_function.php :


<?php
    header('Content-Type: text/html; charset=ISO-8859-15');

    function secur_ent($string,$plus='%_')
    {
        // On regarde si le type de string est un nombre entier (int)
        if(ctype_digit($string))
        {
            $string = intval($string);
        }
        // Pour tous les autres types
        else
        {
            if (!get_magic_quotes_gpc()) {
                $string = addslashes($string);
            }
            $string = addcslashes($string, $plus);
            $string = htmlentities($string);
        }
        
        return $string;
    }

    function query_strip() {
        //echo '##'.$_SERVER['REQUEST_URI'].'##';
        if (preg_match('`/([\w\.]+)(\?[^?]+)?$`',$_SERVER['REQUEST_URI'],$match)) return $match[1];
        return 'index.php';
    }    
?>