Student Result Management System Project Report
Student Result Management System Project Report
Introduction
states the various constraints by which the system will abide. The intended
audience for this document are the development team, testing team and end
Scope
The application will manage the information about various students enrolled in
this course in different years, the subjects offered during different semesters of
the course, the marks obtained by the various students in various subjects in
different semesters.
The application will greatly simplify and speed up the result preparation and
management process.
SYSTEM ENVIRONMENT
Hardware Configuration
1. Pentium IV Processor
2. 512 MB RAM
3. 40GB HDD
Software Configuration
1. OS : Windows XP
Design
INTRODUCTION:
Design is the first step in the development phase for any techniques and
principles for the purpose of defining a device, a process or system in sufficient
detail to permit its physical realization.
Once the software requirements have been analyzed and specified the software
design involves three technical activities - design, coding, implementation and
testing that are required to build and verify the software.
The design activities are of main importance in this phase, because in this
activity, decisions ultimately affecting the success of the software
implementation and its ease of maintenance are made. These decisions have the
final bearing upon reliability and maintainability of the system. Design is the
only way to accurately translate the customer’s requirements into finished
software or a system.
PHP
Unique Features
If you are familiar with other server side language like ASP.NET or JSP you
might be wondering what makes PHP so special, or so different from these
competing alternatives well, here are some reasons:
1. Performance
2. Portability(Platform Independent)
3. Ease Of Use
4. Open Source
5. Third-Party Application Support
6. Community Support
Performance
Scripts written in PHP executives faster than those written in other scripting
language, with numerous independent benchmarks, putting the language ahead
of competing alternatives like JSP,ASP.NET and PERL.The PHP 5.0 engine was
completely redesigned with an optimized memory manager to improve
performance, and is noticeable faster than previous versions.In addition, third
party accelerators are available to further improve performance and response
time.
Portability
Ease Of Use
Open Source
One of PHP’s Strengths has historically been its support for a wide range of
different databases, including MySQL, PostgreSQL, Oracle, and Microsoft SQL
Server. PHP 5.3 Supports more than fifteen different database engines, and it
includes a common API for database access. XML support makes it easy to read
and write XML documents though they were native PHP data structures, access
XML node collections using Xpath, and transform XML into other formats with
XSLT style sheets.
Community Support
One of the nice things about a community-supported language like PHP is the
access it offers to the creativity and imagination of hundreds of developers
across the world.Within the PHP community, the fruits of this creativity may be
found in PEAR, the PHP Extension and Application Repository and PECL, the
PHP Extension Community Library, which contains hundreds of ready-,made
widgets and extensions that developers can use to painlessly and new
functionality to PHP.Using these widgets is often a more time-and cost-efficient
alternative to rolling your own code.
PHP Server
The PHP Community Provides Some types of Software Server solution under
The GNU (General Public License).
Introduction to HTML
HTML is considered first for formatting any new material you plan to
publish on the web. HTML documents are platform independent, meaning that
they don’t confirm to any standard. If they are created properly you can move
home page to any server platform or you can access them with any complaint
www browser.
STRUCTURE OF HTML
HTML elements perform a defined task. HTML uses two types of elements
. Empty Tags
. Container Tags
These tags differ because of what they represent. Empty tags represent
formatting constricts such as line breaks and horizontal rules. Container tags
define a section of text, formats and dot all of the selected text. A container tag
has both a beginning and an ending.
HTML LAYOUT:
<HTML>
<HEAD>
<TITLE>the title of HTML document</TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>
Each document has a head and body delimited by the <HEAD> and <BODY>
tag. The head is where you give your HTML document a title and where you
indicate other parameters the browser may use when displaying the document.
This includes the text for displaying the text. Tag also references special and
indicates the hot spots that link your document to other documents.
HTML FORMS:
To create a form, You use the <FORM> tag. Inside the opening and
closing FORM tags are each of the individual form elements plus any other
HTML content to create a layout for that form.
The opening tag of the FORM element usually includes the attributes:
METHOD and ACTION. The METHOD attributes can be either GET or POST
which determines how your form data is sent to the script to process it.
The ACTION attribute is a pointer to the script that processes the form on
the server side. The ACTION can be included by a relative path or by a full
URL to a script on your server or somewhere else. For example, the following
<FORM> tag would call a script called form-name in cgi-bin directory on server
www.myservser.com
……………….
</FORM>
METHOD ATTRIBUTE:
The other required attribute for the <form> tag sets the methods by which the
browser form’s data to the server for processing. There are two ways: the POST
method and GET method. With POST method, the browser sends the data in
two steps: the browser first contacts the form-processing server specified in the
action attributes, and once contact is made, sends the data.
BACK END TECHNOLOGY:
MYSQL
MySQL Introduction
There are a large number of database management systems currently available,
some commercial and some free.
These Tables, which structure data into rows and columns, Impose organization
on the data.
Note : There are more available parameters, but the ones listed above are the
most important.
In the following example we store the connection in a variable ($con) for later
use in the script.
<?php
// Create connection
$con=mysqli_connect("localhost","root","") or die(mysql_error());
?>
Here localhost is server name. root is MySQL default user name. default
password is blank and database name is my_db. mysql_error( ) function
provides mysql connectivity error message.
// Create connection
$con=mysqli_connect("localhost","root","","my_db") or die(mysql_error());
//code to be
executed. // Close
connection
mysql_close($con);
?>
after work with the database is done we have to close the connection
using mysql_close() function in which the connection to the database is
passed.
Functions
Functions are bet declared between the <Head> tag of HTML page. Functions
are called by user-initiated events. Seems reasonable to keep the functions
between the <Head> tags. They are loaded first before a user can do anything
that might call a function. Scripts can be placed between inside comment fields
to ensure that older browser do not display the script itself.
<html>
<head>
<script
language=”JavaScript”>
(“Hello!”);
</script>
</head>
<body>
<form>
</form>
</body>
</html>
If we want to test this one immediately and you are using a Java Script enabled
browser then please go ahead and push the button.
This script will create a button and when you press it a window will pop up
saying
“hello!”. In fact we have a lot of possibilities just by adding functions to our
scripts.
The common browsers transmit the form information by either method: here’s
the complete tag including the GET transmission method attribute for the
previous form
Example
………
</form>
Input elements.
Use the <input> tag to define any one of a number of common form elements
including text fields multiple choice lists click able images and submission
buttons. There are many attributers for this tag only that types and name
attributes are required for each element, each type of input element uses only a
subset of the followed attributes. Additional <input> attributes may be required
based upon which type of the form element you specify.
Submit button:
The submit button (<input type=submit> ) does what its name implies, settings in motion
the form’s submission to the server from the browser. We many have more than submit
buttons will be added to the parameter list the browser sends along to the server.
Example
Reset button:
The reset button if firm <input> button is nearly self- explanatory; it lets the
user reset erase or set to some default value all elements in the form. By default
the browser displays a reset button worth the label “reset”. We can change that
by specifying a value attribute with tour own button label.
DATABASE MODELS
Single Tier
In a single tier the server and client are the same in the sense that a client
program that needs information (client) and the source of this type of architecture
is also possible in java, in case flat files are used to store the data. However this is
useful only in case of small applications. The advantage with this is the simplicity
and portability of the application developed.
Server and
client
Database
In two tier architecture the database resides in one machine and client in
different machine they are connected through the network. In this type of
architecture a database management takes control of the database and provides
access to clients in a network. This software bundle is also called as the server.
Software in different machines, requesting for information are called as the
clients
Server
Client
Client
Database
In the three-tier architecture, any number servers can access the database that
resides on server. Which in turn serve clients in a network. For example, you
want to access the database using java applets, the applet running in some other
machine, can send request only to the server from which it is down loaded. For
this reason we will need to have a intermediate server which will accept the
requests from applets and them to the actual database server. This intermediate
server acts as a two-way communication channel also. This is the information or
data from the database is passed on to the applet that is requesting it. This can be
extended to make n tiers of servers, each server carrying to specific type of
request from clients, however in practice only 3 tiers architecture is popular.
FEASIBILITY STUDY:
The system has been tested for feasibility in the following points.
1. Technical Feasibility
2. Economical Feasibility
3. Operational Feasibility.
1. Technical Feasibility
2. Economical Feasibility
The computerized system will help in automate the selection leading the profits
and details of the organization. With this software, the machine and manpower
utilization are expected to go up by 80-90% approximately. The costs incurred
of not creating the system are set to be great, because precious time can be
wanted by manually.
3. Operational Feasibility
In this project, the management will know the details of each project where he
may be presented and the data will be maintained as decentralized and if any
inquires for that particular contract can be known as per their requirements and
necessaries.
Implementation:
The system can be implemented only after thorough testing is done and if it is
found to work according to the specification.
INTRODUCTION TO HTML4.0
What is the World Wide Web?
The World Wide Web is a network of information resources. The Web relies on
three mechanisms to make these resources readily available to the widest
possible audience.
1. A uniform naming scheme for locating resources on the Web (e.g. URLs)
2. Protocols, for access to named resources over the Web (e.g. HTTP)
3. Hypertext, for easy navigation among resources (e.g.HTML)
The ties between the three mechanisms are apparent throughout this
specification
What is HTML?
To publish information for global distribution, one needs a universally
understood language, a kind of publishing mother tongue that all computers may
potentially understand. The publishing language used by the World Wide Web
is HTML
(from Hyper Text Markup Language). HTML gives authors the means
to - Publish online documents with headings, text, tables, lists, photos, etc.
- Retrieve online information via hypertext links, at the click of a button
- Design forms for conducting transactions with remote services, for use in
searching for information, making reservations, ordering products etc.
- Include spread - sheets, video clips, sound clips, and other applications directly
in their documents.
The basic idea of the system development life cycle is that there is a well-
defined process by which an application is conceived and developed and
implemented. The life cycle gives structure to a creative process. In order to
manage and control the development effort, it is necessary to know what should
have been done, what has been done, and what has yet to be accomplished. The
phrases in the system development life cycle provide a basis for management
and control because they define segments of the
flow of work, which can be identified for managerial purposes and specifies the
documents or other deliverables to be produced in each phase.
The phases in the life cycle for information system development are described
differently by different writers, but the differences are primarily in the amount
of necessity and manner of categorization. There is a general agreement on the
flow of development steps and the necessity for control procedures at each
stage.
1) Definition.
2) Development.
3) Installation and operation.
The first stage of the process, which defines the information requirements for a
feasible cost effective system. The requirements are then translated into a
physical system of forms, procedures, programs etc., by the system design,
computer programming and procedure development. The resulting system is test
and put into operation. No system is perfect so there is always a need for
maintenance changes. To complete the cycle, there should be a post audit of the
system to evaluate how well it performs and how well it meets the cost and
performance specifications. The stages of definition, development and
installation and operation can therefore be divided into smaller steps or phrases
as follows.
Definition
Proposed definition : preparation of request for proposed applications.
Feasibility assessment : evaluation of feasibility and cost benefit of proposed
system.
Information requirement analysis : determination of information needed.
Design
Conceptual design : User-oriented design of application development.
Physical system design : Detailed design of flows and processes in
applications processing system and preparation of program specification.
Development
Program development : coding and testing of computer programs.
Procedure development : design of procedures and preparation of user
instructions.
Testing Objectives:
Testing Principles:
The primary objective for test case design is to derive a set of tests that has the
highest livelihood for uncovering defects in software. To accomplish this
objective two different categories of test case design techniques are used. They
are
White box testing.
White-box testing:
White box testing focus on the program control structure. Test cases are
derived to ensure that all statements in the program have been executed at least
once during testing and that all logical conditions have been executed.
Block-box testing:
Testing strategies:
A strategy for software testing must accommodate low-level tests that are
necessary to verify that all small source code segment has been correctly
implemented as well as high-level tests that validate major system functions
against customer requirements.
Testing fundamentals:
Testing is a process of executing program with the intent of finding error.
A good test case is one that has high probability of finding an undiscovered
error. If testing is conducted successfully it uncovers the errors in the software.
Testing cannot show the absence of defects, it can only show that software
defects present.
Testing Information flow:
Information flow for testing flows the pattern. Two class of input
provided to test the process. The software configuration includes a software
requirements specification, a design specification and source code.
Test configuration includes test plan and test cases and test tools. Tests are
conducted and all the results are evaluated. That is test results are compared
with expected results. When erroneous data are uncovered, an error is implied
and debugging commences.
Unit Testing:
Unit testing is essential for the verification of the code produced during
the coding phase and hence the goal is to test the internal logic of the modules.
Using the detailed design description as a guide, important paths are tested to
uncover errors with in the boundary of the modules. These tests were carried
out during the programming stage itself. All units of ViennaSQL were
successfully tested.
Integration testing :
Integration testing focuses on unit tested modules and build the program
structure that is dictated by the design phase.
System testing:
System testing tests the integration of each module in the system. It also
tests to find discrepancies between the system and it’s original objective, current
specification and system documentation. The primary concern is the
compatibility of individual modules. Entire system is working properly or not
will be tested here, and specified path ODBC connection will correct or not, and
giving output or not are tested here these verifications and validations are done
by giving input values to the system and by comparing with expected output.
Top-down testing implementing here.
Acceptance Testing:
This testing is done to verify the readiness of the system for the implementation.
Acceptance testing begins when the system is complete. Its purpose is to
provide the end user with the confidence that the system is ready for use. It
involves planning and execution of functional tests, performance tests and stress
tests in order to demonstrate that the implemented system satisfies its
requirements.
Test coverage Analyzer – records the control paths followed for each test case.
Timing Analyzer – also called a profiler, reports the time spent in various
regions of the code are areas to concentrate on to improve system performance.
Coding standards – static analyzers and standard checkers are used to inspect
code for deviations from standards and guidelines.
Test Cases:
Test cases are derived to ensure that all statements in the program have
been executed at least once during testing and that all logical conditions have
been executed.
Using White-Box testing methods, the software engineer can drive test cases
that
CONCLUSION:
The following books were referred during the analysis and execution
phase of the project
WEBSITES:
• www.google.com
• www.w3schools.com
• www.tutorialspoint.php
• http://stackoverflow.com
PROGRAM CODE
<?php
error_reporting(0);
include('includes/config.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Favicon-->
<body>
<div class="container">
</ul>
</div>
</div>
</nav>
<!-- Header - set the background image for the header in the line
below-->
</header>
<section class="py-5">
<div class="col-lg-6">
<h2>Notice Board</h2>
<ul>
<?php $sql = "SELECT * from tblnotice";
$query = $dbh->prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
foreach($results as $result)
{ ?>
<?php }} ?>
</ul>
</marquee>
</div>
</div>
</div>
</section>
<!-- Footer-->
</footer>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.
min.js"></script>
<script src="js/scripts.js"></script>
</body>
</html>
DASH BOARD
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])=="")
{ header("Location: index.php"); }else{
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Student Result Management System | Dashboard</title>
<link rel="stylesheet" href="css/bootstrap.min.css" media="screen" >
<link rel="stylesheet" href="css/font-awesome.min.css" media="screen" >
<link rel="stylesheet" href="css/animate-css/animate.min.css" media="screen" >
<link rel="stylesheet" href="css/lobipanel/lobipanel.min.css" media="screen" >
<link rel="stylesheet" href="css/toastr/toastr.min.css" media="screen" >
<link rel="stylesheet" href="css/icheck/skins/line/blue.css" >
<link rel="stylesheet" href="css/icheck/skins/line/red.css" >
<link rel="stylesheet" href="css/icheck/skins/line/green.css" >
<link rel="stylesheet" href="css/main.css" media="screen" >
<script src="js/modernizr/modernizr.min.js"></script>
</head>
<body class="top-navbar-fixed">
<div class="main-wrapper">
<?php include('includes/topbar.php');?>
<div class="content-wrapper">
<div class="content-container">
<?php include('includes/leftbar.php');?>
<div class="main-page">
<div class="container-fluid">
<div class="row page-title-div">
<div class="col-sm-6">
<h2 class="title">Dashboard</h2>
</div>
<!-- /.col-sm-6 -->
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
<section class="section">
<div class="container-fluid">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<a class="dashboard-stat bg-primary" href="manage-students.php">
<?php
$sql1 ="SELECT StudentId from tblstudents ";
$query1 = $dbh -> prepare($sql1);
$query1->execute();
$results1=$query1->fetchAll(PDO::FETCH_OBJ);
$totalstudents=$query1->rowCount();
?>
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</section>
<!-- /.section -->
</div>
<!-- /.main-page -->
</div>
<!-- /.content-container -->
</div>
<!-- /.content-wrapper -->
</div>
<!-- /.main-wrapper -->
// Welcome notification
toastr.options = {
"closeButton": true,
"debug": false,
"newestOnTop": false,
"progressBar": false,
"positionClass": "toast-top-right",
"preventDuplicates": false,
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "1000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
}
toastr["success"]( "Welcome to student Result Management System!");
});
</script>
</body>
</html>
<?php } ?>
Admin login
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if($_SESSION['alogin']!=''){
$_SESSION['alogin']='';
}
if(isset($_POST['login']))
{
$uname=$_POST['username'];
$password=md5($_POST['password']);
$sql ="SELECT UserName,Password FROM admin WHERE UserName=:uname and
Password=:password";
$query= $dbh -> prepare($sql);
$query-> bindParam(':uname', $uname, PDO::PARAM_STR);
$query-> bindParam(':password', $password, PDO::PARAM_STR);
$query-> execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
{
$_SESSION['alogin']=$_POST['username'];
echo "<script type='text/javascript'> document.location = 'dashboard.php'; </script>";
} else{
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Admin Login</title>
<link rel="stylesheet" href="css/bootstrap.min.css" media="screen" >
<link rel="stylesheet" href="css/font-awesome.min.css" media="screen" >
<link rel="stylesheet" href="css/animate-css/animate.min.css" media="screen" >
<link rel="stylesheet" href="css/prism/prism.css" media="screen" > <!-- USED FOR DEMO
HELP - YOU CAN REMOVE IT -->
<link rel="stylesheet" href="css/main.css" media="screen" >
<script src="js/modernizr/modernizr.min.js"></script>
</head>
<body class="">
<div class="main-wrapper">
<div class="">
<div class="row">
<h1 align="center">Student Result Management System</h1>
<div class="col-lg-3"></div>
<div class="col-lg-6">
<section class="section">
<div class="row mt-40">
<div class="col-md-10 col-md-offset-1 pt-50">
</div>
</div>
<!-- /.panel -->
<p class="text-muted text-center"><small>Student Result
Management System</small></p>
</div>
<!-- /.col-md-11 -->
</div>
<!-- /.row -->
</div>
<!-- /.col-md-12 -->
</div>
<!-- /.row -->
</section>
</div>
<!-- /.col-md-6 -->
</div>
<!-- /.row -->
</div>
<!-- /. -->
</div>
<!-- /.main-wrapper -->
});
</script>
<!-- ========== ADD custom.js FILE BELOW WITH YOUR CHANGES ==========
-->
</body>
</html>
ADD STUDENTS
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])=="")
{
header("Location: index.php");
}
else{
if(isset($_POST['submit']))
{
$studentname=$_POST['fullanme'];
$roolid=$_POST['rollid'];
$studentemail=$_POST['emailid'];
$gender=$_POST['gender'];
$classid=$_POST['class'];
$dob=$_POST['dob'];
$status=1;
$sql="INSERT INTO
tblstudents(StudentName,RollId,StudentEmail,Gender,ClassId,DOB,Status)
VALUES(:studentname,:roolid,:studentemail,:gender,:classid,:dob,:status)";
$query = $dbh->prepare($sql);
$query->bindParam(':studentname',$studentname,PDO::PARAM_STR);
$query->bindParam(':roolid',$roolid,PDO::PARAM_STR);
$query->bindParam(':studentemail',$studentemail,PDO::PARAM_STR);
$query->bindParam(':gender',$gender,PDO::PARAM_STR);
$query->bindParam(':classid',$classid,PDO::PARAM_STR);
$query->bindParam(':dob',$dob,PDO::PARAM_STR);
$query->bindParam(':status',$status,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$msg="Student info added successfully";
}
else
{
$error="Something went wrong. Please try again";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SMS Admin| Student Admission< </title>
<link rel="stylesheet" href="css/bootstrap.min.css" media="screen" >
<link rel="stylesheet" href="css/font-awesome.min.css" media="screen" >
<link rel="stylesheet" href="css/animate-css/animate.min.css" media="screen" >
<link rel="stylesheet" href="css/lobipanel/lobipanel.min.css" media="screen" >
<link rel="stylesheet" href="css/prism/prism.css" media="screen" >
<link rel="stylesheet" href="css/select2/select2.min.css" >
<link rel="stylesheet" href="css/main.css" media="screen" >
<script src="js/modernizr/modernizr.min.js"></script>
</head>
<body class="top-navbar-fixed">
<div class="main-wrapper">
<div class="main-page">
<div class="container-fluid">
<div class="row page-title-div">
<div class="col-md-6">
<h2 class="title">Student Admission</h2>
</div>
</div>
<!-- /.row -->
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="panel">
<div class="panel-heading">
<div class="panel-title">
<h5>Fill the Student info</h5>
</div>
</div>
<div class="panel-body">
<?php if($msg){?>
<div class="alert alert-success left-icon-alert" role="alert">
<strong>Well done!</strong><?php echo htmlentities($msg); ?>
</div><?php }
else if($error){?>
<div class="alert alert-danger left-icon-alert" role="alert">
<strong>Oh snap!</strong> <?php echo
htmlentities($error); ?>
</div>
<?php } ?>
<form class="form-horizontal" method="post">
<div class="form-group">
<label for="default" class="col-sm-2 control-label">Full Name</label>
<div class="col-sm-10">
<input type="text" name="fullanme" class="form-control" id="fullanme"
required="required" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="default" class="col-sm-2 control-label">Rool Id</label>
<div class="col-sm-10">
<input type="text" name="rollid" class="form-control" id="rollid" maxlength="5"
required="required" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="default" class="col-sm-2 control-label">Email id)</label>
<div class="col-sm-10">
<input type="email" name="emailid" class="form-control" id="email"
required="required" autocomplete="off">
</div>
</div>
<div class="form-group">
<label for="default" class="col-sm-2 control-label">Gender</label>
<div class="col-sm-10">
<input type="radio" name="gender" value="Male" required="required"
checked="">Male <input type="radio" name="gender" value="Female"
required="required">Female <input type="radio" name="gender" value="Other"
required="required">Other
</div>
</div>
<div class="form-group">
<label for="default" class="col-sm-2 control-
label">Class</label>
<div class="col-sm-10">
<select name="class" class="form-control" id="default" required="required">
<option value="">Select Class</option>
<?php $sql = "SELECT * from tblclasses";
$query = $dbh->prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<option value="<?php echo htmlentities($result->id); ?>"><?php echo
htmlentities($result->ClassName); ?> Section-<?php echo htmlentities($result-
>Section); ?></option>
<?php }} ?>
</select>
</div>
</div>
<div class="form-group">
<label for="date" class="col-sm-2 control-
label">DOB</label>
<div class="col-sm-10">
<input type="date" name="dob" class="form-
control" id="date">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" name="submit"
class="btn btn-primary">Add</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- /.col-md-12 -->
</div>
</div>
</div>
<!-- /.content-container -->
</div>
<!-- /.content-wrapper -->
</div>
<!-- /.main-wrapper -->
<script src="js/jquery/jquery-2.2.4.min.js"></script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<script src="js/pace/pace.min.js"></script>
<script src="js/lobipanel/lobipanel.min.js"></script>
<script src="js/iscroll/iscroll.js"></script>
<script src="js/prism/prism.js"></script>
<script src="js/select2/select2.min.js"></script>
<script src="js/main.js"></script>
<script>
$(function($) {
$(".js-states").select2();
$(".js-states-limit").select2({
maximumSelectionLength: 2
});
$(".js-states-hide").select2({
minimumResultsForSearch: Infinity
});
});
</script>
</body>
</html>
<?PHP } ?>
ADD RESULT
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])=="")
{
header("Location: index.php");
}
else{
if(isset($_POST['submit']))
{
$marks=array();
$class=$_POST['class'];
$studentid=$_POST['studentid'];
$mark=$_POST['marks'];
array_push($sid1,$row['id']);
}
for($i=0;$i<count($mark);$i++){
$mar=$mark[$i];
$sid=$sid1[$i];
$sql="INSERT INTO tblresult(StudentId,ClassId,SubjectId,marks)
VALUES(:studentid,:class,:sid,:marks)";
$query = $dbh->prepare($sql);
$query->bindParam(':studentid',$studentid,PDO::PARAM_STR);
$query->bindParam(':class',$class,PDO::PARAM_STR);
$query->bindParam(':sid',$sid,PDO::PARAM_STR);
$query->bindParam(':marks',$mar,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$msg="Result info added successfully";
}
else
{
$error="Something went wrong. Please try again";
}
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SMS Admin| Add Result </title>
<link rel="stylesheet" href="css/bootstrap.min.css" media="screen" >
<link rel="stylesheet" href="css/font-awesome.min.css" media="screen" >
<link rel="stylesheet" href="css/animate-css/animate.min.css" media="screen" >
<link rel="stylesheet" href="css/lobipanel/lobipanel.min.css" media="screen" >
<link rel="stylesheet" href="css/prism/prism.css" media="screen" >
<link rel="stylesheet" href="css/select2/select2.min.css" >
<link rel="stylesheet" href="css/main.css" media="screen" >
<script src="js/modernizr/modernizr.min.js"></script>
<script>
function getStudent(val) {
$.ajax({
type: "POST",
url: "get_student.php",
data:'classid='+val,
success: function(data){
$("#studentid").html(data);
}
});
$.ajax({
type: "POST",
url: "get_student.php",
data:'classid1='+val,
success: function(data){
$("#subject").html(data);
}
});
}
</script>
<script>
function getresult(val,clid)
{
var clid=$(".clid").val();
var val=$(".stid").val();;
var abh=clid+'$'+val;
//alert(abh);
$.ajax({
type: "POST",
url: "get_student.php",
data:'studclass='+abh,
success: function(data){
$("#reslt").html(data);
}
});
}
</script>
</head>
<body class="top-navbar-fixed">
<div class="main-wrapper">
<div class="main-page">
<div class="container-fluid">
<div class="row page-title-div">
<div class="col-md-6">
<h2 class="title">Declare Result</h2>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel">
<div class="panel-body">
<?php if($msg){?>
<div class="alert alert-success left-icon-alert" role="alert">
<strong>Well done!</strong><?php echo htmlentities($msg); ?>
</div><?php }
else if($error){?>
<div class="alert alert-danger left-icon-alert" role="alert">
<strong>Oh snap!</strong> <?php echo htmlentities($error); ?>
</div>
<?php } ?>
<form class="form-horizontal" method="post">
<div class="form-group">
<label for="default" class="col-sm-2 control-label">Class</label>
<div class="col-sm-10">
<select name="class" class="form-control clid" id="classid" onChange="getStudent(this.value);"
required="required">
<option value="">Select Class</option>
<?php $sql = "SELECT * from tblclasses";
$query = $dbh->prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<option value="<?php echo htmlentities($result->id); ?>"><?php echo htmlentities($result-
>ClassName); ?> Section-<?php echo htmlentities($result->Section); ?></option>
<?php }} ?>
</select>
</div>
</div>
<div class="form-group">
<label for="date" class="col-sm-2 control-label ">Student
Name</label>
<div class="col-sm-10">
<select name="studentid" class="form-control stid"
id="studentid" required="required" onChange="getresult(this.value);">
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
<div id="reslt">
</div>
</div>
</div>
<div class="form-group">
<label for="date" class="col-sm-2
control-label">Subjects</label>
<div class="col-sm-10">
<div id="subject">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" name="submit" id="submit"
class="btn btn-primary">Declare Result</button>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- /.col-md-12 -->
</div>
</div>
</div>
<!-- /.content-container -->
</div>
<!-- /.content-wrapper -->
</div>
<!-- /.main-wrapper -->
<script src="js/jquery/jquery-2.2.4.min.js"></script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<script src="js/pace/pace.min.js"></script>
<script src="js/lobipanel/lobipanel.min.js"></script>
<script src="js/iscroll/iscroll.js"></script>
<script src="js/prism/prism.js"></script>
<script src="js/select2/select2.min.js"></script>
<script src="js/main.js"></script>
<script>
$(function($) {
$(".js-states").select2();
$(".js-states-limit").select2({
maximumSelectionLength: 2
});
$(".js-states-hide").select2({
minimumResultsForSearch: Infinity
});
});
</script>
</body>
</html>
<?PHP } ?>
ADD NOTICE
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==""){
header("Location: index.php");
}else{
if(isset($_POST['submit']))
$ntitle=$_POST['noticetitle'];
$ndetails=$_POST['noticedetails'];
$query->bindParam(':ntitle',$ntitle,PDO::PARAM_STR);
$query->bindParam(':ndetails',$ndetails,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
}else {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="js/modernizr/modernizr.min.js"></script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
</style>
</head>
<body class="top-navbar-fixed">
<div class="main-wrapper">
<?php include('includes/topbar.php');?>
<div class="content-wrapper">
<div class="content-container">
<?php include('includes/leftbar.php');?>
<div class="main-page">
<div class="container-fluid">
<div class="col-md-6">
</div>
</div>
<div class="col-md-6">
<ul class="breadcrumb">
<li><a href="#">Notices</a></li>
</ul>
</div>
</div>
</div>
<section class="section">
<div class="container-fluid">
<div class="row">
<div class="panel">
<div class="panel-heading">
<div class="panel-title">
<h5>Add Notice</h5>
</div>
</div>
<div class="panel-body">
<form method="post">
<div class="form-group has-success">
<div class="">
</div>
</div>
<div class="">
</div>
</div>
<div class="">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
<script src="js/jquery/jquery-2.2.4.min.js"></script>
<script src="js/jquery-ui/jquery-ui.min.js"></script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<script src="js/pace/pace.min.js"></script>
<script src="js/lobipanel/lobipanel.min.js"></script>
<script src="js/iscroll/iscroll.js"></script>
<script src="js/prism/prism.js"></script>
<!-- ========== THEME JS ========== -->
<script src="js/main.js"></script>
<!-- ========== ADD custom.js FILE BELOW WITH YOUR CHANGES ==========
-->
</body>
</html>
<?php } ?>
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])==""){
header("Location: index.php");
}else{
if(isset($_POST['submit']))
$ntitle=$_POST['noticetitle'];
$ndetails=$_POST['noticedetails'];
$query = $dbh->prepare($sql);
$query->bindParam(':ntitle',$ntitle,PDO::PARAM_STR);
$query->bindParam(':ndetails',$ndetails,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
}else {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script src="js/modernizr/modernizr.min.js"></script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
</style>
</head>
<body class="top-navbar-fixed">
<div class="main-wrapper">
<?php include('includes/topbar.php');?>
<div class="content-wrapper">
<div class="content-container">
<?php include('includes/leftbar.php');?>
<ul class="breadcrumb">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
<script src="js/jquery/jquery-2.2.4.min.js"></script>
<script src="js/jquery-ui/jquery-ui.min.js"></script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<script src="js/pace/pace.min.js"></script>
<script src="js/lobipanel/lobipanel.min.js"></script>
<script src="js/iscroll/iscroll.js"></script>
<script src="js/prism/prism.js"></script>
<script src="js/main.js"></script>
<!-- ========== ADD custom.js FILE BELOW WITH YOUR CHANGES ==========
-->
</body>
</html>
<?php } ?>
CREATE SUBJECT
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])=="")
header("Location: index.php");
else{
if(isset($_POST['submit']))
$subjectname=$_POST['subjectname'];
$subjectcode=$_POST['subjectcode'];
$query->bindParam(':subjectname',$subjectname,PDO::PARAM_STR);
$query->bindParam(':subjectcode',$subjectcode,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
else
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="js/modernizr/modernizr.min.js"></script>
</head>
<body class="top-navbar-fixed">
<div class="main-wrapper">
<?php include('includes/topbar.php');?>
<div class="content-wrapper">
<div class="content-container">
<!-- ========== LEFT SIDEBAR ========== -->
<?php include('includes/leftbar.php');?>
<div class="main-page">
<div class="container-fluid">
<div class="col-md-6">
</div>
</div>
<div class="col-md-6">
<ul class="breadcrumb">
</ul>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="panel">
<div class="panel-heading">
<div class="panel-title">
<h5>Create Subject</h5>
</div>
</div>
<div class="panel-body">
<?php if($msg){?>
</div><?php }
else if($error){?>
</div>
<?php } ?>
<div class="form-group">
<div class="col-sm-10">
</div>
</div>
<div class="form-group">
<div class="col-sm-10">
</div>
</div>
<div class="form-group">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.content-wrapper -->
</div>
<script src="js/jquery/jquery-2.2.4.min.js"></script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<script src="js/pace/pace.min.js"></script>
<script src="js/lobipanel/lobipanel.min.js"></script>
<script src="js/iscroll/iscroll.js"></script>
<script src="js/prism/prism.js"></script>
<script src="js/select2/select2.min.js"></script>
<script src="js/main.js"></script>
<script>
$(function($) {
$(".js-states").select2();
$(".js-states-limit").select2({
maximumSelectionLength: 2
});
$(".js-states-hide").select2({
minimumResultsForSearch: Infinity
});
});
</script>
</body>
</html>
<?PHP } ?>
CREATE CLASS
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])=="")
header("Location: index.php");
else{
if(isset($_POST['submit']))
$classname=$_POST['classname'];
$classnamenumeric=$_POST['classnamenumeric'];
$section=$_POST['section'];
$sql="INSERT INTO tblclasses(ClassName,ClassNameNumeric,Section)
VALUES(:classname,:classnamenumeric,:section)";
$query = $dbh->prepare($sql);
$query->bindParam(':classname',$classname,PDO::PARAM_STR);
$query->bindParam(':classnamenumeric',$classnamenumeric,PDO::PARAM_STR);
$query->bindParam(':section',$section,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
else
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="js/modernizr/modernizr.min.js"></script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
</style>
</head>
<body class="top-navbar-fixed">
<div class="main-wrapper">
<?php include('includes/topbar.php');?>
<div class="content-wrapper">
<div class="content-container">
<!-- ========== LEFT SIDEBAR ========== -->
<?php include('includes/leftbar.php');?>
<div class="main-page">
<div class="container-fluid">
<div class="col-md-6">
</div>
</div>
<div class="col-md-6">
<ul class="breadcrumb">
<li><a href="#">Classes</a></li>
</div>
</div>
</div>
<section class="section">
<div class="container-fluid">
<div class="row">
<div class="panel">
<div class="panel-heading">
<div class="panel-title">
</div>
<?php if($msg){?>
</div><?php }
else if($error){?>
</div>
<?php } ?>
<div class="panel-body">
<form method="post">
<div class="">
</div>
<div class="">
</div>
</div>
<div class="">
</div>
</div>
<div class="">
<button type="submit" name="submit" class="btn btn-
success btn-labeled">Submit<span class="btn-label btn-label-right"><i class="fa
fa-check"></i></span></button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/jquery/jquery-2.2.4.min.js"></script>
<script src="js/jquery-ui/jquery-ui.min.js"></script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<script src="js/pace/pace.min.js"></script>
<script src="js/lobipanel/lobipanel.min.js"></script>
<script src="js/iscroll/iscroll.js"></script>
<!-- ========== PAGE JS FILES ========== -->
<script src="js/prism/prism.js"></script>
<script src="js/main.js"></script>
<!-- ========== ADD custom.js FILE BELOW WITH YOUR CHANGES ==========
-->
</body>
</html>
<?php } ?>
CHANGE PASSWORD
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['alogin'])=="")
header("Location: index.php");
else{
if(isset($_POST['submit']))
$password=md5($_POST['password']);
$newpassword=md5($_POST['newpassword']);
$username=$_SESSION['alogin'];
$query-> execute();
$chngpwd1 = $dbh->prepare($con);
$chngpwd1-> bindParam(':username', $username, PDO::PARAM_STR);
$chngpwd1->execute();
else {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="js/modernizr/modernizr.min.js"></script>
<script type="text/javascript">
function valid()
if(document.chngpwd.newpassword.value!= document.chngpwd.confirmpassword.value)
document.chngpwd.confirmpassword.focus();
return false;
return true;
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
</style>
</head>
<body class="top-navbar-fixed">
<div class="main-wrapper">
<?php include('includes/topbar.php');?>
<div class="content-wrapper">
<div class="content-container">
<?php include('includes/leftbar.php');?>
<div class="container-fluid">
<div class="col-md-6">
</div>
</div>
<div class="col-md-6">
<ul class="breadcrumb">
</ul>
</div>
</div>
<!-- /.row -->
</div>
<section class="section">
<div class="container-fluid">
<div class="row">
<div class="panel">
<div class="panel-heading">
<div class="panel-title">
</div>
</div>
<?php if($msg){?>
</div><?php }
else if($error){?>
</div>
<?php } ?>
<div class="panel-body">
<div class="">
</div>
</div>
<div class="">
</div>
</div>
<div class="">
</div>
</div>
<div class="">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
<script src="js/jquery/jquery-2.2.4.min.js"></script>
<script src="js/jquery-ui/jquery-ui.min.js"></script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<script src="js/pace/pace.min.js"></script>
<script src="js/lobipanel/lobipanel.min.js"></script>
<script src="js/iscroll/iscroll.js"></script>
<script src="js/prism/prism.js"></script>
<!-- ========== ADD custom.js FILE BELOW WITH YOUR CHANGES ==========
-->
</body>
</html>
<?php } ?>
RESULT
<?php
session_start();
error_reporting(0);
include('includes/config.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="js/modernizr/modernizr.min.js"></script>
</head>
<body>
<div class="main-wrapper">
<div class="content-wrapper">
<div class="content-container">
<div class="main-page">
<div class="container-fluid">
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="panel">
<div class="panel-heading">
<div class="panel-title">
<h3 align="center">Student Result Details</h3>
<hr />
<?php
$rollid=$_POST['rollid'];
$classid=$_POST['class'];
$_SESSION['rollid']=$rollid;
$_SESSION['classid']=$classid;
$qery = "SELECT
tblstudents.StudentName,tblstudents.RollId,tblstudents.RegDate,tblstudents.StudentId,tblstudents.
Status,tblclasses.ClassName,tblclasses.Section from tblstudents join tblclasses on
tblclasses.id=tblstudents.ClassId where tblstudents.RollId=:rollid and tblstudents.ClassId=:classid
";
$stmt = $dbh->prepare($qery);
$stmt->bindParam(':rollid',$rollid,PDO::PARAM_STR);
$stmt->bindParam(':classid',$classid,PDO::PARAM_STR);
$stmt->execute();
$resultss=$stmt->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($stmt->rowCount() > 0)
foreach($resultss as $row)
{ ?>
<p><b>Student Name :</b> <?php echo htmlentities($row->StudentName);?></p>
<?php }
?>
</div>
<thead>
</tr>
</thead>
<tbody>
<?php
$query->bindParam(':rollid',$rollid,PDO::PARAM_STR);
$query->bindParam(':classid',$classid,PDO::PARAM_STR);
$query-> execute();
$cnt=1;
if($countrow=$query->rowCount()>0)
{
foreach($results as $result){
?>
<tr>
</tr>
<?php
$totlcount+=$totalmarks;
$cnt++;}
?>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<?php }
?>
</div>
<?php
} else
{?>
strong>Oh snap!</strong>
<?php
?>
</div>
</tbody>
</table>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-6">
</div>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
<!-- /.main-wrapper -->
<script src="js/jquery/jquery-2.2.4.min.js"></script>
<script src="js/bootstrap/bootstrap.min.js"></script>
<script src="js/pace/pace.min.js"></script>
<script src="js/lobipanel/lobipanel.min.js"></script>
<script src="js/iscroll/iscroll.js"></script>
<script src="js/prism/prism.js"></script>
<script src="js/main.js"></script>
<script>
$(function($) {
});
function CallPrint(strid) {
var prtContent = document.getElementById("exampl");
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
</script>
</script>
<!-- ========== ADD custom.js FILE BELOW WITH YOUR CHANGES ==========
-->
</body>
</html>
LOGOUT
<?php
session_start();
$_SESSION = array();
if (ini_get("session.use_cookies")) {
$params = session_get_cookie_params();
$params["path"], $params["domain"],
$params["secure"], $params["httponly"]
);
unset($_SESSION['login']);
header("location:index.php");
?>