Location: PHPKode > projects > crelab > creblog/admin/passpro.php
<?php
include('../config.php');

   if (isset($_POST['submit_pwd'])){
      $pass = isset($_POST['passwd']) ? $_POST['passwd'] : '';
      
      if ($pass != $Password) {
         showForm("Wrong password");
         exit();     
      }
   } else {
      showForm();
      exit();
   }
   
function showForm($error="LOGIN"){
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
   <title><?php echo $title ?></title>
   <link href="style/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <br /><br /><br /><div id="main">
      
      <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="pwd"><div class="content">
        <div class="caption"><?php echo $error; ?></div></div><br />
        <div class="content">Password:
          <input class="text" name="passwd" type="password"/>
          <input class="text" type="submit" name="submit_pwd" value="Login"/>
        </div>
      </form>
      <div id="source">simple blogging system by <a href="http://crelab.de">crelab.de</a></div>
   </div>
</body>       

<?php   
}
?>
Return current item: crelab