More Related Content Similar to Online Franchise Management System Similar to Online Franchise Management System (20) Online Franchise Management System2. www.globsynskills.com 2
Globsyn Skills, Globsyn Crystals,1st Floor,XI – 11 and 12, Block EP, Sector V, SaltLake, Kolkata – 700091
Online Franchise Management System
Debiparna Chatterjee
Dipankar Deb
Aritshom Dey
Mayukh Bal
3. www.globsynskills.com 3
GroupMembers:
DEBIPARNA CHATTERJEE, ADAMAS INSTITUTE OF
TECHNOLOGY,122390110014
DIPANKAR DEB, PAILANCOLLEGE OF MANAGEMENT
AND TECHNOLOGY,131560110019
ARITSHOM DEY,PAILAN COLLEGE OF MANAGEMENT
AND TECHNOLOGY,131560110010
MAYUKH BAL,TECHNO INDIA COLLEGE OF
TECHNOLOGY,121870110039
Table of Contents
Acknowledgement.........................................................................................................................4
Project Objective...........................................................................................................................8
Project Scope ................................................................................................................................9
Requirement Specification...........................................................................................................10
Database Design..........................................................................................................................11
Application Work Flow.................................................................................................................12
Screenshots.................................................................................................................................13
Future Scope of Improvements ....................................................................................................39
Code...........................................................................................................................................40
Certificate.................................................................................................................................155
4. www.globsynskills.com 4
Acknowledgement
I take thisopportunitytoexpressmyprofoundgratitude anddeepregardstomyfaculty Mr. Abhishek
Kunduforhisexemplaryguidance,monitoringandconstantencouragementthroughoutthe courseof
thisproject.The blessing,helpandguidance givenbyhim/hertime totime shall carry me a long way
inthe journeyof life onwhichIam aboutto embark.
I am obliged to my project team members for the valuable information provided by them in their
respective fields.Iamgrateful fortheircooperationduringthe periodof myassignment.
Debiparna Chatterjee
5. www.globsynskills.com 5
Acknowledgement
I take thisopportunitytoexpressmyprofoundgratitude anddeepregardstomyfacultyMr. Abhishek
Kunduforhisexemplaryguidance,monitoringandconstantencouragementthroughoutthe courseof
thisproject.The blessing,helpandguidance givenbyhim/hertime totime shall carry me a long way
inthe journeyof life onwhichIam aboutto embark.
I am obliged to my project team members for the valuable information provided by them in their
respective fields.Iamgrateful fortheircooperationduringthe periodof myassignment.
Dipankar Deb
6. www.globsynskills.com 6
Acknowledgement
I take thisopportunitytoexpressmyprofoundgratitude anddeepregardstomyfacultyMr. Abhishek
Kunduforhisexemplaryguidance,monitoringandconstantencouragementthroughoutthe courseof
thisproject.The blessing,helpandguidance givenbyhim/hertime totime shall carry me a long way
inthe journeyof life onwhichIam aboutto embark.
I am obliged to my project team members for the valuable information provided by them in their
respective fields.Iamgrateful fortheircooperationduringthe periodof myassignment.
Aritshom Dey
7. www.globsynskills.com 7
Acknowledgement
I take thisopportunityto expressmyprofoundgratitude anddeepregardstomyfacultyMr. Abhishek
Kunduforhisexemplaryguidance,monitoringandconstantencouragementthroughoutthe courseof
thisproject.The blessing,helpandguidance givenbyhim/hertime totime shall carry me a long way
inthe journeyof life onwhichIam aboutto embark.
I am obliged to my project team members for the valuable information provided by them in their
respective fields.Iamgrateful fortheircooperationduringthe periodof myassignment.
Mayukh Bal
8. www.globsynskills.com 8
Project Objective
Develop and implement a Web based Franchise ManagementSystem (FMS) for
any franchisor to help franchiseesand studentshave 24 x 7 access to their
franchises, enlist in the available courses.
The primary projectgoalsconsist of:
• Providing the companiesto manage all its franchisesas well as students
• Providing the companieswith a user-friendly way of managing the
business.
• An easy Login and Access procedure.
• Enable out-of-classinteraction amongststudents, the faculty and the
administration
9. www.globsynskills.com 9
Project Scope
The broad scope of the Online Franchise ManagementSystem (OFMS) project
includes:
• The system will be available on an online platform for 24x7 accessto the
students, the franchise and the administration
• The system will allow the students to login to their profilesand apply for
seats at differentfranchisesaswell as apply for a specific course in an
easy way
• The System will allow the Administrator to manage the revenue from the
admission fees, Administratorscan also manage the Paymentdetails of
Students.
• The Administrator/scan add franchiseeseasily by the click of a button.
• Administratorscan also manage the Coursesto be taughtduring the
training period.
• The Franchiseswill have the power to manage the seat capacities of the
specific centers.
10. www.globsynskills.com 1
0
Requirement Specification
• DomainDescription
• ProblemDefinition
• Functional Requirements
• Hardware /Software Requirements
o Hardware requirement
Clientside :NoSpecifichardware required
Serverside :64 bit system.
o Software Requirement
Client side : Chrome Latest versions, Firefox Latest versions( a few
featuresmightnotworkproperly)
Server side : Apache Web Server, an IDE to edit the website, Web
Browser.
12. www.globsynskills.com 1
2
Application WorkFlow
Home
o Login
AdminHome
AddNew Admin
AddNew Franchise
AddNew Course
Manage PaymentStatus
Manage Notices
Manage Students
Manage Franchises
Franchise Home
EditFranchise Details
CheckRevenue
View Students
Manage SeatCapacity
Studenthome
EditPersonal Info
Applyfora course
BookSeat and Slot
39. www.globsynskills.com 39
Future Scope of Improvements
The Website can be modified and made dynamic using Java Script.
Featureslike Online Chat portalfor studentscan be added.
Featureslike online assessment can be added too.
Specific Administratorscan be assigned to specific Franchisees.
40. www.globsynskills.com 40
Code
PHP files:
Aboutus.php:
<html>
<link rel="stylesheet" type="text/css" href="style.css">
<head><title>About us</title></head>
<body>
<div class="wrapper">
<a name="aboutus"></a>
<h1>About Us</h1>
<h2>A word from the CEO</h2>
<font color="#004080">
MADD Educational Centre, LLC's (MADD) mission is to be the company of choice to
deliver effective and efficient training, safety and corporate services. <br>MADD
recognizes that a highly trained, critical thinking workforce is in demand and
paramount to our economy and future. To meet this demand we have office<br>
locations in Mumbai and New Delhi, and will travel on site to fulfill client
needs.<br><br><br>
MADD believes that when an individual with drive and desire is presented an
opportunity in a professional environment - coupled with the highest quality<br>
training - they can become a skilled and valuable member of the workforce. EVERY
member of the MADD team shares the goal of providing the best possible
<br>products and services to our clients, which includes: supporting our students;
customer service; self-improvement and finding solutions.<br><br><br>
MADD's core philosophy and vision is based on our 5 Anchors of success; these
Anchors are stressed in everything we do:<br><br><br>
Integrity<br>
Professionalism<br>
Respect<br>
Consistency<br>
Will to Succeed<br>
MADD consistently strives for continuous improvement and constantly develops new
methods and technologies to address the changing needs of industry. <br><br><br>
41. www.globsynskills.com 41
I pledge that MADD will continue to put full faith and effort into every one of
our endeavors and that you as our client will view NIT as The Company of
Choice.<br><br><br>
Sincerely,<br><br>
Arit Dey JD, ASP<br>
President/CEO<br>
MADD Educational Centre, LLC<br>
</font>
<br><br><br><br><br><br>
<hr>
<a name="contact"></a>
<h1>Contact Us</h1>
<h2>Mumbai Office</h2>
<font color="#004080">
1740 N. Terrilou Ct.<br>
Mumbai, AK 99645<br><br>
Phone: 1-888-367-6482 or (907) 357-6400<br>
Fax: (907) 357-6430<br><br>
Email: info@maddmumbai.com<br><br>
Hours: Monday - Friday 7:30 a.m. - 5:00 p.m.<br><br>
</font>
<h2>New Delhi</h2>
<font color="#004080">
3700 Centerpoint Dr<br>
Suite 102<br>
New Delhi, AK 99503<br>
<br>
Phone: (907) 743-7700<br>
Fax: (907) 743-7721<br>
<br>
Email: ancinfo@madddelhi.com<br><br>
42. www.globsynskills.com 42
Hours: Monday - Friday 8:00 a.m. - 5:00 p.m.<br><br>
<br>
Weekend training courses are available upon request.<br>
</font>
<a href="index.php">HOME</a>
</div>
</body>
</html>
aboutusadmin.php:
<html>
<link rel="stylesheet" type="text/css" href="style.css">
<head><title>About us</title></head>
<body>
<div class="wrapper">
<a name="aboutus"></a>
<h1>About Us</h1>
<h2>A word from the CEO</h2>
<font color="#004080">
MADD Educational Centre, LLC's (MADD) mission is to be the company of choice to
deliver effective and efficient training, safety and corporate services. <br>MADD
recognizes that a highly trained, critical thinking workforce is in demand and
paramount to our economy and future. To meet this demand we have office<br>
locations in Mumbai and New Delhi, and will travel on site to fulfill client
needs.<br><br><br>
MADD believes that when an individual with drive and desire is presented an
opportunity in a professional environment - coupled with the highest quality<br>
training - they can become a skilled and valuable member of the workforce. EVERY
member of the MADD team shares the goal of providing the best possible
<br>products and services to our clients, which includes: supporting our students;
customer service; self-improvement and finding solutions.<br><br><br>
43. www.globsynskills.com 43
MADD's core philosophy and vision is based on our 5 Anchors of success; these
Anchors are stressed in everything we do:<br><br><br>
Integrity<br>
Professionalism<br>
Respect<br>
Consistency<br>
Will to Succeed<br>
MADD consistently strives for continuous improvement and constantly develops new
methods and technologies to address the changing needs of industry. <br><br><br>
I pledge that MADD will continue to put full faith and effort into every one of
our endeavors and that you as our client will view NIT as The Company of
Choice.<br><br><br>
Sincerely,<br><br>
Arit Dey JD, ASP<br>
President/CEO<br>
MADD Educational Centre, LLC<br>
</font>
<br><br><br><br><br><br>
<hr>
<a name="contact"></a>
<h1>Contact Us</h1>
<h2>Mumbai Office</h2>
<font color="#004080">
1740 N. Terrilou Ct.<br>
Mumbai, AK 99645<br><br>
Phone: 1-888-367-6482 or (907) 357-6400<br>
Fax: (907) 357-6430<br><br>
Email: info@maddmumbai.com<br><br>
Hours: Monday - Friday 7:30 a.m. - 5:00 p.m.<br><br>
</font>
44. www.globsynskills.com 44
<h2>New Delhi</h2>
<font color="#004080">
3700 Centerpoint Dr<br>
Suite 102<br>
New Delhi, AK 99503<br>
<br>
Phone: (907) 743-7700<br>
Fax: (907) 743-7721<br>
<br>
Email: ancinfo@madddelhi.com<br><br>
Hours: Monday - Friday 8:00 a.m. - 5:00 p.m.<br><br>
<br>
Weekend training courses are available upon request.<br>
</font>
<a href="index.php">HOME</a>
</div>
</body>
</html>
Aboutusfranchise.php:
<html>
<link rel="stylesheet" type="text/css" href="style.css">
<head><title>About us</title></head>
<body>
<div class="wrapper">
<a name="aboutus"></a>
<h1>About Us</h1>
<h2>A word from the CEO</h2>
<font color="#004080">
45. www.globsynskills.com 45
MADD Educational Centre, LLC's (MADD) mission is to be the company of choice to
deliver effective and efficient training, safety and corporate services. <br>MADD
recognizes that a highly trained, critical thinking workforce is in demand and
paramount to our economy and future. To meet this demand we have office<br>
locations in Mumbai and New Delhi, and will travel on site to fulfill client
needs.<br><br><br>
MADD believes that when an individual with drive and desire is presented an
opportunity in a professional environment - coupled with the highest quality<br>
training - they can become a skilled and valuable member of the workforce. EVERY
member of the MADD team shares the goal of providing the best possible
<br>products and services to our clients, which includes: supporting our students;
customer service; self-improvement and finding solutions.<br><br><br>
MADD's core philosophy and vision is based on our 5 Anchors of success; these
Anchors are stressed in everything we do:<br><br><br>
Integrity<br>
Professionalism<br>
Respect<br>
Consistency<br>
Will to Succeed<br>
MADD consistently strives for continuous improvement and constantly develops new
methods and technologies to address the changing needs of industry. <br><br><br>
I pledge that MADD will continue to put full faith and effort into every one of
our endeavors and that you as our client will view NIT as The Company of
Choice.<br><br><br>
Sincerely,<br><br>
Arit Dey JD, ASP<br>
President/CEO<br>
MADD Educational Centre, LLC<br>
</font>
<br><br><br><br><br><br>
<hr>
<a name="contact"></a>
<h1>Contact Us</h1>
<h2>Mumbai Office</h2>
46. www.globsynskills.com 46
<font color="#004080">
1740 N. Terrilou Ct.<br>
Mumbai, AK 99645<br><br>
Phone: 1-888-367-6482 or (907) 357-6400<br>
Fax: (907) 357-6430<br><br>
Email: info@maddmumbai.com<br><br>
Hours: Monday - Friday 7:30 a.m. - 5:00 p.m.<br><br>
</font>
<h2>New Delhi</h2>
<font color="#004080">
3700 Centerpoint Dr<br>
Suite 102<br>
New Delhi, AK 99503<br>
<br>
Phone: (907) 743-7700<br>
Fax: (907) 743-7721<br>
<br>
Email: ancinfo@madddelhi.com<br><br>
Hours: Monday - Friday 8:00 a.m. - 5:00 p.m.<br><br>
<br>
Weekend training courses are available upon request.<br>
</font><br> <br>
<a href="franchisehome.php">Back</a>
</div>
</body>
</html>
47. www.globsynskills.com 47
Aboutusstudent:
<html>
<link rel="stylesheet" type="text/css" href="style.css">
<head><title>About us</title></head>
<body>
<div class="wrapper">
<a name="aboutus"></a>
<h1>About Us</h1>
<h2>A word from the CEO</h2>
<font color="#004080">
MADD Educational Centre, LLC's (MADD) mission is to be the company of choice to
deliver effective and efficient training, safety and corporate services. <br>MADD
recognizes that a highly trained, critical thinking workforce is in demand and
paramount to our economy and future. To meet this demand we have office<br>
locations in Mumbai and New Delhi, and will travel on site to fulfill client
needs.<br><br><br>
MADD believes that when an individual with drive and desire is presented an
opportunity in a professional environment - coupled with the highest quality<br>
training - they can become a skilled and valuable member of the workforce. EVERY
member of the MADD team shares the goal of providing the best possible
<br>products and services to our clients, which includes: supporting our students;
customer service; self-improvement and finding solutions.<br><br><br>
MADD's core philosophy and vision is based on our 5 Anchors of success; these
Anchors are stressed in everything we do:<br><br><br>
Integrity<br>
Professionalism<br>
Respect<br>
Consistency<br>
Will to Succeed<br>
MADD consistently strives for continuous improvement and constantly develops new
methods and technologies to address the changing needs of industry. <br><br><br>
I pledge that MADD will continue to put full faith and effort into every one of
our endeavors and that you as our client will view NIT as The Company of
Choice.<br><br><br>
48. www.globsynskills.com 48
Sincerely,<br><br>
Arit Dey JD, ASP<br>
President/CEO<br>
MADD Educational Centre, LLC<br>
</font>
<br><br><br><br><br><br>
<hr>
<a name="contact"></a>
<h1>Contact Us</h1>
<h2>Mumbai Office</h2>
<font color="#004080">
1740 N. Terrilou Ct.<br>
Mumbai, AK 99645<br><br>
Phone: 1-888-367-6482 or (907) 357-6400<br>
Fax: (907) 357-6430<br><br>
Email: info@maddmumbai.com<br><br>
Hours: Monday - Friday 7:30 a.m. - 5:00 p.m.<br><br>
</font>
<h2>New Delhi</h2>
<font color="#004080">
3700 Centerpoint Dr<br>
Suite 102<br>
New Delhi, AK 99503<br>
<br>
Phone: (907) 743-7700<br>
Fax: (907) 743-7721<br>
<br>
Email: ancinfo@madddelhi.com<br><br>
Hours: Monday - Friday 8:00 a.m. - 5:00 p.m.<br><br>
<br>
Weekend training courses are available upon request.<br>
49. www.globsynskills.com 49
</font><br> <br>
<a href="studenthome.php">Back</a>
</div>
</body>
</html>
Addnewadmin:
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="admin"))
{
header('Location:error.php');
}
?>
<html>
<link rel="stylesheet" type="text/css" href="adminstyle.css">
<head>
<title> Add Admin </title>
</head>
<div class="wrapper" >
<body>
<h1> Add New Administrator </h1>
<form action="" method="POST">
<table align="center" width="700" height="500">
<tr>
<td>
50. www.globsynskills.com 50
<tr>
<td align="center">First name:</td> <td
align="center"><input type="text" name="fname"/></td>
</tr>
<br/>
<tr>
<td align="center">Last name:</td><td
align="center"> <input type= "text" name="lname" /></td>
</tr>
<tr>
<td align="center">Date Of Birth:</td> <td
align="center"><input type="date" name="dt" /></td>
</tr>
<tr>
<td align="center">Gender: </td>
<td align="center"> Male:<input
type="radio" name="gender" value="M">Female: <input type="radio" name="gender"
value="F"></td>
</tr>
<tr>
<td align="center">Address: </td> <td
align="center"><textarea name="address" ></textarea></td>
</tr>
<tr>
<td align="center">City: </td> <td
align="center"><input type="text" name="city" /></td>
</tr>
<tr>
<td align="center">State: </td> <td
align="center"><input type="text" name="state" /></td>
</tr>
51. www.globsynskills.com 51
<tr>
<td align="center">Pin-code: </td> <td
align="center"><input type="text" name="pin" /></td>
</tr>
<tr>
<td align="center">Country: </td> <td
align="center"><input type="text" name="country" /></td>
</tr>
<tr>
<td align="center">Contact-no: </td> <td
align="center"><input type="text" name="phone" /></td>
</tr>
<tr>
<td align="center">Email: </td> <td
align="center"><input type="email" name="email" /></td>
</tr>
</td>
</tr>
</table>
<br/>
<center> <input type="submit" name="submitbtn" value="submit"/> </center>
52. www.globsynskills.com 52
</form>
</div>
<?php
if(isset($_REQUEST['submitbtn']))
{
$firstname=$_REQUEST['fname'];
$lastname=$_REQUEST['lname'];
$dateofbirth=$_REQUEST['dt'];
$gender=$_REQUEST['gender'];
$address=$_REQUEST['address'];
$city=$_REQUEST['city'];
$state=$_REQUEST['state'];
$pincode=$_REQUEST['pin'];
$country=$_REQUEST['country'];
$phone=$_REQUEST['phone'];
$email=$_REQUEST['email'];
$sql="insert into admin_details
values('','$firstname','$lastname','$dateofbirth','$gender','$address','$city','$s
tate','$pincode','$country','$phone','$email');";
mysql_query($sql) or die(mysql_error());
$sql3="select admin_id from admin_details where admin_fname='$fname'";
$res=mysql_fetch_array(mysql_query($sql3));
$adminid=$res[0];
$sql2="insert into loginasadmin values('$adminid','$email','12345')";
$return2=mysql_query($sql2);
if($return1==true && $return2==true)
{
echo "Added Successfully";
echo "Your Admin Id is $studentid. Username is your email and
password is '12345'. Please change the details on next login.";
}
}
?>
53. www.globsynskills.com 53
<div class="footer" >
<a href="adminhome.php">Back</a>
</div>
</body>
</html>
Addnewcourse:
<?php
ob_start();
require 'dbconn.php';
if(!$_SESSION['type']=="admin")
{
header('Location:error.php');
}
?>
<html>
<head>
<title> COURSE ADDITION </title>
</head>
<link rel="stylesheet" type="text/css" href="adminstyle.css">
<div class="wrapper" width="150">
<body>
<h1> WELCOME TO NEW COURSE REGISTRATION </h1>
<form action="" method="POST">
<table align="center" width="700" height="300">
<tr>
<td align="center">
<br/>
<tr>
<td align="center">Course_Name:</td> <td
align="center"><input type="text" name="name"/></td>
</tr>
<br/>
54. www.globsynskills.com 54
<tr>
<td align="center">Course Fees:</td><td
align="center"><input type="text" name="fees"/></td>
</tr>
<tr>
<td align="center">Information: </td> <td
align="center"><input type="text" name="info" /></td>
</tr>
<tr>
<td align="center">Course-Timeslot 1: </td> <td
align="center"><input type="text" name="t1" /></td>
</tr>
<tr>
<td align="center">Course-Timeslot 2: </td> <td
align="center"><input type="text" name="t2" /></td>
</tr>
<tr>
<td align="center">Course-Timeslot3: </td> <td
align="center"><input type="text" name="t3" /></td>
</tr>
</td>
</tr>
</table>
<br/>
55. www.globsynskills.com 55
<center> <input type="submit" name="submitbtn" value="submit"/>
</center>
</form>
</div>
<div class="footer" >
<a href="adminhome.php">Back</a>
</div>
</body>
</html>
<?php
if(isset($_REQUEST['submitbtn']))
{
echo $name=$_REQUEST['name'];
$fees=$_REQUEST['fees'];
$info=$_REQUEST['info'];
$time1=$_REQUEST['t1'];
$time2=$_REQUEST['t2'];
$time3=$_REQUEST['t3'];
$sql="INSERT into course_details (`course_name`, `course_fees`,
`course_info`, `course_timeslot1`, `course_timeslot2`, `course_timeslot3`) VALUES
('$name', '$fees', '$info', '$time1', '$time2', '$time3')";
mysql_query($sql) or die(mysql_error());
}
?>
Addnewfranchise.php:
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="admin"))
{
header('Location:error.php');
}
56. www.globsynskills.com 56
?>
<html>
<link rel="stylesheet" type="text/css" href="adminstyle.css">
<div class="wrapper" >
<head>
<title>Add New Franchise</title>
</head>
<body>
<h1> ADD NEW FRANCHISE </h1>
<form action="" method="POST">
<table align="center" width="500" height="530" >
<tr>
<td align="center">Franchise_Name:</td>
<td><input type="text" name="name"/></td>
</tr>
<tr>
<td align="center">Address: </td> <td><textarea
name="address" ></textarea></td>
</tr>
<tr>
<td align="center">City: </td> <td><input
type="text" name="city" /></td>
</tr>
<tr>
<td align="center">State: </td> <td><input
type="text" name="state" /></td>
</tr>
<tr>
<td align="center">Pin-code: </td> <td><input
type="text" name="pin" /></td>
</tr>
57. www.globsynskills.com 57
<tr>
<td align="center">Contact-no: </td> <td><input
type="text" name="phone" /></td>
</tr>
<tr>
<td align="center">Email: </td> <td><input
type="email" name="email" /></td>
</tr>
<tr>
<td align="center">Franchise_Head:</td>
<td><input type="text" name="head"/></td>
</tr>
</table>
<br/>
<?php
if(isset($_REQUEST['submitbtn']))
{
$name=$_REQUEST['name'];
$address=$_REQUEST['address'];
$city=$_REQUEST['city'];
$state=$_REQUEST['state'];
$pincode=$_REQUEST['pin'];
$phone=$_REQUEST['phone'];
$email=$_REQUEST['email'];
$head=$_REQUEST['head'];
$sql="INSERT into franchise_details (`franchise_name`,
`franchise_address`, `franchise_city`, `franchise_state`, `franchise_pincode`,
`franchise_phone`, `franchise_email`, `franchise_head`) VALUES ('$name',
'$address', '$city', '$state', '$pincode', '$phone', '$email', '$head')";
$return1=mysql_query($sql) or die(mysql_error());
$sql1="select franchise_id from franchise_details where
franchise_name='$name'";
$res=mysql_fetch_array(mysql_query($sql1));
58. www.globsynskills.com 58
$franid=$res[0];
$sql2="insert into loginasfranchise
values('$franid','$email','12345')";
$return2=mysql_query($sql2);
if($return1==true && $return2==true)
{
echo "Added Successfully";
echo "Your Username is your email and password is '12345'.
Please change the details on next login.";
}
else
header('Location:error.php');
}
?>
<center><input type="submit" name="submitbtn"></center>
</div>
</form>
</body>
<div class="footer" >
<a href="adminhome.php">Back</a>
</div>
</html>
Adminhome.php
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="admin"))
59. www.globsynskills.com 59
{
header('Location:error.php');
}
$adminid=$_SESSION['id'];
$sql="select admin_fname from admin_details where admin_id='$adminid'";
$res=mysql_fetch_array(mysql_query($sql));
?>
<html>
<body>
<link rel="stylesheet" type="text/css" href="adminhome.css">
<div class="wrapper">
<div class="header">
<div class="insideheader"><img alt="LOGO" src="LOGO-MADD-
DEFINITIVO1.jpg" width="250" height="80"></div>
<div class="insideheader2">
<center><strong>
<a href="logout.php">Logout</a>  ||  <a
href="adminpasswordchange.php">Change Password</a><br><br>
</strong>
</center>
</div>
</div>
<div class="leftpanel">
<div class="insideleft">
<center><h2>Notice Board</h2></center>
</div>
<font size="5"><marquee direction="up" height="400" marquee-
speed="fast">
<?php
$sql="select notice from notice_board";
$result=mysql_query($sql);
while($res=mysql_fetch_array($result))
echo $res[0]."<br>";
?></marquee></font>
</div>
60. www.globsynskills.com 60
<div class="content">
<h1 align="center">
Welcome, Administrator
</h1><br><br><br>
</div>
<div class="rightpanel">
<?php $sql1="select admin_fname,admin_lname from admin_details
where admin_id='$adminid'";
$res1=mysql_fetch_array(mysql_query($sql1));
echo "<center><h2>Admin: ".$res1[0]." ".$res1[1]."</center>";
?>
<div class="insideright">
<ul>
<li>
<a href="viewadmindetails.php">View Your Personal Details</a></li><br>
<li> <a href="addnewadmin.php">Add
New Administrator</a></li><br>
<li> <a
href="revenueshare.php">Manage revenue</a></li><br>
<li> <a
href="addnewfranchise.php">Add new Franchise</a></li><br>
<li> <a
href="editpaymentstatus.php">Edit Payment status</a></li><br>
<li> <a
href="adminrevenue.php">Administrator revenue</a></li><br>
<li> <a href="addnewcourse.php">Add
Course</a></li><br>
61. www.globsynskills.com 61
<li> <a
href="viewcoursesadmin.php">All Courses</a></li><br>
<li>
<a href="alladmindetails.php">All Administrator Details</a></li><br>
<li> <a
href="managenotice.php">Manage Notices</a></li><br>
<li> <a
href="franchisedetails.php">View Franchise Details</a></li><br>
</ul>
</div>
</div>
<div class="footer">
<br/><br/><br/><div class="insidefooter">
<center><b><font size="4" color="#000040"><a
href="aboutusadmin.php #aboutus">About Us</a>  || <a
href="aboutusadmin.php #contact">Contact Us</a></b></center></font>
</div>
</div>
</div>
</body>
</html>
Adminpasswordchange.php
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="admin"))
62. www.globsynskills.com 62
{
header('Location:error.php');
}
?>
<html>
<link rel="stylesheet" type="text/css" href="adminstyle.css">
<div class="wrapper">
<head>
<title>
Change Password
</title>
</head>
<body>
<form action="" method="post">
<h1>Change Your Password</h1>
<center><table width="800" height="250"><tr><td
align="center">Username:</td><td><input type="text" name="username"></td></tr>
<tr><td align="center">Password:</td><td><input type="password" name="oldpwd"
required></td></tr>
<tr><td align="center">New Password:</td><td><input type="password" name="newpwd"
required></td></tr>
<tr><td align="center">Re-Enter New Password:</td><td><input type="password"
name="renewpwd" required></td></tr>
</table></center>
<br/>
<h2>
<center><input type="submit" name="submitbtn"></center></h2>
<br/>
</form>
<?php
if(isset($_REQUEST['submitbtn']))
{
$adminid=$_SESSION['id'];
$sql="select admin_username,admin_password from loginasadmin where
admin_id='$adminid'";
$result=mysql_query($sql) or die(mysql_error());
$res=mysql_fetch_array($result);
64. www.globsynskills.com 64
}
?>
</div>
<div class="footer">
<a href="adminhome.php">Back</a>
</div>
</body>
</html>
Adminrevenue.php
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="admin"))
{
header('Location:error.php');
}
?>
<html>
<body>
<link rel="stylesheet" type="text/css" href="adminstyle.css">
<div class="wrapper" >
<head>
<h1>View Your Revenue</h1>
</head>
<?php
$revenue=0;
$sql="select * from fees_details";
$result=mysql_query($sql);
echo "<table align='center' width='1100'>";
echo "<tr>";
65. www.globsynskills.com 65
echo "<th>Student_id</th><th>Franchise Id</th><th>Total Amount</th><th>Share of
Admin</th><th>Share of Franchise</th><th>Payment Status</th>" ;
echo "</tr>";
while($res=mysql_fetch_array($result))
{
echo "<tr>";
for($i=0;$i<6;$i++)
{
echo "<td>";
echo $res[$i];
echo "</td>";
}
if($res[5]=="Paid")
{
$revenue=$revenue+$res[3];
}
}
echo "</table>";
echo "<h2>Your total Collection is Rs.".$revenue."</h2>";
?>
</div>
<div class="footer" >
<a href="adminhome.php">Back</a>
</div>
</body>
</html>
Alladmindetails.php
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="admin"))
{
header('Location:error.php');
66. www.globsynskills.com 66
}
?><html>
<link rel="stylesheet" type="text/css" href="adminstyle.css">
<div class="wrapper">
<font>
<head>
<title> All Administrators Details </title>
</head>
<body>
<h1> Other Administrator Details </h1>
<br/>
<?php
$sql= "select * from admin_details;";
$result=mysql_query($sql) or die(mysql_error());
echo "<table align='center' width='700' height='300' >";
echo "<th>AdminId</th> <th>Admin FirstName</th><th> Admin Lastname</th><th>Date Of
Birth</th><th>Gender</th><th>Address</th><th>City</th><th>State</th ><th>Pin-
code</th><th>Country</th><th>phone</th><th>Email</th>";
while($res=mysql_fetch_array($result))
{
echo "<tr>";
for($i=0;$i<13;$i++){
echo "<td>";
echo $res[$i]." ";
echo "</td>";
}
echo "</tr>";
}
echo "</table>";
?>
</div>
</font> <div class="footer" >
<a href="adminhome.php">Back</a>
</div>
67. www.globsynskills.com 67
</body>
</html>
Choosefranchise.php
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="student"))
{
header('Location:error.php');
}
?>
<html>
<link rel="stylesheet" type="text/css" href="studentstyle.css">
<div class="wrapper">
<h1>
Please Choose Franchise
</h1>
<body>
<?php
$studid=$_SESSION['id'];
$coursefetchsql="select course_id from student_details where
student_id='$studid'";
$fetchresults=mysql_query($coursefetchsql)or die(mysql_error());
$courseresult=mysql_fetch_array($fetchresults);
$cid=$courseresult[0];
$sql="select franchise_id from student_details where
student_id='$studid'";
$result=mysql_query($sql);
$res=mysql_fetch_array($result);
if($res[0]==0 && !isset($_REQUEST['submitBtn1']))
68. www.globsynskills.com 68
{
$newsql="select
course_details.course_name,franchise_details.franchise_id,franchise_details.franch
ise_name,franchise_details.franchise_address,
franchise_details.franchise_city,franchise_details.franchise_state,franchis
e_details.franchise_pincode,
franchise_details.franchise_phone,franchise_details.franchise_email,
franchise_details.franchise_head,franchise_capacity.Slot1_available,franchi
se_capacity.Slot2_available,
franchise_capacity.Slot3_available from
course_details,franchise_details,franchise_capacity
where
course_details.course_id=franchise_capacity.course_id &&
franchise_details.franchise_id=franchise_capacity.franchise_id &&
course_details.course_id='".$cid."'";
echo "<form action='' method='get'>";
echo "<table align='center' width='600' height='490'>";
echo "<tr>";
echo "<tr><td>Course:</td></tr><tr><td>Franchise
ID:</td></tr><tr><td>Franchise
Name</td></tr><tr><td>Address</td></tr><tr><td>City</td></tr><tr><td>State</td></t
r>
<tr><td>Pincode</td></tr><tr><td>Phone</td></tr><tr><td>Email</td></tr><tr>
<td>Head</td></tr>
<tr><td>9am-12pm</td><td>12.30pm-3.30pm</td><td>4pm-
7pm</td></tr>";
69. www.globsynskills.com 69
echo "</tr>";
$results=mysql_query($newsql);
while($rws=mysql_fetch_array($results))
{
echo "<tr>";
for($i=0;$i<13;$i++)
{
echo "<td>".$rws[$i];
if($i==10||$i==11||$i==12)
echo "<input type='radio' name='selected'
value='".$rws[1]."-".$i."'/>";
echo "</td>";
}
echo "</tr>";
}
echo "</table>";
echo "<input type='hidden' name='id' value='$franchiseid'>";
echo "<input type='hidden' name='cid' value='$cid'>";
echo "<input type='hidden' name='sid' value='$studid'>";
echo "<br/>";
echo "<center><input type='submit' name='submitBtn1'
value='Submit'/></center>";
echo "</form>";
}
else
{
echo "<h1>Your Allocated Franchise Details are:</h1>";
echo "<table align='center' width='500' height='100'>";
echo "<tr>";
echo "<th>Slot 1</th><th>Slot 2</th><th>Slot 3</th>";
echo "</tr>";
echo "<tr>";
70. www.globsynskills.com 70
echo "<td align='center'>9am-12pm</td><td
align='center'>12.30pm-3.30pm</td><td align='center'>4pm-7pm</td>";
echo "</tr>";
echo"</table>";
$franid=$res[0];
$elsesql="select
franchise_details.franchise_id,franchise_details.franchise_name,franchise_details.
franchise_address,
franchise_details.franchise_city,franchise_details.franchise_state,franchis
e_details.franchise_pincode,
franchise_details.franchise_phone,franchise_details.franchise_email,
franchise_details.franchise_head,student_details.slot_number from
franchise_details,student_details where
franchise_details.franchise_id=student_details.franchise_id&&
franchise_details.franchise_id=".$franid;
$elseresult=mysql_query($elsesql);
$elseres=mysql_fetch_array($elseresult);
echo "<table align='center' width='800'>";
echo "<tr>";
echo "<th>Franchise ID</th><th>Franchise
Name</th><th>Address</th><th>City</th><th>State</th><th>Pincode</th><th>Phone</th>
<th>Email</th><th>Franchise admin</th><th>Slot No</th>";
echo "</tr>";
echo "<tr>";
for($i=0;$i<13;$i++)
{
echo "<td>".$elseres[$i];
echo "</td>";
}
echo "</tr>";
71. www.globsynskills.com 71
echo "</table>";
}
if(isset($_REQUEST['submitBtn1']))
{
//check out explore();
$selected=$_REQUEST['selected'];
//$franchiseid=($selected/100);
//2-------------------$s=($selected%100);
$fetched=explode("-",$selected);
$franchiseid=$fetched[0];
$s=$fetched[1];
echo $s."<br>";
if($s==10)
{
echo $franchiseid."<br>";
echo $cid."<br>";
$sql1="select Slot1_available from franchise_capacity where
franchise_id='".$franchiseid."' && course_id='".$cid."'";
$result1=mysql_query($sql1);
$res1=mysql_fetch_array($result1);
$available=$res1[0];
if($available==0)
echo "Seat Not Available, Choose Another!!!";
else
{
$newavail=$available-1;
$sql2="update franchise_capacity set Slot1_available='".$newavail."'
where franchise_id='".$franchiseid."'&& course_id='".$cid."'";
mysql_query($sql2);
$sql3="update student_details set
franchise_id='".$franchiseid."',slot_number='1' where student_id='".$studid."'";
mysql_query($sql3);
72. www.globsynskills.com 72
header('Location:choosefranchise.php');
}
}
else if($s==11)
{
echo $franchiseid;
echo $cid;
$sql1="select Slot2_available from franchise_capacity where
franchise_id='".$franchiseid."' && course_id='".$cid."'";
$result1=mysql_query($sql1);
$res1=mysql_fetch_array($result1);
$available=$res1[0];
if($available==0)
echo "Seat Not Available, Choose Another!!!";
else
{
$newavail=$available-1;
$sql2="update franchise_capacity set Slot2_available='".$newavail."'
where franchise_id='".$franchiseid."'";
mysql_query($sql2);
$sql3="update student_details set
franchise_id='".$franchiseid."',slot_number='2' where student_id='".$studid."'&&
course_id='".$cid."'";
mysql_query($sql3);
header('Location:choosefranchise.php');
}
}
else if($s==12)
{
echo $franchiseid."<br>";
echo $cid."<br>";
$sql1="select Slot3_available from franchise_capacity where
franchise_id='".$franchiseid."' && course_id='".$cid."'";
$result1=mysql_query($sql1);
$res1=mysql_fetch_array($result1);
$available=$res1[0];
73. www.globsynskills.com 73
if($available==0)
echo "Seat Not Available, Choose Another!!!";
else
{
$newavail=$available-1;
$sql2="update franchise_capacity set
Slot3_available='".$newavail."' where franchise_id='".$franchiseid."'&&
course_id='".$cid."'";
mysql_query($sql2);
$sql3="update student_details set
franchise_id='".$franchiseid."',slot_number='3' where student_id='".$studid."'";
mysql_query($sql3);
header('Location:choosefranchise.php');
}
}
}
?>
</div>
<div class="footer">
<a href="studenthome.php">Back</a>
</div>
</body>
</html>
dbconn.php
<?php
ob_start();
session_start();
$dbHost="localhost";
$dbName="franchisemanagementsystem";
$dbPassword="";
$dbUsername="root";
mysql_connect($dbHost,$dbUsername,$dbPassword) or die(mysql_error());
74. www.globsynskills.com 74
mysql_select_db($dbName) or die(mysql_error());
?>
Editadmindetails.php:
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="admin"))
{
header('Location:error.php');
}
?>
<?php
$userid=$_SESSION['id'];
if(isset($_REQUEST['submitbtn']))
{
$fname=$_REQUEST['fname'];
$lname=$_REQUEST['lname'];
$dateofbirth=$_REQUEST['dt'];
$gender=$_REQUEST['gender'];
$address=$_REQUEST['address'];
$city=$_REQUEST['city'];
$state=$_REQUEST['state'];
$pincode=$_REQUEST['pin'];
$country=$_REQUEST['country'];
$phone=$_REQUEST['phone'];
$email=$_REQUEST['email'];
$sql="Update admin_details set
admin_fname='".$fname."',admin_lname='".$lname."',
admin_dob='".$dateofbirth."',
admin_gender='".$gender."',admin_address='".$address."',
76. www.globsynskills.com 76
</tr>
<tr>
<td align="center">Date Of Birth:</td>
<td><input type="date" name="dt" value="<?php echo $res[3];?>"/></td>
</tr>
<tr>
<td align="center">Gender:
<td> Male:<input
type="radio" name="gender" <?php if($res[4]=="M")
{
echo "value=".$res[4];
echo " checked"; }
?>/>
Female: <input type="radio"
name="gender" <?php if($res[4]=="F")
{
echo "value=".$res[4];
echo " checked";} ?>></td>
</tr>
<tr>
<td align="center">Address: </td> <td><textarea
name="address" ><?php echo $res[5];?></textarea></td>
</tr>
<tr>
<td align="center">City: </td> <td><input
type="text" name="city" value="<?php echo $res[6];?>"/></td>
</tr>
<tr>
77. www.globsynskills.com 77
<td align="center">State: </td> <td><input
type="text" name="state" value="<?php echo $res[7];?>" /></td>
</tr>
<tr>
<td align="center">Pin-code: </td> <td><input
type="text" name="pin" value="<?php echo $res[8];?>"/></td>
</tr>
<tr>
<td align="center">Country: </td> <td><input
type="text" name="country" value="<?php echo $res[9];?>"/></td>
</tr>
<tr>
<td align="center">Contact-no: </td> <td><input
type="text" name="phone" value="<?php echo $res[10];?>"/></td>
</tr>
<tr>
<td align="center">Email: </td> <td><input
type="email" name="email" value="<?php echo $res[11]; ?>"/></td>
</tr>
</td>
</tr>
</table>
78. www.globsynskills.com 78
<br/>
<center> <input type="hidden" name="id" value="<?php echo $userid;?>"><td
align="center"> <input type="submit" name="submitbtn" value="submit"/></center>
</form>
</div>
<div class="footer" >
<a href="adminhome.php">Back</a>
</div>
</body>
</html>
Editcourses:
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="admin"))
{
header('Location:error.php');
}
?>
<?php
$userid=$_REQUEST['id'];
echo $userid;
if(isset($_REQUEST['submitbtn']))
{
$name=$_REQUEST['name'];
$fees=$_REQUEST['fees'];
$info=$_REQUEST['info'];
$time1=$_REQUEST['slot1'];
$time2=$_REQUEST['slot2'];
$time3=$_REQUEST['slot3'];
79. www.globsynskills.com 79
$sql="Update course_details set
course_name='".$name."',course_fees='".$fees."',course_info='".$info."',
course_timeslot1='".$time1."',course_timeslot2='".$time2."',course_timeslot3='".$s
lot3.
"' where course_id=".$userid;
mysql_query($sql);
}
else{
$sql="select * from course_details where course_id='".$userid."'";
$result=mysql_query($sql);
$res=mysql_fetch_array($result);
}
?>
<html>
<head>
<title> COURSE DETAILS </title>
</head>
<body>
<h1> EDIT COURSE INFORMATION</h1>
<form action="" method="Get">
<table align="center" width="400">
<tr>
<td>
<br/>
<tr>
<td>Course name:</td> <td><input type="text"
name="name" value="<?php echo $res[1];?>"/></td>
</tr>
<br/>
<tr>
<td>Course fees:</td><td> <input type= "text"
name="fees" value="<?php echo $res[2];?>"/></td>
80. www.globsynskills.com 80
</tr>
<tr>
<td>Course Information:</td> <td><input
type="text" name="info" value="<?php echo $res[3];?>"/></td>
</tr>
<tr> <td>Course time-slot 1: </td> <td><input
type="text" name="slot1" value="<?php echo $res[4];?>"/></td>
</tr>
<tr>
<td>Course time-slot 2:</td> <td><input
type="text" name="slot2" value="<?php echo $res[5];?>" /></td>
</tr>
<tr>
<td>Course time-slot 3: </td> <td><input
type="text" name="slot3" value="<?php echo $res[6];?>"/></td>
</tr>
<input type="hidden" name="id" value="<?php echo $userid;?>">
</td>
</tr>
</table>
<hr/>
<table align="center">
<td align="center"> <input type="submit" name="backbtn" value="back" /></td>
<td align="center"> <input type="submit" name="submitbtn"
value="submit"/></td>
81. www.globsynskills.com 81
</table>
</form>
</body>
</html>
Editfranchise.php:
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="franchise"))
{
header('Location:error.php');
}
$franchiseid=$_SESSION['id'];
if(isset($_REQUEST['submitbtn']))
{
$frname=$_REQUEST['frname'];
$fraddress=$_REQUEST['fraddress'];
$frcity=$_REQUEST['frcity'];
$frstate=$_REQUEST['frstate'];
$frpincode=$_REQUEST['frpincode'];
$frphone=$_REQUEST['frphone'];
$fremail=$_REQUEST['fremail'];
$frhead=$_REQUEST['frhead'];
$sql="update franchise_details set
franchise_name='$frname',franchise_address='$fraddress',franchise_city='$frcity',f
ranchise_state='$frstate',franchise_pincode='$frpincode',franchise_phone='$frphone
',franchise_email='$fremail',franchise_head='$frhead' where
franchise_id='$franchiseid'";
$return=mysql_query($sql) or die(mysql_error());
header('Location:editfranchise.php');
82. www.globsynskills.com 82
}
$fetchsql="select * from franchise_details where franchise_id='$franchiseid'";
$result=mysql_query($fetchsql);
$res=mysql_fetch_array($result);
?>
<html>
<link rel="stylesheet" type="text/css" href="franchisestyle.css">
<div class="wrapper">
<h1>Edit Franchise Details</h1>
<body>
<form action="" method="post" >
<table align="center" width="700" height="400">
<tr>
<td align="center"> Name:</td>
<td align="center"><input type="text" name="frname"
value="<?php echo $res[1]; ?>"/></td>
</tr>
<tr>
<td align="center"> Address:</td>
<td align="center"><input type="text" name="fraddress"
value="<?php echo $res[2]; ?>"/></td>
</tr>
<tr>
<td align="center"> City:</td>
<td align="center"><input type="text" name="frcity"
value="<?php echo $res[3]; ?>"/></td>
</tr>
<tr>
<td align="center"> State:</td>
<td align="center"><input type="text" name="frstate"
value="<?php echo $res[4]; ?>"/></td>
</tr>
<tr>
<td align="center"> PinCode:</td>
<td align="center"><input type="text" name="frpincode"
value="<?php echo $res[5]; ?>"/></td>
83. www.globsynskills.com 83
</tr>
<tr>
<td align="center"> Phone:</td>
<td align="center"><input type="text" name="frphone"
value="<?php echo $res[6]; ?>"/></td>
</tr>
<tr>
<td align="center"> Email:</td>
<td align="center"><input type="text" name="fremail"
value="<?php echo $res[7]; ?>"/></td>
</tr>
<tr>
<td align="center"> Franchise Head:</td>
<td align="center"><input type="text" name="frhead"
value="<?php echo $res[8]; ?>"/></td>
</tr>
</table> <br/>
<center> <input type="submit" name="submitbtn" value="UPDATE"/>
</center>
</form>
<div class="footer">
<a href="franchisehome.php">Back</a>
</div>
</body>
</html>
Editpaymentdetails.php:
<?php
require 'dbconn.php';
if(!($_SESSION['type']=="admin"))
{
header('Location:error.php');
}
?>
84. www.globsynskills.com 84
<html>
<link rel="stylesheet" type="text/css" href="adminstyle.css">
<div class="wrapper">
<body>
<h1>Edit Payment Status</h1>
<form action="" method="post">
<h2>
Enter student Id :<input type="number" name="sid"></h2>
<h2>Enter status: <select name="status">
<option>Paid</option>
<option>Unpaid</option>
</select></h2>
<h2><input type="submit" name="submitbtn" /></h2>
<?php
if(!isset($_REQUEST['submitbtn']))
{
$sql="select student_id,payment_status from fees_details";
$result=mysql_query($sql);
echo "<table align='center' width='600' >";
echo "<tr>";
echo "<th>Student_id</th><th>Payment Status</th>";
echo "</tr>";
while($res=mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>".$res[0]."</td>";
echo "<td>".$res[1]."</td>";
echo "</tr>";
}
echo "</table>";
}
if(isset($_REQUEST['submitbtn']))
{
$studid=$_REQUEST['sid'];
$status=$_REQUEST['status'];
85. www.globsynskills.com 85
$query="update fees_details set payment_status='$status' where
student_id='$studid'";
mysql_query($query) or die(mysql_error());
$sql1="select student_id,payment_status from fees_details";
$result1=mysql_query($sql1) or die(mysql_error());
echo "<table>";
echo "<tr>";
echo "<th>Student_id</th><th>Payment Status</th>";
echo "</tr>";
while($res1=mysql_fetch_array($result1))
{
echo "<tr>";
echo "<td>".$res1[0]."</td>";
echo "<td>".$res1[1]."</td>";
echo "</tr>";
}
echo "</table>";
}
?>
</form>
</div>
</body>
<div class="footer">
<a href="adminhome.php">Back</a>
</div>
</html>
Editpersonalinfo.php:
<?php
require 'dbconn.php';
if(!($_SESSION['type']=="student"))
{
86. www.globsynskills.com 86
header('Location:error.php');
}
?>
<?php
$userid=$_SESSION['id'];
echo $userid;
$sql="select * from student_details where student_id='".$userid."'";
$result=mysql_query($sql) or die(mysql_error());
$res=mysql_fetch_array($result);
?>
<html>
<link rel="stylesheet" type="text/css" href="studentstyle.css">
<head>
<title> Student Registration Form
</title> </head>
<body>
<div class="wrapper">
<h1>Edit Your Personal Details</h2>
<form action="" method="" >
<table align="center" width="800" height="800">
<tr>
<th>Firstname:</th>
<td><input type="text" name="fname" <?php echo
"value='".$res[1]."'";?>/></td></tr>
<tr>
<th>Lastname:</th>
<td><input type="text" name="lname" <?php echo
"value='".$res[2]."'";?>/></td></tr>
<tr>
<th>Date of birth:</th>
87. www.globsynskills.com 87
<td><input type="date" name="dob" <?php echo
"value='".$res[3]."'";?>/></td></tr>
<tr>
</tr>
<tr>
<th>Gender: </th>
<td> Male:<input type="radio" name="gender" <?php
if($res[4]=="M")
{
echo "value='".$res[4]."'";
echo " checked"; }
else
echo "value='M'";
?>>
Female: <input type="radio"
name="gender" <?php if($res[4]=="F")
{
echo "value='".$res[4]."'";
echo " checked";}
else
echo "value='F'"; ?>></th>
</tr>
<tr>
<th> Address:</th>
<td><textarea name="address"><?php echo $res[5];?></textarea></td>
</tr>
<tr><th>City:</th>
<td><input type="text" name="city"<?php echo
"value='".$res[6]."'";?>/></td></tr>
<tr><th>State:</th>
<td><input type="text" name="state"<?php echo "value='".$res[7]."'";?>/></td>
</tr>
<tr><th>Insert Pincode:</th>
<td><input type="text" name="pincode"<?php echo
"value='".$res[8]."'";?>/></td>
</tr>
88. www.globsynskills.com 88
<tr><th>Country:</th>
<td><input type="text" name="country"<?php echo
"value='".$res[9]."'";?>/></td>
</tr>
<tr><th>Insert Phone number:</th>
<td><input type="text" name="phone"<?php echo "value='".$res[10]."'";?>/></td>
</tr>
<tr><th>Provide email:</th>
<td><input type="text" name="email"<?php echo "value='".$res[11]."'";?>/></td>
</tr>
<tr><th>Higher Secondary Board:</th>
<td><input type="text" name="hsboard"<?php echo
"value='".$res[12]."'";?>/></td>
</tr>
<tr><th>Higher Secondary School:</th>
<td><input type="text" name="hsschool"<?php echo
"value='".$res[13]."'";?>/></td>
</tr>
<tr><th>Higher Secondary Marks:</th>
<td><input type="text" name="hsmarks"<?php echo
"value='".$res[14]."'";?>/></td>
</tr>
<tr><th>Year Of Passing Higher Secondary:</th>
<td><input type="text" name="yopschool"<?php echo
"value='".$res[15]."'";?>/></td>
</tr>
<tr><th>Name Of College:</th>
<td><input type="text" name="collegename"<?php echo
"value='".$res[16]."'";?>/></td>
</tr>
<tr><th>Stream:</th>
<td><input type="text" name="stream"<?php echo
"value='".$res[17]."'";?>/></td>
</tr>
<tr><th>Select Semester:</th>
<td>
<select name="semester">
<?php for($i=1;$i<=8;$i++)
{
89. www.globsynskills.com 89
if($i==$res[18])
{
echo "<option selected>".$i."</option>";
}
else
echo "<option>".$i."</option>";
}
?>
</select>
</td>
</tr>
<tr><th>GPA:</th>
<td><input type="text" name="gpa"<?php echo "value='".$res[19]."'";?>/></td>
</tr>
<tr><th>Year Of Passing College:</th>
<td><input type="text" name="yopcollege"<?php echo
"value='".$res[20]."'";?>/></td>
</tr>
<tr><td><input type="hidden" name="id" value="<?php echo
$userid;?>"/></td>
</tr>
</table>
<br/>
<center><input type="submit" name="submitbtn" value="submit"/></center>
</form>
<?php
if(isset($_REQUEST['submitbtn']))
{
$fname=$_REQUEST['fname'];
$lname=$_REQUEST['lname'];
$dob=$_REQUEST['dob'];
$gender=$_REQUEST['gender'];
$address=$_REQUEST['address'];
$city=$_REQUEST['city'];
$state=$_REQUEST['state'];
90. www.globsynskills.com 90
$pincode=$_REQUEST['pincode'];
$country=$_REQUEST['country'];
$phone=$_REQUEST['phone'];
$email=$_REQUEST['email'];
$hsboard=$_REQUEST['board'];
$hsschool=$_REQUEST['hsschool'];
$hsmarks=$_REQUEST['hsmarks'];
$yopschool=$_REQUEST['yopschool'];
$collegename=$_REQUEST['collegename'];
$stream=$_REQUEST['stream'];
$semester=$_REQUEST['semester'];
$gpa=$_REQUEST['gpa'];
$yopcollege=$_REQUEST['yopcollege'];
$sql1="Update student_details set
student_fname='$fname',student_lname='$lname',student_dob='$dob',student_gender='$
gender',
student_address='$address',student_city='$city',student_state='$state',student_pin
code='$pincode',student_country='$country',
student_phone='$phone',student_email='$email',student_board='$hsboard',student_sch
ool='$hsschool',student_marks='$hsmarks',student_yearofpassing='$yopschool',
student_college='$collegename',student_stream='$stream',student_semester='$semeste
r',student_gpa='$gpa',student_yopcollege='$yopcollege' where
student_id='$userid'";
mysql_query($sql1) or die(mysql_error());
echo "Updated succefully";
}
?>
<br/>
<div class="footer">
<a href="studenthome.php">Back</a>
</div>
</div> </body>
</html>
91. www.globsynskills.com 91
Error.php:
<html>
<link rel="stylesheet" type="text/css" href="error.css">
<body>
<head><title>Error</title></head>
<div class="head">
<image></div>
<body>
<table align="center" width="500">
<th align="center"> <h1><text>ERROR!!!</text> </h1></th>
<tr><td align="center"> <h2>Please Click The Back Button To Be Re-directed Out Of
The Portal </h2></td>
</tr>
<tr>
<td align="center"><a href="index.php">Back</a></td>
</tr>
</table>
</body>
</div>
</html>
Franchisedetails.php:
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="admin"))
{
header('Location:error.php');
}
?>
92. www.globsynskills.com 92
<html>
<link rel="stylesheet" type="text/css" href="adminstyle.css">
<head>
<title> ALL FRANCHISE DETAILS </title>
</head>
<div class="wrapper">
<body>
<h1> WELCOME TO FRANCHISE DETAILS </h1>
<?php
$sql= "select * from franchise_details;";
$result=mysql_query($sql) or die(mysql_error());
echo "<table>";
echo "<th>FranchiseId</th> <th>Franchise
Name</th><th>Address</th><th>City</th><th>State</th><th>Pin-
code</th><th>phone</th><th>Email</th><th> Franchise Head</th>";
while($res=mysql_fetch_array($result))
{
echo "<tr>";
for($i=0;$i<10;$i++){
echo "<td>";
echo $res[$i]." ";
echo "</td>";
}
echo "</tr>";
}
echo "</table>";
?>
<div class="footer">
<a href="studenthome.php">Back</a>
</div>
</body>
</html>
93. www.globsynskills.com 93
Franchisehome.php:
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="franchise"))
{
header('Location:error.php');
}
?>
<html>
<body>
<link rel="stylesheet" type="text/css" href="franchisehome.css">
<div class="wrapper">
<div class="header">
<div class="insideheader"><img alt="LOGO" src="LOGO-MADD-DEFINITIVO1.jpg"
width="250" height="80"></div>
<div class="insideheader2">
<center><strong>
<a href="logout.php">Logout</a>  ||  <a
href="adminpasswordchange.php">Change Password</a><br><br>
</strong>
</center>
</div>
</div>
<div class="leftpanel">
<div class="insideleft">
<center><h2>Notice Board</h2></center>
</div>
<font size="5"><marquee direction="up" height="400" marquee-
speed="fast">
<?php
$sql="select notice from notice_board";
$result=mysql_query($sql);
while($res=mysql_fetch_array($result))
echo $res[0]."<br>";
?></marquee></font>
94. www.globsynskills.com 94
</div>
<div class="content">
<h1 align="center">
<body>
<h1 ALIGN="CENTER">
Welcome
</h1>
</div>
<div class="rightpanel">
<div class="insideright">
<ul>
<li><a href="viewfranchisedetails.php">View Your Franchise details</a></li><br/>
<li><a href="manageseats.php">Manage seats</a></li><br/>
<li><a href="franchiserevenue.php">Revenue</a></li><br/>
<li><a href="viewfranchisestudents.php">View Students</a></li><br/>
<li><a href="editfranchise.php">Edit Your Franchise details</a></li><br/>
<li><a href="franchisepasswordchange.php">Change Password</a></li><br/>
<li><a href="viewcoursesfranchise.php">All Courses</a></li><br/>
<li><a href="logout.php">Logout</a></li>
</ul>
</div>
</div>
<div class="footer">
<br/><div class="insidefooter">
<center><b><font size="4" color="#000040"><a
href="aboutusfranchise.php #aboutus">About Us</a>  ||  <a
href="aboutusfranchise.php #contact">Contact Us</a></b></center></font>
</div>
</div>
</div>
</body>
95. www.globsynskills.com 95
</html>
Franchisepasswordchange.php:
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="franchise"))
{
header('Location:error.php');
}
?>
<html>
<link rel="stylesheet" type="text/css" href="franchisestyle.css">
<head>
<title>
Change Password
</title>
<div class="wrapper">
<h1>Change Your Password</h1>
</head>
<body>
<form action="" method="post">
<table align="center" width="800" height="250">
<tr><td align="center">Username:</td><td><input type="text"
name="username"></td></tr>
<tr><td align="center">Password:</td><td><input type="password" name="oldpwd"
required></td></tr>
<tr><td align="center">New Password:</td><td><input type="password" name="newpwd"
required></td></tr>
<tr><td align="center">Re-Enter New Password:</td><td><input type="password"
name="renewpwd" required></td></tr>
</table>
<br/>
<center><input type="submit" name="submitbtn"></center>
96. www.globsynskills.com 96
</form>
<?php if(isset($_REQUEST['submitbtn']))
{
$franid=$_SESSION['id'];
$sql="select franchise_username,franchise_password from loginasfranchise
where franchise_id='$franid'";
$result=mysql_query($sql) or die(mysql_error());
$res=mysql_fetch_array($result);
$franusername=$res[0];
$franpassword=$res[1];
$username=$_REQUEST['username'];
$oldpwd=$_REQUEST['oldpwd'];
$newpwd=$_REQUEST['newpwd'];
$renewpwd=$_REQUEST['renewpwd'];
if($username==$franusername)
{
if($oldpwd==$franpassword)
{
if($newpwd==$renewpwd)
{
$sql1="update loginasfranchise set
franchise_password='$newpwd' where franchise_id='$franid'";
mysql_query($sql1) or die(mysql_error());
echo "<center><h3>password changed</h3></center>";
}
else
{
echo "<center><h3>New and Re-enter password doesn't
match</h3></center>";
}
}
else
{
echo "<center><h3>Wrong password</h3></center>";
}
}
else
{
98. www.globsynskills.com 98
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="franchise"))
{
header('Location:error.php');
}
?>
<html>
<link rel="stylesheet" type="text/css" href="franchisestyle.css">
<div class="wrapper">
<h1>View Revenue Share</h1>
<body>
<?php
$franid=$_SESSION['id'];
$revenue=0;
$sql="select student_id,franchise_id,amount,shareoffranchise,payment_status from
fees_details where franchise_id='$franid'";
$result=mysql_query($sql);
echo "<table align='center' width='1100'>";
echo "<tr>";
echo "<th>Student_id</th><th>Franchise Id</th><th>Total Amount</th><th>Share of
Franchise</th><th>Payment Status</th>";
echo "</tr>";
while($res=mysql_fetch_array($result))
{
echo "<tr>";
for($i=0;$i<5;$i++)
{
echo "<td>";
echo $res[$i];
echo "</td>";
}
if($res[4]=="Paid")
{
$revenue=$revenue+$res[3];
}
99. www.globsynskills.com 99
}
echo "</table>";
echo "<h2>Your total Collection is Rs.$revenue </h2>" ;
?> </div>
<div class="footer">
<a href="adminhome.php">Back</a>
</div>
</body>
</html>
Index.php:
<?php
require 'dbconn.php';
?>
<html>
<link rel="stylesheet" type="text/css" href="homepage.css">
<body>
<div class="wrapper">
<div class="header">
<div class="insideheader">
<img alt="LOGO" src="LOGO-MADD-DEFINITIVO1.jpg" width="250"
height="80">
</div>
<div class="insideheader2">
<center><b><a href="login.php">Login</a>  ||  <a
href="Aboutus.php #contact">Contact Us</a></b></center>
</div>
<font></font>
</div>
<div class="header3">
100. www.globsynskills.com 10
0
<a href="viewcourses.php"><center>Courses Taught</center></a></div>
<div class="header2">
<font size="5"><marquee speed="fast"><?php
$sql4="select franchise_name from franchise_details";
$result1=mysql_query($sql4) or die(mysql_error());
while($res1=mysql_fetch_array($result1))
{
echo
$res1[0]."            ";
}
?></marquee></font>
</div>
<div class="leftpanel">
<div class="insideleft">
<center><h2>Notice Board</h2></center>
</div>
<font size="5"><marquee direction="up" height="400" marquee-
speed="fast">
<?php
$sql="select notice from notice_board";
$result=mysql_query($sql);
while($res=mysql_fetch_array($result))
echo $res[0]."<br>";
?></marquee></font>
</div>
<div class="content">
<marquee>
<img alt="Classroom" src="102719_003_Q2xhc3Nyb29t.jpg">
<img alt="Office" src="102719_007.jpg">
<img alt="Classroom2" src="b7bcd4620358405c228775b751dcf190.jpg"
width="700" height="500">
<img src="TedTalk1.jpg">
<img src="iiebm_big02.jpg">
<img alt="Classroom" src="102719_003_Q2xhc3Nyb29t.jpg">
<img alt="Office" src="102719_007.jpg">
<img alt="Classroom2" src="b7bcd4620358405c228775b751dcf190.jpg"
width="700" height="500">
<img src="TedTalk1.jpg">
101. www.globsynskills.com 10
1
<img src="iiebm_big02.jpg">
</marquee>
</div>
<div class="rightpanel">
<center><h3>Register Here</h3></center>
<div class="insideright">
<form action="" method="post" >
<table align="center">
<tr>
<td><input type="text" name="fname" placeholder="First
Name"/></td>
</tr>
<tr>
<td><input type="text" name="lname" placeholder="Last
Name"/></td></tr>
<tr>
<td><input type="date" name="dob" placeholder="Date of
Birth"/></td></tr>
<tr>
<td> M<input type="radio"name="gender" value="M">F<input
type="radio"name="gender" value="F"/>Others<input type="radio"name="gender"
value="O"/></td>
</tr>
<tr><td><input type="text" name="phone" placeholder="Phone
Number"/></td>
</tr>
<tr>
<td><input type="text" name="email" placeholder="E-Mail
Id"/></td>
</tr>
<tr>
<td><input type="submit" name="submitbtn"
value="submit"/></td>
</tr>
102. www.globsynskills.com 10
2
</table>
</form>
<?php
if(isset($_REQUEST['submitbtn']))
{
$fname=$_REQUEST['fname'];
$lname=$_REQUEST['lname'];
$dob=$_REQUEST['dob'];
$gender=$_REQUEST['gender'];
$phone=$_REQUEST['phone'];
$email=$_REQUEST['email'];
$sql="insert into student_details VALUES(' ','$fname','$lname'
,'$dob','$gender', ' ',' ',' ',' ',' ','$phone','$email',' ',' ',' ',
' ',' ',' ',' ',' ',' ',' ',' ',' ')";
$return1=mysql_query($sql) or die(mysql_error());
$sql3="select student_id from student_details where student_fname='$fname'";
$res=mysql_fetch_array(mysql_query($sql3));
$studentid=$res[0];
$sql2="insert into loginasstudent values('$studentid','$email','12345')";
$return2=mysql_query($sql2);
if($return1==true && $return2==true)
{
echo "Added Successfully";
echo "Your Student Id is $studentid. Username is your email and password is
'12345'. Please change the details on next login.";
}
} ?>
</div>
</div>
<div class="footer">
<div class="insidefooter">
<center><b><font size="4" color="#000040"><a href="Aboutus.php
#aboutus">About Us</a>  ||  <a href="Aboutus.php #contact">Contact
Us</a></b></center></font>
103. www.globsynskills.com 10
3
</div>
</div>
</div>
</body>
</html>
Login.php:
<?php
ob_start();
require 'dbconn.php'
?>
<html>
<link rel="stylesheet" type="text/css" href="login.css">
<div class="login-form">
<div class="head">
<img src="user.png" alt="image"/>
</div><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<form>
<table align="center" width="500">
<th align="center"> LOGIN </th>
<tr><td align="center"> <input type="text" placeholder="   Username"
name="username" >
</td> </tr>
<td align="center"> <input type="password" placeholder="  
Password" name="pwd"></td>
</tr>
<tr><td align="center">Login as: <select name="loginas">
104. www.globsynskills.com 10
4
<option>STUDENT</option>
<option>ADMIN</option>
<option>FRANCHISE</option>
</select></td></tr>
<tr><td align="center"><input type="submit" name="submitbtn"
value="Login"/></td>
</tr> </table>
</div>
<div class="footer">
<a href="index.php"><h2>Back</h2></a>
</div>
</body>
</html>
<?php
if(isset($_REQUEST['submitbtn']))
{
$username=$_REQUEST['username'];
$password=$_REQUEST['pwd'];
$loginas=$_REQUEST['loginas'];
if($loginas=="STUDENT")
{
$sql="select * from loginasstudent where
student_username='$username'&& student_password='$password'";
$result=mysql_query($sql) or die(mysql_error());
$res=mysql_fetch_array($result);
if($username==$res[1]&&$password=$res[2])
{
echo $res[0];
$_SESSION['id']=$res[0];
$_SESSION['type']="student";
header('Location:studenthome.php');
}
105. www.globsynskills.com 10
5
else
{
echo "<center><h2>Incorrect Username/Password</h2></center>";
}
}
if($loginas=="ADMIN")
{
$sql="select * from loginasadmin where admin_username='$username'&&
admin_password='$password'";
$result=mysql_query($sql) or die(mysql_error());
$res=mysql_fetch_array($result);
if($username==$res[1]&&$password=$res[2])
{
echo $res[0];
$_SESSION['id']=$res[0];
$_SESSION['type']="admin";
header('Location:adminhome.php');
}
else
{
echo "<center><h2>Incorrect Username/Password</h2></center>";
}
}
if($loginas=="FRANCHISE")
{
$sql="select * from loginasfranchise where
franchise_username='$username'&& franchise_password='$password'";
$result=mysql_query($sql) or die(mysql_error());
$res=mysql_fetch_array($result);
if($username==$res[1]&&$password=$res[2])
{
$_SESSION['id']=$res[0];
$_SESSION['type']="franchise";
header('Location:franchisehome.php');
}
else
{
106. www.globsynskills.com 10
6
echo "<center><h2>Incorrect Username/Password</h2></center>";
}
}
}
?>
Logout.php:
<?php
ob_start();
require 'dbconn.php';
session_destroy();
header('Location:index.php');
managenotice.php:
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="admin"))
header('Location:error.php');
?>
<html>
<body>
<link rel=" stylesheet" type="text/css" href="adminstyle.css">
<div class="wrapper ">
<form action="" method="post">
<br/>
<table align="center" width="800" height="200">
<tr><td align="center"> Edit Notice:</td><td align="center"><input type="text"
name="notice"></td></tr>
</table>
<br/>
107. www.globsynskills.com 10
7
<center>
<input type="submit" name="submitbtn">
</center>
</div>
<div class="footer">
<a href="adminhome.php"> Back</a>
</div>
</form>
<?php
if(isset($_REQUEST['submitbtn']))
{
$notice=$_REQUEST['notice'];
$sql="insert into notice_board values('','$notice')";
$return=mysql_query($sql);
if($return==true)
echo "Updated successfully";
}
?>
</body>
</html>
Manageseats.php:
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="franchise"))
{
header('Location:error.php');
}
?>
<html>
<link rel="stylesheet" type="text/css" href="franchisestyle.css">
<div class='wrapper'>
108. www.globsynskills.com 10
8
<body>
<h1> Manage Seats </h1>
<?php
$franid=$_SESSION['id'];
if(!isset($_REQUEST['submitbtn']))
{
$sql="select
franchise_capacity.franchise_id,franchise_capacity.course_id,course_details.course
_name,franchise_capacity.Slot1_available,franchise_capacity.Slot2_available,franch
ise_capacity.Slot3_available from franchise_capacity,course_details where
franchise_id='$franid'&&franchise_capacity.course_id=course_details.course_id";
$result=mysql_query($sql);
echo "<table align= 'center' width='1100'>";
echo "<tr>";
echo "<th>Franchise Id</th><th>Course Id</th><th>Course Name</th><th>Slot1
Available</th><th>Slot2 Available</th><th>Slot3 Available</th>";
echo "</tr>";
while ($res=mysql_fetch_array($result))
{
echo "<tr>";
for($i=0;$i<6;$i++)
{
echo "<td>";
echo $res[$i];
echo "</td>";
}
}
echo "</table> <br/>";
}
$sql1="select course_name from course_details";
$result1=mysql_query($sql1);
?>
<form action="" method="post">
<table align="center">
<tr><td> Enter Course Id:</td><td><select name="coursename">
<?php
while($res1=mysql_fetch_array($result1))
109. www.globsynskills.com 10
9
{
echo "<option>".$res1[0]."</option>";
}
?>
</select></td></tr>
<tr><td>Enter Slot:</td> <td><select name="slot">
<option>1</option>
<option>2</option>
<option>3</option>
</select></td></tr>
<tr><td>Enter No of seats You want to increase : </td><td><input type="number"
name="seats"></td></tr>
</table>
<br/>
<center><input type="submit" name="submitbtn"></center>
</form>
<?php
if(isset($_REQUEST['submitbtn']))
{
$franid=$_SESSION['id'];
$coursename=$_REQUEST['coursename'];
$slot=$_REQUEST['slot'];
$idsql="select course_id from course_details where
course_name='$coursename'";
$rws=mysql_fetch_array(mysql_query($idsql));
$courseid=$rws[0];
$seats=$_REQUEST['seats'];
if($slot==1)
{
$sql2="select Slot1_available from franchise_capacity where
course_id='$courseid'&& franchise_id='$franid'";
$res1=mysql_fetch_array(mysql_query($sql2));
$seats=$seats+$res1[0];
$sql3="update franchise_capacity set Slot1_available='$seats' where
course_id='$courseid'&& franchise_id='$franid'";
mysql_query($sql3);
110. www.globsynskills.com 11
0
}
if($slot==2)
{
$sql2="select Slot2_available from franchise_capacity where
course_id='$courseid'&& franchise_id='$franid'";
$res1=mysql_fetch_array(mysql_query($sql2));
$seats=$seats+$res1[0];
$sql3="update franchise_capacity set Slot2_available='$seats' where
course_id='$courseid'&& franchise_id='$franid'";
mysql_query($sql3);
}
if($slot==3)
{
$sql2="select Slot3_available from franchise_capacity where
course_id='$courseid'&& franchise_id='$franid'";
$res1=mysql_fetch_array(mysql_query($sql2));
$seats=$seats+$res1[0];
$sql3="update franchise_capacity set Slot3_available='$seats' where
course_id='$courseid'&& franchise_id='$franid'";
mysql_query($sql3);
}
$sql4="select
franchise_capacity.franchise_id,franchise_capacity.course_id,course_details.course
_name,franchise_capacity.Slot1_available,franchise_capacity.Slot2_available,franch
ise_capacity.Slot3_available from franchise_capacity,course_details where
franchise_id='$franid'&&franchise_capacity.course_id=course_details.course_id";
$result2=mysql_query($sql4) or die(mysql_error());
echo "<table align= 'center' width='1100'>";
echo "<tr>";
echo "<th>Franchise Id</th><th>Course Id</th><th>Course Name</th><th>Slot1
Available</th><th>Slot2 Available</th><th>Slot3 Available</th>";
echo "</tr>";
while ($res=mysql_fetch_array($result2))
{
echo "<tr>";
for($i=0;$i<6;$i++)
{
echo "<td>";
echo $res[$i];
111. www.globsynskills.com 11
1
echo "</td>";
}
}
}
?>
</div>
<div class="footer">
<a href="adminhome.php">Back</a>
</div>
</body>
</html>
Revenueshare.php:
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="admin"))
{
header('Location:error.php');
}
?>
<html>
<link rel="stylesheet" type="text/css" href="adminstyle.css">
<head><title>Revenue</title></head>
<div class="wrapper">
<body>
112. www.globsynskills.com 11
2
<h1>Manage Revenue</h1>
<form action="" method="Post">
<br/><br/>
<table align="center" width="400" height="100"> <tr><td align="center">
Percentage: <input type="number" name="percent">
</td></tr>
</table><br/>
<center><input type="submit" name="enter" value="Enter"></center>
</form>
<?php
if (isset($_REQUEST['enter']))
{
$percent=$_REQUEST['percent'];
$sql="select student_id,franchise_id,amount from fees_details";
$result=mysql_query($sql);
while($res=mysql_fetch_array($result))
{
$sid=$res[0];
$fid=$res[1];
$amt=$res[2];
$sof=($amt*$percent)/100;
$soa=$amt-$sof;
$sql1="update fees_details set
shareofadmin='$soa',shareoffranchise='$sof' where student_id=$sid &&
franchise_id=$fid";
mysql_query($sql1);
}
113. www.globsynskills.com 11
3
$sqlrev="select * from fees_details";
$result=mysql_query($sqlrev);
echo "<table align='center'>";
echo "<th>STUDENT ID</th> <th>FRANCHISE ID</th><th>AMOUNT</th><th>SHARE OF
ADMIN</th><th>SHARE OF FRANCHISE</th><th>PAYMENT STATUS</th>";
while($res=mysql_fetch_array($result))
{
echo "<tr>";
for($i=0;$i<7;$i++){
echo "<td>";
echo $res[$i]." ";
echo "</td>";
}
}
echo "</table> <br/>";
}
?>
</div>
<div class="footer">
<a href="adminhome.php">Back</a>
</div>
</body>
</html>
Studenthome.php:
<?php
ob_start();
require 'dbconn.php';
if(!($_SESSION['type']=="student"))
{
header('Location:error.php');
}
$studid=$_SESSION['id'];
114. www.globsynskills.com 11
4
$sql="select student_fname from student_details where student_id='$studid'";
$res=mysql_fetch_array(mysql_query($sql));
$studname=$res[0];
?>
<html>
<html>
<body>
<link rel="stylesheet" type="text/css" href="studenthome.css">
<div class="wrapper">
<div class="header">
<div class="insideheader"><img alt="LOGO" src="LOGO-MADD-DEFINITIVO1.jpg"
width="250" height="80"></div>
<div class="insideheader2">
<center><strong>
<a href="logout.php">Logout</a>  ||  <a
href="studentpasswordchange.php">Change Password</a><br><br>
</strong>
</center>
</div>
</div>
<div class="leftpanel">
<div class="insideleft">
<center><h1>Notice Board</h1></center>
</div>
<font size="5"><marquee direction="up" height="400" marquee-
speed="fast">
<?php
$sql="select notice from notice_board";
$result=mysql_query($sql);
while($res=mysql_fetch_array($result))
echo $res[0]."<br>";
?></marquee></font>
</div>
<div class="content">
<h1 align="center">
Welcome <?php echo $studname;?>