Beispiel #1
0
<?php

session_start();
unset($id);
unset($nama);
session_destroy();
require_once "conf/command.php";
if (cekSessiAdmin()) {
    session_unregister("ses_admin");
}
header("Location:index.php");
Beispiel #2
0
function tampilMenu()
{
    if (cekSessiKunjung()) {
        $menu = array('Home' => '?act=HomeKunjung', 'Data Komentar' => '?act=DataKomentar', 'Sign Out' => 'logout.php');
    } elseif (cekSessiAdmin()) {
        $menu = array('Informasi' => '?act=Home', 'About Program' => '?act=HomeAdmin', 'Sign Out' => 'logout.php');
    } elseif (cekSessiKelas()) {
        $menu = array('About Program' => '?act=HomeAdmin', 'Set Tahun & Bulan' => '?act=InputTahun&action=TAMBAH', 'Sign Out' => 'logout.php');
    } else {
        $menu = array('Informasi' => 'index.php?act=Home', 'About Program' => 'index.php?act=Kontak');
    }
    echo "<ul id=\"navlist\">";
    $i = 0;
    foreach ($menu as $key => $val) {
        $i++;
        if ($key == 'Sign Out') {
            $klik = "onclick=\"return confirm('Yakinkah anda akan logout.?');\"";
        }
        if (isGuest()) {
            if ($i == 1) {
                $last = "class='current_page_item'";
            }
        } else {
            if ($i == 1) {
                $last = "class='current_page_item'";
            }
        }
        echo "<li title='{$key}'><a href='{$val}' >{$key}</a></li>";
    }
    echo "</ul>";
}