Location: PHPKode > projects > iLP System > Release 2.2/upload/_backend/login.php
<?php
/**
 * iLP System Offiziere Login
 * 
 * Autor:       Florian "ApoY2k" Peschka
 * Projekt:		iLP System
 * Paket:		apoy2k.ilp.wrynn
 * Lizenz:		CreativeCommons (by-nc-sa)
 * Kontakt:		hide@address.com
 * Version:		2.1.1
 */
session_start();

require_once('../lib/lib.config.php');

$get_info = $db->prepare("SELECT * FROM `ilp_users` WHERE `login` = :login_name");
$rinfo = $get_info->execute(array(':login_name' => $_POST['login_name']));

if (0 != $get_info->rowCount())
{
	$arr_info = $get_info->fetch(PDO::FETCH_ASSOC);
	if ($arr_info['pw'] == md5(sha1($_POST['login_password'])))
	{
		if (1 == $arr_info['officer'])
		{
			
			// Nach erfolgreichem Einloggen auf die Startseite umleiten
			header('Location: index.php');
		}
		else
		{
			header('Location: ../index.php');
		}
	}
	else
	{
		header('Location: ../index.php');
	}
}
else
{
	header('Location: ../index.php');
}

?>
Return current item: iLP System