Exemplo n.º 1
0
 */
if (!isset($_COOKIE['timezone']) || empty($_COOKIE['timezone'])) {
    $htmlinst->reload();
}
?>
    </head>
    <body>
        <div style='float:right;'>
        <?php 
// if users have an appropriate admin action, then show special bar
if ($cook_book) {
    // get CSRF key from database
    $key = $admin->get_key_from_cookie($db, $_COOKIE['old_skkooll'], random_str, $cook);
    ?>
            Login as <a href='./admin.php'><font class='a-goto-admin'><?php 
    echo $admin->get_user_from_cookie($db, $_COOKIE['old_skkooll'], random_str, $cook);
    ?>
</font></a>
            <?php 
    // root admin = can create another admins
    // admin = can't create another admins
    if ($admin->get_id_from_cookie($db, $_COOKIE['old_skkooll'], random_str, $cook) == 1) {
        ?>
                  <font style='color:yellow;'>(<?php 
        echo "Root Admin";
        ?>
)</font>
                <?php 
    } else {
        ?>
                  <font style='color:yellow;'>(<?php 
Exemplo n.º 2
0
   <li>
     <a href="?change-password">CHANGE PASSW0RD</a>
   </li>
   <li>
     <a href="?options">0PTi0NS</a>
   </li>
 </ul>
 <br><br><br><br><br><br>
 <?php 
 if (isset($_GET['new-post'])) {
     if (isset($_POST['submit-new-post']) && !empty($_POST['submit-new-post'])) {
         // check if user try to submit invalid csrf token
         if (!$admcl->check_key_from_id($db, $id, $_POST['auth_key'])) {
             $htmlinst->javascript_error("CSRF AUTHENTiCATi0N T0KEN ERR0R");
         } else {
             $username = $admcl->get_user_from_cookie($db, $_COOKIE['old_skkooll'], random_str, $cook);
             $hold_bool = $post->add_new_post($db, $_POST['new_post_title'], $_POST['new_post_content'], $username);
             if ($hold_bool) {
                 $htmlinst->admin_inform_ok(array('P0ST UPDATE SUCCESSFUL!', 'PRESS BUTT0N T0 REFRESH PAGE'), 'REFRESH PAGE');
             } else {
                 $htmlinst->error_admin(array('INSERT NEW P0ST FAiLED!'));
             }
         }
     } else {
         ?>
     <form method='post'>
       <div class="formhead post-box post-head">NEW P0ST</div>
       <div class="formwrap post-title">
         <input type='text' name='new_post_title' placeholder='TiTLE HERE..' class='post-title-box' />
       </div>
       <div class="formwrap post-box">