home *** CD-ROM | disk | FTP | other *** search
- <?
- $r=cnstats_sql_query("SELECT hash FROM cns_config;");
- $hashs=explode("-",mysql_result($r,0,0));
- for ($i=0;$i<count($hashs);$i++) if (strlen($hashs[$i])!=32 || $hashs[$i]==$HTTP_COOKIE_VARS["CNSSESSION"]) unset($hashs[$i]);
-
- if (count($hashs)>5) array_shift($hashs);
- array_push($hashs,$hash);
-
- cnstats_sql_query("UPDATE cns_config SET hash='".implode("-",$hashs)."';");
-
- setcookie("CNSSESSION","");
- header("Location: index.php");
- ?>