Skip to content

Commit 9997e85

Browse files
committed
My frist web app using PHP
0 parents  commit 9997e85

File tree

264 files changed

+26268
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

264 files changed

+26268
-0
lines changed

README.md

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# University Management System
2+
3+
[![License](https://poser.pugx.org/pugx/badge-poser/license)](https://github.com/ojkalam/ums)
4+
5+
## Installation
6+
* Import ```uni.sql``` database file.
7+
* ```php/config.php``` contains database access information
8+
* Run it on any PHP supported webserver
9+
10+
11+
### Login access for different roles
12+
```
13+
Administrator login:
14+
15+
username: admin
16+
password: 123
17+
18+
Student login:
19+
20+
ID: 15103058
21+
Password: 123
22+
23+
Faculty login:
24+
25+
username: hk
26+
password: 123
27+
28+
```
29+
# Features
30+
31+
##Admin Specification
32+
33+
###Admin can do the following things:
34+
*Admin can login by their login details
35+
36+
###Manage Student information:
37+
*View all students, update student details, Delete single student.
38+
*Search student by their Name, ID, contact, email.
39+
40+
###Manage Student Attendance Sheet:
41+
*Add student in attendance sheet
42+
*Delete student from attendance sheet
43+
*Update attendance sheet data date wise.
44+
45+
###Manage Student Result:
46+
*Can add result to all students
47+
*Adding marks subject wise and semester wise.
48+
*View their marks, grades, credit hour, SGPA by selecting semester
49+
*When view the result it’s also show the status of subject (pass, fail, retake).
50+
*Update marks of single student by subject wise.
51+
*Can view all completed course and total CGPA of all the semester.
52+
53+
####Download option:
54+
*Admin can download Student list with their information and also faculty list
55+
56+
##Users Specification
57+
58+
###Student:
59+
####Can do:
60+
*Students can register themselves by their ID which is provided by department
61+
*Can login by their ID and password which is given during registration
62+
*Student can see own profile.
63+
*They can edit own information
64+
*Change password option also available to menu bar.
65+
*Students are able to see their result (SGPA & CGPA both)
66+
*They also can see their marks and grade.
67+
68+
####Cannot do:
69+
*First of all student cannot change their ID.
70+
*They are unable to update their marks & grade.
71+
*Student cannot see another student profile and details.
72+
*Cannot delete themselves and also other.
73+
74+
###Faculty:
75+
####Can do:
76+
*Faculty also can login with their username and password
77+
*View their profile and Update information.
78+
*The main thing is they can take attendance of student. At first select date and take attendance.
79+
*Another option is they can update attendance sheet data.
80+
81+
####Cannot do:
82+
*They cannot add marks directly by this software.
83+
*Faculty cannot add and delete student from attendance sheet.

add_result.php

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?php
2+
session_start();
3+
require "php/config.php";
4+
require_once "php/functions.php";
5+
$user = new login_registration_class();
6+
$admin_id = $_SESSION['admin_id'];
7+
$admin_name = $_SESSION['admin_name'];
8+
if(!$user->get_admin_session()){
9+
header('Location: index.php');
10+
exit();
11+
}
12+
if(isset($_REQUEST['ar'])){
13+
$stid = $_REQUEST['ar'];
14+
$name = $_REQUEST['vn'];
15+
}
16+
?>
17+
<?php
18+
$pageTitle = "Student Result";
19+
include "php/headertop_admin.php";
20+
?>
21+
<div class="all_student fix">
22+
23+
<?php
24+
if($_SERVER['REQUEST_METHOD'] == 'POST'){
25+
$subject = $_POST['subject'];
26+
$semester = $_POST['semester'];
27+
$marks = $_POST['marks'];
28+
$res = $user->add_marks($stid,$subject,$semester,$marks);
29+
if($res){
30+
echo "<h3 style='color:green;margin:0;padding:0;text-align:center'>Marks successfully inserted!</h3>";
31+
}else{
32+
echo "<p style='color:red;text-align:center'>Failed to insert data</p>";
33+
}
34+
}
35+
36+
//SELECT avg(marks) as sgpa from result where st_id=10 and semester="1sr"
37+
?>
38+
<div>
39+
<p style="text-align:center;color:#fff;background:purple;margin:0;padding:8px;"><?php echo "Name: ".$name."<br>Student ID: " . $stid; ?></p>
40+
</div>
41+
<div style="width:40%;margin:50px auto">
42+
43+
<table class="tab_one" style="text-align:center;">
44+
<form action="" method="post">
45+
<table>
46+
<tr>
47+
<td>Select Subject: </td>
48+
<td>
49+
<select name="subject" id="">
50+
<option value="DBMS">Database management</option>
51+
<option value="DBMS Lab">DBMS Lab</option>
52+
<option value="Mathematics">Mathematics</option>
53+
<option value="Programming">Programming</option>
54+
<option value="Programming Lab">Programming Lab</option>
55+
<option value="English">English</option>
56+
<option value="Physics">Physics</option>
57+
<option value="Chemistry">Chemistry</option>
58+
<option value="Psychology">Psychology</option>
59+
60+
</select>
61+
</td>
62+
</tr>
63+
<tr>
64+
<td>Select Semester: </td>
65+
<td>
66+
<select name="semester" id="">
67+
<option value="1st">1st semester</option>
68+
<option value="2nd">2nd semester</option>
69+
<option value="3rd">3rd semester</option>
70+
</select>
71+
</td>
72+
</tr>
73+
<tr>
74+
<td>Input marks: </td>
75+
<td><input type="text" name="marks" placeholder="enter marks" required /></td>
76+
</tr>
77+
<tr>
78+
<td><input type="submit" name="sub" value="Add marks" /></td>
79+
<td><input type="reset" /></td>
80+
</tr>
81+
</table>
82+
83+
</form>
84+
</table>
85+
86+
</div>
87+
<div class="back fix">
88+
<p style="text-align:center"><a href="st_result.php"><button class="editbtn">Back to list</button></a></p>
89+
</div>
90+
</div>
91+
<?php include "php/footerbottom.php";?>
92+
<?php ob_end_flush() ; ?>

admin.php

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
session_start();
3+
require "php/config.php";
4+
require_once "php/functions.php";
5+
$user = new login_registration_class();
6+
$admin_id = $_SESSION['admin_id'];
7+
$admin_name = $_SESSION['admin_name'];
8+
if(!$user->get_admin_session()){
9+
header('Location: index.php');
10+
exit();
11+
}
12+
?>
13+
<?php
14+
$pageTitle = "Admin";
15+
include "php/headertop_admin.php";
16+
?>
17+
<div class="admin_profile">
18+
19+
<div class="section">
20+
<h3>Student</h3>
21+
<ul>
22+
<li><a href="admin_all_student.php">View All Student</a></li>
23+
<li><a href="st_result.php">Student Result</a></li>
24+
<li><a href="class_att.php">Attendance</a></li>
25+
<li><a href="student_list_pdf.php"><button>Download Student lsit</button></a></li>
26+
</ul>
27+
</div>
28+
<div class="section">
29+
<h3>Faculty</h3>
30+
<ul>
31+
<li><a href="admin_all_faculty.php">Faculty Details</a></li>
32+
<li><a href="#">Information</a></li>
33+
<li><a href="#">Search Faculty</a></li>
34+
<li><a href="faculty_list.php"><button>Download faculty lsit</button></a></li>
35+
</ul>
36+
</div>
37+
<div class="section">
38+
39+
<h3>Registry</h3>
40+
<ul>
41+
<li><a href="#">Accounts</a></li>
42+
<li><a href="#">Salary</a></li>
43+
<li><a href="#">Student tution fee</a></li>
44+
<li><a href="#">Other cost</a></li>
45+
</ul>
46+
47+
</div>
48+
49+
</div>
50+
51+
<?php include "php/footerbottom.php";?>

admin_all_faculty.php

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
ob_start ();
3+
session_start();
4+
require "php/config.php";
5+
require_once "php/functions.php";
6+
$user = new login_registration_class();
7+
$admin_id = $_SESSION['admin_id'];
8+
$admin_name = $_SESSION['admin_name'];
9+
if(!$user->get_admin_session()){
10+
header('Location: index.php');
11+
exit();
12+
}
13+
14+
?>
15+
<?php
16+
$pageTitle = "All Faculty details";
17+
include "php/headertop_admin.php";
18+
?>
19+
<div class="all_student">
20+
<div class="search_st">
21+
<div class="hdinfo"><h3>All Registered Faculty List</h3></div>
22+
23+
</div>
24+
25+
<table class="tab_one">
26+
<tr>
27+
<th>SL</th>
28+
<th>Name</th>
29+
<th>Email</th>
30+
<th>Contact</th>
31+
<th>Education</th>
32+
<th>Address</th>
33+
<th>Birthday</th>
34+
</tr>
35+
<?php
36+
$i=0;
37+
$alluser =$user->get_faculty();
38+
39+
while($rows = $alluser->fetch_assoc()){
40+
$i++;
41+
?>
42+
<tr>
43+
<td><?php echo $i; ?></td>
44+
<td><?php echo $rows['name'];?></td>
45+
<td><?php echo $rows['email'];?></td>
46+
<td><?php echo $rows['contact'];?></td>
47+
<td><?php echo $rows['education'];?></td>
48+
<td><?php echo $rows['address'];?></td>
49+
<td><?php echo $rows['birthday'];?></td>
50+
51+
</tr>
52+
<?php } ?>
53+
</table>
54+
</div>
55+
<?php include "php/footerbottom.php";?>
56+
<?php ob_end_flush() ; ?>

admin_all_student.php

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?php
2+
ob_start ();
3+
session_start();
4+
require "php/config.php";
5+
require_once "php/functions.php";
6+
$user = new login_registration_class();
7+
$admin_id = $_SESSION['admin_id'];
8+
$admin_name = $_SESSION['admin_name'];
9+
if(!$user->get_admin_session()){
10+
header('Location: index.php');
11+
exit();
12+
}
13+
14+
?>
15+
<?php
16+
$pageTitle = "All student details";
17+
include "php/headertop_admin.php";
18+
?>
19+
<div class="all_student">
20+
<div class="search_st">
21+
<div class="hdinfo"><h3>All Registered Student List</h3></div>
22+
23+
<div class="search">
24+
<form action="admin_search_student.php" method="GET">
25+
<input type="text" name="src_student" placeholder="search student" />
26+
<input type="submit" value="Search" />
27+
</form>
28+
</div>
29+
</div>
30+
<?php
31+
if(isset($_REQUEST['res'])){
32+
if($_REQUEST['res']==1){
33+
echo "<h3 style='color:green;text-align:center;margin:0;padding:10px;'>Data deleted successfully</h3>";
34+
}
35+
}
36+
37+
?>
38+
<table class="tab_one">
39+
<tr>
40+
<th>SL</th>
41+
<th>Name</th>
42+
<th>ID</th>
43+
<th>Show Profile</th>
44+
<th>Edit</th>
45+
<th>Delete</th>
46+
<th>Photo</th>
47+
</tr>
48+
<?php
49+
$i=0;
50+
$alluser = $user->get_all_student();
51+
52+
while($rows = $alluser->fetch_assoc()){
53+
$i++;
54+
?>
55+
<tr>
56+
<td><?php echo $i; ?></td>
57+
<td><?php echo $rows['name'];?></td>
58+
<td><?php echo $rows['st_id'];?></td>
59+
<td><a href="admin_single_student.php?id=<?php echo $rows['st_id'];?>">View Details</a></td>
60+
<td><a href="admin_single_student_update.php?id=<?php echo $rows['st_id'];?>">Edit</a></td>
61+
<td><a href="admin_delete_student.php?id=<?php echo $rows['st_id'];?>">Delete</a></td>
62+
<td><img src="img/student/<?php echo $rows['img'];?>" width="50px" height="50px" title="<?php echo $rows['name'];?>" /></td>
63+
</tr>
64+
<?php } ?>
65+
</table>
66+
</div>
67+
<?php include "php/footerbottom.php";?>
68+
<?php ob_end_flush() ; ?>

admin_delete_student.php

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
session_start();
3+
require "php/config.php";
4+
require_once "php/functions.php";
5+
$user = new login_registration_class();
6+
$admin_id = $_SESSION['admin_id'];
7+
$admin_name = $_SESSION['admin_name'];
8+
if(isset($_REQUEST['id'])){
9+
$st_id = $_REQUEST['id'];
10+
}
11+
12+
if(!$user->get_admin_session()){
13+
header('Location: index.php');
14+
exit();
15+
}
16+
17+
$delete =$user->delete_student($st_id);
18+
if($delete){
19+
header('Location: admin_all_student.php?res=1');
20+
exit();
21+
}
22+
?>

admin_logout.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
session_start();
3+
require "php/config.php";
4+
require_once "php/functions.php";
5+
$user = new login_registration_class();
6+
$user->admin_logout();
7+
header('Location: index.php');
8+
exit();
9+
?>

0 commit comments

Comments
 (0)