Location: PHPKode > projects > Potato News > newcopy/admin/reg.php
<?PHP
if (isset($_COOKIE["user"])) {
$id = $_COOKIE["user"];
if (preg_match('/^[a-z0-9]+$/i', $id)) {
} else {
//INVALID USER NAME
exit("Critical error");
}
}
?><?PHP
$server = getcwd();
$a2 = $_COOKIE["site"];
if (isset($_COOKIE["user"]) and $a2 == $server) {
$id = $_COOKIE["user"];
$zid = $_COOKIE["auth"];
if (file_exists("data/users/$id.php")) {
include ("data/users/$id.php");
include ("data/users/$userid.php");
}
if ($zid == $password) {

if (file_exists("data/users/$id.php")) {
include ("data/users/$id.php");
include ("data/users/$id.pm.php");

if ($admin >= "2") {

if (file_exists("data/preinstall.php")) {
?>
<h3>WARNING!</h3>
<p>INSTALL FILE STILL DETECTED! CLICK <a href="admin2.php?dand=purge"/>HERE</a> TO REMOVE IT!</p>
<?PHP
}

 } else { ?>

<?PHP
}

} else {
setcookie("user", "", time()-3600);
 }

 } else { ?>

<h3>Invalid Authentication</h3>
<p>The logged Authentication seems to be invalid. Simply <a href="admin2.php?dand=login&log=out">logout</a> and login again to fix this.</p>
<?PHP }

 } else { ?>

<h2>Not logged in!</h2>
<p>You are not logged in!</p>
<?PHP } ?>
Return current item: Potato News