Exemplo n.º 1
0
    <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 
        echo "Admin";
        ?>
)</font>
                <?php 
    }
    ?>
Exemplo n.º 2
0
    var timezone = jstz.determine();
    setCookie('timezone', timezone.name(), 7);
    </script>
  </head>
  <body>
    <br>
    <?php 
if (!isset($_COOKIE['timezone']) || empty($_COOKIE['timezone'])) {
    $htmlinst->reload();
}
if (isset($_COOKIE['old_skkooll']) || !empty($_COOKIE['old_skkooll'])) {
    if ($cook->check_cookie($_COOKIE['old_skkooll'], random_str, $db)) {
        if (count($_GET) == 0) {
            $htmlinst->change_location("?main_page");
        }
        $id = $admcl->get_id_from_cookie($db, $_COOKIE['old_skkooll'], random_str, $cook);
        $key = $admcl->get_key_from_cookie($db, $_COOKIE['old_skkooll'], random_str, $cook);
        ?>
        <ul class="idTabs">
          <li>
            <a href="?new-post">NEW P0ST</a>
          </li>
          <li>
            <a href="?list-post">LiST P0ST</a>
          </li>
          <?php 
        if ($id == 1) {
            ?>
            <li>
              <a href="?user-add">ADD USER</a>
            </li>