<?
if (strtolower(substr($_SERVER[HTTP_HOST],0,4)) == 'www.'){
$server='.'.substr($_SERVER[HTTP_HOST],4);
} else {
$server='.'.$_SERVER[HTTP_HOST];
}

if ($_POST['pwd'] != '') setcookie('password', strtoupper(md5($_POST['pwd'])), 0, '/', $server);

include dirname(__FILE__).'/../includes/config.php';

#print_r($_COOKIE);

if (( strtoupper($_COOKIE['password']) != strtoupper(md5(ADMIN_PASS)) ) And ( strtoupper(md5($_POST['pwd'])) != strtoupper(md5(ADMIN_PASS)) )){
echo "<center>Please Enter Your Password: <p> <form method=post><input type=password name=pwd size=20><p><input type=submit value='Go &raquo;'></center>";
exit();
}
?>
<html>
<title>Admin Area: Comments Manager</title>
<style>
BODY, TD {
color: black;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
}
P {
color : black;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
}
A:HOVER {
color : Red;
text-decoration : none ! important;
}
</style>
<body>
<fieldset>
  <legend>Links Manager Administration</legend>
  Please <a href="linkadmin.php">Click Here</a> to administer the link page.
</fieldset>
<br><br>
<fieldset>
  <legend>Comments Administration</legend>
  <? include(dirname(__FILE__).'/cadmin.php'); ?></fieldset>
  
</body>
</html>  