School Management System-MCS-2010 PDF
School Management System-MCS-2010 PDF
Online
line
School Management System
Online
MCS,Batch-7
Project Advisor
SIR MUHAMMAD SIDDIQUE
Chairman,
Department of ComputerScience
Submitted by:
Preface………………………………………………………………………… 3
Acknowledgement…………………………………………………………… 4
Group Members………………………………………………………………… 5
Certificate………………………………………………………………………… 6
Synopsis…………………………………………………………………… 7
Chapter 1 Introduction………………………………………………… 9
1.1 Objective of The Project…………………………………………… 10
Chapter 2. Requirement Identification ……………………………… 12
Chapter 3. Preliminary Investigation………………………………… 14
3.1 Hardware Interfaces……………………………………………… 14
3.2 Software Interfaces………………………………………………… 15
Chapter 4. System Study………………………………………………… 17
4.1 Existing System along with limitations/deficiencies…………… 17
4.2 Proposed System along with intended objectives………………… 18
4.3 Feasibility Study………………………………………………………… 19
4.3.1 Operational………………………………………………… 23
4.3.2 Technical…………………………………………………… 27
4.3.3 Economical………………………………………………… 29
4.3.4 Time (Duration)…………………………………………… 31
Chapter 5. System Analysis………………………………………………… 32
5.1 Requirement Specification…………………………………………… 32
5.1.1 Hardware Specification……………………… 32
5.1.2 Software Specification ………………………… 33
5.2 Data Flow Diagrams…………………………………………………… 34
5.3 Source of data…………………………………………………………… 36
Chapter 6. System Design…………………………………………………… 37
6.1 File/Database Design…………………………………………………… 44
6.2 Screen Shots/Input-output forms……………………………… 57
6.3 Coding..................................................................................... 71
Chapter 7. System Testing …………………………………………………...... 157
7.1 Preparation of Test Data……………………………………………… 159
Chapter 8. System Implementation………………………………………… 161
Chapter 9. Conclusion ………………………………………………………… 162
Chapter 10. Scope of the Project……………………………………………… 163
10.1 Deficiencies……………………………………………………………… 163
10.2 Future Scope and Further Enhancement…………………………… 164
Chapter 11. References/Bibliography………………………………………… 166
Final YearProject Report [2]
Online
School Management System
Preface
relevant information may be very time consuming. All these problems are
This project provides facilities like Students and staff registration, Class
etc.
Acknowledgment
First of all, we thank Almighty Allah who praise us with the ability to
think, work and deliver this project perfectly. Secondly, we are privileged
Specialization:
Design & Development, Report Writing,Data
Collection and requirement analysis
Muhammad Aijaz
Roll No.1241084; Registration No. MS/E/0 /10/CS
Contact Info: CellPh: 0300-226388, Email:
Specialization:
Design & Development,Requirement
gathering,Report Writing,
Certificate of Completion
_____________________________________
Mr. Muhammad Siddique(Project Supervisor)
Chairman, Dept. of Comptuer Science, FUUAST, Karachi.
Synopsis
Objectives:
Student andstaffregistration
Holidays,class andexamschedulemanagement
Attendancerecord management
Staffsalary andstudents’feeinformation
Users Views:
Administrator
Staff
Student
Platform:
Operating Systems:
Microsoft Windows
Technologies Used:
Software Requirements:
PHP 5.0
Hardware Requirements:
20 GB HDD or Higher
CHAPTER 1
INTRODUCTION
Every school has lots of tasks to perform. So in order to perform all the
accomplish all the frantic and baffling work with the help of easy decision
making system.
develop skills and character for success. They will not only have more
time to spend with them, but it will be quality time because they will have
easily maintain its student detail, fees detail, Employee detail, Exam
is just a few seconds away which might have cost hours, or evendays.
decision making.
4. To give the details and solutions for the queries askedby the
them.
prevented and detected and the records are prevented from the
CHAPTER 2
REQUIREMENT IDENTIFICATION
the information i.e. all paper work like Registers, ledgers, etc. The
Registration, Allotment, Student details, Staff details and other details are
Further the retrieval of information is very slow and time consuming and
the processed information may not be 100% accurate, as with the case of
computers.
resource.
task and is very high. The report generation is very tedious and time-
nature”, as rightly said, and if it brings prosperity and gains all welcomes
it.
CHAPTER-3
PRELIMINARY INVESTIGATION
The following investigations have been done before the system design
This activity is also known as the feasibility analysis or the initial business
study. It begins with a request from the user for a new system. It involves
the following:-
The External interface for this system includes the following points:
this user having the look of the window, what are the inputs he has
3.1.1Design Constraints
3.1.2Standard Compliance
being useworldwide.
the different places. They are firstly fixed and then use at
properly.
having the look of the window, what are the inputs he has to be
3.2.1Performance Requirements
3.2.2Standard Compliance
the different places. They are firstly fixed and then use at
CHAPTER-4
SYSTEM STUDY
The study of system is deathly that one cannot ignore any parent or
element of a system without first finding out the effect that element has
Difficult to handle
Data Management
features:-
organization.
6. To get the updated and faster details for the queries asked by
themanagement.
for the project and detailed sub goals. It is necessary at this stage
to quantify the goals and the sub goals. Once these goals are
quantified, the next step is to find out whether these goals can be
met, and if yes, how they will be met and at what cost . Feasibility
information to decide:-
functions, objectives...
in functionality,performance...
alternative:
Types of Feasibility
OperationalFeasibility:
Technical Feasibility:
that will accrue from the new system worth the costs? What are the
savings that will result from the system, including tangible and
Time Feasibility
useful. Typically this means estimating how long the system will
confusion.
together.
(a)Manpower shortage:
keep manpower.
additional resources.
delays.
the data.
work is done.
4.3.2Technical Feasibility
system`s requirements.
technically feasible.
4.3.3EconomicalFeasibility
First listing all the cost associated with the project performs
capital invested.
is economically feasible.
less than the benefits that can be derived from it. So we can
4.3.4Time(Duration) Feasibility
Software.
CHAPTER 5
SYSTEM ANALYSIS
system and their relationship within and outside of the system. A key
For proper functioning of any system the system must fulfill some
broad categories:-
5.1.1Hardware Specification
Monitor-> V G A or Higher
Mouse-> Standard
Keyboard-> Standard
5.1.2Software specification
Server, Vista )
5. Apache WebServer
7. PHP/MySQL
process.
UpdateStaff Detail
Staff Database
1
Existing Staff Detail
Staff
Management
New Staff Entry Update StudentDetail
Student Database
2 ExistingStudentDetail
New student Entry Student
Management
Update ScheduleDetail
ScheduleDatabase
Update PaymentDetail
PaymentDatabase
Administrator
4 ExistingPaymentDetail
Payment
Management
Staff’sModules DFD:
MarksDatabase
5
Marks
ExistingmarksDetail
Management
View
Student’sModules DFD:
Student
View
Staff, Student, Schedule,
Payment, Marks Payment
8 Database
View
familiar with the job will be able to specify the information needed
most efficient and the most accurate. Now we determine the most
data and how it will be utilized. It may be done verbally, with paper
reduced.
the information.
our need with various concerned persons and the system managers
CHAPTER 6
SYSTEM DESIGN
The most creativity and challenging phase of the system life cycle is
system design. The term design describes a final system and the process
by which it is developed.
whole;
of system elements:-
software.
Procedure:The steps that define the specific use of each system elements
time accessed for quality against a set of predefined criteria for “Good”
design .In the software engineering context, design focus on four major
required at each level of design work are different. At that data and
will not risk confusion, errors, and a floor plan that did not make sense,
the design.
model into four levels of design details; the data structure, the system
At each stage, software design work product are reviewed for clarity,
with one-another.
propose to implement the new system. The new system with qualitative
sure , the operating guidelines will prove immensely useful to the staff
After defining the purpose we define the scope of the software. This
software will reduce all the manual and rigorous studying of the different
databases/tables. Only the simple query will produce the desired output.
Since we are using all the Microsoft Standards and products hence will be
Decomposition description:
1) Staff Details
a) Staff Information
b) Class Allocation
2) Student Details
a) Personal Profiles
b) Fee Details
c)Marks Information
3) Student Admission
4) Schedules
a) Exam Schedules
b) Holiday Schedules
c) Class Schedule
Detailed design:
labels are self-explanatory which provides ease to the user sothat they
can fill the entries correctly as well as can retrieve the information and
Command buttons: These buttons act like control buttons of the form.
With the help of this the user can interact with the School Management
System. The user can enter the data into the database through them as
OK-this command button is used to enter the data of the form into the
database.
• Text area: These text areas are being used in order to enter the data by
the user and also to retrieve the data from the user. But text areas take
Code Efficiency:
o Codeis Reliable.
o Easy to use.
seen in screenshot.
attendance_table
Column Type Null Default Comments
Date date No
Student ID int(10) No
Class enum('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
class_table
Column Type Null Default Comments
Mark int(11) No
Class enum('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
Section enum('A', 'B', 'C', 'D', 'E') No
exam_schedule_table
Column Type Null Default Comments
Mark int(10) No
Exam Name varchar(20) No
StartTime varchar(30) No
Am Pm ForStartTime enum('Am', 'Pm') No
EndTime varchar(20) No
Am Pm ForEndTime enum('Am', 'Pm') No
Class varchar(20) No
Section varchar(20) No
Subject varchar(30) No
Date date No
fee_table
Column Type Null Default Comments
Mark int(11) No
Class enum('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
Library Fee int(10) No
Lab Fee int(10) No
Transport Fee int(10) No
No Of Terms int(10) No
First Term int(10) No
Second Termint(10) No
holiday_schedule_table
Column Type Null Default Comments
Mark int(10) No
Date date No
Holiday Name varchar(20) No
From Date date No
To Date date No
message_table
Column Type Null Default Comments
From varchar(20) No
Subject varchar(50) No
Message text No
period_table
Column Type Null DefaultComments
Mark int(10) No
enum('I', 'II', 'III','IV', 'V', 'VI', 'VII', 'VIII', 'IX',
Period No
'X', 'Break')
StartTime varchar(20) No
Am Pm
enum('Am', 'Pm') No
ForStartTime
EndTime varchar(20) No
Am Pm
enum('Am', 'Pm') No
ForEndTime
staff_leave_table
Column Type Null Default Comments
Mark1 int(10) No
Staff ID int(10) No
No Of Leave int(10) No
To Date date No
Reason varchar(100) No
staff_salary_table
Column Type Null Default Comments
Mark int(11) No
Staff ID int(20) No
HRA int(20) No
PF int(20) No
TA int(20) No
DA int(20) No
Basic int(20) No
staff_table
Column Type Null Default Comments
Mark int(10) No
Staff Registration No varchar(20) No
Staff ID int(10) No
Staff Name varchar(20) No
Specilization varchar(20) No
Gender enum('Male', 'Female') No
Experience varchar(20) No
Salary int(20) No
Date Of Join date No
Perminant Address varchar(80) No
Present Address varchar(80) No
Phone varchar(12) No
Cell No varchar(12) No
City varchar(20) No
Required User Name varchar(20) No
Others text No
students_marks_table
Column Type Null Default Comments
Student ID int(10) No
Class varchar(20) No
Section varchar(10) No
Marks1 int(10) No
Marks2 int(10) No
Marks3 int(10) No
Marks4 int(10) No
Marks5 int(10) No
Marks6 int(10) No
Marks7 int(10) No
Marks8 int(10) No
Marks9 int(10) No
Marks10 int(10) No
Total Marks int(10) No
Percentage int(10) No
Grade varchar(2) No
student_table
Mark int(11) No
Student Registration
varchar(20) No
No
Student ID int(10) No
Occupation varchar(30) No
City varchar(20) No
Phone varchar(12) No
Email ID varchar(40) No
Others text
subject_table
Column Type Null Default Comments
Mark int(10) No
Class enum('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
Subject varchar(30) No
syllabus_table
Column Type Null Default Comments
Mark int(10) No
Class enum('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
Subject varchar(30) No
Syllabus Url varchar(50) No
time_table
Column Type Null Default Comments
Class enum('I', 'II', 'III','IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
Section enum('A', 'B', 'C', 'D', 'E') No
Teacher Name varchar(20) No
Period enum('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
Subject varchar(30) No
attendance_table
Column Type Null Default Comments
Date date No
Student ID int(10) No
Class enum('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
class_table
Column Type Null Default Comments
Mark int(11) No
Class enum('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
Section enum('A', 'B', 'C', 'D', 'E') No
exam_schedule_table
Column Type Null Default Comments
Mark int(10) No
Exam Name varchar(20) No
StartTime varchar(30) No
Am Pm ForStartTime enum('Am', 'Pm') No
EndTime varchar(20) No
Am Pm ForEndTime enum('Am', 'Pm') No
Class varchar(20) No
Section varchar(20) No
Subject varchar(30) No
Date date No
fee_table
Column Type Null Default Comments
Mark int(11) No
Class enum('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
Library Fee int(10) No
Lab Fee int(10) No
Transport Fee int(10) No
No Of Terms int(10) No
First Term int(10) No
Second Termint(10) No
holiday_schedule_table
Column Type Null Default Comments
Mark int(10) No
Date date No
Holiday Name varchar(20) No
From Date date No
To Date date No
message_table
Column Type Null Default Comments
From varchar(20) No
Subject varchar(50) No
Message text No
period_table
Column Type Null DefaultComments
Mark int(10) No
enum('I', 'II', 'III','IV', 'V', 'VI', 'VII', 'VIII', 'IX',
Period No
'X', 'Break')
StartTime varchar(20) No
Am Pm
enum('Am', 'Pm') No
ForStartTime
EndTime varchar(20) No
Am Pm
enum('Am', 'Pm') No
ForEndTime
staff_leave_table
Column Type Null Default Comments
Mark1 int(10) No
Staff ID int(10) No
No Of Leave int(10) No
To Date date No
Reason varchar(100) No
staff_salary_table
Column Type Null Default Comments
Mark int(11) No
Staff ID int(20) No
HRA int(20) No
PF int(20) No
TA int(20) No
DA int(20) No
Basic int(20) No
staff_table
Column Type Null Default Comments
Mark int(10) No
Staff Registration No varchar(20) No
Staff ID int(10) No
Staff Name varchar(20) No
Specilization varchar(20) No
Gender enum('Male', 'Female') No
Experience varchar(20) No
Salary int(20) No
Date Of Join date No
Perminant Address varchar(80) No
Present Address varchar(80) No
Phone varchar(12) No
Cell No varchar(12) No
City varchar(20) No
Required User Name varchar(20) No
Others text No
students_marks_table
Column Type Null Default Comments
Student ID int(10) No
Class varchar(20) No
Section varchar(10) No
Marks1 int(10) No
Marks2 int(10) No
Marks3 int(10) No
Marks4 int(10) No
Marks5 int(10) No
Marks6 int(10) No
Marks7 int(10) No
Marks8 int(10) No
Marks9 int(10) No
Marks10 int(10) No
Total Marks int(10) No
Percentage int(10) No
Grade varchar(2) No
student_table
Mark int(11) No
Student Registration
varchar(20) No
No
Student ID int(10) No
Occupation varchar(30) No
City varchar(20) No
Phone varchar(12) No
Email ID varchar(40) No
Others text
subject_table
Column Type Null Default Comments
Mark int(10) No
Class enum('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
Subject varchar(30) No
syllabus_table
Column Type Null Default Comments
Mark int(10) No
Class enum('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
Subject varchar(30) No
Syllabus Url varchar(50) No
time_table
Column Type Null Default Comments
Class enum('I', 'II', 'III','IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
Section enum('A', 'B', 'C', 'D', 'E') No
Teacher Name varchar(20) No
Period enum('I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X') No
Subject varchar(30) No
6.2 Screenshots
Home Screen
LoginSelectionPage
Login Page
AdministratorHome Screen
Class Registration
Staff Registration
Student Registration:
Delete Student/Staff
Add Timetable
View Timetable
Add Holiday
View/EditHoliday
Leave Approval
Leave Histgoryview
6.2 Coding
Index.php
<?php
function ae_detect_ie()
{
If(isset($_SERVER['HTTP_USER_AGENT'])&&
(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
{
return true;
}
else
{
return false;
}
}
if(ae_detect_ie())
{
echo"<center><table border=1 width=600 style=border-
collapse:collapse><tr><td align=center
style=color:red;background-color:#FFE4C4;letter-spacing:1><b>This
Website Does Not Support IE</b></td></tr>";
echo "<tr align=center><td style=background-color:#AFEEEE><a
href=http://www.mozilla.com/firefox/target=_blank>DownLoad
FireFox</a></td></tr></center>";
exit;
}
else
session_start();
unset($_SESSION['user_name']);
unset($_SESSION['password']);
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="main.css" />
<title>Index Page</title>
</head>
<table border=0>
<tr><td colspan="3" width="100%" height="150px"><img
src="images/top_banner_w.gif"/></td></tr>
<tr><td colspan="3" style="background-color:rgb(0,40,118);"
height="5px"></td></tr>
<tr>
<td><img src="images/left_banner.gif"</td>
</table></td>
<td><img src="images/right_banner.gif"</td>
</tr>
</table>
<!--frameset border="1" rows="150px,*">
<frame src="images/k5.jpg" noresize="noresize"/>
<frameset border="1" cols="20px,30px,20px">
<frame src="images/k6.jpg" noresize="noresize"/>
<frame src="welcome_page.php" noresize="noresize"/>
<frame src="images/k7.jpg" noresize="noresize"/>
<p>adfasdF</p>
</frameset-->
</html>
list_of_branches.php
<?php
function ae_detect_ie()
{
If(isset($_SERVER['HTTP_USER_AGENT'])&& (strpos($_SERVER['HTTP_USER_AGENT'],
'MSIE') !== false))
{
return true;
}
else
{
return false;
}
}
if(ae_detect_ie())
{
<td><img src="images/left_banner.gif"</td>
<td valign="top"align="center" width="480">
</fieldset></td></tr>
</table>
</td>
<td><img src="images/right_banner.gif"</td>
</tr>
</table>
<!--frameset border="1" rows="150px,*">
<frame src="images/k5.jpg" noresize="noresize"/>
<frameset border="1" cols="20px,30px,20px">
<frame src="images/k6.jpg" noresize="noresize"/>
<frame src="welcome_page.php" noresize="noresize"/>
<frame src="images/k7.jpg" noresize="noresize"/>
<p>adfasdF</p>
</frameset-->
</html>
welcome_page.php
<?php
function ae_detect_ie()
{
if(isset($_SERVER['HTTP_USER_AGENT'])&& (strpos($_SERVER['HTTP_USER_AGENT'],
'MSIE') !== false))
{
return true;
}
else
{
return false;
}
}
if(ae_detect_ie())
{
echo "<center><table border=1 width=600 style=border-collapse:collapse><tr><td
align=center
style=color:red;background-color:#FFE4C4;letter-spacing:1><b>This Website Does
Not Support IE</b></td></tr>";
echo "<tr align=center><td style=background-color:#AFEEEE><a
href=http://www.mozilla.com/firefox/ target=_blank>DownLoad
FireFox</a></td></tr></center>";
exit;
}
else
?>
<table border=0 cellspacing="4">
<tr height="10px"><td></td></tr>
<tr><td width="150px" align="right"><img src="images/logo.jpg"/></td><td
style="color:blue;font-size:20;">The City Public School</td></tr>
<tr><tdcolspan="2" height="10px"></td></tr>
<tr><td colspan="2" align="center"><form
action="list_of_branches.php"><input type="submit" value="Enter
>>"/></form></td></tr>
</table>
Login.php
<?php
function ae_detect_ie()
{
if (isset($_SERVER['HTTP_USER_AGENT']) &&
(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
{
return true;
}
else
{
return false;
}
}
if(ae_detect_ie())
{
echo "<center><table border=1 width=600 style=border-collapse:collapse><tr><td
align=center
style=color:red;background-color:#FFE4C4;letter-spacing:1><b>This Website Does
Not Support Internet Explorer</b></td></tr>";
echo "<tr align=center><td style=background-color:#AFEEEE><a
href=http://www.mozilla.com/firefox/target=_blank>DownLoad FireFox
</a></td></tr></center>";
exit;
}
else
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="branch_a.css">
<title>Login Page</title>
</head>
<table border=0>
<tr><td colspan="3" width="100%" height="150px"><img
src="images/top_banner.gif"/></td></tr>
<tr><td colspan="3" style="background-color:rgb(0,40,118);"
height="5px"></td></tr>
<tr>
<td><img src="images/left_banner.gif"</td>
<td valign="top" align="center" width="480">
</table>
<?php
if(count($_POST)>0)
{
require("functions_page.php");
$username= $_POST['user_name'];
$password = $_POST['password'];
if(!loginCheck($username,$password))
{
echo "<table border=0>
<tr><td width=77></td><td class=invalid_username
align=center>Invalid User Name or Password</td></tr>
</table>";
}
else header("Location:admin_main_page.php");
session_start();
$_SESSION['user_name']=$username;
$_SESSION['password']=$password;
}
?>
<!--tr><td <a href=""><img src="images/admin_button.gif"></a>
align="right"><img src="images/admin_icon.gif"></td>
<td><img src="images/admin_button.gif"></td></tr-->
</table>
</td>
<td><img src="images/right_banner.gif"</td>
</tr>
</table>
<!--frameset border="1" rows="150px,*">
<frame src="images/k5.jpg" noresize="noresize"/>
<frameset border="1" cols="20px,30px,20px">
<frame src="images/k6.jpg" noresize="noresize"/>
<frame src="welcome_page.php" noresize="noresize"/>
<frame src="images/k7.jpg" noresize="noresize"/>
<p>adfasdF</p>
</frameset-->
</html>
td.def_page_welcome
{
font-size:30;
font-weight:bold;
text-decoration:underline;
}
td.welcome_to
{
color:blue;
font-size:28;"
}
input.enter_button
{
color:brown;
font-size:16;
font-weight:bold;
}
legend
{
border-style:solid;
border-color:black;
background-color:;
color:black;
padding: 2px 6px
}
fieldset
{
background-color:;
border-color:black;
border-style:solid;
}
#branches_link a:link, a:active, a:hover, a:visited
{
color:black;
text-decoration:none;
}
#select_one td.admin_button
{
background-image:url('images/admin_button.gif');
background-repeat:no-repeat;
}
#select_one td.staff_button
{
background-image:url('images/staff_button.gif');
background-repeat:no-repeat;
}
#select_one td.parents_button
{
background-image:url('images/parents_button.gif');
background-repeat:no-repeat;
}
#select_one td.students_button
{
background-image:url('images/students_button.gif');
background-repeat:no-repeat;
}
#select_one a
{
color:white;
text-decoration:none;
font-weight:bold;
font-size:14px;
}
td.invalid_username
{
font-size:12;
color:red;
width:195px;
padding:3px;
background-color:#FFFFE0;
border:1px solid red;
margin:0px;
}
function_page.php
<?php
require("db_connection.php");
function viewStaffLoginDetail()
{
$res = mysql_query("SELECT * FROM staff_table");
echo "<table border=1 style=border-collapse:collapse;><caption
style=color:green;font-weight:bold;font-size:17>Login Detail</vaption>
<th width=180>Staff ID</th><th width=180>Staff Name</th><th
width=180>User Name</th>";
while($row = mysql_fetch_assoc($res))
{
echo "<tr align=center><td>".$row['Staff
ID']."</td><td>".$row['Staff Name']."</td><td>".$row['Required User
Name']."</td></tr>";
}
echo "</table>";
}
function addClass($add_class,$add_section)
{
if($add_class!="select_class"&&$add_section!="select_section")
{
$res = mysql_query("SELECT * FROM class_table");
{
while($row = mysql_fetch_assoc($res))
{
if($add_class==$row['Class']&&$add_section==$row['Section'])
{
echo "Section ".$add_section."
for Class ".$add_class." has allready added...";
return;
}
}
mysql_query("INSERT INTO class_table (Class,
Section) VALUES ('$add_class', '$add_section')");
echo "Section ".$add_section." for Class ".
$add_class ." has been added Successfully...";
return;
}
}
else echo "Please Select Class and Section...";
return;
}
function loginCheck($username,$password)
{
if($username=='anwarhmk'&&$password=="123456")
{
return true;
}
else return false;
}
function viewClass()
{
echo "<table border=1 style=border-collapse:collapse;><th
width=150>Mark</th><th width=150>Class</th><th width=150>Section</th>";
$res = mysql_query("SELECT * FROM class_table ORDER BY Class ASC");
{
while($row=mysql_fetch_assoc($res))
{
echo "<tr align=center><td
class=edit_and_update_link><input type=radio name=mark_id_for_delete_class
value=".$row['Mark']."></td>
<td width=150>".$row['Class']."</td><td
width=150>".$row['Section']."</td><tr>";
}
echo "</table>";
}
}
function deleteClass($delete_class,$delete_section)
{
if($delete_class!="select_class"&&$delete_section!="select_section")
{
$res = mysql_query("SELECT * FROM class_table");
while($row = mysql_fetch_assoc($res))
{
if($delete_class==$row['Class']&&$delete_section==$row['Section'])
{
mysql_query("DELETE FROM
class_table WHERE Class ='$delete_class' AND Section = '$delete_section'");
echo "Section
".$delete_section." for Class ".$delete_class." has Successfully deleted...";
return;exit;
}
}
echo "Section ".$delete_section." for Class ".
$delete_class." is not available for Deleting...";
return;
}
else echo "Please Select Class and Section...";
return;
}
function markDeleteClass($mark_id_for_delete_class)
{
if(!isset($_POST['mark_id_for_delete_class']))
{
header("Location:view_class.php");
}
while($row = mysql_fetch_assoc($res))
{
if($mark_id_for_delete_class==$row['Mark'])
{
mysql_query("DELETE FROM
class_table WHERE Mark = '$mark_id_for_delete_class'");
return;exit;
}
}
}
function addSubject($add_class,$add_subject)
{
if($add_class!="select_class"&&$add_subject!="Subject
Name"&&$add_subject!='')
{
$res = mysql_query("SELECT * FROM subject_table");
{
while($row = mysql_fetch_assoc($res))
{
if($add_class==$row['Class']&&$add_subject==$row['Subject'])
{
echo "Subject ".$add_subject."
for Class ".$add_class." has allready added...";
return;
}
}
mysql_query("INSERT INTO subject_table (Class,
Subject) VALUES ('$add_class', '$add_subject')");
echo "Subject ".$add_subject." for Class ".
$add_class ." has been added Successfully...";
return;
}
}
else echo "Please Select Class and Subject...";
return;
}
function viewSubject()
{
echo "<table border=1 style=border-collapse:collapse;><th
width=150>Mark</th><th width=150>Class</th><th width=150>Subject</th>";
{
$res = mysql_query("SELECT * FROM subject_table ORDER BY Class
ASC");
while($row=mysql_fetch_assoc($res))
{
echo "<tr align=center><td
class=edit_and_update_link><input type=radio name=mark_id_for_update_subject
value=".$row['Mark']."></td>
<td width=150>".$row['Class']."</td>
<td width=150 align=left style=padding-
left:10;>".$row['Subject']."</td></tr>";
}
echo "</table>";
}
}
function deleteSubject($delete_class,$delete_subject)
{
if($delete_class!="select_class"&&$delete_subject!="Subject Name")
{
$res = mysql_query("SELECT * FROM
subject_table");
while($row = mysql_fetch_assoc($res))
{
if($delete_class==$row['Class']&&$delete_subject==$row['Subject'])
{
mysql_query("DELETE FROM subject_table
WHERE Class = '$delete_class' AND Subject = '$delete_subject'");
echo "Subject ". $delete_subject ." for
Class". $delete_class ."has been deleted Successfully...";
return;
}
}
echo "Subject ". $delete_subject ." for Class ".
$delete_class ." is not available to Delete...";
}
function markDeleteSubject($mark_id_for_update_subject)
{
mysql_query("DELETE FROM subject_table WHERE
Mark='$mark_id_for_update_subject'");
return;
}
function updateSubject($class,$subject,$mark_id_for_update_subject)
{
//if($edit_and_delete!='')
if($subject!='')
{
mysql_query("UPDATE subject_table SET Class = '$class', Subject =
'$subject' WHERE Mark = '$mark_id_for_update_subject'");
echo "Values has beem Updated Successfully...";
return true;exit;
}
else echo "Does not update value for Class ".$class." ...";return false;
}
function
addPeriod($add_period,$start_time,$am_pm_for_start_time,$end_time,$am_pm_for_end
_time)
{
if($add_period!="select-
period"&&$start_time!="00:00"&&$end_time!="00:00")
{
$res = mysql_query("SELECT * FROM period_table");
{
while($row = mysql_fetch_assoc($res))
{
if($add_period==$row['Period'])
{
echo "Time for period
".$add_period." has allready added...";
return;
}
}
function viewPeriod()
{
}
echo "</table>";
}
}
function deletePeriod($delete_period)
{
$res = mysql_query("SELECT * FROM period_table");
while($row = mysql_fetch_assoc($res))
{
if($delete_period==$row['Period'])
{
mysql_query("DELETE FROM period_tableWHERE Period = '$delete_period'");
echo "Period ". $delete_period ." has been deleted Successfully...";
return;
}
}
echo "Period ". $delete_period ." is not available to Delete...";
}
function
addSyllabus($add_class_for_db,$add_class_for_folder,$add_subject,$syllabus_url)
{
if($add_class_for_db!="select_class"&&$add_subject!="Subject Name")
{
if($syllabus_url=='')
{
echo "Please Select Syllabus...";
return;
}
//if(file_exists("syllabus/".$add_class_for_folder."/".$_FILES['add_syllabus']['
name']))
// {
// echo "syllabus for ".$add_class_for_folder."
".$_FILES["add_syllabus"]['name']." already exists";
// }
//else
// {
if($add_class_for_db==$row['Class']&&$add_subject==$row['Subject'])
{
echo "Syllabus
for Class ".$add_class_for_db." ".$add_subject." has allready uploaded...";
return;
}
}
move_uploaded_file($_FILES['add_syllabus']['tmp_name'],"syllabus/".$add_class_fo
r_folder."/".$_FILES['add_syllabus']['name']);
mysql_query("INSERT INTO
syllabus_table (`Class`, `Subject`, `Syllabus Url`)
VALUES
('$add_class_for_db', '$add_subject', '$syllabus_url')");
echo "Syllabus for Class
".$add_class_for_db." has been uploaded Successfully...";
return;
}
//}
}
else echo "Please Select Class and Subject...";
return;
}
function viewSyllabus()
{
echo "<table border=1 style=border-collapse:collapse;><th
width=150>Mark</th><th width=150>Class</th><th width=150>Subject</th>
<th width=120>Syllabus</th>";
$res = mysql_query("SELECT * FROM syllabus_table ORDER BY Class
ASC");
while($row=mysql_fetch_assoc($res))
{
echo "<tr align=center><td><input type=radio
name=mark_id_for_delete_syllabus
value=".$row['Mark']."></td>
<td width=150>".$row['Class']."</td>
<td width=150 align=left style=padding-
left:10;>".$row['Subject']."</td>
<td width=10 height=35 valign=middle align=center>
<a href=".$row['Syllabus Url']."><table border=0
width=105 height=33><tr>
<td style=background-
image:url(images/try.gif);background-repeat:no-repeat;>
</td></tr></table></a>";
"</td></tr>";
}
echo "</table>";
function
deleteSyllabus($delete_class_for_db,$delete_class_for_folder,$delete_subject)
{
if($delete_class_for_db!="select_class"&&$delete_subject!="Subject
Name")
{
$res = mysql_query("SELECT * FROM
syllabus_table");
{
while($row =
mysql_fetch_assoc($res))
{
if($delete_class_for_db==$row['Class']&&$delete_subject==$row['Subject'])
{
unlink($row['Syllabus Url']);
function markDeleteSyllabus($mark_id_for_delete_syllabus)
{
$sql = mysql_query("SELECT * FROM
syllabus_table WHERE Mark = '$mark_id_for_delete_syllabus'");
$row = mysql_fetch_assoc($sql);
unlink($row['Syllabus Url']);
mysql_query("DELETE FROM
syllabus_table WHERE Mark = '$mark_id_for_delete_syllabus'");
}
function
addStaff($staff_registration_no,$staff_ID,$staff_name,$specilization,$gender
,$experience,$salary,$date_of_join,$perminant_address,$present_address,$phone,$c
ell_no,$city,$required_username,$others)
{
if($staff_name==''||$specilization==''||$experience==''||$salary==''||$date_of_j
oin=='yyyy-mm-dd'||$date_of_join==''
||$perminant_address==''||$present_address==''||$cell_no==''||$city==''||$requir
ed_username=='')
{
echo "<table border=0><tr><td width=337></td><td
class=popup_for_view_time_table>Please Type Above All
Information...</td><td></td></tr></table>";
return false;
}
'$present_address','$phone','$cell_no','$city','$required_username','$others')")
;
return true;
}
function viewStaff()
{
echo "<table border=1 style=border-collapse:collapse;><th
width=10>Mark</th>
<th width=100>Staff Reg No</th><th width=100>Staff ID</th><th
width=100>Name</th><th width=100>Specilization</th>
<th width=100>Gender</th><th width=100>Experience</th><th
width=100>DOJ</th>
<th width=100>Cell No</th>";
$res = mysql_query("SELECT * FROM staff_table");
{
while($row=mysql_fetch_assoc($res))
{
echo "<tr align=center><td><input type=radio
name=mark_id_for_detail_and_delete_staff
value=".$row['Mark']."></td>
<td width=100>".$row['Staff Registration No']."</td>
<td width=100>".$row['Staff ID']."</td>
<td width=100>".$row['Staff Name']."</td>
<td width=100>".$row['Specilization']."</td>
<td width=100>".$row['Gender']."</td>
<td width=100>".$row['Experience']."</td>
<td width=100>".$row['Date Of Join']."</td>
<td width=100>".$row['Cell No']."</td>
</tr>
";
}
echo "</table>";
}
}
function deleteStaff($mark_id_for_deteil_and_delete_staff)
{
mysql_query("DELETE FROM staff_table WHERE Mark =
'$mark_id_for_deteil_and_delete_staff'");
return true;
}
function deleteStaffReg($registration_no)
{
$res = mysql_query("SELECT * FROM staff_table");
while($row=mysql_fetch_assoc($res))
{
if($row['Staff Registration No']==$registration_no)
{
mysql_query("DELETE FROM staff_table WHERE `Staff
Registration No` = '$registration_no'");
return true;
}
}
return false;
}
function viewCompleteDetailStaff($mark_id_for_detail_and_delete_staff)
{
$res = mysql_query("SELECT * FROM staff_tableWHERE Mark =
'$mark_id_for_detail_and_delete_staff'");
{
//while($row=mysql_fetch_assoc($res))
//{
$row=mysql_fetch_assoc($res);
//echo $row['Mark']."<br>";
echo "<table border=0 cellpadding=2>";
echo "<tr><td width=200>Registration
No</td><td>".$row['Staff Registration No']."</td></tr>";
echo "<tr><td>Staff ID</td><td>".$row['Staff
ID']."</td></tr>";
echo "<tr><td>Name</td><td>".$row['Staff
Name']."</td></tr>";
echo
"<tr><td>Specialization</td><td>".$row['Specilization']."</td></tr>";
echo
"<tr><td>Gender</td><td>".$row['Gender']."</td></tr>";
echo
"<tr><td>Experience</td><td>".$row['Experience']."</td></tr>";
echo
"<tr><td>Salary</td><td>".$row['Salary']."</td></tr>";
echo "<tr><td>Date Of Join</td><td>".$row['Date Of
Join']."</td></tr>";
echo "<tr><td>Perminant
Address</td><td>".$row['Perminant Address']."</td></tr>";
echo "<tr><td>Present Address</td><td>".$row['Present
Address']."</td></tr>";
echo "<tr><td>Phone
No</td><td>".$row['Phone']."</td><tr>";
echo "<tr><td>Cell No</td><td>".$row['Cell
No']."</td></tr>";
echo "<tr><td>City</td><td>".$row['City']."</td></tr>";
echo "<tr><td>User Name</td><td>".$row['Required User
Name']."</td></tr>";
echo
"<tr><td>Others</td><td>".$row['Others']."</td></tr>";
"</table>";
}
}
function
addStudent($student_registration_no,$student_id,$student_name,$date_of_birth,$cl
ass,$section,$gender,$date_of_join,
$father_name,$mother_name,$occupation,$perminant_address,$present_address,$city,
$phone,$email_Id,$others)
{
if($student_name==''||$date_of_birth==''||$date_of_birth=='yyyy-
mm-dd'||$class=='select_class'||$section=='select_section'||$date_of_join==''||
$date_of_join=='yyyy-mm-
dd'||$father_name==''||$occupation==''||$perminant_address==''||$present_address
==''||$phone=='')
{
echo "<table border=0><tr><td width=337></td><td
class=popup_for_view_time_table>Please Type Above All
Information...</td><td></td></tr></table>";
return false;
}
mysql_query("INSERT INTO student_table (`Student
Registration No`,`Student ID`,`Student Name`,`Date Of Birth`,
`Class`,`Section`,`Gender`,`Date Of
Join`,`Father Name`,`Mother Name`,`Occupation`,
`Perminant Address`,`Present
Address`,`City`,`Phone`,`Email ID`,`Others`)
VALUES
('$student_registration_no','$student_id','$student_name','$date_of_birth','$cla
ss',
'$section','$gender','$date_of_join','$father_name',
'$mother_name','$occupation','$perminant_address','$present_address','$city','$p
hone','$email_Id','$others')");
return true;
}
function viewStudent($class,$section)
{
if($class!="select_class"&&$section!="select_section")
{
if($class==''&&$section=='')
{
return;
}
if($class=="all_class"&&$section=="all_section")
{
$res = mysql_query("SELECT * FROM student_table");
}
else if($section=="all_section")
{
$res = mysql_query("SELECT * FROM student_table
WHERE Class = '$class'");
}
else{
$res = mysql_query("SELECT * FROM student_table
WHERE Class = '$class' AND Section = '$section'");
}
if(mysql_fetch_assoc($res)=='')
{
echo "<tr><td width=300></td><td
class=popup_for_add_class valign=middle align=center>No Record Found...</td><td
width=300></td></tr>";
return false;
}
if($class=="all_class"&&$section=="all_section")
{
$res = mysql_query("SELECT * FROM student_table");
while($row=mysql_fetch_assoc($res))
{
echo "<tr align=center><td><input
type=radio name=mark_id_for_detail_and_delete_student
value=".$row['Mark']."/></td>
<td width=>".$row['Student Registration
No']."</td>
<td width=>".$row['Student ID']."</td>
<td width=>".$row['Student Name']."</td>
<td width=>".$row['Father Name']."</td>
<td width=>".$row['Class']."</td>
<td width=>".$row['Section']."</td>
<td width=>".$row['Gender']."</td>
<td width=>".$row['Date Of
Birth']."</td>
<td width=>".$row['Phone']."</td>
</tr>";
}
echo "<tr><td colspan=12 style=color:brown;background-
color:;padding-right:10;font-weight:bold align=right>Male Students : $male_count
Female Students : $female_count Total Students : $rows</td></tr></table>";return
true;
function viewStudentA($search_reg_id)
{
if($search_reg_id=='')
{
return;
}
$res = mysql_query("SELECT * FROM student_table
WHERE `Student Registration No` = '$search_reg_id' OR `Student ID` =
'$search_reg_id'");
if(mysql_fetch_assoc($res)=='')
{
echo "<tr><td width=300></td><td
class=popup_for_add_class valign=middle align=center>NoRecord Found...</td><td
width=300></td></tr>";
return;
}
$res = mysql_query("SELECT * FROM student_table
WHERE `Student Registration No` = '$search_reg_id' OR `Student ID` =
'$search_reg_id'");
echo "<table border=1 style=border-
collapse:collapse;>
while($row=mysql_fetch_assoc($res))
{
echo "<tr align=center>
</tr>";
}
echo "</table>";
return true;
function viewCompleteDetailStudent($mark_id_for_detail_and_delete_student)
{
$res = mysql_query("SELECT * FROM student_table WHERE Mark =
'$mark_id_for_detail_and_delete_student'");
{
//while($row=mysql_fetch_assoc($res))
//{
$row=mysql_fetch_assoc($res);
//echo $row['Mark']."<br>";
echo "<table border=0 cellpadding=2>";
echo "<tr><td width=200>Student Registration
No</td><td>".$row['Student Registration No']."</td></tr>";
echo "<tr><td>Student ID</td><td>".$row['Student
ID']."</td></tr>";
echo "<tr><td>Student Name</td><td>".$row['Student
Name']."</td></tr>";
function viewCompleteDetailStudentA($search_reg_id)
{
$res = mysql_query("SELECT * FROMstudent_table WHERE `Student
Registration No` = '$search_reg_id' OR `Student ID`='$search_reg_id'");
{
//while($row=mysql_fetch_assoc($res))
//{
$row=mysql_fetch_assoc($res);
//echo $row['Mark']."<br>";
echo "<table border=0 cellpadding=2>";
echo "<tr><td width=200>Student Registration
No</td><td>".$row['Student Registration No']."</td></tr>";
echo "<tr><td>Student ID</td><td>".$row['Student
ID']."</td></tr>";
echo "<tr><td>Student Name</td><td>".$row['Student
Name']."</td></tr>";
function deleteStudent($mark_id_for_detail_and_delete_student)
{
mysql_query("DELETE FROM student_table WHERE Mark =
'$mark_id_for_detail_and_delete_student' OR `Student ID` = '$search_reg_id'");
}
function deleteStudentA($search_reg_id)
{
mysql_query("DELETE FROM student_table WHERE Mark =
'$mark_id_for_detail_and_delete_student' OR `Student ID` = '$search_reg_id'");
}
function deleteStudentReg($registration_no)
{
$res = mysql_query("SELECT * FROM student_table");
while($row=mysql_fetch_assoc($res))
{
if($row['Student Registration No']==$registration_no)
{
mysql_query("DELETE FROM student_table WHERE `Student
Registration No` = '$registration_no'");
return true;
}
}
return false;
}
function addTimeTable($add_class,$add_section,$teacher_name,$period,$subject)
{
if($add_class=="select_class" || $add_section=="select_section" ||
$teacher_name=='' || $period=="select_period" || $subject == '')
{
echo "Please Enter All Values...";
return;
}
if($row['Class']==$add_class&&$row['Section']==$add_section&&$row['Subject']==$s
ubject)
{
echo "Time for Class $add_class Section $add_section
Subject $subject is allready set...";
return;
}
}
mysql_query("INSERT INTO time_table (`Class`, `Section`, `Teacher Name`,
`Period`, `Subject`)
VALUES ('$add_class', '$add_section', '$teacher_name',
'$period', '$subject')");
echo "Time Table for Class $add_class Subject $subject has been added
successfully...";
}
function viewTimeTable($class,$section)
{
$available=0;
$res = mysql_query("SELECT * FROM time_table");
while($row = mysql_fetch_assoc($res))
{
if($row['Class']==$class&&$row['Section']==$section)
{
$available = 1;
}
if($available==1)
{
<td><table border=0
width=150 style=border-collapse:collapse;><tr
align=center><td>$row[Subject]</td></tr>
<tr align=center><td
style=font-size:14>".$row['Teacher Name']."</td></tr>
<tr align=center><td
style=font-size:12>$row[StartTime] to $row[EndTime]</td></tr></table></td>
<td><table border=0
width=150 style=border-collapse:collapse;><tr
align=center><td>$row[Subject]</td></tr>
<tr align=center><td
style=font-size:14>".$row['Teacher Name']."</td></tr>
<tr align=center><td
style=font-size:12>$row[StartTime] to $row[EndTime]</td></tr></table></td>
<td><table border=0
width=150 style=border-collapse:collapse;><tr
align=center><td>$row[Subject]</td></tr>
<tr align=center><td
style=font-size:14>".$row['Teacher Name']."</td></tr>
<tr align=center><td
style=font-size:12>$row[StartTime] to $row[EndTime]</td></tr></table></td>
<td><table border=0
width=150 style=border-collapse:collapse;><tr
align=center><td>$row[Subject]</td></tr>
<tr align=center><td
style=font-size:14>".$row['Teacher Name']."</td></tr>
<tr align=center><td
style=font-size:12>$row[StartTime] to $row[EndTime]</td></tr></table></td>
</tr>";$a++;
}
echo "</table>";
return true;
}
echo "<tr><td width=300></td><td
class=popup_for_view_time_table>No Result Found</td><td width=300></td></tr>";
return false;
function updateTimeTable($add_class,$add_section,$teacher_name,$period,$subject)
{
if($add_class=="select_class" || $add_section=="select_section" ||
$teacher_name=='' || $period=="select_period" || $subject == '')
{
echo "Please Enter All Values";
return;
}
function deleteTimeTable($delete_class,$delete_section)
{
if($delete_class=="select_class" || $delete_section=="select_section")
{
echo "Please Select Class and Section";
return;
}
function addHolidaySchedule($date,$holiday_name,$from_date,$to_date)
{
if($holiday_name==''||$from_date=='yyyy-mm-dd'||$to_date=='yyyy-mm-dd')
{
echo "Please Type All Values...";
return ;
}
mysql_query("INSERT INTO holiday_schedule_table (`Date`, `Holiday Name`,
`From Date`, `To Date`)
VALUES ('$date', '$holiday_name','$from_date',
'$to_date')");
echo "Value has been Inserted Successfullay...";
function viewHolidaySchedule()
{
echo "<table border=1 style=border-collapse:collapse;><th
width=150>Mark</th><th width=150>Date</th>
<th width=150>Holiday Name</th>
<th width=120>From Date</th><th width=120>To Date</th>";
$res = mysql_query("SELECT * FROM holiday_schedule_table");
$row = mysql_fetch_assoc($res);
if($row=='')
{
echo "<tr><td colspan=5 class=popup_for_view_time_table>There
are no any Holiday Schedule</td></tr>";
return;
}
$res = mysql_query("SELECT * FROM holiday_schedule_table");
while($row = mysql_fetch_assoc($res))
{
}
echo "</table>";
function markDeleteHolidaySchedule($mark_id_for_edit_delete_holiday)
{
mysql_query("DELETE FROM
holiday_schedule_table WHERE Mark = '$mark_id_for_edit_delete_holiday'");
}
function
updateHolidaySchedule($date,$holiday_name,$from_date,$to_date,$hidden_value_for_
update_holiday)
{
if($holiday_name=='' || $from_date=='' || $to_date=='')
{
echo "Please Enter All Values";
return;
}
function
addExamSchedule($exam_name,$start_time,$am_pm_for_start_time,$end_time,$am_pm_fo
r_end_time,$class,$section,$subject,$date)
{
if($exam_name=='' || $start_time=="00:00"|| $end_time=="00:00" ||
$class=="select_class" || $section=="select_section" || $subject=='' ||
$date=='')
{
echo "Please Type All Values...";
return ;
}
mysql_query("INSERT INTO exam_schedule_table (`Exam Name`, `StartTime`,
`Am Pm ForStartTime`, `EndTime`, `Am Pm ForEndTime`, `Class`, `Section`,
`Subject`, `Date`)
VALUES ('$exam_name', '$start_time','$am_pm_for_start_time',
'$end_time', '$am_pm_for_end_time', '$class', '$section', '$subject',
'$date')");
echo "Value has been Inserted Successfullay...";
function viewExamSchedule($class,$section)
{
if($class=="select_class"||$section=="select_section")
{
echo "<table border=0><tr><td width=600></td><td width=400
class=popup_for_view_time_table>Please Select Class and Section...</td><td
width=600></td></tr></table>";
return false;
}
if($row=='')
{
echo "<table border=0><tr><td widht=200></td><td class =
popup_for_view_time_table widhth=400 >No Result Found...</td><td
widht=400></td></tr></table>";
return false;
}
{
echo "<tr align=center>
<td>".$row['StartTime']." ".$row['Am Pm ForStartTime']."
to ".$row['EndTime']." ".$row['Am Pm ForEndTime']."</td>
<td>".$row['Subject']."</td>
<td>".$row['Date']."</td>
</tr>";
}
echo "</table>";
return true;
}
function deleteExamSchedule($class,$section)
{
if($class=="select_class" || $section=="select_section")
{
echo "Please Select Class And Section...";
return;
}
$blank=0;//for checking that time table is available or not for
deleteion...
$res = mysql_query("SELECT * FROM exam_schedule_table");
while($row=mysql_fetch_assoc($res))
{
if($row['Class']==$class&&$row['Section']==$section)
{
$blank=1;
}
}
if($blank==0)
{
echo "No Result Found...";
return;
}
function
addfee($class,$library_fee,$lab_fee,$transport_fee,$no_of_terms,$first_term,$sec
ond_term)
if($class==''||$library_fee==''||$lab_fee==''||$transport_fee==''||$no_of_terms=
=''||$first_term==''||$second_term=='')
{
echo "<table border=0><tr><td width=320><td class =
popup_for_view_time_table = >Please Type Above All
Information...</td></tr></table>";
return false;
}
$res = mysql_query("SELECT * FROM fee_table");
while($row = mysql_fetch_assoc($res))
{
if($row['Class']==$class)
{
echo "<table border=0><tr><td width=332><td class =
popup_for_view_time_table = >Fee for Class $class is already
added...</td></tr></table>";
return;
}
}
$res = mysql_query("INSERT INTO fee_table (`Class`,`Library Fee`,`Lab
Fee`,`Transport Fee`,`No of Terms`,`First Term`,`Second Term`)
VALUES('$class','$library_fee','$lab_fee','$transport_fee','$no_of_terms','$firs
t_term','$second_term')");
echo "<table border=0><tr><td width=305><td class =
popup_for_view_time_table = >Fee for Class $class is Added
Successfully...</td></tr></table>";
return;
}
function viewFee()
{
echo "<table border=1 style=border-collapse:collapse;><th
width=20>Mark</th>
<th width=115>Class</th><th width=115>Library Fee</th><th width=115>Lab
Fee</th><th width=115>Transport Fee</th>
<th width=115>No Of Terms</th><th width=115>First Term</th><th
width=115>Second Term</th>";
$res = mysql_query("SELECT * FROM fee_table");
{
while($row=mysql_fetch_assoc($res))
{
echo "<tr align=center><td><input type=radio
name=mark_id_for_delete_update_fee_structure
value=".$row['Mark']."></td>
<td width=100>".$row['Class']."</td>
<tdwidth=100>".$row['Library Fee']."</td>
<td width=100>".$row['Lab Fee']."</td>
<td width=100>".$row['Transport Fee']."</td>
<td width=100>".$row['No Of Terms']."</td>
<td width=100>".$row['First Term']."</td>
<td width=100>".$row['Second Term']."</td>
</tr>
";
}
echo "</table>";
}
}
function deleteFee($mark_id_for_delete_update_fee_structure)
{
function
updateFee($class,$library_fee,$lab_fee,$transport_fee,$no_of_terms,$first_term,$
second_term,$mark_id_for_delete_update_fee_structure)
{
mysql_query("UPDATE fee_table SET `Class`='$class',`Library
Fee`='$library_fee',`Lab Fee`='$lab_fee',`TransportFee`='$transport_fee',
`No of Terms`='$no_of_terms',`First
Term`='$first_term',`Second Term`='$second_term' WHERE
`Mark`='$mark_id_for_delete_update_fee_structure'");
function
addStaffSalary($staff_ID,$hra,$pf,$ta,$da,$professional_tax,$basic,$no_of_workin
g_days,$no_of_days_present,$total_amount)
{
if($staff_ID==''||$hra==''||$pf==''||$ta==''||$da==''||$professional_tax==''||$b
asic==''||$no_of_working_days==''||$no_of_days_present=='')
{
echo "<table border=0><tr><td width=345><td class =
popup_for_view_time_table = >Please Type Above All
Information...</td></tr></table>";
return;
}
$res = mysql_query("SELECT * FROM staff_salary_table");
while($row = mysql_fetch_assoc($res))
{
if($row['Staff ID']==$staff_ID)
{
echo "<table border=0><tr><td width=330><td class =
popup_for_view_time_table = >Salary for ID No $staff_ID is already
added...</td></tr></table>";
return;
}
}
$res = mysql_query("INSERT INTO staff_salary_table (`Staff
ID`,`HRA`,`PF`,`TA`,`DA`,`Professional Tax`,`Basic`,`No Of Working Days`,`No Of
Days Present`,`Total Amount`)
VALUES('$staff_ID','$hra','$pf','$ta','$da','$professional_tax','$basic','$no_of
_working_days','$no_of_days_present','$total_amount')");
echo "<table border=0><tr><td width=315><td class =
popup_for_view_time_table = >Salary for ID No $staff_ID is added
Successfully...</td></tr></table>";
}
function viewStaffSalary($view_salary)
{
if($view_salary=='')
{
return false;
}
function deleteStaffSalary($hidden_value_for_edit_staff_salary)
{
mysql_query("DELETE FROM staff_salary_table WHERE `Staff ID` =
'$hidden_value_for_edit_staff_salary'");
}
function
updateStaffSalary($staff_ID,$hra,$pf,$ta,$da,$professional_tax,$basic,$no_of_wor
king_days,$no_of_days_present,$total_amount)
{
/*
if($staff_ID==''||$hra==''||$pf==''||$ta==''||$da==''||$professional_tax==''||$b
asic==''||$no_of_working_days==''||$no_of_days_present=='')
{
echo "<table border=0><tr><td width=370><td class =
popup_for_view_time_table = >Please Type Above All
Information...</td></tr></table>";
return;
}*/
mysql_query("UPDATE staff_salary_table SET
`HRA`='$hra',`PF`='$pf',`TA`='$ta',`DA`='$da',
`Professional Tax`='$professional_tax',`Basic`='$basic',`No
Of Working Days`='$no_of_working_days',
`No Of Days Present`='$no_of_days_present',`Total
Amount`='$total_amount' WHERE `Staff ID`='$staff_ID'");
return;
}
function viewStudentsMarks($student_id,$class,$section)
{
if($student_id!='Student ID')
{
$res = mysql_query("SELECT * FROM
students_marks_table,student_table
WHERE students_marks_table.`Student ID` =
student_table.`Student ID`
AND student_table.`Student ID`='$student_id'");
$row=mysql_fetch_assoc($res);
$bb = mysql_num_rows($res);
if($bb=='')
{
return false;
}
echo "<table border=0 width=400 style=border-
collapse:collapse;><tr><td height=30></td></tr><tr align=center><td> Student
Name : ".$row['Student Name']."</td><td> Student ID : ".$row['Student
ID']."</td></tr>
<tr><td style=padding-left:44;>Class : ".$row['Class']."</td><td
style=padding-left:42;> Section : ".$row['Section']."</td></tr><tr><td
height=10></td></tr></table>";
$b=1;
}
else echo "<tr><td style=padding-
left:5>".$row2['Subject']."</td><td align=center>".$row["Marks$a"]."</td></tr>";
$a++;
}
echo "<table>";
if($b==0)
{
$remarks="<td align=center style=padding-
right:15;>Remarks : Pass</td></tr>";
}else $remarks="<td style=color:red;padding-left:44;
>Remarks : Fail</td></tr>";
echo "<table border=0 style=border-collapse:collapse;
width=400><tr><td height=10></td></tr><tr align=center><td width=200>Total Marks
: ".$row['Total Marks']."</td><td>Percentage : ".$row['Percentage']."%</td></tr>
<tr><td style=padding-left:49;>Grade :
".$row['Grade']."</td>$remarks </table>";
//<tr><
return true;
}
if($class=="select_class"||$section=="select_section")
{
return false;
}
echo "<table border=1 style=border-collapse:collapse;><caption
style=font-size:18;font-weight:bold;color:green;>Class $class Section $section
Result</caption><th width=60>Std ID</th><th width=80>Std Name</th>";
$ress = mysql_query("SELECT * FROM subject_table WHERE Class =
'$class'");
while($rows = mysql_fetch_assoc($ress))
{
echo "<th width=100>".$rows['Subject']."</th>";
}
echo "</th><th width=100>Total Marks</th><th
width=65>Percentage</th><th width=60>Grade</th><th width=60>Remarks</th>";
if($identify_pass_fail==0)
{
$remarks = "Pass";
$str_for_remarks = "<td
align=center>".$remarks."</td>";
$count_pass++;
}
else if($identify_pass_fail==1)
{
$remarks = "Fail";
$str_for_remarks = "<td align=center
style=color:red;>".$remarks."</td>";
$count_fail++;
}
$average_pass_students=($count_pass/$count_students)*100;
echo "<tr><td colspan=15 align=right style=color:brown>Pass Students :
$count_pass Fail Students : $count_fail
Passing Average : ".round($average_pass_students,3)." %</td></tr></table>";
return true;
}
/*
function addAttendance($student_id, $class, $section, $present_absent)
{
$ress = mysql_query("SELECT * FROM student_table WHERE `Student
ID`='$student_id'");
$b=mysql_num_rows($ress);
if($b=='')
{
return false;
}
$res = mysql_query("SELECT * FROM attendance_table WHERE `Student
ID`='$student_id' AND `Date`=current_date()");
$b = mysql_num_rows($res);
if($b!='')
{
return true;
}else {
function viewStudentsAttendance($student_id,$class,$section,$date)
{
if($student_id!="Student ID")
{
$res = mysql_query("SELECT * FROM attendance_table,student_table WHERE
attendance_table.`Student ID`=student_table.`Student ID`
AND attendance_table.`Student ID`='$student_id'");
$row = mysql_fetch_assoc($res);
echo "<table border=1 style=border-collapse:collapse;><caption
style=color:green;font-weight:bold;font-size:17>Attendance Record Of
".$row['Student ID']."</caption><th width=200>Student Name</th><th
width=100>Student ID</th>
<th width=100>Class</th><thwidth=100>Section</th><th
width=100>Status</th><th width=200>Date Of Attendance</th>";
$res = mysql_query("SELECT * FROM attendance_table,student_table
WHERE attendance_table.`Student ID`=student_table.`Student ID`
AND attendance_table.`Student ID`='$student_id'");
$present=0;
$absent=0;
while($row = mysql_fetch_assoc($res))
{
if($row['Status']=='Present')
{
echo "<tr><td align=center style=padding-
left:5>".$row['Student Name']."</td><td align=center>".$row['Student ID']."</td>
<td align=center>".$row['Class']."</td><td
align=center>".$row['Section']."</td><td align=center>".$row['Status']."</td>
<td align=center>".$row['Date']."</td></tr>";
$present++;
}else
{
echo "<tr style=color:red;><td align=center
style=padding-left:5>".$row['Student Name']."</td><td
align=center>".$row['Student ID']."</td>
<td align=center>".$row['Class']."</td><td
align=center>".$row['Section']."</td><td align=center>".$row['Status']."</td>
<td align=center>".$row['Date']."</td></tr>";
$absent++;
}
}
echo "<tr><td align=right style=color:brown;font-
weight:bold;padding-right:10 colspan=6>Present :$present Absent
:$absent</table>";
return true;
}
if($class=='select_class'||$section=='select_section')
{
return false;
}
$res = mysql_query("SELECT * FROM attendance_table,student_table WHERE
attendance_table.`Student ID`=student_table.`Student ID`
AND attendance_table.`Class`='$class' AND
attendance_table.`Section`='$section' AND attendance_table.`Date`='$date'");
$b=mysql_num_rows($res);
if($b=='')
{
return false;
}
$res = mysql_query("SELECT * FROM attendance_table,student_table WHERE
attendance_table.`Student ID`=student_table.`Student ID`
AND attendance_table.`Class`='$class' AND
attendance_table.`Section`='$section' AND attendance_table.`Date`='$date'");
$rowa = mysql_fetch_assoc($res);
function viewLeaveApply()
{
echo "<table border=1 style=border-collapse:collapse><th
width=50>Mark</th><th width=80>Staff ID</th><th width=140>Name</th><th
width=90>No Of Days</th>
<th width=100>From Date</th><th width=100>To Date</th>
<th width=140>Reason</th><th width=100>Status</th>";
$res = mysql_query("SELECT * FROM staff_leave_table,staff_table WHERE
staff_leave_table.`Staff ID`=staff_table.`staff ID`");
while($row = mysql_fetch_assoc($res))
{
echo "<tr><td align=center><input type=radio
name=mark_id_for_update_view_leave_apply
value=".$row['Mark1']."></td><td
align=center>".$row['Staff ID']."</td><td align=center>".$row['Staff
Name']."</td><td align=center>".$row['No Of Leave']."</td>
<td align=center>".$row['Start Date']."</td><td
align=center>".$row['To Date']."</td><td align=center>".$row['Reason']."</td><td
align=center>".$row['Status']."</td></tr>";
}
echo "</table>";return;
function updateViewLeaveApply($mark_id_for_update_view_leave_apply,$status)
{
//$c="disApprove";
mysql_query("UPDATE staff_leave_table SET `Status`='$status' WHERE
`Mark1`='$mark_id_for_update_view_leave_apply'");
return true;
}
function viewLeaveHistory()
{
echo "<table border=1 style=border-collapse:collapse><caption
style=color:green;font-weight:bold;font-size:17>Staff Leave History</caption><th
width=80>Staff ID</th><th width=140>Name</th><th width=90>No Of Days</th>
<th width=100>From Date</th><th width=100>To Date</th>
<th width=140>Reason</th><th width=100>Status</th>";
$res = mysql_query("SELECT * FROM staff_leave_table,staff_table WHERE
staff_leave_table.`Staff ID`=staff_table.`staff ID`");
while($row = mysql_fetch_assoc($res))
{
echo "<tr><td align=center>".$row['Staff ID']."</td><td
align=center>".$row['Staff Name']."</td><td align=center>".$row['No Of
Leave']."</td>
<td align=center>".$row['Start Date']."</td><td
align=center>".$row['To Date']."</td><td align=center>".$row['Reason']."</td><td
align=center>".$row['Status']."</td></tr>";
}
echo "</table>";return;
?>
db_connection.php
<?php
define("ip","localhost");
define("username","root");
define("password","");
$sql=mysql_connect(ip,username,password);
if(!$sql)
{
echo "Could Connected to the database".mysql_error();
}
mysql_select_db("school_management_branch_a",$sql);
?>
add_staff.php
<?php
function ae_detect_ie()
{
if (isset($_SERVER['HTTP_USER_AGENT']) &&
(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
{
return true;
}
else
{
return false;
}
if(ae_detect_ie())
{
echo "<center><table border=1 width=600 style=border-
collapse:collapse><tr><td align=center
style=color:red;background-color:#FFE4C4;letter-spacing:1><b>This
Website Does Not Support Internet Explorer</b></td></tr>";
echo "<tr align=center><td style=background-color:#AFEEEE><a
href=http://www.mozilla.com/firefox/ target=_blank>DownLoad
FireFox</a></td></tr></center>";
exit;
}
else
session_start();
if(!isset($_SESSION['user_name'])&&!isset($_SESSION['password']))
{
header("Location:login.php");
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="branch_a.css">
<title>Staff Registration</title>
</head>
<div id="navMenueTable">
<table border=0>
<div id ="menuContainer">
<ul>
<li id="two_step_menue"><a href="#">Login Detail</a>
<ul id>
<li><a href="staff_login_detail.php">Staff</a></li>
</ul>
</li>
<li id="three_step_menue"><a href="">Basic Registration</a>
<ul id="small_bg_menue_link">
<li><a href="">Class</a>
<ul>
<li><a href="add_class.php">Add</a></li>
<li><a href="view_class.php">View</a></li>
<li><a href="delete_class.php">Delete</a></li>
</ul>
</li>
<li><a href="">Subject</a>
<ul>
<li><a href="add_subject.php">Add</a></li>
<li><a href="view_subject.php">View</a></li>
<li><a href="delete_subject.php">Delete</a></li>
</ul>
</li>
<li><a href="">Period</a>
<ul>
<li><a href="add_period.php">Add</a></li>
<li><a href="view_period.php">View</a></li>
<li><a href="delete_period.php">Delete</a></li>
</ul>
</li>
<li><a href="">Syllabus</a>
<ul>
<li><a href="add_syllabus.php">Add</a></li>
<li><a href="view_syllabus.php">View</a></li>
<li><a
href="delete_syllabus.php">Delete</a></li>
</ul>
</li>
</ul>
</li>
<li id="three_step_menue"><a href="">Personal
Registration</a>
<ul>
<li><a href="">Staff</a>
<ul>
<li><a href="add_staff.php">Add</a></li>
<li><a href="view_staff.php">View</a></li>
<li><a
href="delete_staff_student.php">Delete</a></li>
</ul>
</li>
<li><a href="">Student</a>
<ul>
<li><a href="add_student.php">Add</a></li>
<li><a href="view_student.php">View</a></li>
<li><a
href="search_student_a.php">Search</a></li>
<li><a
href="delete_staff_student.php">Delete</a></li>
</ul>
</li>
</ul>
</li>
<li id="two_step_menue"><a href="">Time Table</a>
<ul>
<li><a href="add_time_table.php">Add</a></li>
<li><a href="view_time_table.php">View</a></li>
<li><a href="update_time_table.php">Update</a></li>
<li><a href="delete_time_table.php">Delete</a></li>
</ul>
</li>
<li id="three_step_menue"><a href="">Academic Schedule</a>
<ul>
<li><a href="">Holiday Schedule</a>
<ul>
<li><a
href="add_holiday_schedule.php">Add</a></li>
<li><a
href="view_holiday_schedule.php">View</a></li>
</ul>
</li>
<li><a href="">Exam Schedule</a>
<ul>
<li><a href="add_exam_schedule.php">Add</a></li>
<li><a
href="view_exam_schedule.php">View</a></li>
<li><a
href="delete_exam_schedule.php">Delete</a></li>
</ul>
</li>
</ul>
</li>
<li id="three_step_menue"><a href="">Payment Management</a>
<ul>
<li><a href="">Fee Structure</a>
<ul>
<li><a href="add_fee.php">Add</a></li>
<li><a href="view_fee.php">View</a></li>
<li><a href="edit_fee.php">Edit</a></li>
</ul>
</li>
<li><a href="">Salary Details</a>
<ul>
<li><a href="add_salary.php">Add</a></li>
<li><a href="view_salary.php">View</a></li>
</ul>
</li>
</ul>
</li>
<li id="one_step_Menue"><a
href="view_attendance.php">Attendance</a></li>
<li id="one_step_Menue"><a href="view_marks.php">Marks
Management</a></li>
</ul>
</div>
<?php
require("functions_page.php");
$staff_registration_no = "blank";
$res = mysql_query("SELECT * FROM staff_table");
while($row=mysql_fetch_assoc($res))
{
$staff_registration_no = $row['Staff Registration No'];
$staff_ID = $row['Staff ID'];
}
if($staff_registration_no=="blank")
{
$staff_registration_no = "10STF-1000";
$staff_ID = "1000";
}
$staff_registration_no++;
$staff_ID++;
?>
</td>
<td colspan="3" width="925px" height="500" class="td5" rowspan="2">
<script type="text/javascript">
function formValidation()
{
var sn = document.getElementById("staff_name").value;
if(sn=='')
{
alert ("Please Enter Staff Name");
return false;
}
if(!sn.match(/^[a-zA-Z /]+$/))
{
alert ("Staff Name Field Should Used Only Letters");
return false;
}
if(!sn.match(/^[a-zA-Z ]{5,}$/))
{
alert ("Staff Name Should be Minimum Five letters");
return false;
}
var sp = document.getElementById("specilization").value;
if(sp==='')
{
alert ("Please Enter Staff Specilization");
return false;
}
if(!sp.match(/^[a-zA-Z ]+$/))
{
alert ("Specilization Field Should Used Only Letters");
return false;
}
if(!sp.match(/^[a-zA-Z]{5,}$/))
{
var fd = document.getElementById("date_of_join").value;
if(fd=='yyyy-mm-dd'||fd=='')
{
alert ("Please Enter Start Date");
return false;
}
if(!fd.match(/^[0-9]{4,4}\-(0[0-9]|1[012])\-(0[0-9]|[12][0-
9]|3[01])/))
{
alert ("Date Format Should be YYYY-MM-DD");
return false;
}
var pa = document.getElementById("perminant_address").value;
if(pa=='')
{
alert ("Please Enter Perminant Address");
return false;
}
var a= document.getElementById("present_address").value;
if(a=='')
{
alert ("Please Enter Present Address");
return false;
}
var cp = document.getElementById("cell_no").value;
if(cp=='')
{
alert ("Please Enter Cell Phone Number");
return false;
}
if(!cp.match(/^[0-9]{11,11}$/))
{
alert ("Invalid Cell Phone Number");
return false;
}
var c = document.getElementById("city").value;
if(c=='')
{
alert ("Please Enter City");
return false;
}
if(!c.match(/^[a-zA-Z ]+$/))
{
alert ("City Name Field Should Used Only Letters");
return false;
}
var un =
document.getElementById("required_user_name").value;
if(un=='')
{
alert ("Please Enter Required User Name");
return false;
}
if(!un.match(/^[a-zA-Z]+$/))
{
alert ("User Name Field Should Used Only Letters");
return false;
}
if(!un.match(/^[a-zA-Z]{5,}$/))
{
alert ("Required User Name Should be Minimum Five
letters");
return false;
}
return true;
}
</script>
if(addStaff($staff_registration_no,$staff_ID,$staff_name,$specilization,
$gender
,$experience,$salary,$date_of_join,$perminant_address,$present_address,$
phone,$cell_no,$city,$required_username,$others))
{
header("Location:add_staff.php");
}
}
?>
</td></tr>
<tr><td height="0" rowspan="0" class="td4"></td></tr>
</html>
ADD_SUBJECT.PHP
<?php
function ae_detect_ie()
if (isset($_SERVER['HTTP_USER_AGENT']) &&
(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
return true;
else
return false;
if(ae_detect_ie())
style=color:red;background-color:#FFE4C4;letter-spacing:1><b>This
Website Does Not Support Internet Explorer</b></td></tr>";
exit;
else
session_start();
if(!isset($_SESSION['user_name'])&&!isset($_SESSION['password']))
header("Location:login.php");
?>
<html>
<head>
<title>Add Subject</title>
</head>
<div id="navMenueTable">
<table border=0>
</table>
<td class="td3">
</td></tr>
<div id ="menuContainer">
<ul>
<ul id>
<li><a href="staff_login_detail.php">Staff</a></li>
</ul>
</li>
<ul id="small_bg_menue_link">
<li><a href="">Class</a>
<ul>
<li><a href="add_class.php">Add</a></li>
<li><a href="view_class.php">View</a></li>
<li><a href="delete_class.php">Delete</a></li>
</ul>
</li>
<li><a href="">Subject</a>
<ul>
<li><a href="add_subject.php">Add</a></li>
<li><a href="view_subject.php">View</a></li>
<li><a href="delete_subject.php">Delete</a></li>
</ul>
</li>
<li><a href="">Period</a>
<ul>
<li><a href="add_period.php">Add</a></li>
<li><a href="view_period.php">View</a></li>
<li><a href="delete_period.php">Delete</a></li>
</ul>
</li>
<li><a href="">Syllabus</a>
<ul>
<li><a href="add_syllabus.php">Add</a></li>
<li><a href="view_syllabus.php">View</a></li>
<li><a
href="delete_syllabus.php">Delete</a></li>
</ul>
</li>
</ul>
</li>
<ul>
<li><a href="">Staff</a>
<ul>
<li><a href="add_staff.php">Add</a></li>
<li><a href="view_staff.php">View</a></li>
<li><a
href="delete_staff_student.php">Delete</a></li>
</ul>
</li>
<li><a href="">Student</a>
<ul>
<li><a href="add_student.php">Add</a></li>
<li><a href="view_student.php">View</a></li>
<li><a
href="search_student_a.php">Search</a></li>
<li><a
href="delete_staff_student.php">Delete</a></li>
</ul>
</li>
</ul>
</li>
<ul>
<li><a href="add_time_table.php">Add</a></li>
<li><a href="view_time_table.php">View</a></li>
<li><a href="update_time_table.php">Update</a></li>
<li><a href="delete_time_table.php">Delete</a></li>
</ul>
</li>
<ul>
<ul>
<li><a
href="add_holiday_schedule.php">Add</a></li>
<li><a
href="view_holiday_schedule.php">View</a></li>
</ul>
</li>
<ul>
<li><a href="add_exam_schedule.php">Add</a></li>
<li><a
href="view_exam_schedule.php">View</a></li>
<li><a
href="delete_exam_schedule.php">Delete</a></li>
</ul>
</li>
</ul>
</li>
<ul>
<ul>
<li><a href="add_fee.php">Add</a></li>
<li><a href="view_fee.php">View</a></li>
<li><a href="edit_fee.php">Edit</a></li>
</ul>
</li>
<ul>
<li><a href="add_salary.php">Add</a></li>
<li><a href="view_salary.php">View</a></li>
</ul>
</li>
</ul>
</li>
<li id="one_step_Menue"><a
href="view_attendance.php">Attendance</a></li>
<ul>
<ul>
<li><a
href="view_leave_approvals.php">Staff</a></li>
</ul>
</li>
<li id="one_step_menue"><a
href="leave_history.php">Leave History</a></li>
</ul>
</li>
<ul>
<li><a href="#">Inbox</a></li>
<li><a href="#">Outbox</a></li>
<li><a href="#">Compose</a></li>
</ul>
</li>
</ul>
</div>
</td>
<center>
<script type="text/javascript">
function formValidation()
var cl = document.getElementById("class").value;
if(cl=='select_class')
return false;
if(sbj=='')
return false;
if(!sbj.match(/^[a-zA-Z ]+$/))
return false;
if(!sbj.match(/^[a-zA-Z ]{4,}$/))
return false;
return true;
</script>
<option value="select_class">Select-Class</option>
<option value="I">I</option>
<option value="II">II</option>
<option value="III">III</option>
<option value="IV">IV</option>
<option value="V">V</option>
<option value="VI">VI</option>
<option value="VII">VII</option>
<option value="VIII">VIII</option>
<option value="IX">IX</option>
<option value="X">X</option>
</select>
</td><tr><td align="right">
</td></tr>
</td></tr>
<?php
if(count($_POST) > 0)
require("functions_page.php");
$add_class = trim($_POST['add_class']);
$add_subject = ucwords(strtolower(trim($_POST['add_subject'])));
addSubject($add_class,$add_subject);
echo "</td></tr>";
?>
</form>
</table>
</center>
</td></tr>
<td><img src="images/admin_button.gif"></td></tr-->
</table>
</table>
</div>
<p>adfasdF</p>
</frameset-->
</html>
staff_login_detail.php
<?php
function ae_detect_ie()
if (isset($_SERVER['HTTP_USER_AGENT']) &&
(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
return true;
else
return false;
if(ae_detect_ie())
style=color:red;background-color:#FFE4C4;letter-spacing:1><b>This
Website Does Not Support Internet Explorer</b></td></tr>";
exit;
else
session_start();
if(!isset($_SESSION['user_name'])&&!isset($_SESSION['password']))
header("Location:login.php");
?>
<html>
<head>
</head>
<div id="navMenueTable">
<table border=0>
</table>
<td class="td3">
</td></tr>
<div id ="menuContainer">
<ul>
<ul id>
<li><a href="staff_login_detail.php">Staff</a></li>
</ul>
</li>
<ul id="small_bg_menue_link">
<li><a href="">Class</a>
<ul>
<li><a href="add_class.php">Add</a></li>
<li><a href="view_class.php">View</a></li>
<li><a href="delete_class.php">Delete</a></li>
</ul>
</li>
<li><a href="">Subject</a>
<ul>
<li><a href="add_subject.php">Add</a></li>
<li><a href="view_subject.php">View</a></li>
<li><a href="delete_subject.php">Delete</a></li>
</ul>
</li>
<li><a href="">Period</a>
<ul>
<li><a href="add_period.php">Add</a></li>
<li><a href="view_period.php">View</a></li>
<li><a href="delete_period.php">Delete</a></li>
</ul>
</li>
<li><a href="">Syllabus</a>
<ul>
<li><a href="add_syllabus.php">Add</a></li>
<li><a href="view_syllabus.php">View</a></li>
<li><a
href="delete_syllabus.php">Delete</a></li>
</ul>
</li>
</ul>
</li>
<ul>
<li><a href="">Staff</a>
<ul>
<li><a href="add_staff.php">Add</a></li>
<li><a href="view_staff.php">View</a></li>
<li><a
href="delete_staff_student.php">Delete</a></li>
</ul>
</li>
<li><a href="">Student</a>
<ul>
<li><a href="add_student.php">Add</a></li>
<li><a href="view_student.php">View</a></li>
<li><a
href="search_student_a.php">Search</a></li>
<li><a
href="delete_staff_student.php">Delete</a></li>
</ul>
</li>
</ul>
</li>
<ul>
<li><a href="add_time_table.php">Add</a></li>
<li><a href="view_time_table.php">View</a></li>
<li><a href="update_time_table.php">Update</a></li>
<li><a href="delete_time_table.php">Delete</a></li>
</ul>
</li>
<ul>
<ul>
<li><a
href="add_holiday_schedule.php">Add</a></li>
<li><a
href="view_holiday_schedule.php">View</a></li>
</ul>
</li>
<ul>
<li><a href="add_exam_schedule.php">Add</a></li>
<li><a
href="view_exam_schedule.php">View</a></li>
<li><a
href="delete_exam_schedule.php">Delete</a></li>
</ul>
</li>
</ul>
</li>
<ul>
<ul>
<li><a href="add_fee.php">Add</a></li>
<li><a href="view_fee.php">View</a></li>
<li><a href="edit_fee.php">Edit</a></li>
</ul>
</li>
<ul>
<li><a href="add_salary.php">Add</a></li>
<li><a href="view_salary.php">View</a></li>
</ul>
</li>
</ul>
</li>
<li id="one_step_Menue"><a
href="view_attendance.php">Attendance</a></li>
<ul>
<ul>
<li><a
href="view_leave_approvals.php">Staff</a></li>
</ul>
</li>
<li id="one_step_menue"><a
href="leave_history.php">Leave History</a></li>
</ul>
</li>
<ul>
<li><a href="#">Inbox</a></li>
<li><a href="#">Outbox</a></li>
<li><a href="#">Compose</a></li>
</ul>
</li>
</ul>
</div>
</td>
<?php
require("functions_page.php");
viewStaffLoginDetail();
</td></tr>
<td><img src="images/admin_button.gif"></td></tr-->
</table>
</table>
</div>
<p>adfasdF</p>
</frameset-->
</html>
staff_student_function_page.php
<?php
require("../db_connection.php");
function loginCheck($username,$password)
$b=mysql_num_rows($res);
if($b!='')
return true;
function viewSubject()
$arr =
array('I','II','III','IV','V','VI','VII','VIII','IX','X',"XI");
for($a=0;$a<10;$a++)
$class = $arr[$a];
$bb = mysql_num_rows($res1);
while($rowa=mysql_fetch_assoc($res1))
echo "<td></td>";
echo "</tr>";
echo "</table>";
function viewStudent($class,$section)
if($class!="select_class"&&$section!="select_section")
if($class=="all_class"&&$section=="all_section")
else if($section=="all_section")
else{
if(mysql_fetch_assoc($res)=='')
return false;
if($class=="all_class"&&$section=="all_section")
$male_count = mysql_num_rows($male);
$female_count = mysql_num_rows($female);
$rows=mysql_num_rows($res);
else if($section=="all_section")
$rows=mysql_num_rows($res);
$male_count = mysql_num_rows($male);
$female_count = mysql_num_rows($female);
else
$rows=mysql_num_rows($res);
$male_count = mysql_num_rows($male);
$female_count = mysql_num_rows($female);
<th width=50>Class</th>
<th width=60>Section</th>
<th width=60>Gender</th><th
width=90>DOB</th>
<th width=100>Phone</th>";
while($row=mysql_fetch_assoc($res))
<td width=>".$row['Student
Registration No']."</td>
<td width=>".$row['Student
ID']."</td>
<td width=>".$row['Student
Name']."</td>
<td width=>".$row['Father
Name']."</td>
<td
width=>".$row['Class']."</td>
<td
width=>".$row['Section']."</td>
<td
width=>".$row['Gender']."</td>
<td width=>".$row['Date Of
Birth']."</td>
<td
width=>".$row['Phone']."</td>
</tr>";
return false;
function viewSyllabus($class)
if($class=='select_class')
return false;
$row = mysql_fetch_assoc($res);
if($row=='')
return false;
<th width=120>Syllabus</th>";
while($row=mysql_fetch_assoc($res))
<td style=background-
image:url(images/try.gif);background-repeat:no-repeat;>
</td></tr></table></a>";
"</td></tr>";
echo "</table>";
function viewExamSchedule($class,$section)
if($class=="select_class"||$section=="select_section")
return false;
$row = mysql_fetch_assoc($res);
if($row=='')
return false;
<th width=180>Time</th>
<th width=210>Subject</th><th
width=110>Date</th>";
while($row = mysql_fetch_assoc($res))
<td>".$row['StartTime']." ".$row['Am Pm
ForStartTime']." to ".$row['EndTime']." ".$row['Am Pm
ForEndTime']."</td>
<td>".$row['Subject']."</td>
<td>".$row['Date']."</td>
</tr>";
echo "</table>";
return true;
function viewHolidaySchedule()
$row = mysql_fetch_assoc($res);
if($row=='')
return;
while($row = mysql_fetch_assoc($res))
<td width=150>".$row['Date']."</td>
echo "</table>";
function viewPeriodsTime()
<caption style=color:green;font-weight:bold;font-size:17>Periods
Time</caption><th width=150>Period</th><th width=150>Start Time</th>
while($row=mysql_fetch_assoc($res))
echo "</table>";
function viewTimeTable($class,$section)
$available=0;
while($row = mysql_fetch_assoc($res))
if($row['Class']==$class&&$row['Section']==$section)
$available = 1;
if($available==1)
<th width=150>Fri</th>";
$a=1;
AND time_table.Class =
'$class' AND time_table.Section = '$section' ORDER BY Class ASC");
while($row = mysql_fetch_assoc($res))
if($a==4)
<td><table
border=0 width=150 style=border-collapse:collapse;><tr
align=center><td>$row[Subject]</td></tr>
<tr
align=center><td style=font-size:14>".$row['Teacher Name']."</td></tr>
<tr
align=center><td style=font-size:12>$row[StartTime] to
$row[EndTime]</td></tr>
</table></td>
<td><table
border=0width=150 style=border-collapse:collapse;><tr
align=center><td>$row[Subject]</td></tr>
<tr
align=center><td style=font-size:14>".$row['Teacher Name']."</td></tr>
<tr
align=center><td style=font-size:12>$row[StartTime] to
$row[EndTime]</td></tr></table></td>
<td><table
border=0 width=150 style=border-collapse:collapse;><tr
align=center><td>$row[Subject]</td></tr>
<tr
align=center><td style=font-size:14>".$row['Teacher Name']."</td></tr>
<tr
align=center><td style=font-size:12>$row[StartTime] to
$row[EndTime]</td></tr></table></td>
<td><table
border=0 width=150 style=border-collapse:collapse;><tr
align=center><td>$row[Subject]</td></tr>
<tr
align=center><td style=font-size:14>".$row['Teacher Name']."</td></tr>
<tr
align=center><td style=font-size:12>$row[StartTime] to
$row[EndTime]</td></tr></table></td>
<td><table
border=0 width=150 style=border-collapse:collapse;><tr
align=center><td>$row[Subject]</td></tr>
<tr
align=center><td style=font-size:14>".$row['Teacher Name']."</td></tr>
<tr
align=center><td style=font-size:12>$row[StartTime] to
$row[EndTime]</td></tr></table></td>
</tr>";$a++;
echo "</table>";
return true;
return false;
function viewStaffSalary($view_salary)
if($view_salary=='')
return false;
AND
staff_salary_table.`Staff ID` = '$view_salary' OR staff_table.`Staff
Registration No` = '$view_salary'");
if(mysql_fetch_assoc($res)=='')
return false;
AND
staff_salary_table.`Staff ID` = '$view_salary' OR staff_table.`Staff
Registration No` = '$view_salary'");
$row=mysql_fetch_assoc($res);
<tr align=center><td>Staff ID
:</td><td>".$row['Staff ID']."</td><td>Staff Name
:</td><td>".$row['Staff Name']."</td></tr>
<tr><td height=5></td></tr></table>";
//echo "<br>";
<tr
align=center><td>Basic</td><td>$row[Basic]</td><td>----</td></tr>
<tr
align=center><td>HR</td><td>$row[HRA]</td><td>----</td></tr>
<tr
align=center><td>PF</td><td>$row[PF]</td><td>----</td></tr>
<tr
align=center><td>TA</td><td>$row[TA]</td><td>----</td></tr>
<tr
align=center><td>DA</td><td>$row[DA]</td><td>----</td></tr>
<tr
align=center><td>Tax</td><td>".$row['Professional Tax']."</td><td>----
</td></tr>
<tr align=center><td
colspan=3>Total Amount : ".$row['Total Amount']."</tr></table>";
return true;
function viewFee()
<caption style=color:green;font-weight:bold;font-
size:17>Students Fee Information</caption>
while($row=mysql_fetch_assoc($res))
echo"<tr align=center>
<td width=100>".$row['Class']."</td>
</tr>
";
echo "</table>";
$marks9, $total_marks,$percentage,$grade)
if($student_id=='')
return false;
if(mysql_fetch_assoc($res)=='')
$row = mysql_fetch_assoc($res);
$b = mysql_num_rows($res);
if($b=='')
return false;
$class = $row['Class'];
$section= $row['Section'];
`Marks2`, `Marks3`,`Marks4`,
`Marks5`, `Marks6`,`Marks7`,`Marks8`,`Marks9`,`Marks10`,`Total
Marks`,Percentage,`Grade`)
VALUES
('$student_id','$class','$section','$marks0','$marks1',
'$marks2','$marks3','$marks4','$marks5','$marks6','$marks7','$marks8','$
marks9','$total_marks','$percentage','$grade')");
return true;
return false;
function viewStudentsMarks($student_id,$class,$section)
if($student_id!='Student ID')
AND student_table.`Student
ID`='$student_id'");
$row=mysql_fetch_assoc($res);
$bb = mysql_num_rows($res);
if($bb=='')
return false;
<tr><td style=padding-left:43;>Class :
".$row['Class']."</td><td style=padding-left:48;> Section :
".$row['Section']."</td></tr><tr><td height=10></td></tr></table>";
$row1=mysql_fetch_assoc($res1);
$class = $row1['Class'];
$a=1;
$b=0;
while($row2=mysql_fetch_assoc($res2))
if($row["Marks$a"]<33)
$b=1;
$a++;
echo "<table>";
if($b==0)
$remarks="<td align=center
style=padding-right:15;>Remarks : Pass</td></tr>";
<tr><td style=padding-left:50;>Grade :
".$row['Grade']."</td>$remarks </table>";
//<tr><
return true;
if($class=="select_class"||$section=="select_section")
returnfalse;
$b = mysql_num_rows($res);
if($b=='')
return false;
while($rows = mysql_fetch_assoc($ress))
$average_pass=0;
$count_students=0;
$count_pass=0;
$count_fail=0;
while($row = mysql_fetch_assoc($res))
$count_students++;
$identify_pass_fail=0;
$a = mysql_num_rows($res1);
for($i=1;$i<=$a;$i++)
$marks = $row["Marks$i"];
if($marks<33)
$identify_pass_fail=1;
$str_for_marks[] = "<td
align=center style=color:red;>".$marks."</td>";
if($identify_pass_fail==0)
$remarks = "Pass";
$str_for_remarks = "<td
align=center>".$remarks."</td>";
$count_pass++;
else if($identify_pass_fail==1)
$remarks = "Fail";
$count_fail++;
foreach($str_for_marks as $m)
echo $m;
<td
align=center>".$row['Grade']."</td>$str_for_remarks</tr>";
unset($str_for_marks);
$average_pass_students=($count_pass/$count_students)*100;
return true;
function deleteResults($class,$section)
if($class=="select_class"||$section=="select_section")
return false;
return true;
$b=mysql_num_rows($ress);
if($b=='')
return false;
$b = mysql_num_rows($res);
if($b!='')
return true;
}else {
VALUES (current_date(),'$student_id',
'$class','$section', '$present_absent')");
return true;
function viewStudentsAttendance($student_id,$class,$section,$date)
if($student_id!="Student ID")
AND attendance_table.`Student
ID`='$student_id'");
$b=mysql_num_rows($res);
if($b=='')
return false;
AND attendance_table.`Student
ID`='$student_id'");
$row = mysql_fetch_assoc($res);
AND attendance_table.`Student
ID`='$student_id'");
$present=0;
$absent=0;
while($row = mysql_fetch_assoc($res))
if($row['Status']=='Present')
<td
align=center>".$row['Class']."</td><td
align=center>".$row['Section']."</td><td
align=center>".$row['Status']."</td>
<td
align=center>".$row['Date']."</td></tr>";
$present++;
}else
<td
align=center>".$row['Class']."</td><td
align=center>".$row['Section']."</td><td
align=center>".$row['Status']."</td>
<td
align=center>".$row['Date']."</td></tr>";
$absent++;
return true;
if($class=='select_class'||$section=='select_section')
return false;
$b=mysql_num_rows($res);
if($b=='')
return false;
$rowa = mysql_fetch_assoc($res);
$present=0;
$absent=0;
while($row = mysql_fetch_assoc($res))
if($row['Status']=='Present')
$present++;
}else
$absent++;
return true;
function leaveApply($staff_id,$no_of_leave,$start_date,$to_date,$reason)
if($staff_id==''||$no_of_leave==''||$start_date==''||$to_date==''||$reas
on=='')
return false;
$date=date("Y-m-d");
$approval="Pending";
$b=mysql_num_rows($res);
if($b!='')
return false;
VALUES('$staff_id','$no_of_leave','$start_date','$to_date','$reason','$a
pproval')");
return true;
function viewLeaveHistory()
while($row = mysql_fetch_assoc($res))
echo "</table>";return;
?>
CHAPTER 7
SYSTEM TESTING
ensuring that all statements have been tested and onfunctional interval is
conducting tests to uncover errors and ensure that defined input will
System “.
Testing Configuration
them as a whole.
1. Unit Testing
2. Integration Testing
without changing the code. Unit test cases are writtenfor each
are tested.
Test data has been prepared for each and every module and for
Log In As:
When the login id & password matches with the stored one then
only he/she can move to next interface. The new system user can
This option used for log in for different users. In this option if
Administrator has logged, then he has all rights for fully used this
If any end user has logged, he will get right only for used this
transaction.
CHAPTER 8
SYSTEM IMPLEMENTATION
installs and operates the new system. The most crucial stage in achieving
The transition or changeover from the old system to the new and the
preparation for this such as making sure the hardware and network
infrastructure for a new system are in place; testing of the system and
also human issues of how best to educate and train staff who will be
CHAPTER 9
CONCLUSION
After proper analyzing feasibility reports and using the current manual
system is best and highly efficient GUI based component. This software is
requirements.
entry operator and makes the whole system efficient and fast. Now by
efficiently.
CHAPTER 10
SCOPE OF THE PROJECT
10.1Deficiencies/Limitations
Each system has its own measures of successes and failures, as well
system.
Since I just want to try to build software that describes me how the
So, this project has limited in some areas. Major limitations and
Management Software.
software
system more and more effective and productive and also goal
oriented.
the facility.
In spite of our rigorous effort we had not been able to assimilate all
modules.
This projectwill produce various reports which are also useful for
user. This project have very much flexibility and according to time
and need we can modify data and facility also. We can add more
limitation from the next version. So, this project has a great future
scope.
Bibliography/References
3. www.homeandlearn.co.uk
4. www.Learn-sql-tutorial.com
Harris)