Example #1
0
function dldc_login($username, $password)
{
    if ($user = DLDC_User::login($username, $password)) {
        $_SESSION['DLDC_USER'] = $user;
        $_SESSION['DLDC_IS_ADMIN'] = dldc_is_admin();
        return true;
    } else {
        return false;
    }
}
Example #2
0
<?php

require 'config.php';
dldc_session_start();
require 'header.php';
if (!dldc_is_admin()) {
    dldc_error('Permission denied!');
} else {
    ?>
<h1>Admin Panel</h1>
<p>Due to a security investigation, the admin panel is currently disabled.</p> 
<?php 
}
require 'footer.php';