0 && $user_enc !== 'clear' && $user_enc !== 'none') {
// If the hash algo bcrypt?
if ($user_enc == 'bcrypt') {
// DON'T DO A FUCKING THING BECAUSE WE'RE USING THE APSSWORDV_ERIFY FUCNTION BITJESK.
$password = $pass;
}
else {
// Yay, we're using a hashing algorithm designed to be FAST so brute forcers can exert less effort
$password = hash($user_enc,$pass);
}
}
else {
// Wow, we really like plaintext stuff. Hope your /config/user/admin.ini isn't web-accessible
$password = $pass;
}
if(file_exists($user_file)) {
if($password === $user_pass || password_verify($password, $user_pass)) {
$_SESSION[config("site.url")]['user'] = $user;
header('location: admin');
}
else {
return $str = '
';
echo '| Title | Published | ';
if (config("views.counter") == "true")
echo 'Views | ';
echo 'Tag | Operations |
';
$i = 0;
$len = count($posts);
foreach ($posts as $p) {
if ($i == 0) {
$class = 'item first';
} elseif ($i == $len - 1) {
$class = 'item last';
} else {
$class = 'item';
}
$i++;
echo '';
echo '| ' . $p->title . ' | ';
echo '' . date('d F Y', $p->date) . ' | ';
if (config("views.counter") == "true")
echo '' . $p->views . ' | ';
echo '' . $p->tag . ' | ';
echo 'Edit Delete | ';
echo '
';
}
echo '
';
}
}
}
// Get all static pages
function get_recent_pages()
{
if (isset($_SESSION[config("site.url")]['user'])) {
$posts = get_static_post(null);
if (!empty($posts)) {
krsort($posts);
echo '