Вы находитесь на странице: 1из 148

A

Minor Project Report


On
Computer Science Department Portal

Preface

Project initiation is the process of formally conceiving, approving, and launching a


new project. You don’t really have a project until the appropriate stakeholders have
approved it during initiation. The time and thought invested during initiation lays
the groundwork for all the project work that follows.

All project managers know of certain steps to take at the beginning of a project.
They need to develop a business case, write a project charter, obtain sponsorship
and funding, assign a project manager, assemble the team, acquire other resources,
and develop a project plan.

Our project is the web portal of Computer Science Department and works as an
interface between the students and the Faculties of the Department.

This project provides the students the facilities to


 Play the quizzes on the Portal
 Register themselves
 View the updates about the Department
 View the information about the Faculties
 View the Photo Gallery of the Department
 Download e-books and syllabus
SYNOPSIS

Name of student: 1. Hitesh Bajoria


2. Sudarshan Singhal
3. Sudershan Malpani
4. Sudhir Phophaliya
5. Tarun Deep Chhabra
Title of Project: Computer Science Department Portal

Software used: 1. Adobe Dreamweaver


2. XAMPP Server

Guided by: Mr. Naveen Hemrajani Sir


Head of the Department
Computer Science Engineering

Suggestions for reformulating:

Teacher Signature: _____________

Computer Science Department Portal


 Existing System: There is no such system available for department.
The students cannot communicate with teachers properly. There is a
great problem in keeping record of daily attendance, performance of
each student, profile of each person associated with the department,
and there was a lot of difficulties for the student regarding interaction
with the faculties and viewing the current updates.

 Proposed System: The proposed system is to make an online web


portal for Computer Science Department, so that everyone can get
information about department, students can easily communicate with
teachers from anywhere. Teachers can easily communicate with the
parents, and can keep records of every student easily and efficiently.
The proposed system could be accessed from any corner of the
world on net.

 Modules: The various modules use in the Computer Science


Department Web Portal is explained below.

 Academics: academics module provides information about


the

 Study material: This module gives the facility to read and


download the study material available on the website. The
module could be edited only by the administrator of the web
portal. Any student can download the material available at
any time.

 About Us: The About Us module gives the information about

 Quiz: Various quizzes could be played by the students on


available subjects. Quizzes are designed by the teachers.
They can add questions to the particular subject quiz.
Students can only answer the questions available in quiz. A
quiz could be taken any number of times by a student and
the results are displayed at the same time.

 Faculties: This module gives profile information of various


faculties associated to the department. It gives profile
information of all the faculties. Anyone can contact to these
faculties through available email addresses.
 Students: This is a separate webpage for students. They
can view, edit, and update their profile from anywhere.
Student can download documents as well.

 Syllabus: The syllabus of various branches associated with


Computer Science Department is available here. Syllabus
can be viewed and downloaded by students.

 Technology: This displays the information about various


technologies to be used in present scenario. Various links
are available for detailed information upon different
technologies.

 System Requirements:

Operating System Windows 98, Windows XP,

Windows Vista.

Software Adobe Dreamweaver 8.0.

XAMPP Server.

Hardware PC with minimum 20 GB Hard Disk,


minimum 512 MB Ram According to
Operating System Used.
Actual Documentation
Software Requirement Specification

1.) Introduction:

Purpose: - Computer Science Department portal is an online web


portal for the students and faculties. It is an interactive service for
students and information seekers of Gyan Vihar Computer Science
Department. It is easy to access and use for communication between
faculties and students. It can also be used for keeping track of
information and documents of students and faculties as well.

1.1) Goals and Objective:


 It is easy for new users to register and create new account.
 It maintains a central base of information.
 It delivers all the information about student profile as well as
students attendance to be accessible by faculties.
 It displays syllabus of various batches of CS Department.
 Faculties can view the profile of any of the student.
 Students can view their previous results, can read books, and can
communicate with teachers through provided email addresses.

1.2) System statement of scope: Major inputs include all the


particulars like student name, batch, student’s attendance and
various studies material etc. for all the students in the department.
Inputs include details of students and faculties. Outputs include
information about department, students result, students and faculties
profile and study material available for student, syllabus of various
batches.

1.3) System Context: Creating webpage for Computer science


Department and implementing it on internet is really a great idea both
for the information seekers as well as for students and faculties of
department. It greatly helps the department and other users as
information about department and students is available at any time on
web. It increases the ease both for students and faculties.
1.4) Technologies used:
 Adobe Dreamweaver for PHP
 MySQL-2005: Database.

1.5) Overview:
Overall Description will describe major modules of the webpage and
functionality of various major modules used in the webpage.
2) Overall Description:

2.1) Communication Interface:


 Client on Internet will be using HTTP/HTTPS protocol.
 IIS connect to mail server with SMTP protocols.

2.2) Software Interface:


 Client on Internet: Web Browser, Operating System (any)
 Web Server: Operating System (any)
 Data Base Server: SQL, Operating System (any)
 Development End: Adobe Dreamweaver.

2.3) Hardware Interface:

Client Side

Hardware requirements

S.
No Alternative (If
. Description available)

PC with 20 GB hard-disk
and minimum 512 MB RAM
1 with Internet facility. Not-Applicable

Software Requirements

S.
No Alternative (If
. Description available)
1 Internet Explorer Mozilla Firefox /
Google Chrome /
Apple Safari
Server side

Hardware requirements

S.
No Alternative (If
. Description available)
PC with 160 GB hard-disk
and 2 GB RAM with Internet
1 facility. Not-Applicable

Software Requirements

S.
No Alternative (If
. Description available)
1 Window XP with MS-Office Not-Applicable
2 MS-SQL Server MS-Access

2.4) Constraints:

 GUI is only in English.


 Login and password is used for identification of User.

2.5) Use case Survey:

2.5.1) Administrator: Administrator is the central user of the webpage.


He is the only person who can add, delete and update the whole
database present on the webpage as well as in backend database.
He can control various operations to be used by students and
faculties. All the moves could be viewed by administrator at any
instance. A dual password security is provided to the administrator
for the prevention of hacking.

2.5.2) Other User: Other user include users other then administrator can
be faculties, students or any other person. The faculties can view
profile of any student and faculty of the department. They can also
feed attendance, study material references and comments for
various students.

2.6) Assumption and Dependencies:-

 User now the English and have good knowledge of surfing.


 Only registered users can login to its account.
 Roles and tasks of each method are predefined.
3) Specific requirement:

Use case report:-

3.1) Administrator:
 Administrator can update the study material available for the students;
can update information about the department.
 He can also update the quiz information (a facility available for all the
users of the webpage).
 He can edit or delete the accounts of students and faculties and other
users.
 Administrator can update any information about department available
on the website.
 Administrator can update current and previous news about
department.

3.2) Module Functioning:

Student:
 A student can view his academic performance.
 He can view his attendance and marks in various subjects.
 He can give various quizzes according to subjects.
 He can also download or read the study material available for the
students.
 He can also view the limited profile of the faculties and students of the
department.

 Total number of students could also be viewed on this module.


Faculty:
 Faculty can view profile of any student of the department.
 A faculty can view profile of other faculties of the department.
 Faculty can update academic information about student like
attendance, marks etc.
 Faculty can view marks scored by various students in quiz.

Academics:
 Academics module consists of academics of the branches associated
with the Computer science Department.
 Present available academics are for B.Tech, M.tech and M.Tech dual
courses.

Study Material:
 This module consists the basic study material available for the students.
 It also consists various links of other WebPages providing study material.
 The material could be downloaded by the student any time.
 This module can be updated only by the administrator.

About Us:
 About Us module describes about the department.
 It gives basic information related to the college and department.

Quiz:
 The quiz module gives the facility to students to take quiz base on their
general knowledge about subject.
 Student can choose any of the given subjects.
 Various links are also available for taking other quizzes through other
websites.
Technology:
 This module consists the information about the present latest technologies
in the market.
 It gives an overview to the student about present scenario.

Syllabus:
 Syllabus module consists syllabus of various batches according to their
curriculum.
 This module can only be edited by administrator.
 Syllabus of Rajasthan Technical University and Gyan Vihar University are
available on this module.
Technologies Used
PHP

PHP is a widely used, general-purpose scripting language that was


originally designed for web development, to produce dynamic web pages. It
can be embedded into HTML and generally runs on a web server, which
needs to be configured to process PHP code and create web page content
from it. It can be deployed on most web servers and on almost every
operating system and platform free of charge. PHP is installed on over 20
million websites and 1 million web servers.
PHP was originally created by Rasmus Lerdorf in 1995 and has been in
continuous development ever since. The main implementation of PHP is
now produced by The PHP Group and serves as the de facto standard for
PHP as there is no formal specification. PHP is free software released
under the PHP License, which is incompatible with the GNU General Public
License (GPL) because of restrictions on the use of the term PHP.
PHP has evolved to include a command line interface capability and can
also be used in standalone graphical applications.

What is PHP?
PHP is a widely-used open source general-purpose scripting language that
is especially suited for web development and can be embedded into HTML.

Nice, but what does that mean? An example:

Example An introductory example

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Example</title>
</head>
<body>

<?php
echo "Hi, I'm a PHP script!";
?>

</body>
</html>

Instead of lots of commands to output HTML (as seen in C or Perl), PHP


pages contain HTML with embedded code that does "something" (in this
case, output "Hi, I'm a PHP script!"). The PHP code is enclosed in special
start and end processing instructions <?php and ?> that allow you to jump
into and out of "PHP mode."

What distinguishes PHP from something like client-side JavaScript is that


the code is executed on the server, generating HTML which is then sent to
the client. The client would receive the results of running that script, but
would not know what the underlying code was. You can even configure
your web server to process all your HTML files with PHP, and then there's
really no way that users can tell what you have up your sleeve.

The best things in using PHP are that it is extremely simple for a
newcomer, but offers many advanced features for a professional
programmer. Don't be afraid reading the long list of PHP's features. You
can jump in, in a short time, and start writing simple scripts in a few hours.

What can PHP do?

Anything. PHP is mainly focused on server-side scripting, so you can do


anything any other CGI program can do, such as collect form data,
generate dynamic page content, or send and receive cookies. But PHP can
do much more.

There are three main areas where PHP scripts are used.
 Server-side scripting. This is the most traditional and main target field
for PHP. You need three things to make this work. The PHP parser
(CGI or server module), a web server and a web browser. You need
to run the web server, with a connected PHP installation. You can
access the PHP program output with a web browser, viewing the
PHP page through the server. All these can run on your home
machine if you are just experimenting with PHP programming. See
the installation instructions section for more information.
 Command line scripting. You can make a PHP script to run it without
any server or browser. You only need the PHP parser to use it this
way. This type of usage is ideal for scripts regularly executed using
cron (on *nix or Linux) or Task Scheduler (on Windows). These
scripts can also be used for simple text processing tasks. See the
section about Command line usage of PHP for more information.
 Writing desktop applications. PHP is probably not the very best
language to create a desktop application with a graphical user
interface, but if you know PHP very well, and would like to use some
advanced PHP features in your client-side applications you can also
use PHP-GTK to write such programs. You also have the ability to
write cross-platform applications this way. PHP-GTK is an extension
to PHP, not available in the main distribution. If you are interested in
PHP-GTK, visit » its own website.

PHP can be used on all major operating systems, including Linux, many
Unix variants (including HP-UX, Solaris and OpenBSD), Microsoft
Windows, Mac OS X, RISC OS, and probably others. PHP has also
support for most of the web servers today. This includes Apache, Microsoft
Internet Information Server, Personal Web Server, Netscape and iPlanet
servers, Oreilly Website Pro server, Caudium, Xitami, OmniHTTPd, and
many others. For the majority of the servers, PHP has a module, for the
others supporting the CGI standard, PHP can work as a CGI processor.

One of the strongest and most significant features in PHP is its support for
a wide range of databases. Writing a database-enabled web page is
incredibly simple. The following databases are currently supported:

 Adabas D
 dBase
 Empress
 FilePro (read-only)
 Hyperwave
 IBM DB2
 Informix
 Ingres
 InterBase
 FrontBase
 mSQL
 Direct MS-SQL
 MySQL
 ODBC
 Oracle (OCI7 and OCI8)
 Ovrimos
 PostgreSQL
 SQLite
 Solid
 Sybase
 Velocis
 Unix dbm

Why use PHP-Nuke and not static HTML pages?

 Because managing large sites with only static HTML pages is


dangerous for your health.
 Because through the dynamic pages, users can interact (Forum,
chat)
 Because through the dynamic pages we can offer value added
services (restricted areas, various services based on user
classification...)
 Because the information is more easily catalogued.
 Because with a few PHP pages we recall a lot of information.
 Because keeping the contents up-to-date does not demand particular
technical expertise and can be managed by anyone (by Davis
Batistes).
 It is very intuitive and easy to learn (by Anonymous)
 It is easy to modify by those who intend to personalize the program
(By Arus)
 It is easy to use by the lesser experts among us.

MySQL
What is MySQL?
MySQL is a database. MySQL is the most popular open-source database
system. The free MySQL database is very often used with PHP. A
database holds one or multiple tables.

The data in MySQL is stored in database objects called tables.

A table is a collection of related data entries and it consists of columns and


rows.

Databases are useful when storing information categorically. A company


may have a database with the following tables: "Employees", "Products",
"Customers" and "Orders".

Database Tables
A database most often contains one or more tables. Each table is identified
by a name (e.g. "Customers" or "Orders"). Tables contain records (rows)
with data.

Below is an example of a table called "Persons":

LastName FirstName Address City

Hansen Ola Timoteivn 10 Sandnes

Svendson Tove Borgvn 23 Sandnes

Pettersen Kari Storgt 20 Stavanger


The table above contains three records (one for each person) and four
columns (LastName, FirstName, Address, and City).

Queries
A query is a question or a request.

With MySQL, we can query a database for specific information and have a
recordset returned.

Look at the following query:

SELECT LastName FROM Persons

The query above selects all the data in the "LastName" column from the
"Persons" table, and will return a recordset like this:

LastName

Hansen

Svendson

Pettersen

Facts about MySQL Database

One great thing about MySQL is that it can be scaled down to support
embedded database applications. Perhaps it is because of this reputation
that many people believe that MySQL can only handle small to medium-
sized systems.
The truth is that MySQL is the de-facto standard database for web sites
that support huge volumes of both data and end users (like Friendster,
Yahoo and Google).

Adobe Dreamweaver
Adobe Dreamweaver (formerly Macromedia Dreamweaver) is a web
development application originally created by Macromedia, and is now
developed by Adobe Systems, which acquired Macromedia in 2005.

Dreamweaver is available for both Mac and Windows operating systems.


Recent versions have incorporated support for web technologies such as
CSS, JavaScript, and various server-side scripting languages and
frameworks including ASP, ColdFusion, and PHP.

Features

Although a hybrid WYSIWYG and code-based web design and


development application, Dreamweaver's WYSIWYG mode can hide the
HTML code details of pages from the user, making it possible for non-
coders to create web pages and sites. One criticism of this approach is that
it has the potential to produce HTML pages whose file size and amount of
HTML code is larger than an optimally hand-coded page would be, which
can cause web browsers to perform poorly. This can be particularly true
because the application makes it very easy to create table-based layouts.

In addition, some web site developers have criticized Dreamweaver in the


past for producing code that often does not comply with W3C standards,
though recent versions have been more compliant. Dreamweaver 8.0
performed poorly on the Acid2 Test, developed by the Web Standards
Project. However, Adobe has focused on support for standards-based
layout in recent and current versions of the application, including the ability
to convert tables to layers.
Dreamweaver allows users to preview websites in locally-installed web
browsers. It also has site management tools, such as FTP/SFTP and
WebDAV file transfer and synchronization features, the ability to find and
replace lines of text or code by search terms and regular expressions
across the entire site, and a tem plating feature that allows single-source
update of shared code and layout across entire sites without server-side
includes or scripting. The behaviors panel also enables use of basic
JavaScript without any coding knowledge, and integration with Adobe's
Spry AJAX framework offers easy access to dynamically-generated content
and interfaces.

Dreamweaver can utilize third-party "Extensions" to enable and extend


core functionality of the application, which any web developer can write
(largely in HTML and JavaScript). Dreamweaver is supported by a large
community of extension developers who make extensions available (both
commercial and free) for most web development tasks from simple rollover
effects to full-featured shopping carts.

Like other HTML editors, Dreamweaver edits files locally, then uploads all
edited files to the remote web server using FTP, SFTP, or WebDAV.
Dreamweaver CS4 now supports the Subversion (SVN) version control
system.

Internationalization and Localization


Language Availability

Adobe Dreamweaver CS4 is available in the following languages: Brazilian


Portuguese, Chinese Simplified (Windows only), Chinese Traditional
(Windows only), Czech, Dutch, English, French, German, Italian,
Japanese, Korean (Windows only), Polish, Russian, Spanish, Swedish and
Turkish.

Specific Features for Arabic and Hebrew languages

The older Adobe Dreamweaver CS3 also features a Middle Eastern version
that allows typing Arabic, Persian or Hebrew text (written from right to left)
within the code view. Whether the text is fully Middle Eastern (written from
right to left) or includes both English and Middle Eastern text (written left to
right and right to left), it will be displayed properly in the browser.

XAMPP
Developer(s) Apache Friends

Stable release 1.7.2 / 2009-08-10; 17 days ago

Operating Cross-platform (Linux, Windows, Solaris,


system Mac OS X)

Type WAMP, MAMP, SAMP, LAMP

License GPL

http://www.apachefriends.org/en/xampp.h
Website
tml

XAMPP (pronounced /ˈzæmp/ or /ˈɛks.æmp) is a free and open source


cross-platform web server package, consisting mainly of the Apache HTTP
Server, MySQL database, and interpreters for scripts written in the PHP
and Perl programming languages.

Etymology

XAMPP's name is an acronym for:

 X (meaning cross-platform)
 Apache HTTP Server
 MySQL
 PHP
 Perl
The program is released under the terms of the GNU General Public
License and acts as a free web server capable of serving dynamic pages.
XAMPP is available for Microsoft Windows, Linux, Solaris, and Mac OS X,
and is mainly used for web development projects.

Requirements and features

XAMPP requires only one zip, tar or exe file to be downloaded and run, and
little or no configuration of the various components that make up the web
server is required. XAMPP is regularly updated to incorporate the latest
releases of Apache/MySQL/PHP and Perl. It also comes with a number of
other modules including OpenSSL and phpMyAdmin.

Because its user interface is considered simple to use, it is sometimes


called the "lazy man's WAMP/LAMP installation".

Installing XAMPP takes less time than installing each of its components
separately. Self-contained, multiple instances of XAMPP can exist on a
single computer, and any given instance can be copied from one computer
to another.

It is offered in both a full, standard version and a smaller version (known as


XAMPP Lite). Add-on extension modules also are available for free.

Use
Officially, XAMPP's designers intended it for use only as a development
tool, to allow website designers and programmers to test their work on their
own computers without any access to the Internet. To make this as easy as
possible, many important security features are disabled by default. In
practice, however, XAMPP is sometimes used to actually serve web pages
on the World Wide Web. A special tool is provided to password-protect the
most important parts of the package.

XAMPP also provides support for creating and manipulating databases in


MySQL and SQLite among others.
About The Project
DFD’s

0th Level DFD of Computer Science Department Portal


1st Level DFD of Computer Science Department Portal

2nd Level DFD of Computer Science Department Portal


ER Diagram

s_name
f_name s_gender

Knowled- Student s_mail


f_desig Faculty
ge
s_address
f_mail

manage

Admin
GUI Of Project
Homepage:
Academics:
Study Material:
Quizes:
About Us:
Faculties:
Technologies:
Students:
Gyan Vihar:
Contact Us:
Registration:
Code

Pages of Admin
Faceup.php

<?
session_start();
include("../include/conn.php");
if(!isset($_SESSION['sid']) && $_SESSION['sname']=="")
{
header("location:../index.php");
exit();
}else{
?>
<?
if(isset($_REQUEST['h1']))
{
mysql_query("update faculty set
path = '".$_REQUEST['h2']."' ,
fname = '".$_REQUEST['add']."' ,
fdes ='".$_REQUEST['add1']."' ,
fphoto ='".$_REQUEST['up']."'
here id ='".$_REQUEST['h1']."' ");
}
if(isset($_GET['did']) && $_GET['todo']=="del")
{
mysql_query("delete from faculty where id = '".$_GET['did']."' ");
}
if(isset($_REQUEST['Submit']))
{
mysql_query("insert into faculty set
path = '".$_REQUEST['h2']."',
fname = '".$_POST['add']."' ,
fdes ='".$_POST['add1']."' ,
fphoto ='".$_REQUEST['up']."' ");
$id = mysql_insert_id();
if(isset($id))
{
echo "thnx ur data inserted at ID ".$id;
}
}
?>
<table width="100%" border="1">
<tr bgcolor="#FF00FF">
<th scope="col">ID</th>
<th scope="col">Path</th>
<th scope="col">Faculty Name </th>
<th scope="col">Designation</th>
<th scope="col">Photo</th>
</tr>
<?
$i =0;
$sql = mysql_query("select * from faculty ");
$num_ = mysql_num_rows($sql);
if($num_)
{
while($row = mysql_fetch_array($sql))
{
if($i%2==0)
$bg = "#ffffff";
else
$bg = "#e1cccc";
?>
<tr bgcolor="<?=$bg?>">
<td><?=$row['id']?></td>
<td><?=$row['path']?></td>
<td><?=$row['fname']?></td>
<td><?=$row['fdes']?></td>
<td><?=$row['fphoto']?></td>
<td align="center"><a href="facup.php?todo=del&did=<?=$row['id']?
>">del</a></td>
<td align="center"><a href="facup.php?todo=edit&eid=<?=$row['id']?
>">edit</a></td>
</tr>
<?
$i++;
}
}else{
?>
<tr>
<td colspan="8" align="center"><strong>No Record Found</strong>
</td>
</tr>
<?
}
?>
</table>
<br /><br /><br />
<?
if(isset($_GET['eid']) && $_GET['todo']=="edit")
{
$q = mysql_query("select * from faculty where id = '".
$_GET['eid']."' ");
$r = mysql_fetch_array($q);
}
$path = "../facImgs/";
if(!is_dir("../facImgs/"))
{
mkdir("../facImgs/",777);
}
$target1 = $path .basename($_FILES['up']['name']);
//$target2 = $path .basename($_FILES['up2']['name']);
$f = $_FILES['up']['name'];
//$pdfVal = $_FILES['up2']['name'];
if(move_uploaded_file($_FILES['up']['tmp_name'],$target1))
{
//if(move_uploaded_file($_FILES['up2']['tmp_name'],
$target2))
//{
mysql_query("insert into faculty
set path = '".$_REQUEST['h2']."',
fname = '".$_REQUEST['add']."',
fdes = '".$_REQUEST['add1']."',
fphoto = '".$f."' ");
//}
}

?>
<form action="facup.php" method="post">
<table width="50%" border="0" align="center">
<tr>
<td>Faculty</td>
<td><label>
<textarea name="add"><?=$r['fname']?></textarea>
</label></td>
</tr> <tr>
<td>Designation</td>
<td><p>
<label>
<textarea name="add1"><?=$r['fdes']?>
</textarea>
</label><br>
</p></td>
</tr><tr>
<td>Faculty Photo</td>
<td><input type="file" name="up" value="" /></td>
<tr>
<td>&nbsp;</td>
<td><input type="hidden" name="h2" value="facImgs/" /></td>
</tr><tr>
<td colspan="2">
<? if($_REQUEST['eid']==""){?>
<input type="submit" name="Submit" value="Insert"/>
<? }else{ ?>
<input type="submit" name="edit" value="Update"/>
<input type="hidden" name="h1" value="<?=$_REQUEST['eid']?>" />
<? } ?> </td>
</tr>
</table>
<input name="index" type="button" value="BACK" onclick="javascript:
history.back();" title="BACKz" />
</form>
<?
}
?>

index.php
<?
session_start();
include("../include/conn.php");
if(!isset($_SESSION['sid']) && $_SESSION['sname']=="")
{
header("location:../index.php");
exit();
}else{
?>
"Welcome Admin for Computer Science Department"<br>
Select any Menu to Update Website Dynamically...
<br>
<form>
<input type="button" name="b0" value="Index Page"/> | | |
<input type="button" name="b1" value="Pdf Upload"
onClick="location.href='uppdf.php';"/>| | |
<input type="button" name="b1" value="Recent Updates"
onClick="location.href='update.php';"/> | | |
<input type="button" name="b1" value="Faculty Updates"
onClick="location.href='facup.php';"/>
</form><a href="../index.php?todo=logout">Log Out</a>
<?
}
?>

login.php
<?
session_start();
include("../include/conn.php");
if(isset($_POST['Submit']))
{
$q =mysql_query("select * from admin1 where uname ='".$_POST['un']."'
&& pass ='".$_POST['up']."' ");
$num =mysql_num_rows($q);
if($num)
{
$row = mysql_fetch_array($q);
$_SESSION['sid'] = $row['id'];
$_SESSION['sname'] = $row['uname'];
header("location:index.php");
exit();
}
}
if(isset($_GET['todo']) && $_GET['todo']=="logout")
{
session_destroy();
}
?>
<form name="f1" action="" method="post">
<table width="80%" border="0">
<tr> </tr>
<tr >
<td bgcolor='#f1f1f1' ><font size="2" face="verdana, arial,
helvetica">UserName </font></td>
<td bgcolor='#f1f1f1' align='center'><font face='verdana, arial,
helvetica' size='2' >
<input type ='text' name='un' size="11" />
</font></td>
</tr><tr>
<td bgcolor='#ffffff' ><font face='verdana, arial, helvetica' size='2'
align='center'> Password </font></td>
<td bgcolor='#ffffff' align='center'><font face='verdana, arial,
helvetica' size='2' >
<input type ='password' name='up' size="11" />
</font></td>
</tr><tr>
<td bgcolor='#f1f1f1' colspan='2' align='center'><font
face='verdana, arial, helvetica' size='2' align='center'>
<input name="Submit" type='submit' value='Submit' />
<input name="reset" type='reset' value='Reset' />
</font></td>
</tr><tr>
<td bgcolor='#ffffff' colspan="2" align='center'><font
face='verdana, arial, helvetica' size='2' > Forgot Password ?</font></td>
</tr><tr>
<td bgcolor='#f1f1f1' colspan='2' align='center'><font
face='verdana, arial, helvetica' size='2' align='center'> </font><label
style="color:#FF0000"><? if(!isset($_POST['uname']) &&
isset($_POST['Submit'])) { echo "invalid user"; } ?></label></td>
</tr><tr>
<td bgcolor='#ffffff' align="center" colspan="2" ><font
face='verdana, arial, helvetica' size='2' align='center'> <a
href='myinbox.php'> New
Member Sign UP </a></font></td></tr>
</table>
</form>

update.php
<?
session_start();
include("../include/conn.php");
if(!isset($_SESSION['sid']) && $_SESSION['sname']=="")
{
header("location:../index.php");
exit();
}else{
?>
<?
if($_REQUEST['h1']>0)
{
// echo "update news set
// data = '".$_POST['add']."' ,
// status ='".$_POST['rg']."'
// where id ='".$_POST['h1']."' ";
// exit;
mysql_query("update news set
data = '".$_POST['add']."' ,
status ='".$_POST['rg']."'
where id ='".$_POST['h1']."' ");
}
if(isset($_GET['did']) && $_GET['todo']=="del")
{
mysql_query("delete from news where id = '".$_GET['did']."' ");
}
if(isset($_REQUEST['Submit']))
{
mysql_query("insert into news set
data = '".$_POST['add']."' ,
status ='".$_POST['rg']."' ");
$id = mysql_insert_id();
if(isset($id))
{
echo "thnx ur data inserted at ID ".$id;
}
}
?>
<table width="100%" border="1">
<tr bgcolor="#FF00FF">
<th scope="col">ID</th>
<th scope="col">Data</th>
<th scope="col">Status</th>
<th scope="col">Delete</th>
<th scope="col">Update</th>
</tr>
<?
$i =0;
$sql = mysql_query("select * from news ");
$num_ = mysql_num_rows($sql);
if($num_)
{
while($row = mysql_fetch_array($sql))
{
if($i%2==0)
$bg = "#ffffff";
else
$bg = "#e1cccc";
?>
<tr bgcolor="<?=$bg?>">
<td><?=$row['id']?></td>
<td><?=$row['data']?></td>
<td><?=$row['status']?></td>
<td align="center"><a href="update.php?todo=del&did=<?=$row['id']?
>">del</a></td>
<td align="center"><a href="update.php?todo=edit&eid=<?
=$row['id']?>">edit</a></td>
</tr>
<?
$i++;
}
}else{
?>
<tr>
<td colspan="8" align="center"><strong>No Record Found</strong>
</td>
</tr>
<?
}
?>
</table>
<br /><br /><br />
<?
if(isset($_GET['eid']) && $_GET['todo']=="edit")
{
$q = mysql_query("select * from news where id = '".$_GET['eid']."' ");
$r = mysql_fetch_array($q);
}
?>
<form action="update.php" method="post">
<table width="50%" border="0" align="center">
<tr>
<td>Data</td>
<td><label>
<textarea name="add"><?=$r['data']?></textarea>
</label></td>
</tr> <tr>
<td>Status</td>
<td><p>
<label>
<input type="radio" name="rg" value="1" <? if($r['status']=="1") echo
"checked=checked";?>>
</label> <label>
<input type="radio" name="rg" value="0" <? if($r['status']=="0") echo
"checked=checked";?>>
0</label> <br>
</p></td>
</tr> <tr>
<td colspan="2">
<? if($_REQUEST['eid']==""){?>
<input type="submit" name="Submit" value="Insert"/>
<? }else{ ?>
<input type="submit" name="edit" value="Update"/>
<input type="hidden" name="h1" value="<?
=$_REQUEST['eid']?>" />
<? } ?> </td>
</tr>
</table>
<input name="index" type="button" value="BACK" onclick="javascript:
history.back();" title="BACKz" />
</form>
<?}?>

uppdf.php
<?
session_start();
include("../include/conn.php");
if(!isset($_SESSION['sid']) && $_SESSION['sname']=="")
{
header("location:../index.php");
exit();
}else{
?>
<?
if(isset($_REQUEST['h1']))
{
mysql_query("update books set
imgname ='".$_REQUEST['up']."' ,
fname = '".$_REQUEST['fname']."' ,
auth ='".$_REQUEST['auth']."' ,
price = '".$_REQUEST['prc']."' ,
pub ='".$_REQUEST['pub']."' ,
pdfValue ='".$_REQUEST['up2']."' ,
tar='".$_REQUEST['tar']."'
where id ='".$_REQUEST['h1']."' ");
}
if($_REQUEST['did']!="" && $_REQUEST['todo']=="del")
{
$delete=mysql_query("delete from books where id = '".
$_REQUEST['did']."' ");
if($delete)
{
echo "deleted successfully";
}
}
if(isset($_REQUEST['Submit']))
{
mysql_query("insert into news set
imgname ='".$_REQUEST['up']."' ,
fname = '".$_REQUEST['fname']."' ,
auth ='".$_REQUEST['auth']."' ,
price = '".$_REQUEST['prc']."' ,
pub ='".$_REQUEST['pub']."' ,
pdfValue ='".$_REQUEST['up2']."'
tar='".$_REQUEST['tar']."' ");
$id = mysql_insert_id();

if(isset($id))
{
echo "thnx ur data inserted at ID ".$id;
}
}
?>
<table width="100%" border="1">
<tr bgcolor="#FF00FF">
<th scope="col">ID</th>
<th scope="col">path</th>
<th scope="col">imgname</th>
<th scope="col">fname</th>
<th scope="col">auth</th>
<th scope="col">price</th>
<th scope="col">pub</th>
<th scope="col">pdfValue</th>
<th scope="col">tar</th>
</tr>
<?
$i =0;
$sql = mysql_query("select * from books ");
$num_ = mysql_num_rows($sql);
if($num_)
{
while($row = mysql_fetch_array($sql))
{
if($i%2==0)
$bg = "#ffffff";
else
$bg = "#e1cccc";
?>
<tr bgcolor="<?=$bg?>">
<td><?=$row['id']?></td>
<td><?=$row['path']?></td>
<td><?=$row['imgname']?></td>
<td><?=$row['fname']?></td>
<td><?=$row['auth']?></td>
<td><?=$row['price']?></td>
<td><?=$row['pub']?></td>
<td><?=$row['pdfValue']?></td>
<td><?=$row['tar']?></td>
<td align="center"><a href="uppdf.php?todo=del&did=<?=$row['id']?
>">del</a><?=$row['id']?></td>
<td align="center"><a href="uppdf.php?todo=edit&eid=<?=$row['id']?
>">edit</a></td>
</tr>
<?
$i++;
}
}else{
?>
<tr>
<td colspan="8" align="center"><strong>No Record Found</strong>
</td>
</tr>
<?
}
?>
</table>
<br /><br /><br />
<?
if($_REQUEST['eid']!="" && $_REQUEST['todo']=="edit")
{
$q = mysql_query("select * from books where id = '".$_REQUEST['eid']."' ");
$r = mysql_fetch_object($q);
}
?>
<?
$path = "../pdfImgs/";
if(!is_dir("../pdfImgs/"))
{
mkdir("../pdfImgs/",777);
}
$target1 = $path .basename($_FILES['up']['name']);
$target2 = $path .basename($_FILES['up2']['name']);
$f = $_FILES['up']['name'];
//$a = "mani";
$pdfVal = $_FILES['up2']['name'];
if(move_uploaded_file($_FILES['up']['tmp_name'],$target1))
{
if(move_uploaded_file($_FILES['up2']['tmp_name'],$target2))
{
mysql_query("insert into books
set path = '".$_REQUEST['h2']."',
imgname = '".$f."',
fname = '".$_REQUEST['fname']."',
auth = '".$_REQUEST['auth']."',
price = '".$_REQUEST['prc']."',
pub ='".$_REQUEST['pub']."',
pdfValue = '".$pdfVal."' ");
echo "thnx ur file ".$_FILES['up']['name']." and ".
$_FILES['up2']['name'].".have been uploaded";
//echo "thnx ur file ".$_FILES['up2']['name'].".have been uploaded";
}
}
?>
<p><form id="form1" method="post" action="?"
enctype="multipart/form-data">
<table width="100%" border="0">
<tr>
<td colspan="2" align="center">PDF Information Center<br />
Kindly enter information to save all records in DB. </td>
</tr>
<tr>
<td>Diplay Book name </td>
<td><label>
<input type="text" name="fname" value="<?php echo $r-
>fname; ?>" />
</label></td>
</tr><tr>
<td>Auther Name </td>
<td><label>
<input type="text" name="auth" value="<?php echo $r->auth; ?
>" />
</label></td>
</tr><tr>
<td>Price</td>
<td><label>
<input name="prc" type="text" size="8" value="<?php echo $r-
>price; ?>" />
</label></td>
</tr><tr>
<td>Publication</td>
<td><label>
<textarea name="pub" value="<?php echo $r->pub; ?>"
></textarea>
</label></td>
</tr><tr>
<td>Select PDF Img</td>
<td><input type="file" name="up" value="<?php echo $r-
>imgname; ?>" /></td>
</tr> <tr>
<td>PDF Value </td>
<td><input type="file" name="up2" value="<?php echo $r-
>pdfValue; ?>" /></td>
</tr><tr>
<td>Target</td>
<td><p>
<label>
<input type="radio" name="tar" value="_blank" <? if($r-
>status=="1") echo "checked=checked";?> /><?=$r->status; ?>
Blank</label>
<label>
<input type="radio" name="tar" value="_parent" <? if($r-
>status=="0") echo "checked=checked";?>/>
Root</label>
<br />
</p></td>
</tr><tr>
<td>&nbsp;</td>
<td><input type="hidden" name="h2" value="pdfImgs/" /></td>
</tr><tr>
<td colspan="2"><label>
<input type="reset" name="Reset" value="Rset"/>
</label><? if(!isset($_REQUEST['eid'])){?>
<input type="submit" name="Submit" value="Submit" />
<? }else{ ?>
<input type="submit" name="edit" value="Update"/>
<input type="hidden" name="h1" value="<?=$_REQUEST['eid']?>" />
<? } ?></td>
</tr>
</table>
<input name="index" type="button" value="BACK"
onclick="javascript: history.back();" title="BACKz" />
</form>
</p>
</div>
<div class="meta">
</div>
</div><!-- end #welcome -->
</marquee> </p>
</div>
</div>
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
</div>
<!-- end #sponsors -->
<p id="legal">Copyright &copy; 2010 Computer Science
Department. All Rights Reserved. Designed by Hitesh Bajoria, Sudarshan
Singhal , Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra
</p>
</div>
</body>
</html>
<?
}
?>

Pages of connection
conn.php

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conn = "localhost";
$database_conn = "feedback";
$username_conn = "root";
$password_conn = "";
$conn = mysql_pconnect($hostname_conn, $username_conn,
$password_conn) or trigger_error(mysql_error(),E_USER_ERROR);
?>

conn1.php

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conn1 = "localhost";
$database_conn1 = "registration";
$username_conn1 = "root";
$password_conn1 = "";
$conn1 = mysql_pconnect($hostname_conn1, $username_conn1,
$password_conn1) or trigger_error(mysql_error(),E_USER_ERROR);
?>

conn2.php
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conn2 = "localhost";
$database_conn2 = "news";
$username_conn2 = "root";
$password_conn2 = "";
$conn2 = mysql_pconnect($hostname_conn2, $username_conn2,
$password_conn2) or trigger_error(mysql_error(),E_USER_ERROR);
?>

conn3.php

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conn3 = "localhost";
$database_conn3 = "ques";
$username_conn3 = "root";
$password_conn3 = "";
$conn3 = mysql_pconnect($hostname_conn3, $username_conn3,
$password_conn3) or trigger_error(mysql_error(),E_USER_ERROR);
?>

aboutus.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>About Us</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Homepage</a></li>
<li><a href="academics.php" title="">Academics</a></li>
<li><a href="study.php" title="">Study Material </a></li>
<li><a href="quiz.php" title="">Quizes</a></li>
<li class="active"><a href="aboutus.php" title="">About
Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
<div class="title">
<h2>more pictures </h2>
</div>
<div class="content">
<form id="form1" method="post" action="#" >
<fieldset>
<legend>More Pictures</legend>
<p><img src="images/IMG_1009.jpg" alt="" width="120"
height="120" class="left" /></p>
</fieldset>
</form>
</div>
</div>
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
<div class="content">
<ul id="size">
<li><a href="faculties.php">Faculties</a></li>
<li><a href="tech.php">Technology</a></li>
<li><a href="students.php">Students</a></li>
<li><a href="syllabus.php">Syllabus</a></li>
<li ><a href="http://www.gyanvihar.org">Gyan Vihar</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>Computer Science Depatment
</span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story"><img src="images/IMG_1009.jpg"
alt="" width="120" height="120" class="left" />
<p>Started in the year 2000 the Computer
Engineering Department has no looking back. In the past year itself the
department has got accredition from <strong>NBA (National Board of
Accrediation).</strong> </p>
<p>Department believes in excellent interaction and
generating one- on -one rapport with the who's who of the Computer
industry, not only to learn from them but also to promote the career
prospects of our students. We regularly conduct 'Corporate Interaction
Programme' and Seminars aimed at developing direct communication with
the corporate world. </p>
<p>Computers in every kind of application need
professional engineers to design set up and maintain high quality systems.
The course provides a thorough grinding in electronics &amp; interfacing,
computer structures, engineering systems, application &amp; system
software. We at Computer Engineering Department of Gyan Vihar focus
on developing overall orientation towards development, design and
maintenance of software as well as hardware systems. </p>
<p>In fact the impact of computers is visible in every
walk of life, be it under manufacturing or service industry. One can’t think
about effective functioning of today’s society without Computers. Indian
computer professionals are well respected across the globe. Gyan Vihar
University, Jaipur has been working towards producing Computer and IT
professionals with highest caliber for the industry. </p>
<p>The Department is well equipped with hardware as
well as Software facilities. The Institute has over <strong>500</strong>
computer systems in <strong>15</strong> fully air-conditioned
programming, graphics, Linux, database, software engineering, and
Communication, Internet and network laboratories. The labs consist of
most advanced P-IV systems with Windows NT/2003, Windows
Vista/XP/2000 professional operating systems. Separate Linux lab with
dual OS is available with advanced Networking facilities. </p>
</div>
<div class="meta">
</div>
</div>
<?
"/n";
"/n";
?>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>
</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img
src="images/IMG_0996.jpg" alt="" width="180" height="520" /></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria,Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>
academics.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Academics</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Homepage</a></li>
<li class="active"><a href="academics.php"
title="">Academics</a></li>
<li><a href="study.php" title="">Study Material </a></li>
<li><a href="quiz.php" title="">Quizes</a></li>
<li><a href="aboutus.php" title="">About Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
<div class="title">
<h2>Courses </h2>
</div>
<div class="content">
<p>M.Tech Dual
<p>M.Tech
<p>B.Tech(Computer Science)
</div>
</div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>

</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>STUDYING IN COMPUTER
SCIENCE DEPARTMENT </span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story"><img src="images/IMG_1024.jpg"
alt="" width="120" height="120" class="left" />
<p>Started in the year 2000 the Computer Engineering
Department has no looking back. In the past year itself the department has
got accredition from NBA (National Board of Accrediation).</p>
<p>In the last twenty years, computer science has
grown from a somewhat obscure academic discipline into one of the driving
forces of technological advance. From antilock brakes to airbags,
secondary oil recovery to weather prediction, advanced imaging technology
to digital enhancement in the cinema, computation is changing the world in
which we live. Contrary to popular belief, the job market in computer
science is robust and growing (a fact highlighted by the recent ACM
Taskforce on Outsourcing). Over the next several decades, computer
scientists will continue to reshape the world in which we live. </p>
<p>On the educational front, we place top-flight
researchers in the classroom with our undergraduates and graduate
students. Education at our department is a contact sport, with small
classes, informed faculty, and myriad opportunities for students and faculty
to interact, schools on technology issues, and take advocacy roles in public
policy that range from advising the federal government on science policy
through fighting to ensure secure voting systems. .
</p>
</div>
<div class="meta">
</div>
</div>
<?
"/n";
"/n";
?>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div></div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img
src="images/IMG_0923.jpg" alt="" width="180" height="520" /></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria,Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>

answer.php
<?
require("header.php");
require('connection.php');
session_start();
$a=$_REQUEST['aid'];
$ans=mysql_query("select * from answer where aid=$a");
echo $ans;
echo $a;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Quizes</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Homepage</a></li>
<li><a href="academics.php" title="">Academics</a></li>
<li><a href="study.php" title="">Study Material </a></li>
<li class="active"><a href="quiz.php"
title="">Quizes</a></li>
<li><a href="aboutus.php" title="">About Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
<div class="title">
<h2>play online </h2>
</div>
<div class="content">
<p><a href="http://www.quibblo.com">www.quibblo.com</a></p>
<p><a href="http://www.gthepwebsite.com">www.thewebsite.com</a></p>
<p><a href="http://www.careerquiz.com">www.careerquiz.com</a></p>
<p><a href="http://www.thatquiz.org">www.thatquiz.org</a></p>
<p><a href="http://www.pitara.com/activities/">www.pitara.com</a></p>
</div>
</div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
<div class="content">
<ul id="size">
<li><a href="faculties.php">Faculties</a></li>
<li><a href="tech.php">Technology</a></li>
<li><a href="students.php">Students</a></li>
<li><a href="syllabus.php">Syllabus</a></li>
</ul>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>Quiz</span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story"><img src="images/quiz.gif" alt=""
width="120" height="120" class="left" />
<p>Greetings! On behalf of the faculty, staff, and
students of the Department of Computer Science, we welcome you! These
are exciting times for computer scientists as the discipline is now widely
recognized as an essential source of tools and techniques for
advancements in nearly all spheres of human endeavor.</p>
<p><form action="" method="post" name="form1" id="form1">
<h2><strong> Answers</strong></h2>
<table width="572">
<tr>
<td width="359"><strong>ANWSER</strong></td>
<td width="197"><strong>DATE OF ANSWER </strong></td>
</tr>
<? $i=0;
while($id=mysql_fetch_array($ans))
{
++$i;
?>
<tr>
<td>(<?= $i;?>.)<? echo $id['answer']; ?></td>
<td><? echo $id['dateofanswer']; ?></td>
</tr>
<?
}
?>
</table>
</form></p>
</div>
<div class="meta">
</div>
</div>
<?
"/n";
"/n";
?>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>
</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img
src="images/cryptic_quiz.gif" alt="" width="180" height="520" /></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria, Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>
answerquery.php
<?
session_start();
require("connection.php");
//echo $_SERVER['HTTP_REFERER'];

if(isset($_SESSION["id"])/*$_SERVER['HTTP_REFERER']=="http://localho
st/mcateam/l1.php"*/)
{
$vq=$_REQUEST["vq"];
$keyorder="ascending";
$keysortby="answered";
$ok="false";
if($_REQUEST["OK"]!="")
{
$ok="true";
$keyorder=$_REQUEST["order"];
$keysortby=$_REQUEST["sortby"];
$keyid=$_REQUEST["subject"];
$vq=1;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Quizes</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Homepage</a></li>
<li><a href="academics.php" title="">Academics</a></li>
<li><a href="study.php" title="">Study Material </a></li>
<li class="active"><a href="quiz.php"
title="">Quizes</a></li>
<li><a href="aboutus.php" title="">About Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
<div class="title">
<h2>play online </h2>
</div>
<div class="content">
<p><a href="http://www.quibblo.com">www.quibblo.com</a></p>
<p><a href="http://www.gthepwebsite.com">www.thewebsite.com</a></p>
<p><a href="http://www.careerquiz.com">www.careerquiz.com</a></p>
<p><a href="http://www.thatquiz.org">www.thatquiz.org</a></p>
<p><a href="http://www.pitara.com/activities/">www.pitara.com</a></p>
</div>
</div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
<div class="content">
<ul id="size">
<li><a href="faculties.php">Faculties</a></li>
<li><a href="tech.php">Technology</a></li>
<li><a href="students.php">Students</a></li>
<li><a href="syllabus.php">Syllabus</a></li>
<li ><a href="http://www.gyanvihar.org">Gyan Vihar</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>Quiz</span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story"><img src="images/quiz.gif" alt=""
width="120" height="120" class="left" />
<p>Greetings! On behalf of the faculty, staff, and
students of the Department of Computer Science, we welcome you! These
are exciting times for computer scientists as the discipline is now widely
recognized as an essential source of tools and techniques for
advancements in nearly all spheres of human endeavor.</p>
<p><form id="form1" name="form1" method="post" action="">
<table border=1>
<tr>
<td width="155" rowspan=2>
<? $id=$_SESSION["id"];
$_SESSION["id"]=$id;
$sql=mysql_query("select * from question where facid=$id");
//echo $sql;
//$count=mysql_fetch_array($sql);
//echo $count;
?>
<a href="answerquery.php?vq=1">view question(<?=$count;?
>)</a>
<? if ($vq==1)
{
$sql1=mysql_query("select subid from assigned where
facid=$id");
?></td>
<td width="486">
sort by
<label>
<select name="sortby" id="sortby">
<option value="answered" <? if($keysortby=="answered")
echo"selected";?>>Answered</option>
<option value="notanswered" <? if($keysortby=="notanswered")
echo"selected";?>>Not Answered</option>
</select>
</label>
order
<select name="order" id="order">
<option value="ascending" <? if($keyorder=="ascending")
echo"selected";?>>Ascending</option>
<option value="descending" <? if($keyorder=="descending")
echo"selected";?>>Descending</option>
</select>
subject
<label>
<select name="subject" id="subject">
<?
$i=1;
while($sub=mysql_fetch_array($sql1))
{
$s=$sub['subid'];
$sq=mysql_query("select subname from queries where
subid=$s");
$sql2=mysql_fetch_array($sq);
if ($i==1 && $ok=="false")
{ $keyid=$s;
$key=$sql2['subname'];
$i++;
}
?>
<option value="<?=$s;?>"<? if($keyid==$s) echo"selected";?
>><?=$sql2['subname'];?></option>
<?
}
?>
</select>
<input type="submit" name="OK" id="OK" value="Ok">
</label> </td>
</tr><tr>
<td>
<?
if($keyorder=="ascending")
{
if($keysortby!="date")
{
$sq0=mysql_query("select query,qid,dop from query where qid
in(select qid from answer where subid=$keyid) order by qid");
$sq1=mysql_query("select query,qid,dop from query where qid
not in(select qid from answer where subid=$keyid) and subid=$keyid order
by qid");
}
}
$i=1;
echo "<br>";
if ($keysortby=="answered")
{
while($q=mysql_fetch_array($sq0))
{
echo "<br>".$i++.". ".$q[0]."&nbsp;".$q[2];
echo "<a href ='ans.php?q=$q[1]' target=_blank >view
answer</a>";
}
echo "<br>";
while($q=mysql_fetch_array($sq1))
{
echo "<br>".$i++.". ".$q[0]."&nbsp;".$q[2];
echo "<a href ='fillans.php?q=$q[1]' target=_blank
>fill answer</a>";
}
}
else if($keysortby=="notanswered")
{
while($q=mysql_fetch_array($sq1))
{
echo "<br>".$i++.". ".$q[0]."&nbsp;".$q[2];
echo "<a href ='fillans.php?q=$q[1]' target=_blank
>fill answer</a>";
}
echo "<br>";
while($q=mysql_fetch_array($sq0))
{
echo "<br>".$i++.". ".$q[0]."&nbsp;".$q[2];
echo "<a href ='ans.php?q=$q[1]' target=_blank
>view answer</a>";
}
}
}
?> </td>
</tr>
</table>
</form></p>
</div>
<div class="meta">
</div>
</div>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>
</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img
src="images/cryptic_quiz.gif" alt="" width="180" height="520" /></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria, Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>
contact.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Contact Us</title>
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Homepage</a></li>
<li><a href="academics.php" title="">Academics</a></li>
<li><a href="quiz.php" title="">Quizes</a></li>
<li><a href="aboutus.php" title="">About Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
</div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
<div class="content">
<ul id="size">
<li><a href="faculties.php">Faculties</a></li>
<li><a href="syllabus.php">Syllabus</a></li>
<li ><a href="http://www.gyanvihar.org">Gyan Vihar</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span> Computer Science Depatment
</span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story">
<p><a href="mailto:sudarshansinghal@yahoo.co.in">Department</p>
<p><a href="mailto:sudhirphophaliya@gmail.com">Mr. Naveen Hemrajani-
HOD</a></p>
<p><a href="mailto:sudhirphophaliya@gmail.com">Mr.Gajanad Sharma-
Proctor</p>
<p><a href="mailto:sudhirphophaliya@gmail.com">Mr.Ravi Shankar-
Senior Faculty</p>
</div>
<div class="meta">
</div>
</div>
<?
"/n";
?>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>
</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img src="images/Contact-
Us.jpg" alt="" width="180" height="520" /></a></div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria,Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>
faculties.php

<?
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Faculties</title>
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Homepage</a></li>
<li><a href="academics.php" title="">Academics</a></li>
<li><a href="quiz.php" title="">Quizes</a></li>
<li><a href="aboutus.php" title="">About Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed"></div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
<div class="content">
<ul id="size">
<li><a href="faculties.php">Faculties</a></li>
<li><a href="tech.php">Technology</a> </li>
<li><a href="syllabus.php">Syllabus</a></li>
<li ><a href="http://www.gyanvihar.org">Gyan Vihar</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>Honorable Faculties </span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story">
<? /////////////////////////////// ?>
<table width="80%" border="0" align="center">
<tr>
<td width="17%">&nbsp;</td>
<td width="83%">&nbsp;</td>
</tr>
<!-- Start Loop from here-->
<?
include("include/conn.php");
$q = "select * from faculty";
$num1 = mysql_num_rows(mysql_query($q));
$page_size=1;
$totalpage=ceil($num1/$page_size);
page_index=(isset($_GET['page_index']))?$_GET['page_index']:"0";
if(isset($_GET['page_index']))
{
$page_index=$_GET['page_index'];
}else
{
$page_index=0;
}
$q.=" limit ".($page_index*$page_size).','.$page_size;
$start = $page_index*$page_size;
$k=mysql_query($q);
if($num1>0)
{
while($r = mysql_fetch_array($k))
{
?>
<tr>
<td rowspan="3"><img src="<?=$r['path']?><?=$r['fphoto']?>" width="75"
height="73" /></td>
<td>Name : <?=$r['fname']?></td>
</tr> <tr>
<td>Designation: <?=$r['fdes']?></td>
</tr> <tr>
<td>Photo : <?=$r['fphoto']?></td>
</tr>
<!-- Loop End here-->
<?
}
}
?>
</table><? ////////////////////////////// ?>
</div>
<div class="meta">
</div>
</div>
<table width="83%" >
<tr>
<td align="center">
<? if($page_index>0 ){
?>
<a href="faculties.php?page_index=<?=$page_index-1?>">Pre</a>
<?
}
?>
<? for($i=1;$i<=$totalpage;$i++)
{ ?>
<a href="faculties.php?page_index=<?=$i-1?>"><?=$i?></a>
<?
//echo"<a href=\"paging.php?$page_index\">$i</a>";
}
?> &nbsp;&nbsp;&nbsp;
<? if(($page_index<$totalpage-1)){?> <a href="faculties.php?
page_index=<?=$page_index+1?>">Next</a><? }?>
</td>
</tr>
</table>
<?
"/n";
"/n";
?>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>
</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img
src="images/Dr.Ch..jpg" alt="" width="180" height="520" /></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria,Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>
quiz.php

<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) &&
($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "index.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
?>
<?
require("header.php");
require("connection.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Quizes</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Homepage</a></li>
<li><a href="academics.php" title="">Academics</a></li>
<li><a href="study.php" title="">Study Material </a></li>
<li class="active"><a href="quiz.php"
title="">Quizes</a></li>
<li><a href="aboutus.php" title="">About Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
<div class="title">
<h2>play online </h2>
</div>
<div class="content">
<p><a href="http://www.quibblo.com">www.quibblo.com</a></p>
<p><a href="http://www.gthewebsite.com">www.thepwebsite.com</a></p>
<p><a href="http://www.careerquiz.com">www.careerquiz.com</a></p>
<p><a href="http://www.thatquiz.org">www.thatquiz.org</a></p>
<p><a href="http://www.pitara.com/activities/">www.pitara.com</a></p>
</div>
</div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
<div class="content">
<ul id="size">
<li><a href="faculties.php">Faculties</a></li>
<li><a href="tech.php">Technology</a></li>
<li><a href="students.php">Students</a></li>
<li><a href="syllabus.php">Syllabus</a></li>
<li ><a href="http://www.gyanvihar.org">Gyan Vihar</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>Quiz</span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story"><img src="images/quiz.gif" alt=""
width="120" height="120" class="left" />
<p>Greetings! On behalf of the faculty, staff, and
students of the Department of Computer Science, we welcome you! These
are exciting times for computer scientists as the discipline is now widely
recognized as an essential source of tools and techniques for dvancements
in nearly all spheres of human endeavor.</p>
<p><table> <tr>
<td>&nbsp;</td>
</tr> <tr>
<td>SELECT THE SUBJECT</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><?
$sql="select * from queries";
$result=mysql_query($sql);
while($row=mysql_fetch_array($result))
{
?></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;<a href="quiz.php?id=<?
=$row['subid'];?>"><? echo $row[1];?></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><?
}
?></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
<td width="773" valign="top"><table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td><?
extract($_GET);
$sql1="select * from quiz where subid='$id'";
$result1=mysql_query($sql1);
while($r=mysql_fetch_array($result1))
{
?></td>
</tr>
<tr>
<td>SELECT THE QUIZ</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><a href="taketest.php?id=<?=$r['quizid'];?>"><? echo $r[1];?
></a></td>

</table></p>
</div>
<div class="meta">
</div>
</div>
<?
"/n";
"/n";
?>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>

</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img
src="images/cryptic_quiz.gif" alt="" width="180" height="520" /></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria,Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>

reg.php
<?
session_start();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="reg.js" language="javascript"></script>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Registration</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Homepage</a></li>
<li><a href="academics.php" title="">Academics</a></li>
<li><a href="study.php" title="">Study Material </a></li>
<li><a href="quiz.php" title="">Quizes</a></li>
<li><a href="aboutus.php" title="">About Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
</div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
<div class="content">
<ul id="size">
<li>
<a href="faculties.php">Faculties</a>
</li><li>
<a href="tech.php">Technology</a>
</li><li>
<a href="students.php">Students</a>
</li><li>
<a href="syllabus.php">Syllabus</a>
</li><li >
<a href="http://www.gyanvihar.org">Gyan Vihar</a>
</li><li>
<a href="contact.php">Contact Us</a>
</li>
</ul>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>Register Here </span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story">
<p><?
include("include/conn.php");
if(isset($_REQUEST['Submit']))
{
mysql_query("insert into info set
uname = '".$_POST['un']."' ,
pass='".$_POST['pa']."',
address = '".$_POST['add']."' ,
phone = '".$_REQUEST['ph']."' ,
gender ='".$_POST['rg']."' ,
year = '".$_REQUEST['year']."' ");
$id = mysql_insert_id();
if(isset($id))
{
echo "thnx ur data inserted at ID ".$id;
}
}
?>
<script>
function checkform(frm)
{
var check=false;
var errormsg="";
var br="\n";
var name=document.getElementById('public_name').value;
var username=document.getElementById('username').value;
if(name=="")
{
errormsg="please fill the name";
check=true;
}
if(username=="")
{
errormsg+=br+"please fill the username";
check=true;
}
if(check==true)
{
alert(errormsg);
check=false;
}
}
</script>
<form name="frmcandidate" id="frmcandidate" method="post" action=""
enctype="multipart/form-data" onsubmit=" check_form('frmcandidate');" >
<input type="hidden" name="public_register" id="public_register" value="0"
/>
<input type="hidden" name="cancel" id="cancel" value="0" />
<input type="hidden" name="reg_date" id="reg_date"/>
<input type="hidden" name="public_image" id="public_image"/>
<table border="0" id="" class="table" style="width:500px; height:100px;"
align="center">
<tr>
<td class="tableheader" colspan="2" align="center">Registration Form
</td> </tr>
<tr class="tabledata">
<td>Name of Student *</td>
<td><input type="text" name="public_name" id="public_name"
value="<?php echo $frmdata['public_name'];?>" onkeyup="return
checkalpha(this.name);"/>
<IMG SRC="" WIDTH="10" HEIGHT="10" NAME="img_public_name"
BORDER="0"></td> </tr>
<tr class="tabledata">
<td>Gender *</td>
<td>
<input type="radio" name="gender" id="ele_mele" value="M" <?php
if($_REQUEST['gender']=='M') echo ' checked="checked" '; ?>/>Male
<input type="radio" name="gender" id="ele_female" value="F" <?php
if($_REQUEST['gender']=='F') echo ' checked="checked" '; ?>/>Female
</td>
</tr>
<tr class="tabledata">
<td>Title *</td>
<td><select name="title" size="1">
<option value="Mr" <?php if($_REQUEST['title']=="Mr") { echo
"selected"; }?>>Mr</option>
<option value="Ms" <?php if($_REQUEST['title']=="Ms") { echo
"selected"; }?>>Ms</option>
<option value="Mrs" <?php if($_REQUEST['title']=="Mrs") { echo
"selected"; }?>>Mrs</option>
<option value="Dr" <?php if($_REQUEST['title']=="Dr") { echo
"selected"; }?>>Dr.</option>
</select> </td>
</tr>
<tr class="tabledata">
<td>Username *</td>
<td><input type="text" name="username" id="username" value="<?php
echo $frmdata['username'];?>" onkeyup="return checkalpha(this.name);"/>
<IMG SRC="" WIDTH="10" HEIGHT="10" NAME="img_username"
BORDER="0">
<br /><font color="red"><?php echo $error; ?></font></td>
</tr>
<tr class="tabledata">
<td>Password *</td>
<td><input type="password" name="password"
id="password"onkeyup="return checkalpha(this.name);"/>
<IMG SRC="" WIDTH="10" HEIGHT="10" NAME="img_password"
BORDER="0"></td>
</tr>
<tr class="tabledata">
<td>Date of birth</td>
<td>
<select name="day" id="ddlDay" tabindex="6">
<option value="">- Day -</option>
<?php for($i=0;$i<31;$i++)
{
?>
<option value="<?php echo $dobs[$i]->day; ?>" <?
php if ($frmdata['day']==$dobs[$i]->day) echo ' selected="selected " '; ?
>><?php echo $dobs[$i]->day; ?></option>
<?php
}
?></select>

<select name="month_no" id="ddlMonth" tabindex="5">


<option value="">- Month -</option>
<?php for($i=0;$i<12;$i++)
{
?>
<option value="<?php echo $dobs[$i]-
>month_no; ?>" <?php if ($frmdata['month']==$dobs[$i]->month) echo '
selected="selected " '; ?>><?php echo $dobs[$i]->month; ?></option>
<?php
}
?></select>

<select name="year" id="ddlYear" tabindex="7">


<option value="">- Year -</option>
<?php for($i=0;$i<count($dobs);$i++)
{
?>
<option value="<?php echo $dobs[$i]->year; ?>" <?
php if ($frmdata['year']==$dobs[$i]->year) echo ' selected="selected " '; ?
>><?php echo $dobs[$i]->year; ?></option>
<?php
}
?></select> </td>
</tr>
<tr class="tabledata">
<td>Father / Mother /Name * </td>
<td><input type="text" name="father_name" id="father_name" value="<?
php echo $frmdata['father_name'];?>" onkeyup="return
checkalpha(this.name);"/>
<IMG SRC="" WIDTH="10" HEIGHT="10" NAME="img_father_name"
BORDER="0"></td>
</tr>
<tr class="tabledata">
<td>Nationality *</td>
<td><input type="text" name="nationality" id="nationality" value="<?php
echo $frmdata['nationality'];?>" onkeyup="return checkalpha(this.name);"/>
<IMG SRC="" WIDTH="10" HEIGHT="10" NAME="img_nationality"
BORDER="0"></td>
</tr>
<tr class="tabledata">
<td>Address*</td>
<td><input type="text" name="town" id="town" value="<?php echo
$frmdata['town'];?>" onkeyup="return checkalpha(this.name);"/>
<IMG SRC="" WIDTH="10" HEIGHT="10" NAME="img_town"
BORDER="0"></td>
</tr>
<tr class="tabledata">
<td>State *</td>
<td><select name="state" id="stname" onChange="SelectSubCat();">
<option value="">---- Please Select ----</option>
<?php
for($counter=0;$counter<count($statelist);$counter+
+)
{
?>
<option value="<?php echo
$statelist[$counter]->state_id;?>" <?php
if($frmdata['state_id']==$statelist[$counter]->state_id) echo '
selected="selected " ';?>><?php echo $statelist[$counter]->state_name;?
></option>
<?php
}
?>
</select> </td>
</tr>
<tr class="tabledata">
<td>District * </td>
<td>
<div id="candidate_area">
<select name="candidate_area" id="candidate_area">
<option value="">Please choose state first</option>
</select></div> </td>
</tr>
<tr class="tabledata">
<td>Pin Code *</td>
<td><input type="text" name="pin_code" id="pin_code" value="<?php
echo $frmdata['pin_code'];?>" onkeyup="return checkpin_code();"/>
<IMG SRC="" WIDTH="10" HEIGHT="10" NAME="img_pin_code"
BORDER="0"></td>
</tr>
<tr>
<td class="tableheader" colspan="2" align="center">
<input type="button" value="Register" onClick="javascript: checkform();"
>
&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="btn_cancel"
id="btn_cancel" value="Cancel" onClick="Cancel(document.frmcandidate);"
/> </td>
</tr>
</table>
</form>
</p>
</div>
<div class="meta">
</div>
</div>
<?
"/n";
"/n";
?>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>
</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img
src="images/ad_120x600.jpg" alt="" width="120" height="290" /></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria,Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>
result.php

<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) &&
($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "index.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
?>
<? session_start();
require("connection.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Quizes</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Homepage</a></li>
<li><a href="academics.php" title="">Academics</a></li>
<li><a href="study.php" title="">Study Material </a></li>
<li class="active"><a href="quiz.php"
title="">Quizes</a></li>
<li><a href="aboutus.php" title="">About Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
<div class="title">
<h2>play online </h2>
</div>
<div class="content">
<p><a href="http://www.quibblo.com">www.quibblo.com</a></p>
<p><a href="http://www.gthwebsite.com">www.thwebsite.com</a></p>
<p><a href="http://www.careerquiz.com">www.careerquiz.com</a></p>
<p><a href="http://www.thatquiz.org">www.thatquiz.org</a></p>
<p><a href="http://www.pitara.com/activities/">www.pitara.com</a></p>
</div>
</div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
<div class="content">
<ul id="size">
<li><a href="faculties.php">Faculties</a></li>
<li><a href="tech.php">Technology</a></li>
<li><a href="students.php">Students</a></li>
<li><a href="syllabus.php">Syllabus</a></li>
<li ><a href="http://www.gyanvihar.org">Gyan Vihar</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>Quiz</span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story"><img src="images/quiz.gif" alt=""
width="120" height="120" class="left" />
<p>Greetings! On behalf of the faculty, staff, and
students of the Department of Computer Science, we welcome you! These
are exciting times for computer scientists as the discipline is now widely
recognized as an essential source of tools and techniques for
advancements in nearly all spheres of human endeavor.</p>
<p><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
<td width="1044" valign="top"><table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><?
$qid=$_SESSION["quizid"];
//echo $qid;
$sql1="select * from quiz where quizid='$qid'";
$f=mysql_fetch_array(mysql_query($sql1));
$sql="insert into results (studentid,quizid,marks) values('".
$_SESSION["sid"]."','".$_SESSION["quizid"]."','".$_SESSION["marks"]."')";
mysql_query($sql);
?>&nbsp;</td>
</tr><tr>
<td align="center" >RESULT OF TEST </td>
</tr><tr>
<td>&nbsp;</td>
</tr><tr>
<td><table width="200" border="2" align="center">
<tr>
<td>TITLE</td>
<td><? echo $f['title'];?></td>
</tr>
<td>MARKS(MAX 25)</td>
<td><? echo $_SESSION["marks"];?></td>
</tr></table>
</td>
</tr><tr>
<td>&nbsp;</td>
</tr><tr>
<td>&nbsp;</td>
</tr><tr>
<td>&nbsp;</td>
</tr><tr>
<td><a href="home.php"></a></td>
</tr><tr>
<td>&nbsp;</td>
</tr> <tr>
<td>&nbsp;</td>
</tr><tr>
<td>&nbsp;</td>
</tr><tr>
<td>&nbsp;</td>
</tr><tr>
<td>&nbsp;</td>
</tr><tr>
<td>&nbsp;</td>
</tr><tr>
<td>&nbsp;</td>
</tr><tr>
<td>&nbsp;</td>
</tr><tr>
<td>&nbsp;</td>
</tr><tr>
<td>&nbsp;</td>
</tr></table></td>
</tr> <tr>
<td colspan="2"><? require("footer.php");?></td>
</tr></table></p>
</div>
<div class="meta">
</div>
</div>
<?
"/n";
"/n";
?>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>
</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img
src="images/cryptic_quiz.gif" alt="" width="180" height="520" /></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria,Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>
student.php
<?
session_start();
include("include/conn.php");
if(isset($_POST['Submit']))
{
$q = mysql_query("select * from admin where uname='".$_POST['un']."'
&& upass = '".$_POST['upass']."' ");
$num =mysql_num_rows($q);
if($num)
{
$row = mysql_fetch_array($q);
$_SESSION['sid'] = $row['id'];
$_SESSION['sname'] = $row['uname'];
header("location:admin/login.php3");
exit();
}
$q = mysql_query("select * from info where uname ='".$_POST['un']."'
&& pass = '".$_POST['upass']."' ");
$num =mysql_num_rows($q);
if($num)
{
$row = mysql_fetch_array($q);
$_SESSION['sid'] = $row['id'];
$_SESSION['sname'] = $row['uname'];
header("location:welcome.php");
exit();
}
}
if(isset($_GET['todo']) && $_GET['todo']=="logout")
{
session_unset();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Computer Science Department</title>
<meta name="keywords" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
<meta name="description" content="" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li class="active"><a href="#" title="">Homepage</a></li>
<li><a href="academics.php" title="">Academics</a></li>
<li><a href="study.php" title="">Study Material </a></li>
<li><a href="quiz.php" title="">Quizes</a></li>
<li><a href="aboutus.php" title="">About Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
<div class="title">
<h2>Sign In </h2>
</div>
<div class="content">
<form id="form1" method="post" action="#">
<fieldset>
<legend>Sign-In</legend>
<label for="inputtext1">Username:</label>
<input id="inputtext1" type="text" name="un" value="" />
<label for="inputtext2">Password:</label>
<input id="inputtext2" type="password" name="upass" value="" />
<input id="inputsubmit1" type="submit" name="Submit" value="LogIn"
<p><? if(!isset($_POST['uname']) && isset($_POST['Submit'])) {
echo "invalid user"; } ?></p>
<P><a href="reg.php">New User <img src="" width="15"
height="20" /></a></P>
</fieldset>
</form>
</div>
</div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
<div class="content">
<ul id="size">
<li><a href="faculties.php">Faculties</a></li>
<li><a href="tech.php">Technology</a></li>
<li><a href="students.php">Students</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>Student's section </span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story"><img src="images/IMG_0971.jpg"
alt="" width="120" height="120" class="left" />
<p>At times, a student's life can be anything but easy:
drawing up timetables, finding rooms, sitting for exams and undertaking
work experience – with as little hassle and upheaval as possible.</p>
<p>The aim of this page is to simplify matters a little
by providing students at Technische Universität München with some links
and tips for their studies. </p>
</div>
<div class="meta">
</div>
</div>
<!-- end #welcome -->
<div id="example" class="post">
<h2 class="title"><span>Recent Updates </span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story">
<p><marquee scrollamount="1" scrolldelay="100"
direction="up" width="370" height="100" onmouseover="this.stop();"
onmouseout="this.start();">
<ul>
<?
$q = mysql_query("select * from news where status ='1'");
$num = mysql_num_rows($q);
if($num>0)
{
while($r = mysql_fetch_array($q))
{
?>
<li><?=$r['data']?></li>
<?
}
}
?>
</ul>
</ul>
</marquee> </p>
</div>
</div>
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>
</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img
src="images/aayam2008(2).jpg" alt="" width="180" height="520"
/></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria,Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>
syllabus.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Syllabus</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Homepage</a></li>
<li><a href="academics.php" title="">Academics</a></li>
<li><a href="study.php" title="">Study Material </a></li>
<li><a href="quiz.php" title="">Quizes</a></li>
<li><a href="aboutus.php" title="">About Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
</div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
<div class="content">
<ul id="size">
<li><a href="faculties.php">Faculties</a></li>
<li><a href="tech.php">Technology</a></li>
<li><a href="students.php">Students</a></li>
<li><a href="syllabus.php">Syllabus</a></li>
<li ><a href="http://www.gyanvihar.org">Gyan Vihar</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>syllabus of Computer Science
Depatment </span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story"><img
src="images/computerscience.jpg" alt="" width="120" height="180"
class="left" />
<p>The syllabus serves many purposes for the students
and the teacher such as ensuring a fair and impartial understanding
between the instructor and students such that there is minimal confusion
on policies relating to the course, setting clear expectations of material to
be learned, behavior in the classroom, and effort on student's behalf to be
put into the course, providing a roadmap of course organization/direction
relaying the instructor's teaching philosophy to the students, and providing
a marketing angle of the course such that students may choose early in
the course whether the subject material is attractive</p>
</div>
<br />
<a href="pdf/sgvu.pdf" target="_blank">Syllabus for Suresh
Gyan Vihar University</a><br />
<a href="pdf/syl.pdf" target="_blank">Syllabus for 3rd year &
4th Year RTU batch</a><br />
<a href="pdf/1st.pdf" target="_blank">Syllabus for 1st Year
RTU batch</a><br />
<a href="pdf/2nd.pdf" target="_blank">Syllabus for 2nd Year
RTU batch</a>
<div class="meta">
</div>
</div>
<?
"/n";
"/n";
?>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>
</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img src="images/image.jpg"
alt="" width="180" height="520" /></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria,Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>

taketest.php
<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) &&
($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);

$logoutGoTo = "index.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
?>
<? session_start();?>
<? require("header.php");
?>

<?
$sno=1;
require("connection.php");
extract($_GET);
if($_POST["submit"]!="")
{
$sno=$_SESSION["sno"];
$sno++;
$_SESSION["sno"]=$sno;
$marks=$_SESSION["marks"];
$i=$_SESSION["i"];
if($_REQUEST["ans"]==$_SESSION["answer"])
{
$_SESSION["marks"]=$_SESSION["marks"]+5;
}
if($sno==6)
{
?> <a href="result.php">Result</a><?
}
}
if($sno==1)
{
$_SESSION["marks"]=0;
$_SESSION["i"]=1;
$i=$_SESSION["i"];
$_SESSION["quizid"]=$id;
mysql_query("drop table temp");
$sql="create table temp as select * from details where quizid=$id
order by rand() limit 5";
//echo $sql; die;
mysql_query($sql);
}
$result=mysql_query("select * from temp");
$cnt=1;
while($r=mysql_fetch_array($result))
{
if($cnt==$sno)
{
$_SESSION["answer"]=$r['answer'];
?>
</p>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Quizes</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Homepage</a></li>
<li><a href="academics.php" title="">Academics</a></li>
<li><a href="study.php" title="">Study Material </a></li>
<li class="active"><a href="quiz.php" title="">Quizes</a></li>
<li><a href="aboutus.php" title="">About Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
<div class="title">
<h2>play online </h2>
</div>
<div class="content">
<p><a href="http://www.quibblo.com">www.quibblo.com</a></p>
<p><a href="http://www.gthepwebsite.com">www.thewebsite.com</a></p>
<p><a href="http://www.careerquiz.com">www.careerquiz.com</a></p>
<p><a href="http://www.thatquiz.org">www.thatquiz.org</a></p>
<p><a href="http://www.pitara.com/activities/">www.pitara.com</a></p>
</div>
</div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
<div class="content">
<ul id="size">
<li><a href="faculties.php">Faculties</a></li>
<li><a href="tech.php">Technology</a></li>
<li><a href="students.php">Students</a></li>
<li><a href="syllabus.php">Syllabus</a></li>
<li ><a href="http://www.gyanvihar.org">Gyan Vihar</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>Quiz</span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story"><img src="images/quiz.gif" alt=""
width="120" height="120" class="left" />
<p>Greetings! On behalf of the faculty, staff, and
students of the Department of Computer Science, we welcome you! These
are exciting times for computer scientists as the discipline is now widely
recognized as an essential source of tools and techniques for
advancements in nearly all spheres of human endeavor.</p>
<p><td>&nbsp;</td>
</tr><tr>
<td><p>Q <? echo $_SESSION['i'];?>) <? echo $r['question'];?>
</p>&nbsp;</td>
</tr><tr>
<td><form id="form1" name="form1 "action="taketest1.php"
method="post">
<hr>
<input name="ans" type="radio" value="1"> &nbsp; 1) &nbsp; <?
echo $r['option1'];?>
<hr>
<input name="ans" type="radio" value="2"> &nbsp; 2) &nbsp; <?
echo $r['option2'];?>
<hr>
<input name="ans" type="radio" value="3"> &nbsp; 3) &nbsp; <?
echo $r['option3'];?>
<hr>
<input name="ans" type="radio" value="4" > &nbsp; 4)&nbsp; <?
echo $r['option4'];?>
<hr>
<p>&nbsp;</p>
<input name="submit" type="submit" value="submit">
<? $i++;
$_SESSION["i"]=$i;?>

<?
break;
}
$cnt++;
}
//echo "123123";

$_SESSION["sno"]=$sno;
?>
</form>&nbsp;</td>
</tr>
</p>
</div>
<div class="meta">
</div>
</div>
<?
"/n";
"/n";
?>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>
</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img src="images/cryptic_quiz.gif"
alt="" width="180" height="520" /></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria, Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>

tech.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Technology</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
</div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>Latest technology links </span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story">
<div></div>
<ul>
<li>
<a href="http://www.sciencedaily.com/">Artificial Intelligence</a>
</li> <li>
<a href="http://www.sciencedaily.com/">Communications</a>
</li><li>
<a href="http://www.sciencedaily.com">Computational Biology</a>
</li><li>
<a href="http://www.sciencedaily.com">Computer Graphics</a>
</li><li>
<a href="http://www.sciencedaily.com">Computer Modeling</a>
</li><li>
<a href="http://www.sciencedaily.com">Computer Programming</a>
</li>
</ul>
<p>&nbsp;</p>
</div>
<div class="meta">
</div>
</div>
<?
"/n";
"/n";
?>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>
</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img
src="images/Workgroup_608071.jpg" alt="" width="180" height="520"
/></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria, Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>

viewers.php
<?
session_start();
require("connection.php");
$hostname="localhost";
$username="root";
$pwd="";
$dbname="registration";
$con=mysql_connect($localhost,$username,$pwd);
mysql_select_db($dbname,$con);
require("connection.php");
$id=$_SESSION["id"];
//echo $_SERVER['HTTP_REFERER'];

if(isset($_SESSION["id"])/*$_SERVER['HTTP_REFERER']=="http:/localhos
t/mcateam/l1.php"*/)
{
$vq=$_REQUEST["vq"];
$keyorder="ascending";
$keysortby="answered";
$ok="false";
if($_REQUEST["OK"]!="")
{
$ok="true";
$keyorder=$_REQUEST["order"];
$keysortby=$_REQUEST["sortby"];
$keyid=$_REQUEST["subject"];
$vq=1;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Quizes</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Homepage</a></li>
<li><a href="academics.php" title="">Academics</a></li>
<li><a href="study.php" title="">Study Material </a></li>
<li class="active"><a href="quiz.php" title="">Quizes</a>
<li><a href="aboutus.php" title="">About Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
<div class="title">
<h2>play online </h2>
</div>
<div class="content">
<p><a href="http://www.quibblo.com">www.quibblo.com</a></p>
<p><a href="http://www.thewebsite.com">www.thewebsite.com </a>
<p><a href="http://www.carrquiz.com">www.careerquiz.com</a></p>
<p><a href="http://www.thatquiz.org">www.thatquiz.org</a></p>
<p><a href="http://www.pitara.com">www.pitara.com</a></p>
</div>
</div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
<div class="content">
<ul id="size">
<li><a href="faculties.php">Faculties</a></li>
<li><a href="tech.php">Technology</a></li>
<li><a href="students.php">Students</a></li>
<li><a href="syllabus.php">Syllabus</a></li>
<li ><a href="http://www.gyanvihar.org">Gyan Vihar</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>Quiz</span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story"><img src="images/quiz.gif" alt=""
width="120" height="120" class="left" />
<p>Greetings! On behalf of the faculty, staff, and students
of the Department of Computer Science, we welcome you! These are
exciting times for computer scientists as the discipline is now widely
recognized as an essential source of tools and techniques for
advancements in nearly all spheres of human endeavor.</p>
<p>Welcome <? echo $_SESSION["fname"];?></td>
</tr><tr>
<td width="216" valign="top"><table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<tr>
<td>
<table width="500" border="1" align="center" cellpadding="3"
cellspacing="3">
<tr>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 20px; color:
#006;">Name Of Student</td>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 20px; color:
#006;">Name of Quiz</td>
<td style="font-family: Arial, Helvetica, sans-serif; font-size: 20px; color:
#006;">Marks(outof 25)</td>

</tr>
<?
$sql="select * from results where facid=$id";
$result=mysql_query($sql);

while($row=mysql_fetch_array($result))
{
?>
<tr><? $sid=$row["studentid"];
$qid=$row["quizid"];
?>
<?
$sql2="select * from reg where id=$sid";
$f=mysql_fetch_array(mysql_query($sql2));
?>
<td><?=$f["username"];?></td>
<?
$sql2="select * from quiz where quizid=$qid";
$f=mysql_fetch_array(mysql_query($sql2));
?>
<td><?=$f["title"];?></td>
<td><?=$row["marks"];?></td>
</tr>

<?
}
}
?>
</table></p></td>
</tr>
</div>
<div class="meta">
</div>
</div>
<?
"/n";
"/n";
?>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>
</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img src="images/cryptic_quiz.gif"
alt="" width="180" height="520" /></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria, Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>
welcome.php

<?
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Welcome</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
<h1><a href="#">Computer Science</a></h1>
<h2><a href="http://www.freecsstemplates.org/"></a></h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Homepage</a></li>
<li><a href="academics.php" title="">Academics</a></li>
<li><a href="study.php" title="">Study Material </a></li>
<li><a href="quiz.php" title="">Quizes</a></li>
<li><a href="aboutus.php" title="">About Us </a></li>
</ul>
</div>
</div>
<div id="content">
<div id="sidebar">
<div id="login" class="boxed">
</div>
<!-- end #login -->
<div id="updates" class="boxed">
<div class="title">
<h2>Quick Links </h2>
</div>
<div class="content">
<ul id="size">
<li><a href="faculties.php">Faculties</a></li>
<li><a href="tech.php">Technology</a></li>
<li><a href="students.php">Students</a></li>
<li><a href="syllabus.php">Syllabus</a></li>
<li ><a href="http://www.gyanvihar.org">Gyan Vihar</a></li>
<li><a href="contact.php">Contact Us</a></li>
</ul>
</div>
</div>
<!-- end #updates -->
</div>
<!-- end #sidebar -->
<div id="main">
<div id="welcome" class="post">
<h2 class="title"><span>Welcome User </span></h2>
<h3 class="date"><?=date("d-m-y");?></span></h3>
<div class="story">
<p><?

include("include/conn.php");
if(!isset($_SESSION['sid']) && $_SESSION['sname']=="")
{
header("location:index.php");
exit();
}
else
{
?>
<h1>Welcome <?=$_SESSION['sname']?> </h1><? echo " "; ?>
<a href="index.php?todo=logout">Logout </a>
<br>
<?php
$ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
$_SERVER['HTTP_X_FORWARDED_FOR'] :
$_SERVER['REMOTE_ADDR'];
echo 'Your IP is: '.$ip; ?>
<br />
<?php
$useragent = $_SERVER ['HTTP_USER_AGENT'];
echo "<b>Your User Agent is</b>: " . $useragent;
?>
<?
}
?>
<br><br><br><br><br>
</p>
</div>
<div class="meta">
</div>
</div>
<?
"/n";
"/n";
?>
<!-- end #welcome -->
<!-- end #example -->
</div>
<!-- end #main -->
<div id="sidebar2">
<div id="sponsors" class="boxed">
<div class="title">
<h2>Photo Gallery </h2>
</div>
</div>
<!-- end #sponsors -->
<div id="ad120x600"><a href="#"><img src="images/com.jpg"
alt="" width="180" height="520" /></a></div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #sidebar2 -->
<!-- end #content -->
<div id="footer">
<p id="legal">Copyright &copy; 2010 Computer Science Department.
All Rights Reserved. Designed by Hitesh Bajoria,Sudarshan Singhal ,
Sudershan Malpani, Sudhir Phophaliya, Tarun Deep Chhabra </p>
<p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of
Use</a> | <a href="#">Contact Us</a></p>
</div>
</body>
</html>
Future Expansion
As per the departments requirement whole website is designed.
We can add additional enhancements to our project. We can also make
this project in such a way that users can solve their problems directly
through the Internet by querying the faculties of the department and these
queries and there replies can be viewed by all other registered users,hence
it will save time of both students and faculties,who have the same problem
to solve.
We can also embed chat option for the users (Students or
Faculties) who are online at the time and are registered, so that it can be
used as a social networking site such as Facebook, Orkut, and Twitter etc
at a small scale or at department level. Furter we can also add an option of
sms for the registered users.
Conclusion
 As there was no such system available for department by which the
students can communicate with teachers properly.This project will
provide the students proper medium to communicate with the faculties
over there probems regarding studies and other topics.

 There was a great problem in keeping record of daily attendance,


performance of each student, profile of each person associated with the
department.

 There were a lot of difficulties for the student regarding the current
updates of the department.All the latest updates of the departments are
provided on the website, such as all the information are uploaded on the
website as quick as possible.
Bibliography

Вам также может понравиться