예제 #1
0
if ($_POST) {
    $roll = $_POST['roll'];
    $password = $_POST['password'];
    $result = db_select_where('students', 'roll,name', 'roll=' . $roll . ' and md5("' . $password . '")=password');
    if ($result) {
        $token = uniqid();
        setcookie("roll", $roll);
        setcookie("token", $token);
        $login_query = 'update students set token="' . $token . '" where roll=' . $roll;
        if (db_exec_only($login_query)) {
            $login_success = true;
        }
    }
}
theme_header('Login');
theme_navbar($login_success, $roll);
?>
        <div class="col-lg-5">
        <h2><i class="fa fa-sign-in fa-fw"></i> Login <small>Get access student database</small></h2>
        <?
        if($login_success)
            login_success();
        else {
            if($_POST) {
                login_error();
            }
            theme_login_form();
        }
        ?>
        </div>
<?
예제 #2
0
<?php

include 'include.php';
theme_header('Home');
theme_navbar($verified_user, $roll);
?>
    <div class="col-lg-8 ">
    <img src="img/csebuilding.jpg" alt="..." class="img-thumbnail">
    <br />
    <br />
    
                <table class="table table-hover">
                <thead>
                  <tr>
                    <td  class="warning" colspan="2"><i class="fa fa-globe fa-lg"> CSE 500 Internet Programming Project</i></td>
                  </tr>
                </thead>
                <tbody>
                <tr>
                    <td><i class="fa fa-star"> Project Superviser</i></td>
                    <td><strong>Boshir Ahmed</strong>,  Assistant Professor, CSE, RUET
                    </td>
                </tr>
                <tr>
                    <td><i class="fa fa-tag"> Project Name</i></td>
                    <td>Student Information Registration and Browsing System
                    </td>
                </tr>
                <tr>
                    <td><i class="fa fa-user"> Project Member 1</i></td>
                    <td><a href="details.php?roll=103001">Md. Minhazul Haque</a>, Roll # 103001
예제 #3
0
<?php

include 'include.php';
$logout_success = false;
$roll = $_COOKIE['roll'];
if ($roll) {
    setcookie("roll", "");
    setcookie("token", "");
    $logout_query = 'update students set token="" where roll=' . $roll;
    $logout_success = db_exec_only($logout_query);
}
theme_header('Logout');
theme_navbar();
?>
        <div class="col-lg-5">
            <h2>Logout <small>End your session</small></h2>
            <?
            if($logout_success)
                logout_success();
            else
                logout_error();           
            
            ?>
        </div>
<?
theme_footer();
db_close();

?>