Location: PHPKode > projects > Tagging manager > version 1.02/login.php
<?php
/**
 * login processing
 *
 *
 * @author hide@address.com
 * @version 1.0
 * @package TaggingManager
 */
  $root_path = './';
  
  include_once($root_path.'config.php');
	  
  require_once($root_path.'includes/dbconn.php');
  require_once($root_path.'includes/functions.php');
  require_once($root_path.'includes/form.php');
  require_once($root_path.'includes/template.php');
  require_once($root_path.'includes/user.php');

if (isset ($_POST['path'])) { $return = $_POST['path']; } else { $return="";}

if (isset($_COOKIE["user"]) AND isset($_COOKIE["secret"])) {
$myUser = new User;

$myUser->userName = $_COOKIE["user"];
$myUser->userPassword = $_COOKIE["secret"];

$myUser->verifyPassword();
header("Location: $location/$return"); //cookie was already set, no need to relogin
}
else { 
if (isset($_POST['User']) AND isset($_POST['Secret'])) {
$myUser = new User;

$myUser->userName = $_POST["User"];
$myUser->userPassword = md5($_POST["Secret"]);
$myUser->verifyPassword();

setcookie("user", $myUser->userName, time()+60*60*24*30);
setcookie("secret", $myUser->userPassword, time()+60*60*24*30);
header("Location: $location/$return"); 
}
else {
}
}


?>

Return current item: Tagging manager