function France($tel) { //Telephone en Array, si un valide passer à ok la validation des fiches =) if ($tel == "sans") { return $tel; } $tel = ToNumber($tel); $D4 = substr($tel, 0, 4); $D2 = substr($tel, 0, 2); if (Preg_match("~12345|643322031|65035676|010101|020202|010203|060606|0000|15151|202020|6677|7788|6699|8877~", $tel, $t) or strlen($tel) < 8) { G2('tel', $t); return "¤{$tel}"; } # if (in_array($D4, array('0032', '0033', '0034', '0049', '0041'))) { return $tel; } //internationnaux authorisés if (in_array($D2, array('01', '02', "03", "04", "05", "06", "07", "08", "09", "41", "49", "33"))) { return $tel; } //Si un ok, return direct =) return "¤{$tel}"; #si aucun n'est bon au final =) }
function kwd($ref) { GT('k2'); if (Preg_match("~utmctr=([^;|]+)~", $_COOKIE['__utmz'], $t)) { return tridecoder($t[1]); } #adwords failsafe on cookie #if($_ENV['yt']['mots']&&$_ENV['yt']['lw']&&$_ENV['yt']['lw']<(now-120)){$x=FGC(ipf,'mots');if(j9==1)Db("ipfmot:$x");Return $x;} if (preg_match("~&[q|p]=([^&]+)~i", $ref, $t)) { $mots = ask($t); } elseif (Preg_match("~cgi-bin.*x_query=([^&]+)~i", $ref, $t)) { $mots = $t[1]; } elseif (Preg_match("~FORID%3A([^&]+)~i", $ref, $t)) { $mots = $t[1]; } elseif (Preg_match("~fr/go.*/([^/]+)~i", $ref, $t)) { $mots = $t[1]; } elseif (Preg_match("~fr/q/(.*).html~i", $ref, $t)) { $mots = $t[1]; } elseif (Preg_match("~&text=([^&]+)~i", $ref, $t)) { $mots = $t[1]; } elseif (Preg_match("~xeoo.*&k=([^&]+)~i", $ref, $t)) { $mots = $t[1]; } elseif (Preg_match("~&(q|p|cx)=([^&]+)~i", $ref, $t)) { $mots = ask($t); } else { $ref = preg_replace('~&(searchfor|eingabe|l|key|text|itag|OVRAW|wd|recherche|rds|rch|data|uery|for|str|ing|qs|qt|req|k|q|p)=~is', 'MX=', $ref); preg_match_all("~MX=([^&]+)~is", $ref, $t); if ($t[1]) { $mots = str_replace('MX=', '', $t[0][0]); } } if (strlen($mots) > 3) { GT('k3'); $mots = trim(Preg_replace("~[ ]{2,}~", ' ', str_replace(array('/', 'search&q=', 'http:', 'http', "\\\\'", "\\'", "\\'", '\\', "'", '"', '+', '-', '-', '&', '|', '{', '}', '(', ')', ',', '...', 'ggmain.jhtml ', 'searchfor=', ''), ' ', $mots))); $mots = Preg_replace("~'|\"|\\[|\\]~", '', $mots); if (is_numeric($mots)) { return ''; } return strtolower(cleankeyword(Tridecoder($mots))); #"@'|\"|[\\]@" } }
#if(IP=='127.0.0.1')?XDEBUG_PROFILE=1 #$D=Array('nu'=>preg_replace("~(\?|&).*~",'',U)); $loadKernel = 1; if (is_file('/conf.php')) { require_once '/conf.php'; } #injection var via racine serveur if (is_file(CWD . '0.inc.php')) { require_once CWD . '0.inc.php'; } #Per Directory variations, please note kernel is not loaded yet and this single file can prevent its loading if (defined('R')) { $loadKernel = null; } elseif (Preg_match("~(sql2|pma|phpmyadmin)/~is", $a['REQUEST_URI'])) { $loadKernel = null; } elseif ($nofun || Preg_match("~-\\.php|composer|console|apc\\.php|nofun|ajax\\.php|%C2%A3|£~is", $a['REQUEST_URI']) || strpos($a['args'], 'nofun') || strpos($a['args'], '-fun')) { $loadKernel = null; } /*url specials or filename arguments*/ if (strpos('-.php', $a['REQUEST_URI'])) { args(',noheaderscheck'); } $_ENV['args'] = $a['args']; if (!$loadKernel) { args(',nofun'); } require_once 'lib/obs.php'; #obselete or missing extensions like igbinary require_once 'mios.php'; #Minimalist Input/output system if ($loadKernel) {
function sql5($sql, $p = '', $nt = '') { static $i, $Acache; $i++; if (is_array($sql)) { extract($sql); } # if (isset($Acache[md5($sql)])) { return $Acache[md5($sql)]; } #if(j9&&strpos(u,'607b'))av('DB:'.DB); if ($p == 1 or $nt == 1) { $close = 1; unset($p, $nt); } if (strpos($sql, '.s3db')) { Preg_match('~[^ ]+\\.s3db\\.~i', $sql, $m); $p = trim($m[0], '.'); $sql = str_replace($m[0], '', $sql); } if (strpos($p, '.s3db')) { return sqlite($sql, $p, $close); } #no=1,bd=ben,pile=id,np=0 if ($p) { if ($y = param($p)) { extract($y); } } gt('0:sql5' . $i . __LINE__); $_ENV['sql'][] = $sql; $x = sql($sql, $bd, $p); gt('1:sql5' . $i . __LINE__); if (is_numeric($x)) { return $x; } if (!$x) { return; } #retour de Num_rows quand update $nr = mysqli_num_rows($_ENV['sqlquery']); if ($nr < 1) { return; } #Si resultat vide#Seulement sur un select #$if($len>30000000) $mem = memory_get_usage(); if ($mem > 30000000) { $len = array_sum(mysqli_fetch_lengths($x)); DBM('debugmem', "sql:{$sql}, len:{$len}, mem:{$mem}"); } gt('0:sql5while' . $i . __LINE__); while ($t = mysqli_fetch_assoc($x)) { #Memleak Here /// #@mysql_volume_kilobytes:sizeof($R)>90.000.000 ???? #if($mem>40000000)DBM('debugmem',$sql.pre($t).$mem); if ($nc) { $R[] = $t; continue; } #2dim Array for 1D Array, no collapse, original form switch if ($nr == 1 && $np) { $R = $t; break; } #Single Array for Result if ($pile) { $id = $t[$pile]; unset($t[$pile]); $R[$id] = $t; continue; } //Replaces the key with some value(id) if ($nr == 1 && count($t) == 1 && !$no) { $R = end($t); break; } #1single results return a string if ($nr == 1 && !$no) { $R = $t; break; } #1 column returns 1 dimension Array if (count($t) == 1 and !$no) { $R[] = end($t); continue; } #2dim-1single value//Un seul élément => Dépilé ! $R[] = $t; //todo:MemError allocation here } #if(j10){print_r(compact('R','t'));die;} if ($_ENV['sqlcache'] || $cache) { $Acache[md5($sql)] = $R; } #if(strpos(U,'webcam.php')){print_r(compact('R','sql'));die;} gt('1:sql5while' . $i . __LINE__); #14ms dans le while mysqli_free_result($x); if (is_array($R)) { $R = array_filter($R); } return $R; gt('1:sql5freeres' . $i . __LINE__); }