Location: PHPKode > projects > ProjectPress > projectpress/login.php
<?php
session_start();
define('access',true);
include('config.inc.php'); // Includes the db and form info.
include(PM_DIR . 'pm-includes/global.inc.php');
require(PM_DIR . 'pm-includes/functions.php');
/*if(isset($_SESSION['logged'])) {  // User is already logged in.
	if(isset($_SESSION['url'])) {
		$url = $_SESSION['url']; // holds url for last page visited.
	} else {
		$url = "index.php"; // default page for
	}
}*/
if(isset($_SESSION['logged'])) {  // User is already logged in.
	pm_redirect(PM_URI . "/index.php"); // Goes to main page.
}

	// calls the login filter
	pm_login();

	/**
	 * Creates a new template for the login page.
	 */
	$login = new Template(PM_DIR . "pm-includes/tpl/login.tpl");
	$login->set("pmurl", get_pm_option('siteurl'));
	$login->set("phpself", $_SERVER['PHP_SELF']);
	
	/**
	 * Outputs the login page form.
	 */
	echo $login->output();
Return current item: ProjectPress