<?
if($_COOKIE['useremailid']!="")
{
header("location:admin.php");
}
?>
<?
if(isset($_POST['hiddenlogin']))
{
//$filename ="config.php";
$lines = file('config.php');
$totallines= count($lines);
$emailid=0;
$password=0;
for($i=1;$i<($totallines-1);$i++)
 {
 $value =  explode("=",trim($lines[$i]));
 //echo $value[1];
 $getvalue = explode("$",$value[0]);
// echo $getvalue[1];
   if(trim($getvalue[1])=="Emailid")
   {
   //  echo $value[1];
   $getemailid = explode("//",$value[1]);
// echo $getemailid[0];
   $getemailid1 = explode(";",$getemailid[0]);
  // echo $getemailid1[0];
   $emailid= $getemailid1[0];
  // echo $emailid;
    }
	elseif(trim($getvalue[1])=="password")
   {
   $value1 = explode("//",$value[1]);
   $value2 =  explode(";",$value1[0]);
   $password=$value2[0];
   }
}
//echo $password;
if(($password <> "0") && ($emailid <> "0"))
{
//echo "password".$password;
$password1 = str_replace('"','',$password);
$emailid1 = str_replace('"','',$emailid);
if((($password1) == $_POST['password'])&&(($emailid1) == $_POST['emailid']))
{
setcookie("useremailid",$_POST['emailid']);
header("location:admin.php");
}
else
{
$message1= "You have entered the wrong Email Id or Password";
}
}
}
?>
<html>
<head>
<META NAME="Keywords" CONTENT="Keywords">
<META NAME="Description" CONTENT="Configuration Panel : login page">
<META NAME="revisit-after" CONTENT="1 WEEK">
<META NAME="robots" CONTENT="ALL">
<META NAME="distribution" CONTENT="Global">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<link href="andreas09.css" rel="stylesheet" type="text/css" />

</head>

<body>
<div id="container">
<div id="sitename">


<h1>Control Panel</h1>
<h2>Login area</h2><br>
 
</div>
<div id="mainmenu">

<ul><li>&nbsp;</li></ul>

</div>
<!-- end header -->
<div id="wrap">
	

	<div id="rightside">
	
	</div>

<div id="contentalt">
<table width="50%"  align="center">
		<? if(isset($message1) && $message1!="")
{ ?>

		<tr>
		<td colspan="2" align="center"><? echo $message1;?></td>

		</tr><? }?>
		<form name="login" method="post" action="index.php">
  <tr align="center">
    <td colspan="2" class="style4">Email id and password are case sensitive.</td>
    </tr>
  <tr>
    <td class="style4">Email Id:</td>
    <td class="style4"><input type="text" name="emailid" size="32"></td>
  </tr>
  <tr>
    <td class="style4">Password:</td>
    <td class="style4"><input type="password" name="password" size="32"></td>
  </tr>
  <tr>
    
    <td colspan="2" align="center"><input type="submit" align="middle" name="frmsubmit" value="Login"></td>
  </tr>
  <input type ="hidden" name="hiddenlogin">
  </form>
  <tr>
    <td colspan="2" align="center"><a href="forgotpassword.php">Forgot Pasword</a></td>
  </tr>
</table>
<center>
Copyright &copy; <?php echo (date(Y)); ?> - All rights reserved worldwide - Developped and owned by JP. Schoeffel - Rue du vieux collège, CH-1262 Eysins - Switzerland <br><a href="http://www.ethiccash.com">Ethiccash.com</a> | <a href="http://www.adsensefiresale.com">Adsense Firesale</a> | <a href="http://www.adsense-insight.com">Adsense Insight</a> </center>
		
  
  
</center>

<div class="clearingdiv">&nbsp;</div>
</div>
</div>


</body>
</html>




