Professional Documents
Culture Documents
Vishnu
(3GN21AI062)
Saikumar
(3GN21AI046)
Saikumar
(3GN21AI045)
Under the Guidance of
Prof.Netravati S
CERTIFICATE
This is to certify that the Database Management System Project work entitled Crime Database
Management System has been carried out by Mahesh(3GN21AI015), Vishnu
(3GN21AI062), Saikumar(3GN21AI046) , Saikumar(3GN21AI045) bonafide students of
Guru Nanak Dev College Bidar in partial fulfillment for the Completion of 5 th Sem of Bachelor
of Engineering in Artificial Intelligence And Machine Learning of the Visvesvaraya
Technological University, Belgaum during the year 2023-2024. It is certified that all
corrections/suggestions indicated for Internal Assessment have been incorporated in the Report
deposited in the departmental library. This DBMS Project Report has been approved as it
satisfies the academic requirements in respect of project work prescribed for the said degree.
----------------- -------------------
Signature of Guide Signature of HOD
ACKNOWLEDGEMENT
It gives us a great sense of pleasure to present the report of the B.E. Mini Project undertaken during the 5th
semester. We also take the opportunity to acknowledge the contribution of Dr.Dayanand J. Sir, HOD. of the
Department of Artificial Intelligence and Machine Learning, Guru Nanak Dev Engineering College Bidar,
for his full support and assistance during the development of the project. It is only through his cognizant
efforts that our endeavors have seen the light of day. We owe a special debt of gratitude to Mrs. Netravati
S., Department of Artificial Intelligence and Machine Learning, Guru Nanak Dev Engineering College Bidar,
for her constant support and guidance throughout the course of our work. Her sincerity, thoroughness, and
perseverance have been a constant source of inspiration for us. We also do not like to miss the opportunity to
acknowledge the contribution of all faculty members of the department for their kind assistance and
cooperation during the development of our project. And last but not least, we acknowledge our friends for
their contribution to the completion of the project.
Mahesh
Vishnu
Saikumar (046)
Saikumar(045)
lOMoARcPSD|280 114 95
II
ABSTRACT
The purpose of University Management System is to automate the existing manual system by the help of
computerized equipments and full-fledged computer software,fulfilling their requirements,so that their
valuable data/information can be stored for a longer period with easy accessing and manipulation of the
same.The required software and hardware are easily available and easy to work with.
University Management System,as described above,can lead to error free,secure,reliable and fast management
system.It can assist the user to concentrate on their other activities rather to concentrate on the record keeping.
Thus it will help organization in better utilization of resources.The organization can maintain computerized
records without redundant entries.That means that one need not be distracted by information that is not
relevant,while being able to reach the information.
The system displays all the available records of available faculties,students,and their marks.It also controls
student attendance records under different dates and sets marks for students in various subjects.Users can
view the overall results of each student,including CGPA and download student and faculty records.
lOMoARcPSD|280 114 95
TABLE OF CONTENTS
ACKNOWLEDGEMENT I
ABSTRACT II
Chapter 1
INTRODUCTION
In today's digital age, universities and educational institutions are increasingly relying on
methods of managing student records, course schedules, and faculty information are being
The implementation of a university management system aims to centralize and automate various
administrative tasks, thereby improving efficiency, reducing paperwork, and providing better
services to students, faculty, and staff members. This system facilitates seamless communication,
Chapter 2
SYSTEM REQUIREMENTS
To demonstrate and work with this project there few hardware and software requirements that
are to be satisfied To work with any storage system we need a database installed into our system
and as this project is made as an stand alone application any frontend tool can be used to design
and develop it .The major Hardware and Software requirements are listed below.
● PHP(version-8.2.12)
● XAMPP(version-3.3.0)
● Apache(version-2.4.58)
1. My SQL:
- MySQL is a relational database management system (RDBMS) developed by Oracle that is
based on structured query language (SQL).
- In this project, My SQL is likely used as the backend database to store and manage the data.
2.PHP:
- Hypertext Pre-processor commonly known as PHP is a general-purpose programming language
that is used in combination with various web template systems, web frameworks, and web content
management systems.
- In this project, PHP is likely used as the backend scripting language to build the web application.
3. XAMPP:
- XAMPP, which stands for Cross-Platform, Apache, MySQL, PHP, and Perl, is a free platform that
allows developers to test their code locally on their own computers..
- This platform provides the experience of having your own mini web server at home, compatible
with both Windows (WAMP) and Linux (LAMP) environments.
- In this project, XAMPP is likely used for interacting with the DBMS, Backend server(Apache)
through localhost.
4. Apache:
-Apache is a free, open-source web server that displays website contents.
- In this project, as a Web server, Apache is responsible for accepting directory (HTTP) requests
from Internet users and sending them their desired information in the form of files and Web pages.
Overall, this project seems to be a combination of backend development with PHP and My SQL,
coupled with frontend development for data visualization and interaction using HTML, CSS,
Javascript.
2023−24 Page 3
Crime Database Management System
lOMoARcPSD|280 114 95
Chapter 3
DESIGN
The overall design objective is to provide an efficient, modular design that will reduce the system’s
complexity, facilitate change and result in an easy implementation. This will be accomplished by
designing a strong cohesion system with minimal coupling. The purpose of the design phase is to
develop a clear understanding of what the developer wants people to gain from the project. The
database application system may be divided into two kinds: one is data-centric and the other is
process-centric. The former takes the data provided as the goal, and the data acquisition, the
database construction and maintenance as the key point. Although the latter also includes these,
the emphasis is the service data, that is carrying on inquiry, statistics, report output and so on. In
this article the student information management database application system is mainly process-
centric.
Following the functional requirement of the student information management database application
system, the overall structure of the application system could be indicated with the hierarchy chart,
from the top to down: Layer 1 is the system layer, Layer 2 is the function layer, Layer 3 for
operation layer. Figure 3.1 is the overall structure of the student information management database
application system.
Figure 3.
Chapter 4
IMPLEMENTATION
Creating a university management system using PHP, MySQL, and XAMPP involves several
steps including database design, backend development, frontend development, and
integration. Below, is the outline of a basic implementation guide for such a system:
1. Setup XAMPP:
Download and install XAMPP (which includes Apache, MySQL, PHP, and Perl)
from the Apache Friends website.
Start the Apache and MySQL services from the XAMPP Control Panel.
2. Database Design:
Design the database schema to store information such as students, courses,
professors, grades, etc. Identify the entities, attributes, and relationships
between them.
Create the necessary tables in MySQL using phpMyAdmin or any MySQL
client.
3. Backend Development (PHP):
Write PHP scripts to handle database operations like insert, update, delete,
and select.
Implement authentication and authorization mechanisms for users (e.g.,
students, professors, admin).
Develop backend logic to handle functionalities such as enrollment, grading,
scheduling, etc.
Ensure security measures such as input validation, SQL injection prevention,
and session management.
First, create a database according to the given ER diagram and Schema diagram. In Selected
Schema, there are three tables: two normal tables and one relationship table.
After creating the tables in the University database, it is now time to develop the frontend of the
project that connects the database to the server using PHP and provides a smooth user interface
using HTML,CSS and Javascript , which helps in the insertion of data into the database and
retrieval of the required data using Query.
<?php
class databaseConnection{
public function __construct(){
global $conn;
$conn = new
mysqli("localhost","root","","uni");
//check error
if(!$conn){
die("Database cannot
established connection
properly:".$conn->connect_error());
}
}
}
?>
lOMoARcPSD|280 114 95
footerbottom.php
</div>
<footer class="container">
<h3 style="text-align:center;background:#2A2B3C;margin:0;padding:15px;color:#fff;font-
weight:normal">©Developed by group07 - <?php echo date("Y");?> </h3>
</footer>
</html>
function.php
<?php
class login_registration_class{
public function __construct(){
$db = new databaseConnection();
}
$num = $query->num_rows;
$in_sql = "INSERT INTO st_info
(st_id,name,password,email,bday,program,contact,gender,address) VALUES
('$st_id','$st_name','$st_pass','$st_email','$bday','$st_dept','$st_contact','$st_gender','$st_add') ";
if($num == 0){
$conn->query($in_sql);
return true;
}else{
return false;
}
}
//session_destroy();
}
public function getsession(){
return @$_SESSION['st_login'];
}
/**
---------------------------------
All functions for faculty section
---------------------------------
**/
public function fct_registration($name,$uname, $pass,$email,
$bday,$gender,$edu,$contact,$address){
global $conn;
$fct = $conn->query("select id from faculty where username='$uname' ");
$count = $fct->num_rows;
if($count == 0){
$sql = "insert into
faculty(name,username,password,email,birthday,gender,education,contact,address)
values('$name','$uname','$pass','$email','$bday','$gender','$edu','$contact','$address')";
$result = $conn->query($sql);
lOMoARcPSD|280 114 95
return true;
}else{
return false;
}
}
//get faculty
public function get_faculty_by_username($uname){
global $conn;
$sql = "select * from faculty where username='$uname'";
$result = $conn->query($sql);
return $result;
}
public function get_faculty(){
global $conn;
$sql = "select * from faculty order by id ASC";
$result = $conn->query($sql);
return $result;
}
//login for faculty
public function fct_login($uname, $pass){
global $conn;
$sql = "select id,username,name from faculty where username='$uname' and
password='$pass' ";
$result = $conn->query($sql);
$count = $result->num_rows;
$fctinfo = $result->fetch_assoc();
if($count == 1){
session_start();
$_SESSION['fct_login'] = true;
$_SESSION['f_id'] = $fctinfo['id'];
$_SESSION['f_uname'] = $fctinfo['username'];
$_SESSION['f_name'] = $fctinfo['name'];
return true;
}else{
return false;
}
}
public function faculty_logout(){
$_SESSION['fct_login'] = false;
unset($_SESSION['f_id']);
unset($_SESSION['f_uname']);
unset($_SESSION['f_name']);
unset($_SESSION['fct_login']);
lOMoARcPSD|280 114 95
/*
**********************
----------------------
All functions for Admin
----------------------
**********************
*/
$_SESSION['admin_id'] = $admin_info['id'];
$_SESSION['admin_name'] = $admin_info['username'];
return true;
}else{
return false;
}
}
public function get_admin_session(){
return @$_SESSION['admin_login'];
}
//admin logout
public function admin_logout(){
$_SESSION['admin_login'] = false;
unset($_SESSION['admin_id']);
unset($_SESSION['admin_name']);
unset($_SESSION['admin_login']);
}
//delete student
public function delete_student($st_id){
global $conn;
$sql = "delete from st_info where st_id='$st_id' ";
$result = $conn->query($sql);
if($result){
return true;
}else{
return false;
}
}
//attendance system
}
public function delete_atn_student($at_id){
global $conn;
$res = $conn->query("delete from at_student where id = '$at_id' ");
return $res;
}
public function get_attn_date(){
global $conn;
$res = $conn->query("select distinct at_date from attn ");
return $res;
}
public function attn_all_student($date){
global $conn;
lOMoARcPSD|280 114 95
//end class
};
?>
headertop.php
<!Doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title><?php echo $pageTitle; ?></title>
<meta name="description" content="University Management system">
<meta name="author" content="Md Abul Kalam">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Place favicon.ico in the root directory -->
<?php } ?>
<?php if($user->get_faculty_session()){ ?>
<li><a href="facultylogout.php"><i
class="fa fa-sign-out" aria-hidden="true"></i> Logout</a></li>
<li><a href="class_att_fc.php"><i
class="fa fa-cog" aria-hidden="true"></i> Options</a></li>
<li><a
href="fct_single_profile.php"><i class="fa fa-user" aria-hidden="true"></i> <?php echo $fname;
?></a></li>
<?php } ?>
</ul>
</div>
</div>
</header>
<div class="info container fix">
Headertop-admin.php
<!Doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title><?php echo $pageTitle; ?></title>
<meta name="description" content="University Management system">
<meta name="author" content="Md Abul Kalam">
<meta name="viewport" content="width=device-width, initial-scale=1">
lOMoARcPSD|280 114 95
<?php } ?>
</ul>
</div>
</div>
</header>
<div class="info container fix">
Headertop-faculty.php
<!Doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title><?php echo $pageTitle; ?></title>
lOMoARcPSD|280 114 95
<?php } ?>
</ul>
</div>
</div>
</header>
<div class="info container fix">
Admin.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
lOMoARcPSD|280 114 95
<div class="section">
<h3>Student</h3>
<ul>
<li><a href="admin_all_student.php">View All Student</a></li>
<li><a href="st_result.php">Student Result</a></li>
<li><a href="class_att.php">Attendance</a></li>
<li><a href="student_list_pdf.php"><button>Download Student
List</button></a></li>
</ul>
</div>
<div class="section">
<h3>Faculty</h3>
<ul>
<li><a href="admin_all_faculty.php">Faculty Details</a></li>
<li><a href="#">Information</a></li>
<li><a href="#">Search Faculty</a></li>
lOMoARcPSD|280 114 95
<h3>Registry</h3>
<ul>
<li><a href="#">Accounts</a></li>
<li><a href="#">Salary</a></li>
<li><a href="#">Student tution fee</a></li>
<li><a href="#">Other cost</a></li>
</ul>
</div> -->
</div>
admin-all-faculty.php
<?php
ob_start ();
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
lOMoARcPSD|280 114 95
?>
<?php
$pageTitle = "All Faculty details";
include "php/headertop_admin.php";
?>
<div class="all_student">
<div class="search_st">
<div class="hdinfo"><h3>All Registered Faculty List</h3></div>
</div>
<table class="tab_one">
<tr>
<th>SL</th>
<th>Name</th>
<th>Email</th>
<th>Contact</th>
<th>Education</th>
<th>Address</th>
<th>Birthday</th>
</tr>
<?php
lOMoARcPSD|280 114 95
$i=0;
$alluser =$user->get_faculty();
while($rows = $alluser->fetch_assoc()){
$i++;
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $rows['name'];?></td>
<td><?php echo $rows['email'];?></td>
<td><?php echo $rows['contact'];?></td>
<td><?php echo $rows['education'];?></td>
<td><?php echo $rows['address'];?></td>
<td><?php echo $rows['birthday'];?></td>
</tr>
<?php } ?>
</table>
</div>
<?php include "php/footerbottom.php";?>
<?php ob_end_flush() ; ?>
admin-all-student.php
<?php
ob_start ();
session_start();
require "php/config.php";
lOMoARcPSD|280 114 95
?>
<?php
$pageTitle = "All student details";
include "php/headertop_admin.php";
?>
<div class="all_student">
<div class="search_st">
<div class="hdinfo"><h3>All Registered Student List</h3></div>
<div class="search">
<form action="admin_search_student.php" method="GET">
<input type="text" name="src_student" placeholder="search student" />
<input type="submit" value="Search" />
</form>
</div>
</div>
<?php
if(isset($_REQUEST['res'])){
if($_REQUEST['res']==1){
lOMoARcPSD|280 114 95
?>
<table class="tab_one">
<tr>
<th>SL</th>
<th>Name</th>
<th>ID</th>
<th>Show Profile</th>
<th>Edit</th>
<th>Delete</th>
<th>Photo</th>
</tr>
<?php
$i=0;
$alluser = $user->get_all_student();
while($rows = $alluser->fetch_assoc()){
$i++;
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $rows['name'];?></td>
<td><?php echo $rows['st_id'];?></td>
<td><a href="admin_single_student.php?id=<?php echo
$rows['st_id'];?>">View Details</a></td>
lOMoARcPSD|280 114 95
admin-delete-student.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$admin_id = $_SESSION['admin_id'];
$admin_name = $_SESSION['admin_name'];
if(isset($_REQUEST['id'])){
$st_id = $_REQUEST['id'];
}
if(!$user->get_admin_session()){
header('Location: index.php');
exit();
}
lOMoARcPSD|280 114 95
$delete =$user->delete_student($st_id);
if($delete){
header('Location: admin_all_student.php?res=1');
exit();
}
?>
admin-logout.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$user->admin_logout();
header('Location: index.php');
exit();
?>
admin-search-student.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$admin_id = $_SESSION['admin_id'];
lOMoARcPSD|280 114 95
?>
<?php
$pageTitle = "All student details";
include "php/headertop_admin.php";
?>
<div class="search_result">
<table class="tab_one">
<?php
$key = $_GET['src_student'];
$min_length = 1;
if(strlen($key) >= $min_length){
$key = htmlspecialchars($key);
$src_result = $user->search($key);
$count = $src_result->num_rows;
if($count>0){
?>
<tr>
<th>Name</th>
<th>ID</th>
<th>Show Profile</th>
lOMoARcPSD|280 114 95
<th>Edit</th>
<th>Delete</th>
<th>Photo</th>
</tr>
<?php
while($rows = $src_result->fetch_assoc()){
?>
<tr>
<td><?php echo $rows['name'];?></td>
<td><?php echo $rows['st_id'];?></td>
<td><a href="admin_single_student.php?id=<?php echo
$rows['st_id'];?>">View Details</a></td>
<td><a href="admin_single_student_update.php?id=<?php echo
$rows['st_id'];?>">Edit</a></td>
<td><a href="admin_delete_student.php?id=<?php echo
$rows['st_id'];?>">Delete</a></td>
<td><img src="img/student/<?php echo $rows['img'];?>"
width="50px" height="50px" title="<?php echo $rows['name'];?>" /></td>
</tr>
<?php } ?>
</table>
<?php
}else{
echo "<h2 style='font-size:45px;text-
align:center;color:#ddd;'>Opps....No result found !</h2>";
}
lOMoARcPSD|280 114 95
admin-single-student.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$admin_id = $_SESSION['admin_id'];
$admin_name = $_SESSION['admin_name'];
if(isset($_REQUEST['id'])){
$st_id = $_REQUEST['id'];
}else{
header('Location: admin.php');
exit();
}
if(!$user->get_admin_session()){
header('Location: index.php');
lOMoARcPSD|280 114 95
exit();
}
?>
<?php
$pageTitle = "Student Details";
include "php/headertop_admin.php";
?>
<div class="profile">
<p style="font-size:18px;text-
align:center;background:#1abc9c;color:#fff;padding:10px;margin:0"><?php $user-
>getusername($st_id); ?> <i class="fa fa-check-circle" aria-hidden="true"></i></p>
<table class="tab_one">
<?php
$getuser = $user->getuserbyid($st_id);
while($row = $getuser->fetch_assoc()){
?>
<tr>
<td></td>
<?php if(empty($row['img'])){?>
<td><img src="img/default.png" style="height:180px; width:180px;
border:1px #1ABC9C solid;border-radius:90px" alt="" /></td>
<?php }else{ ?>
<td><img src="img/student/<?php echo $row['img']; ?>"
style="height:180px; width:180px; border:1px #1ABC9C solid;border-radius:90px" alt="" /></td>
<?php }?>
</tr>
<tr>
<td>Student ID: </td>
<td><?php echo $row['st_id']; ?></td>
lOMoARcPSD|280 114 95
<tr>
<td>Update Profile: </td>
<td><a href="admin_single_student_update.php?id=<?php echo
$row['st_id'];?>"><button class="editbtn">Edit Profile</button></a></td>
</tr>
<?php } ?>
</table>
<div class="back fix">
<p style="text-align:center"><a href="admin_all_student.php"><button
class="editbtn">Back to student list</button></a></p>
</div>
</div>
admin-single-student-update.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$admin_id = $_SESSION['admin_id'];
$admin_name = $_SESSION['admin_name'];
if(isset($_REQUEST['id'])){
$st_id = $_REQUEST['id'];
}else{
header('Location: admin.php');
lOMoARcPSD|280 114 95
if(!$user->get_admin_session()){
header('Location: index.php');
exit();
}
?>
<?php
$pageTitle = "Student Details";
include "php/headertop_admin.php";
?>
<script>
function PreviewImage(upname, prv_id) {
var oFReader = new FileReader();
oFReader.readAsDataURL(document.getElementsByName(upname)[0].files[0]);
</script>
<div class="profile">
<h3 style="font-size:18px;text-
align:center;background:#1abc9c;color:#fff;padding:10px;margin:0">Update Profile</h3>
<?php
$qry=$user->getuserbyid($st_id);
lOMoARcPSD|280 114 95
$pic=$qry->fetch_assoc();
$piclocation=$pic['img'];
if($_SERVER['REQUEST_METHOD'] == "POST"){
//code for img
function guid() {
if (function_exists('com_create_guid'))
{
return
com_create_guid();
} else {
if($_FILES["personal_image"]["name"])
{
$path_parts =
pathinfo($_FILES["personal_image"]["name"]);
$ext =
$path_parts['extension'];
move_uploaded_file($_FILES['personal_image']['tmp_name'], "img/student/$fileName");
//end img
$st_name = $_POST['st_name'];
$st_email = $_POST['st_email'];
$st_dept = $_POST['st_dept'];
$st_contact = $_POST['st_contact'];
$st_gender = $_POST['st_gender'];
$st_add = $_POST['st_add'];
if(empty($st_name) or empty($st_email) or
empty($st_contact) or empty($st_dept) or empty($st_gender) or empty($st_add)){
echo "<p style='color:red;text-
align:center'>Field must not be empty.</p>";
lOMoARcPSD|280 114 95
}else{
$update = $user-
>updateprofile($st_id,$st_name,$st_email,$st_dept,$st_gender,$st_contact,$st_add,$fileName);
if($update){
echo "<h4 style='color:green;text-
align:center'>Information Updated successfully</h4>";
}else{
echo "<h4 style='color:red;text-
align:center;text-align:center'>Failed to update</h4>";
}
}
}
?>
</tr>
<tr>
<td style="width:125px;"></td>
<td>Address:</td>
<td><input type="text" name="st_add"
value="<?php echo $row['address']; ?>"></td>
</tr>
<tr>
<td style="width:125px;"></td>
<td></td>
<td colspan="2">
<input
style="background:#3498db;color:#fff;width:168px;border-radius:5px;" type="submit"
name="Update" value="Update">
</td>
</tr>
</table>
<?php } ?>
</form>
</div>
<div class="back fix">
<p style="text-align:center"><a
href="admin_all_student.php"><button class="editbtn">Back to student Profile</button></a></p>
</div>
</div>
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$admin_id = $_SESSION['admin_id'];
$admin_name = $_SESSION['admin_name'];
if(!$user->get_admin_session()){
header('Location: index.php');
exit();
}
?>
<?php
$pageTitle = "All student details";
include "php/headertop_admin.php";
?>
<div class="all_student fix">
<h3 style="text-
align:center;color:#fff;margin:0;padding:5px;background:#1abc9c">Attendance Management</h3>
<div class="fix" style="background:#ddd;padding:20px;">
<span style="float:left;"><button
style="background:#58A85D;border:none;color:#fff;padding:10px;"><a style="color:#fff;"
href="att_add.php">Add student</a></button></span>
<span style="float:right;"> <button
style="background:#58A85D;border:none;color:#fff;padding:10px;"><a style="color:#fff;"
href="class_att.php">Back</a></button></span>
</div>
<?php
if(isset($_POST['sub'])){
lOMoARcPSD|280 114 95
$name = $_POST['name'];
$stid = $_POST['stid'];
$add = $user->add_attn_student($name,$stid);
if($add){
echo "<h3 style='color:green;margin:0;padding:0;text-
align:center'>Successfull!</h3>";
}else{
echo "<p style='color:red;text-align:center'>Failed</p>";
}
}
?>
<div style="margin-left:330px;padding-top:30px;">
<table>
<form action="" method="post">
<table>
<tr>
<td>Student Name: </td>
<td><input type="text" name="name"
required/></td>
</tr>
<tr>
<td>Student Id: </td>
<td><input type="text" name="stid" required /></td>
</tr>
lOMoARcPSD|280 114 95
</form>
</div>
</div>
<?php include "php/footerbottom.php";?>
<?php ob_end_flush() ; ?>
att-del.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$admin_id = $_SESSION['admin_id'];
$admin_name = $_SESSION['admin_name'];
if(!$user->get_admin_session()){
header('Location: index.php');
exit();
}
if(isset($_REQUEST['dl'])){
lOMoARcPSD|280 114 95
$at_id = $_REQUEST['dl'];
}
$delete =$user->delete_atn_student($at_id);
if($delete){
header('Location: class_att.php?res=1');
exit();
}
?>
att-single-view.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$admin_id = $_SESSION['admin_id'];
$admin_name = $_SESSION['admin_name'];
if(!$user->get_admin_session()){
header('Location: index.php');
exit();
}
if(isset($_REQUEST['dt'])){
$date = $_REQUEST['dt'];
}
?>
<?php
lOMoARcPSD|280 114 95
att-single-view-fc.php
<?php
lOMoARcPSD|280 114 95
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$fid = $_SESSION['f_id'];
$funame = $_SESSION['f_uname'];
$fname = $_SESSION['f_name'];
if(!$user->get_faculty_session()){
header('Location: facultylogin.php');
exit();
}
if(isset($_REQUEST['dt'])){
$date = $_REQUEST['dt'];
}
?>
<?php
$pageTitle = "Attendance details";
include "php/headertop.php";
?>
<div class="all_student fix">
<h3 style="text-
align:center;color:#fff;margin:0;padding:5px;background:#1abc9c">View Attendance Details</h3>
<div class="fix" style="background:#ddd;padding:20px;">
<span style="float:left;"><a style="color:#fff;"
href="class_att_fc.php"><button
style="background:#58A85D;border:none;color:#fff;padding:10px;">Take
Attendance</button></a></span>
<span style="float:right;"><a style="color:#fff;" href="att_view_fc.php">
<button style="background:#58A85D;border:none;color:#fff;padding:10px;">View
Attendance</button></a></span>
lOMoARcPSD|280 114 95
?>
</tr>
lOMoARcPSD|280 114 95
<?php
$i=0;
$std = $user->attn_all_student($date);
//var_dump($std);
if($std){
while($rows = $std->fetch_assoc()){
$i++;
?>
<tr>
<td><?php echo $i;?></td>
<td><?php echo $rows['name'];?></td>
<td><?php echo $rows['st_id'];?></td>
att-view.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$admin_id = $_SESSION['admin_id'];
$admin_name = $_SESSION['admin_name'];
if(!$user->get_admin_session()){
header('Location: index.php');
exit();
}
lOMoARcPSD|280 114 95
</tr>
<?php
$i=0;
$get_date = $user->get_attn_date();
while($rows = $get_date->fetch_assoc()){
$i++;
lOMoARcPSD|280 114 95
?>
<tr>
<td><?php echo $i;?></td>
<td><?php echo $rows['at_date'];?></td>
<td><a href="att_single_view.php?dt=<?php echo $rows['at_date'];
?>">View Attendance</a></td>
</tr>
<?php } ?>
</table>
</div>
<?php include "php/footerbottom.php";?>
<?php ob_end_flush() ; ?>
att-view-fc.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$fid = $_SESSION['f_id'];
$funame = $_SESSION['f_uname'];
$fname = $_SESSION['f_name'];
if(!$user->get_faculty_session()){
header('Location: facultylogin.php');
exit();
lOMoARcPSD|280 114 95
</tr>
<?php
$i=0;
$get_date = $user->get_attn_date();
while($rows = $get_date->fetch_assoc()){
$i++;
?>
lOMoARcPSD|280 114 95
<tr>
<td><?php echo $i;?></td>
<td><?php echo $rows['at_date'];?></td>
<td><a href="att_single_view_fc.php?dt=<?php echo
$rows['at_date']; ?>">View Attendance</a></td>
</tr>
<?php } ?>
</table>
</div>
<?php include "php/footerbottom.php";?>
<?php ob_end_flush() ; ?>
class-att.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$admin_id = $_SESSION['admin_id'];
$admin_name = $_SESSION['admin_name'];
if(!$user->get_admin_session()){
header('Location: index.php');
exit();
}
?>
lOMoARcPSD|280 114 95
}
}
?>
class-att-fc.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$fid = $_SESSION['f_id'];
$funame = $_SESSION['f_uname'];
$fname = $_SESSION['f_name'];
if(!$user->get_faculty_session()){
header('Location: facultylogin.php');
exit();
}
?>
<?php
$pageTitle = "All student details";
lOMoARcPSD|280 114 95
?>
</tr>
<?php
$i=0;
$alluser = $user->attn_student();
while($rows = $alluser->fetch_assoc()){
$i++;
?>
<tr>
<td><?php echo $i;?></td>
<td><?php echo $rows['name'];?></td>
<td><?php echo $rows['st_id'];?></td>
<td>
lOMoARcPSD|280 114 95
</table>
<span style="margin-left:360px;"><input style="<text-align:right></text-
align:right>;background:#58A85D;border:none;color:#fff;padding:8px 100px;" type="submit"
name="submit" value="Submit" /></span>
</form>
</div>
<?php include "php/footerbottom.php";?>
<?php ob_end_flush() ; ?>
faculty-list.php
<?php
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
require('plugins/fpdf/fpdf.php');
lOMoARcPSD|280 114 95
require('plugins/fpdf/rotation.php');
$pdf->Image('img/logo.png',10,9,17);
$pdf->Ln();
$pdf-> Cell(20);
$pdf->SetFont('Times','',14);
$pdf->Write(5, $iubat);
$pdf->Ln();
$pdf-> Cell(22);
$pdf->SetFont('Times','',10);
$pdf->Write(4,'Developed by Md Abul Kalam');
$pdf-> Cell(20);
$pdf->SetFont('Times','',8);
$pdf->Write(5,
'________________________________________________________________________________
__________________________________________________');
$pdf->Ln();
$pdf->Ln();
$pdf-> Cell(85);
$pdf->SetFont('Times','U',10);
$pdf->Write(5, 'Faculty List');
$pdf->Ln();
$pdf->Ln(2);
$pdf-> Cell(5);
lOMoARcPSD|280 114 95
$pdf->SetFont('Times','B',8);
$pdf->Cell(8,6,'SL',1);
$pdf->Cell(40,6,'Faculty Name',1);
$pdf->Cell(40,6,'Contact',1);
$pdf->Cell(40,6,'Email',1);
$pdf->Cell(40,6,'Education',1);
$pdf->Ln();
$qry = $user->get_faculty();
facultylogin.php
<?php
ob_start ();
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
if($user->get_faculty_session()){
header('Location: class_att_fc.php');
exit();
}
?>
<?php
$pageTitle = "Faculty login";
include "header.php";
?>
lOMoARcPSD|280 114 95
<?php
//php for faculty login
if($_SERVER['REQUEST_METHOD'] == "POST"){
$username = $_POST['user'];
$psw = $_POST['psw'];
if(empty($username) or empty($psw)){
echo "<p style='color:red;text-
align:center;'>Field must not be empty.</p>";
}else{
$psw = md5($psw);
$login = $user->fct_login($username, $psw);
if($login){
header('Location: class_att_fc.php');
}else{
echo "<p style='color:red;text-
align:center'>Incorrect Username or password</p>";
}
}
}
?>
<?php
include "footer.php";
ob_end_flush() ;
?>
facultylogout.php
<?php
ob_start();
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$user->faculty_logout();
header('Location: facultylogin.php');
exit();
ob_end_flush();
?>
fct-reg.php
<?php
lOMoARcPSD|280 114 95
$BirthMonth = $_POST['BirthMonth'];
$BirthDay = $_POST['BirthDay'];
$BirthYear = $_POST['BirthYear'];
$bday = "{$BirthYear}-{$BirthMonth}-{$BirthDay}";
$st_gender = $_POST['gender'];
$degree = $_POST['degree'];
lOMoARcPSD|280 114 95
$subject = $_POST['subject'];
$inst = $_POST['inst'];
$edu = "{$degree} in {$subject} from {$inst}";
$st_contact = $_POST['st_contact'];
$st_add = $_POST['st_add'];
if(empty($st_name) or empty($uname) or
empty($st_pass ) or empty($st_email) or empty($BirthMonth) or empty($BirthDay) or
empty($BirthYear)or empty($degree) or empty($subject) or empty($inst) or empty($st_contact) or
empty($st_gender) or empty($st_add)){
echo "<p style='color:red;text-
align:center'>**Field must not be empty**</p>";
}else{
$st_pass = md5($st_pass);
$fct_register = $user-
>fct_registration($st_name,$uname,$st_pass,$st_email,$bday,$st_gender,$edu,$st_contact,$st_add)
;
if($fct_register){
echo "<h3
style='color:green;margin:0;padding:0;text-align:center'>Registration Complete !! <a style='font-
size:20px;color:#8e44ad' href='facultylogin.php'>Login</a></h3>";
}else{
echo "<p style='color:red;text-
align:center'>Error..username Already exists</p>";
}
}
}
?>
</p>
<form action="" method="post" id="st_form">
lOMoARcPSD|280 114 95
fct-single-profile.php
<?php
lOMoARcPSD|280 114 95
ob_start();
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$fid = $_SESSION['f_id'];
$funame = $_SESSION['f_uname'];
$fname = $_SESSION['f_name'];
if(!$user->get_faculty_session()){
header('Location: facultylogin.php');
exit();
}
?>
<?php
$pageTitle = "Student Profile";
include "php/headertop.php";
?>
<div class="faculty">
<p style="font-size:18px;text-
align:center;background:#1abc9c;color:#fff;padding:10px;margin:0">Welcome : <?php echo
$funame; ?> <i class="fa fa-check-circle" aria-hidden="true"></i></p>
<table class="tab_one">
<?php
$getuser = $user->get_faculty_by_username($funame);
while($row = $getuser->fetch_assoc()){
?>
<tr>
lOMoARcPSD|280 114 95
<?php } } ?>
</table>
</div>
<?php
include "php/footerbottom.php";
ob_end_flush();
?>
footer.php
</div>
</div>
header.php
<!Doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
lOMoARcPSD|280 114 95
<li><a
href="facultylogin.php"><i class="fa fa-sign-in" aria-hidden="true"></i> Login</a></li>
<li><a
href="fct_single_profile.php"><i class="fa fa-user" aria-hidden="true"></i> Profile</a></li>
<li><a href="class_att.php"><i
class="fa fa-database" aria-hidden="true"></i> Class Attendance</a></li>
</ul>
</ul>
</div>
</div>
<div class="content fix">
index.php
<?php
lOMoARcPSD|280 114 95
<?php
$pageTitle = "Admin Login";
?>
<?php include "header.php"; ?>
if(empty($username) or empty($password)){
echo "<p style='color:red;text-
align:center;'>Field must not be empty.</p>";
}else{
$password = md5($password);
lOMoARcPSD|280 114 95
$login = $user->admin_userlogin($username,
$password);
st-change-pass.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$sid = $_SESSION['sid'];
$sname = $_SESSION['sname'];
if(!$user->getsession()){
header('Location: st_login.php');
exit();
}
?>
<?php
$pageTitle = "Change Password";
include "php/headertop.php";
?>
<div class="profile">
<h3 style="font-size:18px;text-
align:center;background:#1abc9c;color:#fff;padding:10px;margin:0">Update Your Profile</h3>
<?php
if($_SERVER['REQUEST_METHOD'] == "POST"){
lOMoARcPSD|280 114 95
</tr>
<tr>
<td style="width:125px;"></td>
<td>New Password:</td>
<td><input type="text" name="newpass"
placeholder="New password" /></td>
</tr>
<tr>
<td style="width:125px;"></td>
<td>Confirm Password:</td>
<td><input type="text" name="confirmpass"
placeholder="Confirm password" /></td>
</tr>
<tr>
<td style="width:125px;"></td>
<td></td>
<td colspan="2">
<input
style="background:#3498db;color:#fff;width:168px;border-radius:5px;" type="submit"
name="Update" value="Update">
</td>
</tr>
</table>
<?php } ?>
</form>
</div>
<div class="back fix">
<p style="text-align:center"><a href="st_profile.php"><button
class="editbtn">Back to your Profile</button></a></p>
lOMoARcPSD|280 114 95
st-login.php
<?php
ob_start ();
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
if($user->getsession()){
header('Location: st_profile.php');
exit();
}
?>
<?php
$pageTitle = "Student login";
include "header.php";
?>
<div class="loginform fix">
<div class="msg"><h3><i class="fa fa-graduation-cap" aria-
hidden="true"></i>Student login</h3></div>
<div class="access">
<?php
lOMoARcPSD|280 114 95
if($_SERVER['REQUEST_METHOD'] == "POST"){
$st_id = $_POST['st_id'];
$st_pass = $_POST['st_pass'];
if(empty($st_id) or empty($st_pass)){
echo "<p style='color:red;text-
align:center;'>Field must not be empty.</p>";
}else{
$st_pass = md5($st_pass);
$login = $user->st_userlogin($st_id, $st_pass);
if($login){
header('Location: st_profile.php');
}else{
echo "<p style='color:red;text-
align:center'>Incorrect Student ID or password</p>";
}
}
}
?>
st-logout.php
<?php
ob_start();
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$user->st_logout();
header('Location: st_login.php');
exit();
ob_end_flush();
?>
st-profile.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$sid = $_SESSION['sid'];
$sname = $_SESSION['sname'];
if(!$user->getsession()){
header('Location: st_login.php');
exit();
lOMoARcPSD|280 114 95
}
?>
<?php
$pageTitle = "Student Profile";
include "php/headertop.php";
?>
<div class="profile">
<p style="font-size:18px;text-
align:center;background:#1abc9c;color:#fff;padding:10px;margin:0">Welcome : <?php $user-
>getusername($sid); ?> <i class="fa fa-check-circle" aria-hidden="true"></i></p>
<table class="tab_one">
<?php
$getuser = $user->getuserbyid($sid);
while($row = $getuser->fetch_assoc()){
?>
<tr>
<td></td>
<?php if(empty($row['img'])){?>
<td><img src="img/default.png" style="height:180px; width:180px;
border:1px #1ABC9C solid;border-radius:90px" alt="" /></td>
<?php }else{ ?>
<td><img src="img/student/<?php echo $row['img']; ?>"
style="height:180px; width:180px; border:1px #1ABC9C solid;border-radius:90px" alt="" /></td>
<?php }?>
</tr>
<tr >
<td><b>Student ID:</b> </td>
<td><?php echo $row['st_id']; ?></td>
</tr>
lOMoARcPSD|280 114 95
<tr>
<td><b>Update Profile:</b> </td>
<td><a href="st_update.php?id=<?php echo
$row['st_id'];?>"><button class="editbtn">Edit Profile</button></a></td>
</tr>
<?php } } ?>
</table>
</div>
st-reg.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
if($user->getsession()){
header('Location: st_profile.php');
}
?>
<?php
$pageTitle = "Student Registration";
include "header.php";
?>
<div class="st_reg fix">
lOMoARcPSD|280 114 95
$BirthMonth = $_POST['BirthMonth'];
$BirthDay = $_POST['BirthDay'];
$BirthYear = $_POST['BirthYear'];
$bday = "{$BirthYear}-{$BirthMonth}-{$BirthDay}";
$st_dept = $_POST['st_dept'];
$st_contact = $_POST['st_contact'];
$st_gender = $_POST['gender'];
$st_add = $_POST['st_add'];
if(empty($st_id) or empty($st_name) or
empty($st_pass ) or empty($st_email) or empty($BirthMonth) or empty($BirthDay) or
empty($BirthYear) or empty($st_dept) or empty($st_contact) or empty($st_gender) or
empty($st_add)){
echo "<p style='color:red;text-
align:center'>**Field must not be empty**</p>";
}else{
$st_pass = md5($st_pass);
$st_register = $user-
>st_registration($st_id,$st_name,$st_pass,$st_email,$bday,$st_dept,$st_contact,$st_gender,$st_add
);
if($st_register){
lOMoARcPSD|280 114 95
echo "<h3
style='color:green;margin:0;padding:0;text-align:center'>Registration Complete !! <a style='font-
size:20px;color:#8e44ad' href='st_login.php'>Login</a></h3>";
}else{
echo "<p style='color:red;text-
align:center'>Error..Student ID or email Already exists</p>";
}
}
}
?>
</p>
<form action="" method="post" id="st_form">
<table>
<tr>
<th>Name: </th>
<td><input type="text" name="st_name" placeholder="Full
Name" required /></td>
</tr>
<tr>
<tr>
<th>Student ID: </th>
<td><input type="text" name="st_id" placeholder="Student
Id" required /></td>
</tr>
<tr>
<th>Password: </th>
<td><input type="password" name="st_pass"
placeholder="password" required /></td>
</tr>
lOMoARcPSD|280 114 95
<option value="02">Feb</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">Aug</option>
<option value="09">Sep</option>
lOMoARcPSD|280 114 95
<option value="10">Oct</option>
<option value="11">Nov</option>
<option value="12" >Dec</option>
</label>
</select>
</fieldset>
</td>
</tr>
<tr>
<th>Program:</th>
<td><input type="text" name="st_dept"
placeholder="BCSE,BSEEE, BBA..." required /></td>
</tr>
<tr>
<th>Contact:</th>
<td><input type="text" name="st_contact"
placeholder="phone" required /></td>
</tr>
<tr>
<th>Gender:</th>
lOMoARcPSD|280 114 95
</td>
</tr>
<tr>
<th>Address:</th>
<td><input type="text" name="st_add"
placeholder="Address" required /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="sub"
value="Register" /></td>
</tr>
</table>
</form>
</div>
st-result.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
lOMoARcPSD|280 114 95
</tr>
<?php
$i=0;
$alluser = $user->get_all_student();
while($rows = $alluser->fetch_assoc()){
lOMoARcPSD|280 114 95
</table>
</div>
<?php include "php/footerbottom.php";?>
<?php ob_end_flush() ; ?>
st-result-update.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$admin_id = $_SESSION['admin_id'];
$admin_name = $_SESSION['admin_name'];
if(!$user->get_admin_session()){
lOMoARcPSD|280 114 95
header('Location: index.php');
exit();
}
if(isset($_REQUEST['ar'])){
$stid = $_REQUEST['ar'];
$name = $_REQUEST['vn'];
$semester = $_REQUEST['seme'];
}
?>
<?php
$pageTitle = "update Student Result";
include "php/headertop_admin.php";
?>
<div class="all_student fix">
<div>
<p style="text-
align:center;color:#fff;background:purple;margin:0;padding:8px;"><?php echo "Name:
".$name."<br>ID: ".$stid."<br>Semester: " . $semester; ?></p>
</div>
<?php
if($_SERVER['REQUEST_METHOD'] == 'POST'){
$subject = $_POST['umark'];
$res = $user->update_result($stid,$subject,$semester);
//var_dump($res);
if($res){
echo "<h3 style='color:green;margin:0;padding:0;text-
align:center'>Marks successfully updated!</h3>";
}else{
lOMoARcPSD|280 114 95
?>
</tr>
<?php
$i=0;
$get_result = $user->show_marks($stid,$semester);
while($rows = $get_result->fetch_assoc()){
$i++;
?>
<tr>
<td><?php echo $rows['sub'];?></td>
<td><input type="text" name="umark[<?php echo $rows['sub'];?>]"
value="<?php echo $rows['marks'];?>"/></td>
</tr>
lOMoARcPSD|280 114 95
<?php } ?>
<tr><td colspan="2"><input type="submit" value="Update Result"
/></td></tr>
</table>
</form>
<div class="back fix">
<p style="text-align:center"><a href="view_result.php?vr=<?php
echo $stid?>&vn=<?php echo $name?>"><button class="editbtn">go to result
page</button></a></p>
</div>
</div>
<?php include "php/footerbottom.php";?>
<?php ob_end_flush() ; ?>
st-update.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$sid = $_SESSION['sid'];
$sname = $_SESSION['sname'];
/*
if(isset($_REQUEST['id'])){
$id = $_REQUEST['id'];
}else{
header('Location: index.php');
exit();
lOMoARcPSD|280 114 95
?>
<?php
$pageTitle = "Update Profile";
include "php/headertop.php";
?>
<script>
function PreviewImage(upname, prv_id) {
var oFReader = new FileReader();
oFReader.readAsDataURL(document.getElementsByName(upname)[0].files[0]);
</script>
<div class="profile">
<h3 style="font-size:18px;text-
align:center;background:#1abc9c;color:#fff;padding:10px;margin:0">Update Your Profile</h3>
<?php
lOMoARcPSD|280 114 95
$qry=$user->getuserbyid($sid);
$pic=$qry->fetch_assoc();
$piclocation=$pic['img'];
if($_SERVER['REQUEST_METHOD'] == "POST"){
//code for img
function guid() {
if (function_exists('com_create_guid'))
{
return
com_create_guid();
} else {
if($_FILES["personal_image"]["name"])
{
$path_parts =
pathinfo($_FILES["personal_image"]["name"]);
$ext =
$path_parts['extension'];
move_uploaded_file($_FILES['personal_image']['tmp_name'], "img/student/$fileName");
//end img
$st_name = $_POST['st_name'];
$st_email = $_POST['st_email'];
$st_dept = $_POST['st_dept'];
$st_contact = $_POST['st_contact'];
$st_gender = $_POST['st_gender'];
$st_add = $_POST['st_add'];
lOMoARcPSD|280 114 95
if(empty($st_name) or empty($st_email) or
empty($st_contact) or empty($st_dept) or empty($st_gender) or empty($st_add)){
echo "<p style='color:red;text-
align:center'>Field must not be empty.</p>";
}else{
$update = $user-
>updateprofile($sid,$st_name,$st_email,$st_dept,$st_gender,$st_contact,$st_add,$fileName);
if($update){
echo "<h4 style='color:green;text-
align:center'>Information Updated successfully</h4>";
}else{
echo "<h4 style='color:red;text-
align:center;text-align:center'>Failed to update</h4>";
}
}
}
?>
<tr>
<td style="width:125px;"></td>
<td>Gender:</td>
<td><input type="text" name="st_gender"
value="<?php echo $row['gender']; ?>"></td>
</tr>
<tr>
<td style="width:125px;"></td>
<td>Address:</td>
<td><input type="text" name="st_add"
value="<?php echo $row['address']; ?>"></td>
</tr>
<tr>
<td style="width:125px;"></td>
<td></td>
<td colspan="2">
<input
style="background:#3498db;color:#fff;width:168px;border-radius:5px;" type="submit"
name="Update" value="Update">
</td>
</tr>
</table>
<?php } ?>
</form>
</div>
<div class="back fix">
<p style="text-align:center"><a href="st_profile.php"><button
class="editbtn">Back to your Profile</button></a></p>
</div>
</div>
lOMoARcPSD|280 114 95
student-list-pdf.php
<?php
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
require('plugins/fpdf/fpdf.php');
require('plugins/fpdf/rotation.php');
$this->Rotate(0);
}
}
$pdf->Image('img/logo.png',10,9,17);
$pdf->Ln();
$pdf-> Cell(20);
$pdf->SetFont('Times','',14);
$pdf->Write(5, $iubat);
$pdf->Ln();
$pdf-> Cell(22);
$pdf->SetFont('Times','',10);
$pdf->Write(4,'Developed by Md Abul Kalam');
$pdf-> Cell(20);
$pdf->SetFont('Times','',8);
$pdf->Write(5,
'________________________________________________________________________________
__________________________________________________');
$pdf->Ln();
lOMoARcPSD|280 114 95
$pdf-> Cell(85);
$pdf->SetFont('Times','U',10);
$pdf->Write(5, 'Student List');
$pdf->Ln();
$pdf->Ln(2);
$pdf-> Cell(5);
$pdf->SetFont('Times','B',8);
$pdf->Cell(8,6,'SL',1);
$pdf->Cell(20,6,'Student ID',1);
$pdf->Cell(40,6,'Student Name',1);
$pdf->Cell(40,6,'Contact',1);
$pdf->Cell(40,6,'Email',1);
$pdf->Cell(22,6,'Picture',1);
$pdf->Ln();
$qry = $user->get_all_student();
$sl=1;
while($rec = $qry->fetch_assoc())
{
$pdf-> Cell(5);
$pdf->SetFont('Times','',8);
$pdf->Cell(8,20,$sl,1);
lOMoARcPSD|280 114 95
$pdf->Cell(20,20,$rec['st_id'],1);
$pdf->Cell(40,20,$rec['name'],1);
$pdf->Cell(40,20,$rec['contact'],1);
$pdf->Cell(40,20,$rec['email'],1);
$image1='img/student/'.$rec['img'];
$pdf->Cell( 22, 20, $pdf->Image($image1, $pdf-
>GetX(), $pdf->GetY(),22, 20), 1, 0, 'L', false);
$sl++;
$pdf->Ln();
}
$pdf->Ln();
$pdf->Ln();
$pdf->Output();
?>
view-cgpa.php
<?php
session_start();
require "php/config.php";
lOMoARcPSD|280 114 95
if(!$user->get_admin_session()){
header('Location: index.php');
exit();
}
if(isset($_REQUEST['vr'])){
$stid = $_REQUEST['vr'];
$name = $_REQUEST['vn'];
}
?>
<?php
$pageTitle = "Student Result";
include "php/headertop_admin.php";
?>
<div class="all_student fix">
<?php
//$get_result = $user->show_marks();
lOMoARcPSD|280 114 95
$get_result = $user->view_cgpa($stid);
//var_dump($get_result);
if($get_result && ($get_result->num_rows)>0){
?>
?>
<tr>
<td><?php echo $rows['sub']; ?></td>
<td><?php echo $rows['marks']; ?></td>
<td>
<?php
//set grade for individual subject
$mark = $rows['marks'];
if($mark<60){echo "F";}
elseif($mark>=60 && $mark<70){echo "D";}
lOMoARcPSD|280 114 95
?>
</td>
<td><?php echo credit_hour($rows['sub']); ?></td>
<td>
<?php
$stat = $rows['marks'];
if($stat<60){
echo "<span style='background:red;padding:3px
11px;color:#fff;'>Fail</span>";
}elseif($stat>=60 && $stat<70){
echo "<span
style='background:yellow'>Retake</span>";
}else{
echo "<span style='background:green;padding:3px
6px;color:#fff;'>Pass</span>";
}
?>
</td>
</tr>
lOMoARcPSD|280 114 95
<?php
}
else{
echo "<p style='color:red;text-align:center'>Nothing Found</p>";
}
?>
</div>
<?php include "php/footerbottom.php";?>
<?php ob_end_flush() ; ?>
view-result.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$admin_id = $_SESSION['admin_id'];
$admin_name = $_SESSION['admin_name'];
if(!$user->get_admin_session()){
header('Location: index.php');
lOMoARcPSD|280 114 95
<?php
</form>
<?php
//select semester
if($_SERVER['REQUEST_METHOD'] == 'POST'){
lOMoARcPSD|280 114 95
$i=0;
$ch = 0;
$gp = 0;
//$get_result = $user->show_marks();
$get_result = $user->show_marks($stid,$semester);
if($get_result){
?>
<p><?php echo "<p style='text-
align:center;background:#ddd;color:#01C3AA;padding:5px;width:84%;margin:0
auto'>".$semester." Semester Result"?></p>
<table class="tab_two" style="text-align:center;width:85%;margin:0
auto">
<th>Subject</th>
<th>Marks</th>
<th>Grade</th>
<th>Credit hr.</th>
<th>Status</th>
<?php
while($rows = $get_result->fetch_assoc()){
$i++;
//count total credit hour;
$ch = $ch + credit_hour($rows['sub']);
?>
<tr>
lOMoARcPSD|280 114 95
?>
</td>
<td><?php echo credit_hour($rows['sub']); ?></td>
<td>
<?php
$stat = $rows['marks'];
if($stat<60){
echo "<span style='background:red;padding:3px
11px;color:#fff;'>Fail</span>";
}elseif($stat>=60 && $stat<70){
echo "<span
style='background:yellow'>Retake</span>";
}else{
lOMoARcPSD|280 114 95
</tr>
<?php } ?>
<tr>
<td colspan="2">SGPA : </td>
<td colspan="2">
<?php
$sg = $gp/$ch;
echo "<span style='color:green;padding:3px 6px;font-size:20px'>" .
round($sg,2) . "</span>"; ?>
</td>
<td>
<?php
if($sg>=3.5){
echo "<span
style='background:purple;padding:3px 6px;color:#fff;'>Excellent";
}elseif($sg>=3.0 && $sg<3.5){
echo "<span
style='background:green;padding:3px 6px;color:#fff;'>Good";
}elseif($sg>=2.5 && $sg<3.0){
echo "<span
style='background:gray;padding:3px 6px;color:#fff;'>Average";
}else{
echo "<span
style='background:red;padding:3px 6px;color:#fff;'>Probation";
lOMoARcPSD|280 114 95
}
?>
</td>
</tr>
</table>
<?php
}
else{
echo "<p style='color:red;text-align:center'>Nothing Found</p>";
}
?>
<p style="float:left; text-align:right;margin:20px 0;width:49%"><a
href="st_result_update.php?ar=<?php echo $stid?>&seme=<?php echo $semester?>&vn=<?php
echo $name?>"><button class="editbtn">Edit Result</button></a></p>
<?php
}
?>
</div>
<?php include "php/footerbottom.php";?>
<?php ob_end_flush() ; ?>
view-single-cgpa.php
<?php
lOMoARcPSD|280 114 95
<?php
//$get_result = $user->show_marks();
$get_result = $user->view_cgpa($stid);
//var_dump($get_result);
if($get_result && ($get_result->num_rows)>0){
?>
?>
<tr>
<td><?php echo $rows['sub']; ?></td>
<td><?php echo $rows['marks']; ?></td>
<td>
<?php
//set grade for individual subject
lOMoARcPSD|280 114 95
$mark = $rows['marks'];
if($mark<60){echo "F";}
elseif($mark>=60 && $mark<70){echo "D";}
elseif($mark>=70 && $mark<80){echo "C";}
elseif($mark>=80 && $mark<90){echo "B";}
elseif($mark>=90 && $mark<=100){echo "A";}
?>
</td>
<td><?php echo credit_hour($rows['sub']); ?></td>
<td>
<?php
$stat = $rows['marks'];
if($stat<60){
echo "<span style='background:red;padding:3px
11px;color:#fff;'>Fail</span>";
}elseif($stat>=60 && $stat<70){
echo "<span
style='background:yellow'>Retake</span>";
}else{
echo "<span style='background:green;padding:3px
6px;color:#fff;'>Pass</span>";
}
?>
</td>
lOMoARcPSD|280 114 95
</tr>
<?php } ?>
<tr>
<td><?php echo "Total Course: <span style='color:#800080;padding:3px
6px;font-size:22px'>".$i."</span>"; ?></td>
<td colspan="1">Total CGPA : </td>
<td colspan="2">
<?php
$sg = $gp/$ch;
echo "<span style='color:green;padding:3px 6px;font-size:22px'>" .
round($sg,2) . "</span>"; ?>
</td>
<td>
<?php
if($sg>=3.5){
echo "<span
style='background:purple;padding:3px 6px;color:#fff;'>Excellent";
}elseif($sg>=3.0 && $sg<3.5){
echo "<span
style='background:green;padding:3px 6px;color:#fff;'>Good";
}elseif($sg>=2.5 && $sg<3.0){
echo "<span
style='background:gray;padding:3px 6px;color:#fff;'>Average";
}else{
echo "<span
style='background:red;padding:3px 6px;color:#fff;'>Probation";
}
?>
</td>
lOMoARcPSD|280 114 95
</tr>
</table>
<?php
}
else{
echo "<p style='color:red;text-align:center'>Nothing Found</p>";
}
?>
</div>
<?php include "php/footerbottom.php";?>
<?php ob_end_flush() ; ?>
view-single-result.php
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$sid = $_SESSION['sid'];
$sname = $_SESSION['sname'];
lOMoARcPSD|280 114 95
<?php
function grade_point($gd){
if($gd<60) return 0;
elseif($gd>=60 && $gd<70) return 1;
elseif($gd>=70 && $gd<80) return 2;
elseif($gd>=80 && $gd<90) return 3;
elseif($gd>=90 && $gd<=100) return 4;
}
?>
<!--Infomation of student-->
<div>
<p style="text-align:center;color:#fff;background:purple;margin:0;padding:8px;"><?php
echo "Name: ".$name."<br>Student ID: " . $stid; ?></p>
</div>
<form action="" method="post" style="width:25%;margin:0 auto;padding-bottom:5px;">
<select name="seme" id="">
<option value="1st">1st Semester</option>
<option value="2nd">2nd Semester</option>
<option value="3rd">3rd Semester</option>
</select>
<input type="submit" value="View Result" />
</form>
<div class="fix">
<p style="float:left;margin:0 0 3px 0;width:100%;text-align:center;"><a
href="view_single_cgpa.php?vr=<?php echo $stid; ?>&vn=<?php echo $name; ?>"><button
class="editbtn">View CGPA & Complete Course</button></a></p>
</div>
<?php
//select semester
lOMoARcPSD|280 114 95
$i=0;
$ch = 0;
$gp = 0;
//$get_result = $user->show_marks();
$get_result = $user->show_marks($stid,$semester);
if($get_result){
?>
<p><?php echo "<p style='text-
align:center;background:#ddd;color:#01C3AA;padding:5px;width:84%;margin:0
auto'>".$semester." Semester Result"?></p>
<table class="tab_two" style="text-align:center;width:85%;margin:0
auto">
<th>Subjects</th>
<th>Marks</th>
<th>Grade</th>
<th>Credit hr.</th>
<th>Status</th>
<?php
while($rows = $get_result->fetch_assoc()){
$i++;
//count total credit hour;
$ch = $ch + credit_hour($rows['sub']);
?>
lOMoARcPSD|280 114 95
<tr>
<td><?php echo $rows['sub'];?></td>
<td><?php echo $rows['marks'];?></td>
<td>
<?php
//set grade for individual subject
$mark = $rows['marks'];
if($mark<60){echo "F";}
elseif($mark>=60 && $mark<70){echo "D";}
elseif($mark>=70 && $mark<80){echo "C";}
elseif($mark>=80 && $mark<90){echo "B";}
elseif($mark>=90 && $mark<=100){echo "A";}
?>
</td>
<td><?php echo credit_hour($rows['sub']); ?></td>
<td>
<?php
$stat = $rows['marks'];
if($stat<60){
echo "<span style='background:red;padding:3px
11px;color:#fff;'>Fail</span>";
}elseif($stat>=60 && $stat<70){
echo "<span
style='background:yellow'>Retake</span>";
lOMoARcPSD|280 114 95
</tr>
<?php } ?>
<tr>
<td colspan="2">SGPA : </td>
<td colspan="2">
<?php
$sg = $gp/$ch;
echo "<span style='color:green;padding:3px 6px;font-size:20px'>" .
round($sg,2) . "</span>"; ?>
</td>
<td>
<?php
if($sg>=3.5){
echo "<span
style='background:purple;padding:3px 6px;color:#fff;'>Excellent";
}elseif($sg>=3.0 && $sg<3.5){
echo "<span
style='background:green;padding:3px 6px;color:#fff;'>Good";
}elseif($sg>=2.5 && $sg<3.0){
echo "<span
style='background:gray;padding:3px 6px;color:#fff;'>Average";
}else{
lOMoARcPSD|280 114 95
echo "<span
style='background:red;padding:3px 6px;color:#fff;'>Probation";
}
?>
</td>
</tr>
</table>
<?php
}
else{
echo "<p style='color:red;text-align:center'>Nothing Found</p>";
}
}
?>
</div>
<?php include "php/footerbottom.php";?>
<?php ob_end_flush() ; ?>
lOMoARcPSD|280 114 95
Chapter 5
APPICATION SCREENSHOTS
Chapter 6
In conclusion, the development and implementation of the university management system using
PHP, MySQL, and XAMPP represent a significant step towards modernizing and enhancing
administrative processes within educational institutions. Throughout this report, we have explored
the various aspects of the system, from its architecture and design to its features, functionality, and
deployment.
The university management system offers numerous benefits, including streamlined administrative
examination scheduling, the system helps save time and resources while minimizing errors and
inconsistencies.
The project has a very vast scope in the future. The project can be implemented on the intranet in
the future. The project can be updated in the near future as and when the requirement for the same
arises, as it is very flexible in terms of expansion. With the proposed software for database Space
Manager ready and fully functional, the client is now able to manage and hence run the entire work
The scope of the university management system includes but is not limited to the
following modules:
and programs.
faculty members.
REFERENCES