Você está na página 1de 19

1

(GGSIPU University)

ByAMIT KUMAR (0181772010) RAMANDEEP SINGH (0381772010)

Online Library System: Home page

Home page: php coding


<html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Library System</title> <link href="/SMS/Student Information System/library/css/default.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="wrapper"> <?php include $_SERVER['DOCUMENT_ROOT'] .'/SMS/Student Information System/library/includes/header.php';?> <div id="page"> <div id="content"> <div id="welcome"> <h2>Welcome to Student Library</h2> <!--body-->

6
</div>

<!-- end div#welcome --> </div> <!-- end div#content --> <div id="sidebar"> <ul> <?php include $_SERVER['DOCUMENT_ROOT'] .'/SMS/Student Information System/library/includes/nav.php';?> <!-- end navigation --> <?php include $_SERVER['DOCUMENT_ROOT'] .'/SMS/Student Information System/library/includes/updates.php';?> <!-- end updates --> </ul> </div>

7
<p>Welcome to Student Library. Here you will find the complete collection of book on our library. Please contact our staff if you want to borrow any books. </p> <!--body ends--> <!-- end div#sidebar --> <div style="clear: both; height: 1px"></div> </div> <?php include $_SERVER['DOCUMENT_ROOT'] .'/SMS/Student Information System/library/includes/footer.php';?> </div> <!-- end div#wrapper --> </body> </html>

Admin Login Page

<?php

Admin login page: php coding


session_start(); if(isset($_REQUEST['login'])){ $admin_user = $_REQUEST['admin_user']; $admin_pwd = $_REQUEST['admin_pwd']; if(empty($admin_pwd) || empty($admin_user)){ $err = "Every Field has to be Filled."; } else if($admin_user == "aks" && $admin_pwd == "aks"){ $_SESSION['admin'] = $admin_user; header("Location: admin.php");

10
} else {

?> <html > <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Library System</title> <link href="/SMS/Student Information System/library/css/default.css" rel="stylesheet" type="text/css" /> </head>

} if(isset($_REQUEST['logout'])){ session_unset(); header("location: admin.php"); }

$err = "You are not an Authorised Administrator";

11
<body> <?php if(!isset($_SESSION['admin'])){ ?> <div id="apDiv1"> Please fill form: <form name="form1" method="post" action=""> <table width="374"> <tr> <td style="color:#F00; text-align:center;" colspan="2"><?php if(isset($err)) echo $err; ?></td> </tr> <tr> <td style="text-align:right;">Admin Username</td> <td><input type="text" name="admin_user" id="admin_user" /></td> </tr> <tr> <td style="text-align:right;">Password</td> <td><input type="password" name="admin_pwd" id="admin_pwd" class="validate[required,custom[phone]] text-input" /></td> </tr>

12
<td colspan="2" style="text-align:center;"><input type="submit" name="login" id="login" value="Login" /></td> </tr> </table> </form> <p>&nbsp;</p> </div> <?php } ?> <div id="wrapper"> <?php include $_SERVER['DOCUMENT_ROOT'] .'/SMS/Student Information System/library/includes/header.php';?> <div id="page"> <div id="content"> <div id="welcome"> <h2>Welcome to Student Library System</h2> <!--body--> <tr>

13
<p> Welcome to Student Library System. Here you will find the complete collection of book on our library. Please contact our staff if you want to borrow any books. </p> <p> </p> <!--body ends--> </div> <!-- end div#welcome --> <br><br><br><br><br><br><br><br> <BR><br><br><br><br><br><br><br><a href="/SMS/index.html" class="button">Home Page</a> </div> <!-- end div#content --> <?php if(isset($_SESSION['admin'])){ ?>

14
<div id="sidebar"> <ul> <?php include $_SERVER['DOCUMENT_ROOT'] .'/SMS/Student Information System/library/includes/nav_library.php';?> <!-- end navigation --> <?php include $_SERVER['DOCUMENT_ROOT'] .'/SMS/Student Information System/library/includes/updates.php';?> <!-- end updates --> </ul> </div> <?php }?> <!-- end div#sidebar --> <div style="clear: both; height: 1px"></div> </div> <?php include $_SERVER['DOCUMENT_ROOT'] .'/SMS/Student Information System/library/includes/footer.php';?> </div> <!-- end div#wrapper --> </body> </html>

15

Some other modules

16

Admin Main Page

Data Entry page

17

18

Book Transaction page

19

Você também pode gostar