if (!ini_get('register_globals')) { $superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET); if (isset($_SESSION)) { array_unshift($superglobals, $_SESSION); } foreach ($superglobals as $superglobal) { extract($superglobal, EXTR_SKIP); } } $link=substr($link,0,10); $search = array ("''si", // Strip out javascript "'<[\/\!]*?[^<>]*?>'si", // Strip out HTML tags "'([\r\n])[\s]+'", // Strip out white space "'&(quot|#34);'i", // Replace HTML entities "'&(amp|#38);'i", "'&(lt|#60);'i", "'&(gt|#62);'i", "'&(nbsp|#160);'i", "'&(iexcl|#161);'i", "'&(cent|#162);'i", "'&(pound|#163);'i", "'&(copy|#169);'i", "'(\d+);'e"); // evaluate as php $replace = array ("", "", "\\1", "\"", "&", "<", ">", " ", chr(161), chr(162), chr(163), chr(169), "chr(\\1)"); $link= preg_replace($search, $replace, $link); if (!$link) { $link="home"; } function popup ($pic){ $pict="images/".$pic.".jpg"; $size=getimagesize ("$pict"); $dimensions=",'scrollbars=no,width=".$size[0].",height=".$size[1]; return "popup.php?ii=".$i."&pict=".urlencode($pic)."&art=art',''".$dimensions; } ?>