2015-03-27 02:00:01 +01:00
|
|
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
|
2015-08-03 02:49:12 +02:00
|
|
|
// ============================================================================
|
|
|
|
// Check role
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Functions
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Main before POST
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// POST Method
|
|
|
|
// ============================================================================
|
|
|
|
|
2015-03-27 02:00:01 +01:00
|
|
|
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
|
|
|
{
|
2015-08-08 02:39:10 +02:00
|
|
|
// Verify User sanitize the input
|
|
|
|
if( $Login->verifyUser($_POST['username'], $_POST['password']) )
|
2015-03-27 02:00:01 +01:00
|
|
|
{
|
|
|
|
Redirect::page('admin', 'dashboard');
|
|
|
|
}
|
2015-05-15 00:07:45 +02:00
|
|
|
else
|
|
|
|
{
|
2015-07-22 05:15:02 +02:00
|
|
|
Alert::set($Language->g('Username or password incorrect'));
|
2015-05-15 00:07:45 +02:00
|
|
|
}
|
2015-08-03 02:49:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// Main after POST
|
|
|
|
// ============================================================================
|