Example #1
0
}
include_once "client_functions.php";
include_once "users.php";
include_once "admin_functions.php";
include_once "list.php";
if (admin_logged_in()) {
    if (isset($_POST['create'])) {
        echo '<div class="login-card">';
        echo "<center>Password : "******"</center>";
        echo '</div>';
        direct("admin.php", 3);
    } elseif (isset($_POST['log_out'])) {
        session_destroy();
        direct('admin.php', 0);
    } elseif (isset($_POST['update_book'])) {
        $list = new BookList(get_pathname());
        $list->saveList();
        echo '<div class="login-card">';
        echo "<center>List has been updated.</center>";
        echo '</div>';
        direct('admin.php', 3);
    } else {
        echo '<div class="login-card">';
        echo "<form method='post' action=''>\n\t\t<input type='submit' name='create' value='Create User' class='login login-submit' />\n\t\t<br/>\n\t\t<input type='submit' name='update_book' value='Update List' class='login login-submit' />\n\t\t<br/>\n\t\t<input type='submit' name='log_out' value='Logout' class='login login-submit' />\n\t\t</form>";
        echo '</div>';
    }
} else {
    if (isset($_POST['sub'])) {
        verify_admin();
        direct('admin.php', 0);
    } else {
Example #2
0
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet prefetch' href='inc/jquery-ui.css'>
<link rel="stylesheet" href="inc/style.css">
</head>
<body>

<?php 
include_once 'viewer_model.php';
include_once 'client_functions.php';
if (isset($_POST['pagenum'])) {
    $pgn = (int) $_POST['pagenum'];
    $totalPage = totalNumber(get_pathname() . Viewer::titleToDocName($_POST['docname']));
    if ($pgn < $totalPage && $pgn >= 0) {
        $view = new Viewer(get_pathname() . Viewer::titleToDocName($_POST['docname']), $_POST['pagenum']);
        $x = $view->nextPageN();
        echo '<img src=' . $x . ' width="60%" height="%70" >';
    }
}
?>

<script src='inc/jquery.min.js'></script>
<script src='inc/jquery-ui.min.js'></script>
</body>
</html>