0 && $user_enc !== 'clear' && $user_enc !== 'none')?hash($user_enc,$pass):$pass;
if(file_exists($user_file)) {
if($pass === $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 '