SlideShare a Scribd company logo
Course Code : BCSL-057
Course Title : Web Programming Lab
Assignment Number : BCA(V)/057/Assign/14-15
This assignment has one question of 40 marks. Rest 10 marks are for viva voce. Please go
through the guidelines regarding assignments given in the programme guide for the format of
presentation.
Question 1: Create a Sample site for your School having the following features (you must use
CSS preferably as a separate file):
(a) The website should consist of four different areas – HEADER area, FOOTER area, MENU
area and CONTENT area.
(b) All the pages of this web site should have common HEADER area consisting of the School
Name with logo, and the mission of the school. You must use CSS to format this area.
(c) All the pages should have FOOTER area that must contain the copyright details of the
website. It should contain the date and time of last update of the website as well as contact
information of the school.
(d) The title of each page should be contain the school name.
(e) The MENU area of the website should contain a drop down menu consisting of following
menu items:
Home, About School, School Faculty, Student Corner, Feedback
Please note that the HEADER, MENU and FOOTER areas should be visible in all the web pages.
Each menu item should be linked to a webpage.
(f) The CONTENT area of Home page should contain the information about the Objectives of the
school and present events in the school. The events must be stored in a database and should be
displayed from the database.
(g) The CONTENT area of About School page should contain the history of the school, school
location on a map and how to reach directions. The history should be shown in a table form with
alternative rows having different shading.
(h) The CONTENT area of the School Faculty page should contain names and qualifications of
all the teachers of the school in a subject wise lists of primary, middle and senior teachers
categories.
(i) The CONTENT area of Student Corner page should have a login page. The login account
name and password must be verified from a database, and if found correct, student must be
shown her/his marks. You must design suitable database for this.
(j) The feedback form should get the following information –
a. Name of the person seeking information, the question and his/her email ID on which reply
could be sent.
b. You must check that all the fields of feedback form are duly filled up properly. Use JavaScript
for this purpose.
c. The feedback should be submitted and stored in a database.
Solution:
The answers of the question are given below. The website of school is created in HTML
using PHP Script and JavaScript.
NOTE:- you have to install WampServer on your computer to run these following source
codes, because the PHP script runs on Server.
The Web site i have created is very simple and easy that helps you students to understand the
programming of site. you can copy or download the below source code and make change of the
look and feel of the website.
Index.php
<?php
error_reporting(0);
include(‘/database/db.php’);
?>
<!doctype html>
<html>
<head>
<meta charset=”utf-8″>
<link type=”text/css” rel=”stylesheet” href=”style.css”>
<title></title>
</head>
<body>
<div id=”main_body”>
<header id=”header”>
<table>
<tr>
<td><img src=”banner_sm.jpg”></td>
<td id=”schoolname”><h1>Evergreen Public Schools</h1></td>
</tr>
</table>
<div id=”menu”>
<a href=”index.php”>Home </a>
<a href=”about.php”>About School </a>
<a href=”faculties.php”> School Faculty </a>
<a href=”student_corner.php”> Student Corner </a>
<a href=”feedback.php”>Feedback </a>
</div>
</header>
<main id=”wrapper”>
<div class=”events”>
<h2>Our Current Events:</h2>
&uarr;
<?php
$sql = “select * from events”;
$query = mysql_query($sql);
while($rows = mysql_fetch_assoc($query)){
$name = $rows['event_name'];
$date = $rows['event_date'];
$id = $rows['id'];
$descp = $rows['descp'];
?>
<div class=”event_box”>
<h2> <?php echo $name .”<br>”; ?></h2>
<strong><?php echo “Date: “.$date.”<br>”; ?></strong>
<?php echo $descp; ?>
</div>
<?php } ?>
</div>
<div class=”objectives”>
<h2> Objectives:</h2>
<ul>
<li>To provide elementary schools in hamlets where there are no
schools</li>
<li>To provide free and compulsory education for all children of
age group 6-14.</li>
<li>To enroll school age children in schools before 2003.</li>
<li>To provide five years of schooling all children before
2007.</li>
<li>To provide eight years of schooling for all children before
2010.</li>
<li>To eradicate dropouts before 2010 fully.</li>
<li>To improve the basic amenities in schools.</li>
<li>To improve and enrich the syllabus.</li>
<li>To improve the quality of education from the pre-school to
higher secondary school level.</li>
<li>To ensure minimum levels of learning.</li>
<li>To impart refresher training to teachers.</li>
<li>To eradicate illiteracy</li>
<li>To involve the parents in the management of schools to a great
extent.</li>
<li>To encourage health education in schools.</li>
<li>To give importance to vocational training schools.</li>
<li>To open village libraries where there is a population of 5000
and above.</li>
<li>To distribute quality textbooks at fair price in time.</li>
</ul>
</div>
</main>
<div id=”footer”>
<b> Evergreen Public Schools </b><br>
All Rights Reserved &copy; 2010- <?php echo date(‘Y’); ?>
</div>
</div>
</body>
</html>
Home Page:
about.php
<?php error_reporting(0); include(‘/database/db.php’); ?>
<!doctype html>
<html>
<head>
<meta charset=”utf-8″>
<link type=”text/css” rel=”stylesheet” href=”style.css”>
<title>Evergreen Public Schools</title>
<script src=”http://maps.googleapis.com/maps/api/js”></script>
<script>
function initialize() {
var mapProp = {
center:new google.maps.LatLng(20.052138,80.251608),
zoom:5,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new
google.maps.Map(document.getElementById(“googleMap”),mapProp);
}
google.maps.event.addDomListener(window, ‘load’, initialize);
</script>
</head>
<body>
<div id=”main_body”>
<header id=”header”>
<table>
<tr>
<td><img src=”banner_sm.jpg”></td>
<td><h1>Evergreen Public Schools</h1></td>
</tr>
</table>
</header>
<div id=”menu”>
<a href=”index.php”>Home </a>
<a href=”about.php”>About School </a>
<a href=”faculties.php”> School Faculty </a>
<a href=”student_corner.php”> Student Corner </a>
<a href=”feedback.php”>Feedback </a>
</div>
<main id=”wrapper”>
<div >
<table>
<tr>
<td><h2>Our History</h2></td>
</tr>
<tr>
<td>
<img src=”220px-Lmspic.png”>
<p>
Provision of quality education, a felt need of the newly developed Janakpuri colony
in the seventies was met with the opening of St. Mark’s school in January 1975 by
the visionary founder Chairman Mr. T.P. Aggarwal. The school which had a
modest beginning grew by leaps and bounds and in a few years’ time there was an
all round expansion in the enrolment of students, enlargement of the school
building, growth in the number of teaching and other staff and upgradation of the
school from middle to senior secondary level.Inspired by the success of the school,
another Senior Secondary Public School was established in Meera Bagh, (Paschim
Vihar). This school was inaugurated by the then Lt. Governor of Delhi, Air Chief
Marshal Arjan Singh on April 20, 1990. With a strength of over 3500 students this
co-educational, English medium institution excels in all spheres.In addition to these
Senior Secondary School, St. Mark’s runs an exclusive school for girls in Meera
Bagh. The main building of St. Marks Girls School, was inaugurated by the
Hon’able Chief Minister of N.C.T of Delhi, Ms. Sheila Dixit on January 19,
2000.All the school buildings are set amidst beautiful green lawns and have all
facilities required for the all round development of children such as well stocked
libraries and well-equipped laboratories for Physics, Chemistry, Biology, Home
Science,Computer Science etc.
</p>
</td>
</tr>
<tr>
<td><h2>School Location</h2></td>
</tr>
<tr>
<td><div id=”googleMap” style=”width:500px;height:380px;”></div></td>
</tr>
</table>
</div>
</main>
<div id=”footer”>
<b> Evergreen Public Schools </b><br>
All Rights Reserved &copy; 2010- <?php echo date(‘Y’); ?>
</div>
</div>
</body>
</html>
About Us Page:
faculties.php
<?php error_reporting(0); include(‘/database/db.php’); ?>
<!doctype html>
<html>
<head>
<meta charset=”utf-8″>
<link type=”text/css” rel=”stylesheet” href=”style.css”>
<title>Evergreen Public Schools</title>
</head>
<body>
<div id=”main_body”>
<header id=”header”>
<table>
<tr>
<td><img src=”banner_sm.jpg”></td>
<td><h1>Evergreen Public Schools</h1></td>
</tr>
</table>
</header>
<div id=”menu”>
<a href=”index.php”>Home </a>
<a href=”about.php”>About School </a>
<a href=”faculties.php”> School Faculty </a>
<a href=”student_corner.php”> Student Corner </a>
<a href=”feedback.php”>Feedback </a>
</div>
<main id=”wrapper”>
<table border=”2″ >
<h2>Our Faculties:</h2>
<tr>
<td bgcolor=”#6F6465″>Name</td>
<td bgcolor=”#6F6465″>Qualification</td>
<td bgcolor=”#6F6465″>Subject</td>
<td bgcolor=”#6F6465″>Catogery</td>
</tr>
<tr>
<td>Mr. Anil Kumar</td>
<td>MCA</td>
<td>Computer</td>
<td>Senoir</td>
</tr>
<tr>
<td>Dr. Hemant Sharma</td>
<td>PhD</td>
<td>English</td>
<td>Senior</td>
</tr>
<tr>
<td>Mrs. Aparna Dev</td>
<td>MBA</td>
<td>Management</td>
<td>Senior</td>
</tr>
<tr>
<td>Mr. Dhiraj Sah</td>
<td>BCA</td>
<td>IT</td>
<td>Middle</td>
</tr>
<tr>
<td>Mr. Prakash Shing</td>
<td>BCA</td>
<td>Computer</td>
<td>Primary</td>
</tr>
</table>
</main>
<div id=”footer”>
<b> Evergreen Public Schools </b><br>
All Rights Reserved &copy; 2010- <?php echo date(‘Y’); ?>
</div>
</div>
</body>
</html>
Faculties Page:
Student_corner.php
<?php error_reporting(0); include(‘/database/db.php’); session_start();if
(isset($_POST['login'])){
$username = $_POST['uname'];
$password = $_POST['pass'];$sql = “select * from students where username =
‘$username’ and password = ‘$password’”;
$query = mysql_query($sql);
$row = mysql_fetch_object($query);if ($row == 1) {
$_SESSION['id'] =$row->id;
$_SESSION['name'] =$row->username;
$_SESSION['enroll'] =$row->enroll_no;
echo “<script>window.location=’student_page.php’;</script>”;
} else{
echo “<script>alert(‘Username or Password not Matched’)</script>”;}
}
?>
<!doctype html>
<html>
<head>
<meta charset=”utf-8″>
<link type=”text/css” rel=”stylesheet” href=”style.css”>
<title>Evergreen Public Schools</title>
</head><body>
<div id=”main_body”>
<header id=”header”>
<table>
<tr>
<td><img src=”banner_sm.jpg”></td>
<td><h1>Evergreen Public Schools</h1></td>
</tr>
</table>
</header>
<div id=”menu”>
<a href=”index.php”>Home </a>
<a href=”about.php”>About School </a>
<a href=”faculties.php”> School Faculty </a>
<a href=”student_corner.php”> Student Corner </a>
<a href=”feedback.php”>Feedback </a>
</div>
<main id=”wrapper”>
<div>
<form action=”" method=”post”>
<table align=”center”>
<tr><td colspan=”2″ align=”center” bgcolor=”#6B6B6B”><strong
style=”color:#FFFFFF”>Student Login</strong></td></tr>
<tr>
<td><b>Username:</b></td>
<td><input type=”text” name=”uname” ></td>
</tr>
<tr>
<td><b>Password:</b></td>
<td><input type=”password” name=”pass” ></td>
</tr>
<tr>
<td></td>
<td><input type=”submit” name=”login” value=”Login”></td>
</tr>
</table>
</form>
</div>
</main>
<div id=”footer”>
<b> Evergreen Public Schools </b><br>
All Rights Reserved &copy; 2010- <?php echo date(‘Y’); ?>
</div>
</div>
</body>
</html>
Student Corner Page:
Feedback.php
<?php error_reporting(0); include(‘/database/db.php’);
if (isset($_POST['sent'])){
$name = $_POST['name'];
$email = $_POST['mail'];
$msg = $_POST['msg'];
$sql = “insert into feedback(name, email, msg) value(‘$name’, ‘$email’, ‘$msg’)”;
$query = mysql_query($sql);
if ($query) {
$mssg = “Thnak You $name for your Feedback!”;
} else{
echo “Error in feedback”;}
}
?>
<!doctype html>
<html>
<head>
<meta charset=”utf-8″>
<link type=”text/css” rel=”stylesheet” href=”style.css”>
<title>Evergreen Public Schools</title>
<script type=”text/javascript”>
function validate()
{
if(document.getElementById(‘name’).value==”)
{
alert(‘Please Enter Name’);
return false;
}
else if(document.getElementById(‘email’).value==”)
{
alert(‘Please Enter Email ID’);
return false;
}
else if(document.getElementById(‘msg’).value==”)
{
alert(‘Please Enter your Meaasge’);
return false;
}
}
</script>
</head>
<body>
<div id=”main_body”>
<header id=”header”>
<table>
<tr>
<td><img src=”banner_sm.jpg”></td>
<td><h1>Evergreen Public Schools</h1></td>
</tr>
</table>
</header>
<div id=”menu”>
<a href=”index.php”>Home </a>
<a href=”about.php”>About School </a>
<a href=”faculties.php”> School Faculty </a>
<a href=”student_corner.php”> Student Corner </a>
<a href=”feedback.php”>Feedback </a>
</div>
<main id=”wrapper”>
<form action=”" method=”post” onsubmit=”return validate()”>
<table align=”center”>
<tr><td colspan=”2″ align=”center” bgcolor=”#6B6B6B”><strong
style=”color:#FFFFFF”>Submit your Queries</strong></td></tr>
<tr>
<td><b>Name:</b></td>
<td><input type=”text” name=”name” id=”name” ></td>
</tr>
<tr>
<td><b>Email id:</b></td>
<td><input type=”email” name=”mail” id=”email”></td>
</tr>
<tr>
<td valign=”top”><b>Message:</b></td>
<td><textarea cols=”30″ rows=”5″ name=”msg” id=”msg”></textarea></td>
</tr>
<tr>
<td><?php echo $mssg ?></td>
<td><input type=”submit” name=”sent” value=”Submit”></td>
</tr>
</table>
</form>
</main>
<div id=”footer”>
<b> Evergreen Public Schools </b><br>
All Rights Reserved &copy; 2010- <?php echo date(‘Y’); ?>
</div>
</div>
</body>
</html>
Feedback Page:
Student_page.php
<?php
error_reporting(0);
session_start();
include(‘/database/db.php’); ?>
<!doctype html>
<html>
<head>
<meta charset=”utf-8″>
<link type=”text/css” rel=”stylesheet” href=”style.css”>
<title>Evergreen Public Schools</title>
</head>
<body>
<div id=”main_body”>
<header id=”header”>
<table>
<tr>
<td><img src=”banner_sm.jpg”></td>
<td><h1>Evergreen Public Schools</h1></td>
</tr>
</table>
</header>
<div id=”menu”>
<a href=”index.php”>Home </a>
<a href=”about.php”>About School </a>
<a href=”faculties.php”> School Faculty </a>
<a href=”student_corner.php”> Student Corner </a>
<a href=”feedback.php”>Feedback </a>
</div>
<main id=”wrapper”>
<div ><strong>Welcome:</strong> <?php echo $_SESSION['name']; ?> | <a
href=”logout.php”>Logout</a></div><?php
$roll = $_SESSION['enroll'];
$query = “select * from marksheet where enroll_no = ‘$roll’”;
$sql = mysql_query($query);
$rows = mysql_fetch_object($sql);if ($rows == 1) {
$rollno = $rows->enroll_no;
$hindi = $rows->Hindi;
$math = $rows->Math;
$english = $rows->English;
$science = $rows->Science;
$ss = $rows->Social_Study;
$copmuter = $rows->Copmuter;
}
?>
<div>
<table align=”center” border=”0″ width=”100%”>
<tr>
<td colspan=”6″ align=”center”><h2>Marksheet</h2></td>
</tr>
<tr style=”font-weight:bolder”>
<td colspan=”3″> Student Name: <?php echo $_SESSION['name']; ?></td>
<td colspan=”3″ align=”right”> Student Enrollment No.: <?php echo $rollno;
?></td>
</tr>
<tr align=”center” bgcolor=”#888833″ style=”font-weight:bold”>
<td colspan=”2″> Subject Name </td>
<td colspan=”2″> Marks Obtained</td>
<td colspan=”2″> Total Marks </td>
</tr>
<tr align=”center”>
<td colspan=”2″>Hindi</td>
<td colspan=”2″> <?php echo $hindi; ?></td>
<td colspan=”2″> <?php echo $hindi; ?> </td>
</tr>
<tr align=”center”>
<td colspan=”2″> Englsih</td>
<td colspan=”2″> <?php echo $english; ?></td>
<td colspan=”2″> <?php echo $english; ?> </td>
</tr>
<tr align=”center”>
<td colspan=”2″> Math</td>
<td colspan=”2″> <?php echo $math; ?></td>
<td colspan=”2″> <?php echo $math; ?> </td>
</tr>
<tr align=”center”>
<td colspan=”2″> Science </td>
<td colspan=”2″> <?php echo $science; ?></td>
<td colspan=”2″> <?php echo $science; ?> </td>
</tr>
<tr align=”center”>
<td colspan=”2″> Social Study </td>
<td colspan=”2″> <?php echo $ss; ?></td>
<td colspan=”2″> <?php echo $ss; ?> </td>
</tr>
<tr align=”center”>
<td colspan=”2″> Computer </td>
<td colspan=”2″> <?php echo $copmuter; ?></td>
<td colspan=”2″> <?php echo $copmuter; ?> </td>
</tr>
</table>
</div>
</main>
<div id=”footer”>
<b> Evergreen Public Schools </b><br>
All Rights Reserved &copy; 2010- <?php echo date(‘Y’); ?>
</div>
</div>
</body>
</html>
logout.php
<?php
session_start();
session_destroy();
session_unset();
echo “<script>window.location=’student_corner.php’;</script>”;
?>
Style.css
@charset “utf-8″;
/* CSS Document */
#main_body{
height: auto;
width:900px;
margin:auto;
overflow:hidden;
}#header{
height:auto;
width:auto;
background-color:#989595;
}#menu, a{
height:auto;
width:auto;
background-color:#D8B992;
padding:10px;
text-decoration:none;
}#wrapper{
height:auto;
width:auto;
margin:auto;
}.events{
height:auto;
width:auto;
margin:auto;
}.event_box{
height:200px;
width:200px;
padding:5px;
background-color: #6FE4E2;
float:left;
margin:5px 5px 5px 5px;
}.objectives{
height:auto;
width:550px;
}#footer{
height:auto;
width:auto;
background-color:#989595;
text-align:center;
padding:10px;
}.faculty table, tr, td{
padding:10px;
margin-top:10px;
}.login{
height:200px;
width:400px;
overflow:auto;
border: 2px solid gray;
margin:10px 10px 10px 260px;
background-color:#BCB553;
}.welcome{
height:20px;
width:885px;
background-color: #6DEC9F;
text-align:right;
padding:10px;
}

More Related Content

PDF
PDF
Fundamentals of Web Development For Non-Developers
PPT
URL
PPTX
world wide web
PPT
How the internet_works
PPTX
Learning Managment System
PPT
Website Introduction
PPT
Accessibility Workshop
Fundamentals of Web Development For Non-Developers
URL
world wide web
How the internet_works
Learning Managment System
Website Introduction
Accessibility Workshop

What's hot (20)

PPSX
HTML + CSS Examples
PPT
Dream weaver ppt
PDF
Meeting 13. web server i
PPTX
State management
PPTX
Domain and hosting
PPTX
PDF
Web Design Proposal Powerpoint Presentation Slides
PDF
Html for beginners
DOCX
100 PHP question and answer
PPTX
Website design with Wordpress ppt
DOC
Online shopping ecommerce java project
PPTX
Search Engine
PDF
CSS Dasar #2 : Anatomy CSS
PDF
Front-end development for headless cms
PPT
School Management System
PPTX
Expense Tracker power point presentation
PPT
Web Development Ppt
PPTX
web development.pptx
PPT
Websites 101 PowerPoint Presentation
HTML + CSS Examples
Dream weaver ppt
Meeting 13. web server i
State management
Domain and hosting
Web Design Proposal Powerpoint Presentation Slides
Html for beginners
100 PHP question and answer
Website design with Wordpress ppt
Online shopping ecommerce java project
Search Engine
CSS Dasar #2 : Anatomy CSS
Front-end development for headless cms
School Management System
Expense Tracker power point presentation
Web Development Ppt
web development.pptx
Websites 101 PowerPoint Presentation
Ad

Similar to BCSL 057 solved assignments (20)

PPTX
Presentation on a website of Department of computer science and engineering
PPT
296612332-College-Website-Presentation.ppt
PPT
eLESOFT-Overview
PPTX
Open source school management system
PPTX
Academic Audit PPT Template - BGSCET.pptx
PPTX
Major.ppt
PPT
Web Design Informative Slideshow
PPTX
PDF
Fall_2008_CS601_W1_Tyngsboro
PDF
Fall_2008_CS601_W1_Tyngsboro
PDF
Fall_2008_CS601_W1_Tyngsboro
PDF
Fall_2008_CS601_W1_Tyngsboro
PDF
Web Technology LAB MANUAL for Undergraduate Programs
DOCX
educational website report
PDF
CPSC 633-600 Machine Learning: Spring 2009
PPTX
Data storing & retrieval system
PPTX
PPT Final Project - College Website.pptx
DOCX
Portalimagesstart_here.jpgPortalindex.htmlClasses      .docx
DOCX
SchoolSearch Retrospective Summary Report422018Summary1st .docx
PPTX
School Informatics Profile
Presentation on a website of Department of computer science and engineering
296612332-College-Website-Presentation.ppt
eLESOFT-Overview
Open source school management system
Academic Audit PPT Template - BGSCET.pptx
Major.ppt
Web Design Informative Slideshow
Fall_2008_CS601_W1_Tyngsboro
Fall_2008_CS601_W1_Tyngsboro
Fall_2008_CS601_W1_Tyngsboro
Fall_2008_CS601_W1_Tyngsboro
Web Technology LAB MANUAL for Undergraduate Programs
educational website report
CPSC 633-600 Machine Learning: Spring 2009
Data storing & retrieval system
PPT Final Project - College Website.pptx
Portalimagesstart_here.jpgPortalindex.htmlClasses      .docx
SchoolSearch Retrospective Summary Report422018Summary1st .docx
School Informatics Profile
Ad

More from Indira Gnadhi National Open University (IGNOU) (18)

PDF
Mcs 17 solved assignment 2015- 16
PDF
Mcs 16 solved assignment 2015-16
PDF
Mcs 014 solved assignment 2015-16
PDF
Mcs 012 soved assignment 2015-16
PDF
Mcs 011 solved assignment 2015-16
PDF
PDF
Bcs 053 solved assignment 2014-15
PDF
2012 bcsl-021 solve assihnment
PDF
Bcsl 022 solved-assignment_2012-13

Recently uploaded (20)

PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
Complications of Minimal Access Surgery at WLH
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Institutional Correction lecture only . . .
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
Pharma ospi slides which help in ospi learning
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
master seminar digital applications in india
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Complications of Minimal Access Surgery at WLH
O7-L3 Supply Chain Operations - ICLT Program
Anesthesia in Laparoscopic Surgery in India
STATICS OF THE RIGID BODIES Hibbelers.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Microbial disease of the cardiovascular and lymphatic systems
Insiders guide to clinical Medicine.pdf
Institutional Correction lecture only . . .
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Pharma ospi slides which help in ospi learning
Abdominal Access Techniques with Prof. Dr. R K Mishra
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
master seminar digital applications in india
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
VCE English Exam - Section C Student Revision Booklet

BCSL 057 solved assignments

  • 1. Course Code : BCSL-057 Course Title : Web Programming Lab Assignment Number : BCA(V)/057/Assign/14-15 This assignment has one question of 40 marks. Rest 10 marks are for viva voce. Please go through the guidelines regarding assignments given in the programme guide for the format of presentation. Question 1: Create a Sample site for your School having the following features (you must use CSS preferably as a separate file): (a) The website should consist of four different areas – HEADER area, FOOTER area, MENU area and CONTENT area. (b) All the pages of this web site should have common HEADER area consisting of the School Name with logo, and the mission of the school. You must use CSS to format this area. (c) All the pages should have FOOTER area that must contain the copyright details of the website. It should contain the date and time of last update of the website as well as contact information of the school. (d) The title of each page should be contain the school name. (e) The MENU area of the website should contain a drop down menu consisting of following menu items: Home, About School, School Faculty, Student Corner, Feedback Please note that the HEADER, MENU and FOOTER areas should be visible in all the web pages. Each menu item should be linked to a webpage. (f) The CONTENT area of Home page should contain the information about the Objectives of the school and present events in the school. The events must be stored in a database and should be displayed from the database. (g) The CONTENT area of About School page should contain the history of the school, school location on a map and how to reach directions. The history should be shown in a table form with alternative rows having different shading. (h) The CONTENT area of the School Faculty page should contain names and qualifications of all the teachers of the school in a subject wise lists of primary, middle and senior teachers categories. (i) The CONTENT area of Student Corner page should have a login page. The login account name and password must be verified from a database, and if found correct, student must be shown her/his marks. You must design suitable database for this. (j) The feedback form should get the following information – a. Name of the person seeking information, the question and his/her email ID on which reply could be sent. b. You must check that all the fields of feedback form are duly filled up properly. Use JavaScript for this purpose. c. The feedback should be submitted and stored in a database. Solution: The answers of the question are given below. The website of school is created in HTML using PHP Script and JavaScript.
  • 2. NOTE:- you have to install WampServer on your computer to run these following source codes, because the PHP script runs on Server. The Web site i have created is very simple and easy that helps you students to understand the programming of site. you can copy or download the below source code and make change of the look and feel of the website. Index.php <?php error_reporting(0); include(‘/database/db.php’); ?> <!doctype html> <html> <head> <meta charset=”utf-8″> <link type=”text/css” rel=”stylesheet” href=”style.css”> <title></title> </head> <body> <div id=”main_body”> <header id=”header”> <table> <tr> <td><img src=”banner_sm.jpg”></td> <td id=”schoolname”><h1>Evergreen Public Schools</h1></td> </tr> </table> <div id=”menu”> <a href=”index.php”>Home </a> <a href=”about.php”>About School </a> <a href=”faculties.php”> School Faculty </a> <a href=”student_corner.php”> Student Corner </a> <a href=”feedback.php”>Feedback </a> </div> </header> <main id=”wrapper”> <div class=”events”> <h2>Our Current Events:</h2> &uarr; <?php $sql = “select * from events”; $query = mysql_query($sql); while($rows = mysql_fetch_assoc($query)){ $name = $rows['event_name']; $date = $rows['event_date'];
  • 3. $id = $rows['id']; $descp = $rows['descp']; ?> <div class=”event_box”> <h2> <?php echo $name .”<br>”; ?></h2> <strong><?php echo “Date: “.$date.”<br>”; ?></strong> <?php echo $descp; ?> </div> <?php } ?> </div> <div class=”objectives”> <h2> Objectives:</h2> <ul> <li>To provide elementary schools in hamlets where there are no schools</li> <li>To provide free and compulsory education for all children of age group 6-14.</li> <li>To enroll school age children in schools before 2003.</li> <li>To provide five years of schooling all children before 2007.</li> <li>To provide eight years of schooling for all children before 2010.</li> <li>To eradicate dropouts before 2010 fully.</li> <li>To improve the basic amenities in schools.</li> <li>To improve and enrich the syllabus.</li> <li>To improve the quality of education from the pre-school to higher secondary school level.</li> <li>To ensure minimum levels of learning.</li> <li>To impart refresher training to teachers.</li> <li>To eradicate illiteracy</li> <li>To involve the parents in the management of schools to a great extent.</li> <li>To encourage health education in schools.</li> <li>To give importance to vocational training schools.</li> <li>To open village libraries where there is a population of 5000 and above.</li> <li>To distribute quality textbooks at fair price in time.</li> </ul> </div> </main> <div id=”footer”> <b> Evergreen Public Schools </b><br> All Rights Reserved &copy; 2010- <?php echo date(‘Y’); ?> </div>
  • 4. </div> </body> </html> Home Page: about.php <?php error_reporting(0); include(‘/database/db.php’); ?> <!doctype html> <html> <head> <meta charset=”utf-8″> <link type=”text/css” rel=”stylesheet” href=”style.css”> <title>Evergreen Public Schools</title> <script src=”http://maps.googleapis.com/maps/api/js”></script> <script> function initialize() { var mapProp = { center:new google.maps.LatLng(20.052138,80.251608),
  • 5. zoom:5, mapTypeId:google.maps.MapTypeId.ROADMAP }; var map=new google.maps.Map(document.getElementById(“googleMap”),mapProp); } google.maps.event.addDomListener(window, ‘load’, initialize); </script> </head> <body> <div id=”main_body”> <header id=”header”> <table> <tr> <td><img src=”banner_sm.jpg”></td> <td><h1>Evergreen Public Schools</h1></td> </tr> </table> </header> <div id=”menu”> <a href=”index.php”>Home </a> <a href=”about.php”>About School </a> <a href=”faculties.php”> School Faculty </a> <a href=”student_corner.php”> Student Corner </a> <a href=”feedback.php”>Feedback </a> </div> <main id=”wrapper”> <div > <table> <tr> <td><h2>Our History</h2></td> </tr> <tr> <td> <img src=”220px-Lmspic.png”> <p> Provision of quality education, a felt need of the newly developed Janakpuri colony in the seventies was met with the opening of St. Mark’s school in January 1975 by the visionary founder Chairman Mr. T.P. Aggarwal. The school which had a modest beginning grew by leaps and bounds and in a few years’ time there was an all round expansion in the enrolment of students, enlargement of the school building, growth in the number of teaching and other staff and upgradation of the school from middle to senior secondary level.Inspired by the success of the school,
  • 6. another Senior Secondary Public School was established in Meera Bagh, (Paschim Vihar). This school was inaugurated by the then Lt. Governor of Delhi, Air Chief Marshal Arjan Singh on April 20, 1990. With a strength of over 3500 students this co-educational, English medium institution excels in all spheres.In addition to these Senior Secondary School, St. Mark’s runs an exclusive school for girls in Meera Bagh. The main building of St. Marks Girls School, was inaugurated by the Hon’able Chief Minister of N.C.T of Delhi, Ms. Sheila Dixit on January 19, 2000.All the school buildings are set amidst beautiful green lawns and have all facilities required for the all round development of children such as well stocked libraries and well-equipped laboratories for Physics, Chemistry, Biology, Home Science,Computer Science etc. </p> </td> </tr> <tr> <td><h2>School Location</h2></td> </tr> <tr> <td><div id=”googleMap” style=”width:500px;height:380px;”></div></td> </tr> </table> </div> </main> <div id=”footer”> <b> Evergreen Public Schools </b><br> All Rights Reserved &copy; 2010- <?php echo date(‘Y’); ?> </div> </div> </body> </html>
  • 7. About Us Page: faculties.php <?php error_reporting(0); include(‘/database/db.php’); ?> <!doctype html> <html> <head> <meta charset=”utf-8″> <link type=”text/css” rel=”stylesheet” href=”style.css”> <title>Evergreen Public Schools</title> </head> <body> <div id=”main_body”> <header id=”header”> <table> <tr> <td><img src=”banner_sm.jpg”></td> <td><h1>Evergreen Public Schools</h1></td> </tr> </table> </header> <div id=”menu”>
  • 8. <a href=”index.php”>Home </a> <a href=”about.php”>About School </a> <a href=”faculties.php”> School Faculty </a> <a href=”student_corner.php”> Student Corner </a> <a href=”feedback.php”>Feedback </a> </div> <main id=”wrapper”> <table border=”2″ > <h2>Our Faculties:</h2> <tr> <td bgcolor=”#6F6465″>Name</td> <td bgcolor=”#6F6465″>Qualification</td> <td bgcolor=”#6F6465″>Subject</td> <td bgcolor=”#6F6465″>Catogery</td> </tr> <tr> <td>Mr. Anil Kumar</td> <td>MCA</td> <td>Computer</td> <td>Senoir</td> </tr> <tr> <td>Dr. Hemant Sharma</td> <td>PhD</td> <td>English</td> <td>Senior</td> </tr> <tr> <td>Mrs. Aparna Dev</td> <td>MBA</td> <td>Management</td> <td>Senior</td> </tr> <tr> <td>Mr. Dhiraj Sah</td> <td>BCA</td> <td>IT</td> <td>Middle</td> </tr> <tr> <td>Mr. Prakash Shing</td> <td>BCA</td> <td>Computer</td>
  • 9. <td>Primary</td> </tr> </table> </main> <div id=”footer”> <b> Evergreen Public Schools </b><br> All Rights Reserved &copy; 2010- <?php echo date(‘Y’); ?> </div> </div> </body> </html> Faculties Page: Student_corner.php <?php error_reporting(0); include(‘/database/db.php’); session_start();if (isset($_POST['login'])){ $username = $_POST['uname']; $password = $_POST['pass'];$sql = “select * from students where username =
  • 10. ‘$username’ and password = ‘$password’”; $query = mysql_query($sql); $row = mysql_fetch_object($query);if ($row == 1) { $_SESSION['id'] =$row->id; $_SESSION['name'] =$row->username; $_SESSION['enroll'] =$row->enroll_no; echo “<script>window.location=’student_page.php’;</script>”; } else{ echo “<script>alert(‘Username or Password not Matched’)</script>”;} } ?> <!doctype html> <html> <head> <meta charset=”utf-8″> <link type=”text/css” rel=”stylesheet” href=”style.css”> <title>Evergreen Public Schools</title> </head><body> <div id=”main_body”> <header id=”header”> <table> <tr> <td><img src=”banner_sm.jpg”></td> <td><h1>Evergreen Public Schools</h1></td> </tr> </table> </header> <div id=”menu”> <a href=”index.php”>Home </a> <a href=”about.php”>About School </a> <a href=”faculties.php”> School Faculty </a> <a href=”student_corner.php”> Student Corner </a> <a href=”feedback.php”>Feedback </a> </div> <main id=”wrapper”> <div> <form action=”" method=”post”> <table align=”center”> <tr><td colspan=”2″ align=”center” bgcolor=”#6B6B6B”><strong style=”color:#FFFFFF”>Student Login</strong></td></tr> <tr> <td><b>Username:</b></td> <td><input type=”text” name=”uname” ></td>
  • 11. </tr> <tr> <td><b>Password:</b></td> <td><input type=”password” name=”pass” ></td> </tr> <tr> <td></td> <td><input type=”submit” name=”login” value=”Login”></td> </tr> </table> </form> </div> </main> <div id=”footer”> <b> Evergreen Public Schools </b><br> All Rights Reserved &copy; 2010- <?php echo date(‘Y’); ?> </div> </div> </body> </html> Student Corner Page:
  • 12. Feedback.php <?php error_reporting(0); include(‘/database/db.php’); if (isset($_POST['sent'])){ $name = $_POST['name']; $email = $_POST['mail']; $msg = $_POST['msg']; $sql = “insert into feedback(name, email, msg) value(‘$name’, ‘$email’, ‘$msg’)”; $query = mysql_query($sql); if ($query) { $mssg = “Thnak You $name for your Feedback!”; } else{ echo “Error in feedback”;} } ?> <!doctype html> <html> <head> <meta charset=”utf-8″> <link type=”text/css” rel=”stylesheet” href=”style.css”> <title>Evergreen Public Schools</title> <script type=”text/javascript”> function validate() { if(document.getElementById(‘name’).value==”) { alert(‘Please Enter Name’); return false; } else if(document.getElementById(‘email’).value==”) { alert(‘Please Enter Email ID’); return false; } else if(document.getElementById(‘msg’).value==”) { alert(‘Please Enter your Meaasge’); return false; } } </script> </head> <body>
  • 13. <div id=”main_body”> <header id=”header”> <table> <tr> <td><img src=”banner_sm.jpg”></td> <td><h1>Evergreen Public Schools</h1></td> </tr> </table> </header> <div id=”menu”> <a href=”index.php”>Home </a> <a href=”about.php”>About School </a> <a href=”faculties.php”> School Faculty </a> <a href=”student_corner.php”> Student Corner </a> <a href=”feedback.php”>Feedback </a> </div> <main id=”wrapper”> <form action=”" method=”post” onsubmit=”return validate()”> <table align=”center”> <tr><td colspan=”2″ align=”center” bgcolor=”#6B6B6B”><strong style=”color:#FFFFFF”>Submit your Queries</strong></td></tr> <tr> <td><b>Name:</b></td> <td><input type=”text” name=”name” id=”name” ></td> </tr> <tr> <td><b>Email id:</b></td> <td><input type=”email” name=”mail” id=”email”></td> </tr> <tr> <td valign=”top”><b>Message:</b></td> <td><textarea cols=”30″ rows=”5″ name=”msg” id=”msg”></textarea></td> </tr> <tr> <td><?php echo $mssg ?></td> <td><input type=”submit” name=”sent” value=”Submit”></td> </tr> </table> </form> </main> <div id=”footer”> <b> Evergreen Public Schools </b><br> All Rights Reserved &copy; 2010- <?php echo date(‘Y’); ?>
  • 14. </div> </div> </body> </html> Feedback Page: Student_page.php <?php error_reporting(0); session_start(); include(‘/database/db.php’); ?> <!doctype html> <html> <head> <meta charset=”utf-8″> <link type=”text/css” rel=”stylesheet” href=”style.css”> <title>Evergreen Public Schools</title> </head> <body> <div id=”main_body”> <header id=”header”> <table> <tr>
  • 15. <td><img src=”banner_sm.jpg”></td> <td><h1>Evergreen Public Schools</h1></td> </tr> </table> </header> <div id=”menu”> <a href=”index.php”>Home </a> <a href=”about.php”>About School </a> <a href=”faculties.php”> School Faculty </a> <a href=”student_corner.php”> Student Corner </a> <a href=”feedback.php”>Feedback </a> </div> <main id=”wrapper”> <div ><strong>Welcome:</strong> <?php echo $_SESSION['name']; ?> | <a href=”logout.php”>Logout</a></div><?php $roll = $_SESSION['enroll']; $query = “select * from marksheet where enroll_no = ‘$roll’”; $sql = mysql_query($query); $rows = mysql_fetch_object($sql);if ($rows == 1) { $rollno = $rows->enroll_no; $hindi = $rows->Hindi; $math = $rows->Math; $english = $rows->English; $science = $rows->Science; $ss = $rows->Social_Study; $copmuter = $rows->Copmuter; } ?> <div> <table align=”center” border=”0″ width=”100%”> <tr> <td colspan=”6″ align=”center”><h2>Marksheet</h2></td> </tr> <tr style=”font-weight:bolder”> <td colspan=”3″> Student Name: <?php echo $_SESSION['name']; ?></td> <td colspan=”3″ align=”right”> Student Enrollment No.: <?php echo $rollno; ?></td> </tr> <tr align=”center” bgcolor=”#888833″ style=”font-weight:bold”> <td colspan=”2″> Subject Name </td> <td colspan=”2″> Marks Obtained</td> <td colspan=”2″> Total Marks </td> </tr>
  • 16. <tr align=”center”> <td colspan=”2″>Hindi</td> <td colspan=”2″> <?php echo $hindi; ?></td> <td colspan=”2″> <?php echo $hindi; ?> </td> </tr> <tr align=”center”> <td colspan=”2″> Englsih</td> <td colspan=”2″> <?php echo $english; ?></td> <td colspan=”2″> <?php echo $english; ?> </td> </tr> <tr align=”center”> <td colspan=”2″> Math</td> <td colspan=”2″> <?php echo $math; ?></td> <td colspan=”2″> <?php echo $math; ?> </td> </tr> <tr align=”center”> <td colspan=”2″> Science </td> <td colspan=”2″> <?php echo $science; ?></td> <td colspan=”2″> <?php echo $science; ?> </td> </tr> <tr align=”center”> <td colspan=”2″> Social Study </td> <td colspan=”2″> <?php echo $ss; ?></td> <td colspan=”2″> <?php echo $ss; ?> </td> </tr> <tr align=”center”> <td colspan=”2″> Computer </td> <td colspan=”2″> <?php echo $copmuter; ?></td> <td colspan=”2″> <?php echo $copmuter; ?> </td> </tr> </table> </div> </main> <div id=”footer”> <b> Evergreen Public Schools </b><br> All Rights Reserved &copy; 2010- <?php echo date(‘Y’); ?> </div> </div> </body> </html> logout.php
  • 17. <?php session_start(); session_destroy(); session_unset(); echo “<script>window.location=’student_corner.php’;</script>”; ?> Style.css @charset “utf-8″; /* CSS Document */ #main_body{ height: auto; width:900px; margin:auto; overflow:hidden; }#header{ height:auto; width:auto; background-color:#989595; }#menu, a{ height:auto; width:auto; background-color:#D8B992; padding:10px; text-decoration:none; }#wrapper{ height:auto; width:auto; margin:auto; }.events{ height:auto; width:auto; margin:auto; }.event_box{ height:200px; width:200px; padding:5px; background-color: #6FE4E2; float:left; margin:5px 5px 5px 5px; }.objectives{ height:auto; width:550px;
  • 18. }#footer{ height:auto; width:auto; background-color:#989595; text-align:center; padding:10px; }.faculty table, tr, td{ padding:10px; margin-top:10px; }.login{ height:200px; width:400px; overflow:auto; border: 2px solid gray; margin:10px 10px 10px 260px; background-color:#BCB553; }.welcome{ height:20px; width:885px; background-color: #6DEC9F; text-align:right; padding:10px; }