示例#1
0
}
if (isset($_SESSION["user_type"])) {
    $user_type = $_SESSION["user_type"];
}
if (isset($user_name)) {
    // check if it is regular user
    if ($user_type == "a") {
        echo "<table width='100%' align='center'>";
        echo "<tr>";
        echo "<td align='right' style='color: #C15BAF; font-size: 24px;'>Welcome Admin! Press here to <a href='logout.php'>logout!</a></td>";
        echo "</tr>";
        echo "</table>";
        $manage = new Manage(Hostname, DB - username, password, Database - Name);
        $manage->connect();
        $manage->show_users();
        $manage->get_user_name();
        $manage->show_user_business_plan_information();
        $manage->disconnect();
        echo "<a href='register.php'>Register a New user</a>";
    } else {
        if ($user_type == "r") {
            header("location: user.php");
        } else {
            echo "Login in error";
        }
    }
} else {
    echo "Please enter username and password to login<br />";
    echo "Press here to <a href='index.php?'>HomePage!</a>";
}
?>