View
828
Download
0
Category
Tags:
Preview:
Citation preview
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
1 | P a g e
A
PROJECT REPORT
ON
ONLINE SELF TEST
Submitted as subject accomplishment of 5nd Semester for the degree of
Academic Year 2014-15
Submitted By
PANDAV GOVIND M. (125380693054)
Internal Guide
Asst. Prof. Viral Shah
Asst. Prof. Charmi Kotak
Submitted To
Shri Sunshine Group of Institutions – Rajkot.
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
2 | P a g e
PREFACE
00rst of all we would like to say that project is very essential part of our educational
quota. If we are going only for theory parts, it cannot give us perfect knowledge.
Computer Technology has proved beneficial in many ways from visible to invisible
spectacular to routine in every field computer system occupy special place. Computer makes
possible smooth and efficient operation.
This project report of “ONLINE SELF TEST” Project is present against you for
project as a subject in 5nd semester in MCA.
Your co-operation in form of suggestions and comments are most welcome, to improve any knowledge and project.
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
3 | P a g e
CANDIDATE’S DECLARATION
We hereby declare that the work presented in this project entitled “ONLINE SELF TEST”
submitted towards completion of project in fifth Semester of M.C.A at the Shree Sunshine Group
of Institution - Rajkot, is an authentic record of our original work carried out under the guidance of
Asst.Prof. Viral Shah and Asst.Prof. Charmi Kotak Assistance Professors at Sunshine Group of
Institution - Rajkot.
Name : PANDAV GOVIND M. (125380693054)
Place : Rajkot
Date :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
4 | P a g e
ACKNOWLADGEMENTS
The presentation of this report gives us the feeling of fulfillment. As the first step toward the
MCA, this activity has bridged apply ourselves to become good IT professional. Naturally, it requires lots of people’s support to complete this project. We take this opportunity to acknowledge their support to us.
It is a great pleasure and satisfaction to present this Project report on “ONLINE SELF
TEST ” for the M.C.A (5-Sem), Gujarat Technological University. We are heartily grateful & express sincere thanks to Mrs. Alpana Upadhayay, H.O.D. of
the MCA Department of Sunshine Group of Institution.
We are thankful to our project guide Asst.Prof. Viral Shah and Asst.Prof. Charmi Kotak who has provided such a nice facility to attend our project work in project of on “ONLINE SELF
TEST” without his guidance and kind co-operation this work would not be completed. It was a great
pleasure and privilege to work under them.
We are also thankful to MCA department staff of our college for their kind co-operation and giving opportunity to work on this project in their guidance. They all have been very kind in sparing their valuable time for our encouragement and guidance.
We are also thankful to our parents and friends whole heartedly as they have given us directly
or indirectly support in preparing this project.
Thank You…
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
5 | P a g e
ABSTRACT
Our project is on “ONLINE SELF TEST”.
In our project we have covered all the possible points which is important in “ONLINE SELF TEST” or “ONLINE EXAMINATION”.
This project also gives the any institutions and any company are used this project.
Institutions are used this project in facility informations and many subject releted information
stored in Questions wise.
IT company are used this project in new employees are indicate to general test.
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
6 | P a g e
INDEX
Sr.
No. CONTENTS
Page
No.
1. ABOUT TECHNOLOGY (Front End and Back End)
1.1 HTML
1.2 JavaScript 1.3 PHP 1.4 MySQL
8
2. REQUIREMENTS
2.1 Project Profile 2.2 Hardware & Software Requitements
2.2.3 Software Specification
11
3. SYSTEM PLANNING & IMPLEMENTATION
3.1 Project Planning 3.2 Sehedule Of Project
3.3.1 Proposed Timeline Chart
14
4. DATA DICTIONARY
4.1 Faculty_master 4.2 Interview_master
4.3 Log_status 4.4 Question_master 4.5 Quiz_category
4.6 Quiz_course 4.7 Quiz_schedule
4.8 Result_master 4.9 Student_registration 4.10 Subject_master
4.11 Test_question_master 4.12 User_master
17
5. DATA FLOW DIAGRAM
5.1 Level ‘0’ DFD
5.2 Level ‘1’ DFD 5.3 Level ‘2’ DFD
20
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
7 | P a g e
6. SCREEN SHOTS
6.1 Home Page
6.1.1 Concept Page 6.1.1.1 SubConcept Page
6.1.1.1.1 QueType Page 6.1.1.1.1.1 Exam Page 6.1.1.1.1.2 Display Page (Result)
6.2 Aptitude Page 6.3 Logical Reasoning Page
6.4 Verbal Ability Page 6.5 General Knowledge Page 6.6 Interview Paper Page
6.7.1 Online Test (Admin Login) Page
6.7.1.1 Admin / User Info Page
6.7.1.2 Category Page 6.7.1.3 Course Page 6.7.1.4 Subject Page
6.7.1.5 Question Page 6.7.1.6 Faculty Page
6.7.1.7 Student Page 6.7.1.8 Interview Paper Page 6.7.1.9 Log Status Page
6.7.2 Online Test (Faculty Login) Page
6.7.2.1 Profile Page
6.7.2.2 Student Page 6.7.2.3 Schedule Page 6.7.2.4 Question Page
6.7.3 Online Test (Student Login) Page
6.7.3.1 Profile Page
6.7.3.2 StartExam Page 6.7.3.2.1 Exam Page 6.7.3.2.2 Display (Result) Page
6.7.3.3 Result Page 6.7.4 SignUp (Register) Page
6.8 Contact Us Page
29
7. SOURCE CODE
7.1 VISITORS / GUEST PANEL
7.1.1 index.php
7.1.1.1 Concept.php 7.1.1.1.1 SubConcept.php 7.1.1.1.1.1 QueType.php
7.1.1.1.1.1.1 Exam.php 7.1.1.1.1.1.2 Display.php
7.1.2 Interview.php 7.1.2.1 InsertInterQue.php 7.1.3 user.php
7.1.4 Contact.php
63
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
8 | P a g e
7.2 ADMIN PANEL
7.2.1 index.php 7.2.2 User.php
7.2.2.1 InsertUser.php 7.2.2.2 EditUser.php
7.2.2.3 DeleteUser.php 7.2.3 Category.php 7.2.3.1 InsertCategory.php
7.2.3.2 EditCategory.php 7.2.3.3 DeleteCategory.php
7.2.4 Course.php 7.2.4.1 InsertCourse.php 7.2.4.2 EditCourse.php
7.2.4.3 DeleteCourse.php 7.2.5 Subject.php
7.2.5.1 InsertSubject.php 7.2.5.2 EditSubject.php 7.2.5.3 DeleteSubject.php
7.2.6 Question.php 7.2.6.1 InsertQuestion.php
7.2.6.2 EditQuestion.php 7.2.6.3 DeleteQuestion.php 7.2.7 Faculty.php
7.2.7.1 InsertFaculty.php 7.2.7.2 EditFaculty.php
7.2.7.3 DeleteFaculty.php 7.2.8 Student.php 7.2.8.1 InsertStudent.php
7.2.8.2 EditStudent.php 7.2.8.3 DeleteStudent.php
7.2.9 Interview.php 7.2.9.1 InsertInterQue.php 7.2.9.2 EditPaper.php
7.2.9.3 DeletePaper.php 7.2.10 LogStatus.php
7.3 FACULTY / RESEARCHER PANEL
7.3.1 index.php 7.3.2 Profile.php
7.3.2.1 EditFaculty.php 7.3.3 Student.php
7.3.3.1 InsertStudent.php 7.3.3.2 EditStudent.php 7.3.3.3 DeleteStudent.php
7.3.4 Schedule.php 7.3.4.1 DeleteSchedule.php
7.3.5 Question.php 7.3.5.1 InsertQuestion.php 7.3.5.2 EditQuestion.php
7.3.5.3 DeleteQuestion.php 7.4 STUDENT / USER PANEL
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
9 | P a g e
7.4.1 index.php 7.4.2 Profile.php 7.4.2.1 EditProfile.php
7.4.3 StartExam.php 7.4.3.1 Exam.php
7.4.3.2 Display.php 7.4.4 Result.php
7.5 style.css
7.6 Header.php
7.7 footer.php
7.8 login.php
7.9 Register.php
7.10 Logout.php
8. BIBLOGRAPHY
8.1 Books 8.2 Web Links
223
9. CONCLUSION
224
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
10 | P a g e
1. ABOUT TECHNOLOGY (Front End / Back End Language)
1.1 What is HTML?
HTML or Hyper Text Markup Language is the standard markup language. Developed by scientist Tim Berners-Lee in 1990, HTML is the "hidden" code that helps us communicate with
others on the World Wide Web (WWW). HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets
(like <html>).
A web browser can read HTML files and compose them into visible or audible web pages. The browser does not display the HTML tags, but uses them to interpret the content of the page. HTML describes the structure of a website semantically along with cues for presentation, making it a
markup language rather than a programming language.
HTML elements form the building blocks of all websites. HTML allows images and objects to be embedded and can be used to create interactive forms. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes
and other items. It can embed scripts written in languages such as JavaScript which affect the behavior of HTML web pages.
Web browsers can also refer to Cascading Style Sheets (CSS) to define the look and layout of
text and other material.
1.2 What is PHP:
PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to
allow web developers to write dynamically generated pages quickly. Originally created by Rasmus Lerdorf in 1994, the reference implementation of PHP (powered
by the Zend Engine) is now produced by The PHP Group. While PHP originally stood for Personal Home Page, it now stands for PHP: Hypertext Preprocessor, which is a recursive backronym.
PHP is a server-side scripting language designed for web development but also used as a general-
purpose programming language. As of January 2013, PHP was installed on more than 240 million
websites (39% of those sampled) and 2.1 million web servers. Originally created by Rasmus Lerdorf in 1994, the reference implementation of PHP (powered by the Zend Engine) is now produced by
The PHP Group. While PHP originally stood for Personal Home Page, it now stands for PHP: Hypertext Preprocessor, which is a recursive backronym.
PHP code can be simply mixed with HTML code, or it can be used in combination with various templating engines and web frameworks. PHP code is usually processed by a PHP interpreter, which
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
11 | P a g e
is usually implemented as a web server's native module or a Common Gateway Interface (CGI) executable. After the PHP code is interpreted and executed, the web server sends resulting output to
its client, usually in form of a part of the generated web page – for example, PHP code can generate a web page's HTML code, an image, or some other data. PHP has also evolved to include a command-
line interface (CLI) capability and can be used in standalone graphical applications. The canonical PHP interpreter, powered by the Zend Engine, is free software released under the
PHP License. PHP has been widely ported and can be deployed on most web servers on almost every operating system and platform, free of charge.
Despite its popularity, no written specification or standard exists for the PHP language; instead,
the canonical PHP interpreter serves as a de facto standard. However, work on creating a formal
specification has started in 2014.
1.3 What is JavaScript:
JavaScript is a dynamic computer programming language. It is most commonly used as part of
web browsers, whose implementations allow client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed. It is also used in server-side network programming with frameworks such as Node.js, game development and
the creation of desktop and mobile applications.
JavaScript is classified as a prototype-based scripting language with dynamic typing and first-class functions. This mix of features makes it a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles.
Despite some naming, syntactic, and standard library similarities, JavaScript and Java are
otherwise unrelated and have very different semantics. The syntax of JavaScript is actually derived from C, while the semantics and design are influenced by Self and Scheme programming languages.
The application of JavaScript in use outside of web pages—for example, in PDF documents, site-specific browsers, and desktop widgets—is also significant. Newer and faster JavaScript VMs and
platforms built upon them (notably Node.js) have also increased the popularity of JavaScript for server-side web applications. On the client side, JavaScript was traditionally implemented as an interpreted language but just-in-time compilation is now performed by recent browsers.
JavaScript was formalized in the ECMAScript language standard and is primarily used as part of
a web browser (client-side JavaScript). This enables programmatic access to objects within a host environment.
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
12 | P a g e
1.4 What is SQL:
Structured Query Language is a third generation language for working with relational databases. Being a 3G language it is closer to human language than machine language and therefore easier to understand and work with.
Dr. E. F. Ted Codd who worked for IBM described a relational model for database in 1970.
In 1992, ANSI (American National Standards Institute), the apex body, standardized most of the basic syntax.
It’s called SQL 92 and most databases (like Oracle, MySQL, Sybase, etc.) implement a
subset of the standard (and proprietary extensions that makes them often incompatible).
1.4.1 Why MySQL:
Free as in Freedom - Released with GPL version 2 license (though a different license can be bought from Oracle, see below).
Cost - Free!
Support - Online tutorials, forums, mailing list (lists.mysql.com), paid support contracts.
Speed - One of the fastest databases available.
Functionality - supports most of ANSI SQL commands.
Ease of use - less need of training / retraining.
Portability - easily import / export from Excel and other databases.
Scalable - Useful for both small as well as large databases containing billions of records and terabytes of data in hundreds of thousands of tables.
Permission Control - selectively grant or revoke permissions to users.
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
13 | P a g e
2. REQUIREMENTS
2.1 PROJECT PROFILE
Project Name : ONLINE SELF TEST
Submitted To : Gujarat Technological University
Project Guide : Asst.Prof. Charmi Kotak
Asst.Prof. Viral Shah
Developed By : PANDAV GOVIND M. (125380693054)
Project Duration : 91 Days
Academic year : 2014-15
Front End : EditPlus3
Back End : MySQL DB
Documentation Tools : Microsoft word
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
14 | P a g e
2.2 HARDWARE & SOFTWARE
REQUIREMENT
2.2.1 Hardware Requirement :
1. PIII or higher Processor 2. 512 MB or higher RAM
3. Color or Monochrome VGA monitor .
2.2.2 Software Requirements :
1. Windows XP or higher version 2. Edit Plus 3(PHP, JAVASCRIPT, HTML, JQUERY, AJAX)
3. MYSQL(DATABASE TOOLS)
2.2.3 Software Specification :
1. Google Chrome Browser 2. Mozila Firefox Browser
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
15 | P a g e
3. SYSTEM PLANNING & IMPLEMENTATION
3.1 PROJECT PLANNING
Project planning includes description of project tasks, activities and functions,
dependencies, resource requirements and a detailed schedule.
Design
Coding
Testing
Requiremet
Analysis
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
16 | P a g e
3.2 SCHEDULE OF PROJECT
Analysis = 2 weeks
Designs = 3 Weeks
Coding = 5 Weeks
Testing = 7 Weeks
Documentation = 4 Weeks
(Week-wise project Planning)
3.2.1 Proposed Timeline Chart
2
3
57
4
Project Planning
Analysis
Design
Coding
Testing
Documentation
Development Phase
Weeks Number Of
Weeks Analysis 1 2 3 4 5 6 7 8 9 10 11 12 13
2
Design 1 2 3 4 5 6 7 8 9 10 11 12 13
3
Coding 1 2 3 4 5 6 7 8 9 10 11 12 13
5
Testing 1 2 3 4 5 6 7 8 9 10 11 12 13
7
Documentation 1 2 3 4 5 6 7 8 9 10 11 12 13
4
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
17 | P a g e
4. DATA DICTIONARY
4.1 Faculty_master :
Field Type Discription
Faculty_Id int(11) Id of Faculty
Faculty_Name varchar(20) Name of Faculty
Faculty_Email varchar(20) Email of Faculty
Faculty_Mobile varchar(10) Mob. No. of Faculty
Faculty_User varchar(20) UserId of Faculty
Faculty_Password varchar(20) Password of Faculty
Status varchar(10) Status of Faculty
4.2 Interview_master :
Field Type Discription
CmpId int(10) Id of Company
CmpName Text Name of Company
LocDate Text Location & Date of CMP
PlacePaper Text Placement Paper of CMP
Name Text Name of Uploader
Email Text Email of Uploader
Date Date Date of Upload by User
Time Time Time of Upload by User
4.3 Log_status :
Field Type Discription
Id int(11) Unique Id of Status
Userid int(10) Id of User
Usernm varchar(20) Name of User
process varchar(100) Process name performed
date Date Date of status
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
18 | P a g e
time Time Time of status
status varchar(200) Status of process
4.4 Question_master :
Field Type Description
Que_Id int(11) Id of Question
Quiz_Id int(11) Id of Quiz
Sem varchar(10) Semester of stream
Subject_Id int(11) Id of Subject
Que varchar(200) Question
Opt_A varchar(100) Option A
Opt_B varchar(100) Option B
Opt_C varchar(100) Option C
Opt_D varchar(100) Option D
Ans varchar(100) Answer
4.5 Quiz_category :
Field Type Description
Quiz_Id int(11) Id of Quiz
Quiz_Name varchar(20) Name of Quiz
4.6 Quiz_course :
Field Type Description
Course_Id int(10) Id of Course
Course_Name Text Name of Course
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
19 | P a g e
4.7 Quiz_schedule :
Field Type Description
Schedule_Id int(11) Id of Schedule
Quiz_Id int(11) Id of Quiz
Semester varchar(10) Semester
Subject_Id int(11) Id of Subject
QuizDate Date Date of Quiz
QuizTime Time Time of Quiz
4.8 Result_master :
Field Type Description
Result_Id int(11) Id of Result
Exam_Id int(11) Id of Exam
Subject_Id int(11) Id of Subject
Student_Id int(11) Id of Student
Total int(11) Total Points
Correct int(11) Correct Answers/Points
Wrong int(11) Wrong Answers/Points
Result int(11) True/Net Result
4.9 Student_registration :
Field Type Description
Student_Id int(11) Id of Student
RollNumber varchar(20) Roll No. of Student
Name varchar(20) Name of Student
Semester varchar(10) Semester of Student
Email varchar(20) Email of Student
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
20 | P a g e
Mobile varchar(10) Mob. No. of Student
UserName varchar(20) UserName of Student
Password varchar(20) Password of Student
Status varchar(10) Status of Student
4.10 Subject_master :
Field Type Description
Subject_Id int(11) Id of Subject
Subject_Name varchar(30) Name of Subject
Semester varchar(10) Semester for Subject
4.11 Test_question_master :
Field Type Description
Que_Id int(10) Id of Question
Que text Question
Img text Image of Question
Opt_A text Option A
Opt_B text Option B
Opt_C text Option C
Opt_D text Option D
Ans text Answer
Expl text Explanation of Answer
Link text Link of Question
Subject text Question within Subject
Concept text Question within Concept
Sub_Concept text Que. within SubConcept
QueType text Que. Withing QueType
date date Date of Question Record
time time Time of Question Record
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
21 | P a g e
4.12 User_master :
Field Type Description
User_Id int(11) Id of User/Admin
User_Name varchar(20) Name of User/Admin
User_Password varchar(20) Password of User/Admin
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
22 | P a g e
5. DATA FLOW DIAGRAM
Data Flow Diagram is a graphical aid for defining system inputs, process and outputs. It
represents flow through the system.
“The DFD is a Flower which unfolds the stirs of a System Petal by Petal”
DFD illustrate how data is processed by a system in terms of inputs and outputs. The
following symbols are used in designing DFD:
Data Flow :
Process :
Source and Destination :
Data Store :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
23 | P a g e
5.1 Level ‘0’ DFD :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
24 | P a g e
5.2 Level ‘1’ DFD :
Admin Login :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
25 | P a g e
Faculty Login :
Student Login :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
26 | P a g e
For Visitors / Guests :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
27 | P a g e
5.3 Level ‘2’ DFD :
For Student / User:
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
28 | P a g e
For Faculty / Researcher :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
29 | P a g e
6. SCREEN SHOTS
6.1 Home Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
30 | P a g e
6.1.1 Concept Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
31 | P a g e
6.1.1.1 SubConcept Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
32 | P a g e
6.1.1.1.1 QueType Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
33 | P a g e
6.1.1.1.1.1 Exam Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
34 | P a g e
6.1.1.1.1.2 Display Page (Result) :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
35 | P a g e
6.2 Aptitude Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
36 | P a g e
6.3 Logical Reasoning Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
37 | P a g e
6.4 Verbal Ability Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
38 | P a g e
6.5 General Knowledge Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
39 | P a g e
6.6 Interview Paper Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
40 | P a g e
6.7.1 Online Test (Admin Login) Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
41 | P a g e
6.7.1.1 Admin / User Info Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
42 | P a g e
6.7.1.2 Category Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
43 | P a g e
6.7.1.3 Course Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
44 | P a g e
6.7.1.4 Subject Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
45 | P a g e
6.7.1.5 Question Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
46 | P a g e
6.7.1.6 Faculty Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
47 | P a g e
6.7.1.7 Student Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
48 | P a g e
6.7.1.8 Interview Paper Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
49 | P a g e
6.7.1.9 Log Status Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
50 | P a g e
6.7.2 Online Test (Faculty Login) Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
51 | P a g e
6.7.2.1 Profile Page :
6.7.2.2 Student Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
52 | P a g e
6.7.2.3 Schedule Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
53 | P a g e
6.7.2.4 Question Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
54 | P a g e
6.7.3 Online Test (Student Login) Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
55 | P a g e
6.7.3.1 Profile Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
56 | P a g e
6.7.3.2 StartExam Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
57 | P a g e
6.7.3.2.1 Exam Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
58 | P a g e
6.7.3.2.2 Display (Result) Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
59 | P a g e
6.7.3.3 Result Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
60 | P a g e
6.7.4 SignUp (Register) Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
61 | P a g e
6.8 Contact Us Page :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
62 | P a g e
7. SOURCE CODE
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
63 | P a g e
7.1 VISITORS / GUEST PANEL
7.1.1 index.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title> </head>
<body>
<div id="container"> <?php
include "Header.php"; ?>
<div id="content"> <div id="left"> <br><wel>Welcome</wel> <usr>Guest</usr><br><br>
<div id="prj">Welcome to Online Self Test</div> <br>
<?php // Establish Connection with Database
$con = mysql_connect("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to execute $sql = "select distinct Subject from
test_question_master"; // Execute query
$result = mysql_query($sql,$con); // Loop through each records ?>
<div id="title">Main Concepts</div> <div style="width:398px;padding:10px;border:5px solid #a8ccff;"> <?php
$Subject=""; $Concept="";
while($row = mysql_fetch_array($result)) {
if($Subject!=$row['Subject']) {
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
64 | P a g e
$Subject=$row['Subject']; ?>
<a id="lnk" href="Concept.php?Subject=<?php echo $Subject?>"><?php echo
$Subject;?></a>
<?php // }
}
} // Retrieve Number of records returned
$records = mysql_num_rows($result); if($records==0) {
echo "<b><strong id='rna'>Record Not Available</strong></b>";
}else { $count="<div
id='rec'><b><strong>Records : $records</strong></b></div>"; }
?> </div>
<?php echo
$count; // Close the connection mysql_close($con);
?>
<video style="padding-top:20px" id="sampleMovie2" width=660 src="Vid\Html Embed Video _ HTML Embed Video.mp4" controls></video>
</div>
<div id="footerline"></div> </div>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
65 | P a g e
<div id="footer"> <?php include 'footer.php'?></div> </div>
</body> </html>
7.1.1.1 Concept.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title> </head>
<body>
<div id="container"> <?php include "Header.php";
$count=""; ?>
<div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr>Guest</usr><br><br>
<?php // Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con);
// Specify the query to execute $sql = "select distinct Concept from test_question_master where Subject='".$_GET['Subject']."'";
// Execute query $result = mysql_query($sql,$con);
// Loop through each records ?> <div id="title"><?php echo $_GET['Subject']?></div>
<div style="width:398px;padding:10px;border:5px solid #a8ccff;margin:0;">
<?php
$Subject=""; ?>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
66 | P a g e
<?php $Concept="";
while($row = mysql_fetch_array($result)) {
if($Concept!=$row['Concept'])
{ $Concept=$row['Concept'];
?>
<a id="lnk" href="SubConcept.php?Concept=<?php echo $row['Concept']?>"><?php echo
$row['Concept'];?></a> <?php
}
} // Retrieve Number of records returned $records = mysql_num_rows($result);
if($records==0)
{ echo "<a id='lnk' href=''>Record Not Available</a>";
}else {
$count="<div id='rec' style='float:right'><b><strong>Records : $records</strong></b></div>";
}
?>
</div> <?php
echo $count; // Close the connection
mysql_close($con); ?>
<video style="padding-top:20px" id="sampleMovie2" width=660 src="Vid\Html Embed Video _ HTML Embed Video.mp4" controls></video>
</div> <div id="footerline"></div>
</div>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
67 | P a g e
<div id="footer"> <?php include 'footer.php'?></div>
</div> </body>
</html>
7.1.1.1.1 SubConcept.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
</head>
<body> <div id="container"> <?php
include "Header.php"; ?>
<div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr>Guest</usr><br><br> <?php
// Establish Connection with Database $con = mysql_connect("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to execute
$sql = "select distinct SubConcept from test_question_master where Concept='".$_GET['Concept']."'"; // Execute query
$result = mysql_query($sql,$con); // Loop through each records
?> <div id="title"><?php echo $_GET['Concept']?></div> <div style="width:398px;padding:10px;border:5px solid
#a8ccff;margin:0;"> <?php
$SubConcept=""; while($row = mysql_fetch_array($result))
{
if($SubConcept!=$row['SubConcept'])
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
68 | P a g e
{
$SubConcept=$row['SubConcept'];
?> <a id="lnk"
href="QueType.php?SubConcept=<?php echo $row['SubConcept']?>"><?php echo $row['SubConcept'];?></a>
<?php
} } // Retrieve Number of records returned
$records = mysql_num_rows($result);
if($records==0) { echo "<b><strong
id='rna'>Record Not Available</strong></b>"; }else
{ $count="<div id='rec' style='float:right'><b><strong>Records : $records</strong></b></div>";
}
?> </div> <?php
echo $count; // Close the connection
mysql_close($con); ?>
<video style="padding-top:20px" id="sampleMovie2" width=660 src="Vid\Html Embed Video _
HTML Embed Video.mp4" controls></video> </div> <div id="footerline"></div>
</div>
<div id="footer"> <?php include 'footer.php'?></div> </div> </body>
</html>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
69 | P a g e
7.1.1.1.1.1 QueType.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" />
<title>OST</title> </head>
<body> <div id="container">
<?php include "Header.php"; ?>
<div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr>Guest</usr><br><br> <?php
// Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con); // Specify the query to execute
$sql = "select distinct QueType from test_question_master where SubConcept='".$_GET['SubConcept']."'";
// Execute query $result = mysql_query($sql,$con); // Loop through each records
?>
<div id="title"><?php echo $_GET['SubConcept']?></div> <div style="width:398px;padding:10px;border:5px solid #a8ccff;margin:0;">
<?php
$QueType=""; while($row = mysql_fetch_array($result))
{
if($QueType!=$row['QueType']) { $QueType=$row['QueType'];
?>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
70 | P a g e
<a id="lnk" href="Exam.php?QueType=<?php echo $row['QueType']?>"><?php echo
$row['QueType'];?></a>
<?php
} }
// Retrieve Number of records returned $records = mysql_num_rows($result);
if($records==0) {
echo "<b><strong id='rna'>Record Not Available</strong></b>"; }else
{ $count="<div id='rec'
style='float:right'><td><b><strong>Records : $records</strong></b></div>"; }
?> </div>
<?php echo
$count; // Close the connection
mysql_close($con); ?> <video style="padding-top:20px" id="sampleMovie2"
width=660 src="Vid\Html Embed Video _ HTML Embed Video.mp4" controls></video>
</div> <div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div>
</div> </body> </html>
7.1.1.1.1.1.1 Exam.php :
<?php if (!isset($_SESSION))
{
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
71 | P a g e
session_start();
} ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
<title>OST</title> <style type="text/css">
<!-- .style1 { color: #99FF66;
font-weight: bold; }
--> </style>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<!--paging apple--> <script src="Js/jquery.js"></script> <script src="Js/paging.js"></script>
<link href="Css/paging.css" rel="stylesheet" type="text/css" /> </head>
<body> <div id="container">
<?php include "Header.php";
?> <div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr>Guest</usr><br><br>
<p> <?php $QueType=$_GET['QueType'];
// Establish Connection with Database
$con = mysql_connect("localhost","root");
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
72 | P a g e
// Select Database mysql_select_db("ost", $con);
// Specify the query to execute $sql = "select * from test_question_master where QueType='".$QueType."'";
// Execute query $result = mysql_query($sql,$con); // Loop through each records
$i=1; while($row= mysql_fetch_array($result))
{ $Id=$row['Que_Id']; $Question=$row['Que'];
$OptionA=$row['Opt_A']; $OptionB=$row['Opt_B'];
$OptionC=$row['Opt_C']; $OptionD=$row['Opt_D']; ?>
</p> <form id="form2" name="form2" method="post" action="Display.php?Type=<?php echo
$QueType;?>"> <table id='tablepaging' class='yui' width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr> <td height="36" colspan="2" bgcolor="#00aaff" style="padding:5px;border-radius:10px;"><span class="style1"><?php echo $i.". ";?><?php echo
$Question;?></usr></span></td> </tr>
<tr> <td colspan="2"><table width="100%" height="64" cellpadding="0" cellspacing="0">
<tr> <td height="32" width="50%" bgcolor="#EBF9FF"><input type="radio"
name="RadioGroup<?php echo $i;?>" value="<?php echo $OptionA;?>" id="OptionA" /> <?php echo $OptionA;?></td> <td width="50%"><input type="radio" name="RadioGroup<?php echo
$i;?>" value="<?php echo $OptionC;?>" id="OptionC" /> <?php echo $OptionC;?></td>
</tr> <tr> <td height="32" width="50%"><input type="radio"
name="RadioGroup<?php echo $i;?>" value="<?php echo $OptionB;?>" id="OptionB" /> <?php echo $OptionB;?></td>
<td width="50%"><input type="radio" name="RadioGroup<?php echo $i;?>" value="<?php echo $OptionD;?>" id="OptionD" /> <?php echo $OptionD;?></td>
</tr> </table></td>
</tr>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
73 | P a g e
</table>
<div style="background-color:#a8ccff;height:2px;"></div>
<p>
<?php $i=$i+1;
} ?>
</p> <p align="center">
</p>
<div align="center">
<?php // Retrieve Number of records returned $records = mysql_num_rows($result);
if($records!=0) {
?> <input type="submit" name="button" id="button" value="Submit" />
<div id='pageNavPosition' style='padding-top: 20px;' align='center'></div> <script type='text/javascript'>
var pager = new Pager('tablepaging', 15); pager.init(); pager.showPageNav('pager', 'pageNavPosition');
pager.showPage(1); </script>
<?php
} if($records==0)
{ echo "<tr><td><b><strong id='rna'>Record Not Available</strong></b></td></tr>";
}else {
echo "<br><br><tr><td><wel>Records : $records</wel></td></tr>"; }
// Close the connection mysql_close($con);
?>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
74 | P a g e
</div> </form>
</div> <div id="footerline"></div>
</div>
<div id="footer"> <?php include 'footer.php'?></div> </div> </body>
</html>
7.1.1.1.1.1.2 Display.php :
<?php include "Log.php"?>
<?php if (!isset($_SESSION)) {
session_start();
} ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" />
<title>OST</title> <style type="text/css">
<!-- .style1 {color: #FFFFFF} -->
</style> </head>
<body> <div id="container">
<?php include "Header.php";
?> <div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr>Guest</usr><br><br>
<p>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
75 | P a g e
<table width="100%" height="66" border="1" cellpadding="0" cellspacing="0"
bordercolor="#a8ccff"> <tr>
<th height="33" bgcolor="#00aaff"><span class="style1">No</span></th> <th bgcolor="#00aaff"><span class="style1">Question</span></th> <th bgcolor="#00aaff"><span class="style1">Your Answer</span></th>
<th bgcolor="#00aaff"><span class="style1">Correct Answer</span></th> <th bgcolor="#00aaff"><span class="style1">Score</span></th>
</tr> <?php
// Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con); // Specify the query to execute
$sql = "select *from test_question_master where QueType='".$_GET['Type']."'"; // Execute query
$result = mysql_query($sql,$con); // Loop through each records $i=1;
$Score=0; $Correct=0;
$Wrong=0; while($row = mysql_fetch_array($result)) {
$Id=$row['Que_Id']; $Question=$row['Que'];
$Answer=$row['Ans']; if (!isset($_POST['RadioGroup'.$i]))
$ans1="Skip"; else
$ans1 = $_POST['RadioGroup'.$i]; ?>
</p>
<tr height="30"> <td><?php echo $i;?></td> <td><?php echo $Question;?></td>
<td><?php echo $ans1;?></td> <td><?php echo $Answer;?></td>
<td> <?php if ($ans1==$Answer)
{ echo "5 Points";
$Score=$Score+5;
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
76 | P a g e
$Correct=$Correct+1; }
else {
echo "0 Points"; $Wrong=$Wrong+1; }
?> </td> </tr>
<p>
<?php $i=$i+1;
} // Retrieve Number of records returned $records = mysql_num_rows($result);
// Close the connection mysql_close($con);
?> </p> </table>
<p> </p> <table width="100%" border="1" cellpadding="0" cellspacing="0"
bordercolor="#a8ccff"> <tr height="30"> <td height="24" bgcolor="#00aaff"><div align="center"><span
class="style1"><strong>Total Question</strong></span></div></td> <td bgcolor="#00aaff"><div align="center"><span class="style1"><strong>Correct
Answer</strong></span></div></td> <td bgcolor="#00aaff"><div align="center"><span class="style1"><strong>Wrong Answer</strong></span></div></td>
<td bgcolor="#00aaff"><div align="center"><span class="style1"><strong>Total Score</strong></span></div></td>
</tr> <tr height="30"> <td>
<div align="center"><strong> <?php
$i=$i-1; echo $i; ?>
</strong></div></td> <td><div align="center"><strong><?php echo $Correct;?></strong></div></td>
<td><div align="center"><strong><?php echo $Wrong;?></strong></div></td> <td><div align="center"><strong><?php echo $Score;?></strong></div></td> </tr>
</table> <!-- <?php
# $con = mysql_connect ("localhost","root");
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
77 | P a g e
// Select Database # mysql_select_db("ost", $con);
// Specify the query to Insert Record # $sql = "insert into result_master
(Exam_Id,Subject_Id,Student_Id,Total,Correct,Wrong,Result) values('".$Exam."','".$Subject."','".$_SESSION['ID']."','".$i."','".$Correct."','".$Wrong."','".$Score."')";
// execute query # mysql_query ($sql,$con);
// Close The Connection # mysql_close ($con); ?>-->
<br><br> <center> <a id="lnk" style="font-size:small" href="index.php">Home</a></center>
</div> <div id="footerline"></div>
</div>
<div id="footer"> <?php include 'footer.php'?></div> </div> </body>
</html>
7.1.2 Interview.php :
<?php if (!isset($_SESSION))
{ session_start();
} ?>
<?php require_once('/Connections/QUIZ.php'); ?> <?php if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{ $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) { case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break;
case "long":
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
78 | P a g e
case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL";
break; case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break;
case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break;
} return $theValue;
} }
mysql_select_db($database_QUIZ, $QUIZ); $query_Recordset1 = "SELECT * FROM quiz_category";
$Recordset1 = mysql_query($query_Recordset1, $QUIZ) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_select_db($database_QUIZ, $QUIZ);
$query_Recordset2 = "SELECT * FROM subject_master"; $Recordset2 = mysql_query($query_Recordset2, $QUIZ) or die(mysql_error()); $row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" />
<title>OST</title> <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script> <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<!--paging apply-->
<script src="Js/jquery.js"></script> <script src="Js/paging.js"></script>
<link href="Css/paging.css" rel="stylesheet" type="text/css" />
<style type="text/css"> <!--
.style1 {
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
79 | P a g e
font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif;
} .style2 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style3 {font-size: small} --> </style>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> <link href="SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css" />
</head> <body>
<div id="container"> <?php
include "Header.php"; ?> <div id="content">
<div id="left">
<br><wel>Welcome</wel> <usr>Guest</usr><br><br> <div id="TabbedPanels1" class="TabbedPanels"> <ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab style1" tabindex="0">Create Question</li> <li class="TabbedPanelsTab style2 style3" tabindex="0">Display
Questions</li> </ul> <div class="TabbedPanelsContentGroup" style="width:650px">
<div class="TabbedPanelsContent"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td> </td> </tr>
<tr> <td><form id="form1" name="form1" method="post"
action="InsertInterQue.php" enctype="multipart/form-data"> <table width="100%" height="281" border="0" cellpadding="0" cellspacing="0">
<tr> <td height="27"><strong>Company Name:</strong></td>
<td><span id="sprytextfield1"> <label> <input type="text" name="txtCmp" id="txtCmp" />
</label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr> <tr>
<td height="27"><strong>Location & Date:</strong></td> <td><span id="sprytextfield2">
<label>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
80 | P a g e
<input type="text" name="txtLD" id="txtLD" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td height="29"><strong>Placement Paper & Interview Experience:</strong></td>
<td><span id=""> <label> <input type="file" name="file"
id="file"><br> </label>
<span class="textareaRequiredMsg">A value is required.</span></span></td> </tr>
<tr> <td height="27"><strong>Your Name:</strong></td>
<td><span id="sprytextfield4"> <label> <input type="text" name="txtNm" id="txtNm" />
</label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr> <tr>
<td height="27"><strong>Your Email Id:</strong></td> <td><span id="sprytextfield5">
<label> <input type="text" name="txtEid" id="txtEid" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr> <td> </td>
<td><label> <input type="submit" name="button" id="button" value="Submit" />
</label></td> </tr> </table>
</form> </td>
</tr> </table> </div>
<div class="TabbedPanelsContent"> <table id='tablepaging' class='yui' width=100%>
<thead class="style3">
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
81 | P a g e
<tr> <th>No</th>
<th>Company Name</th> <th>Location & Date</th>
<th>Placement Paper</th> <th>Uploader Name</th> <th>Uploader Email</th>
<th>Date</th> <th>Time</th>
</tr> </thead> <tbody>
<?php // Establish Connection with Database
$con = mysql_connect("localhost","root"); // Select Database mysql_select_db("ost", $con);
// Specify the query to execute $sql = "SELECT *from interview_master";
// Execute query $result = mysql_query($sql,$con); // Loop through each records
while($row = mysql_fetch_array($result)) {
$CmpId=$row['CmpId']; $CmpNm=$row['CmpName']; $LocDate=$row['LocDate'];
$PlacePaper=$row['PlacePaper']; $Name=$row['Name'];
$Email=$row['Email']; $Date=$row['Date']; $Time=$row['Time'];
?> <tr> <td><?php echo $CmpId;?></td>
<td><?php echo $CmpNm;?></td> <td><?php echo $LocDate;?></td>
<td><a href="Interview/<?php echo $PlacePaper?>"><?php echo $PlacePaper;?></a></td> <td><?php echo $Name;?></td>
<td><?php echo $Email;?></td> <td><?php echo $Date;?></td>
<td><?php echo $Time;?></td> </tr> <?php
} // Retrieve Number of records returned
$records = mysql_num_rows($result);
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
82 | P a g e
?> <?php
// Close the connection mysql_close($con);
?> </tbody> </table>
<div id='pageNavPosition' style='padding-top: 20px;' align='center'></div> <script type='text/javascript'>
var pager = new Pager('tablepaging', 10); pager.init();
pager.showPageNav('pager', 'pageNavPosition'); pager.showPage(1); </script>
<!--Display no of records within frame-->
<div style="text-align:right"> <wel>Total Papers : <?php echo
$records;?><wel> </div><br>
</div>
</div> </div>
</div> <div id="footerline"></div>
</div>
<div id="footer"> <?php include 'footer.php'?></div> </div> <script type="text/javascript">
<!-- var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2"); var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4"); var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5");
//--> </script>
</body> </html>
<?php
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
83 | P a g e
mysql_free_result($Recordset1);
mysql_free_result($Recordset2); ?>
7.1.2.1 InsertInterQue.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title> </head>
<body> <?php
include "Log.php"; $Cmp=$_POST['txtCmp'];
$LD=$_POST['txtLD']; $Name=$_POST['txtNm'];
$Eid=$_POST['txtEid'];
$allowedExts = array("gif", "jpeg", "jpg", "png","txt","pdf","doc","dot");
$temp = explode(".", $_FILES["file"]["name"]); $extension = end($temp);
if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/jpg") || ($_FILES["file"]["type"] == "image/pjpeg") || ($_FILES["file"]["type"] == "image/x-png")
|| ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "application/txt")
|| ($_FILES["file"]["type"] == "application/pdf") || ($_FILES["file"]["type"] == "application/doc") || ($_FILES["file"]["type"] == "application/dot")
) && ($_FILES["file"]["size"] < 500000)
&& in_array($extension, $allowedExts)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br>";
} else { // echo "Upload: " . $_FILES["file"]["name"] . "<br>";
// echo "Type: " . $_FILES["file"]["type"] . "<br>";
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
84 | P a g e
// echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; // echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br>";
if (file_exists("Interview/" . $_FILES["file"]["name"])) { // echo $_FILES["file"]["name"] . " already exists. ";
echo '<script type="text/javascript">alert($_FILES["file"]["name"] already exists.");window.location=\'Interview.php\';</script>';
} else { //echo $_FILES["file"];
// Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con);
// Specify the query to execute $sql = "select * from interview_master"; // Execute query
$result = mysql_query($sql,$con); // Loop through each records
if($_FILES["file"]["type"] == "image/gif") $type=".gif";
if($_FILES["file"]["type"] == "image/jpeg") $type=".jpeg";
if($_FILES["file"]["type"] == "image/jpg") $type=".jpg"; if($_FILES["file"]["type"] == "image/pjpeg")
$type=".pjpeg"; if($_FILES["file"]["type"] == "image/x-png")
$type=".x-png"; if($_FILES["file"]["type"] == "image/png") $type=".png";
if($_FILES["file"]["type"] == "application/txt")
$type=".txt"; if($_FILES["file"]["type"] == "application/pdf")
$type=".pdf";
if($_FILES["file"]["type"] == "application/doc") $type=".doc";
if($_FILES["file"]["type"] == "application/dot") $type=".dot";
while($row = mysql_fetch_array($result)) {
$no=$row['CmpId']+1; $_SERVER['file']=$no."".$type;
}
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
85 | P a g e
move_uploaded_file($_FILES["file"]["tmp_name"],"Interview/" . $_SERVER['file']);
//echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
// Close the connection mysql_close($con);
}
} } else { echo "Invalid file";
}
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record //echo $_SERVER['file'];
//echo '<script type="text/javascript">alert("'+$_SERVER['file']+'");window.location= \'Question.php\';</scr
ipt>'; $sql="INSERT INTO `interview_master`(`CmpName`, `LocDate`, `PlacePaper`,
`Name`, `Email`, `Date`, `Time`) VALUES ('".$Cmp."','".$LD."','".$_SERVER['file']."','".$Name."','".$Eid."',now(),now())";
// execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con);
echo '<script type="text/javascript">alert("New Interview Placement Paper Inserted Succesfully");window.location=\'Interview.php\';</script>';
?>
</body> </html>
7.1.3 user.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
86 | P a g e
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" />
<title>OST</title> </head>
<body> <div id="container">
<?php include "Header.php";
?> <div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr>Guest</usr><br><br>
<div id="prj">Welcome to Online Self Test </div> <p align="justify">Welcome to Online Self Test System. Now Students or Any Users
of Master & Bachalor in any Stream can prepare themselves for various competitive examination through this online Self Test applicaion. </p>
<p align="justify">Faculty Members or Researchers announce the schedule of Online Self Test and Students can participate in Online Self Test by login in to the system. Students can also view the result of their Online Self Test competiotion.</p>
<h1> </h1>
</div> <?php include "Right.php";
?> <div id="footerline"></div>
</div> <div id="footer"> <?php include 'footer.php'?></div>
</div>
</body> </html>
7.1.4 Contact.php :
<?php
session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
87 | P a g e
<title>OST</title> </head>
<body>
<div id="container"> <?php
include "Header.php"; ?>
<div id="content"> <img src="images/Contact.jpg" style="float:right;width:200px;padding-right:30px;padding-top:48px;height:280px;">
<div id="left">
<br><wel>Welcome</wel> <usr>Guest</usr><br><br> <div id="prj">Developer Info </div>
<br>
<div style="background-color:#a8ccff;padding:30px;border-radius:20px 20px 20px 20px;color:white;font-size:large;">
Name : Pandav Govind M.<br> Email : vj43076@gmail.com
</div> <br><br> <div style="background-color:#a8ccff;padding:30px;border-radius:20px 20px
20px 20px;color:white;font-size:large;"> Name : Bhatt Ankit K.<br>
Email : bhatt.ankit7911@gmail.com </div>
</h3>
</div> <div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div>
</div> <?php
//echo '<script type="text/javascript">alert("Placement ");window.location=\'Interview.php\';</script>';
//include("Log.php"); //log1($_SESSION['ID'],$_SESSION['Name']); //echo "log1()";
//echo '<script type="text/javascript">alert("Placement Paper Deleted ");window.location=\'Interview.php\';</script>';
//log($_SESSION['ID'],$_SESSION['Name'],"View ContactUs Page","Successful");
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
88 | P a g e
//echo '<script type="text/javascript">alert("cOMPLETE");window.location=\'Interview.php\';</script>';
?> </body>
</html>
7.2 ADMIN PANEL
7.2.1 index.php :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
89 | P a g e
<?php if (!isset($_SESSION))
{ session_start();
} ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
</head> <body>
<div id="container"> <?php
include "Header.php"; ?> <div id="content">
<div id="left"> <br><wel>Welcome</wel> <usr><?php echo
$_SESSION['Name'];?></usr><br><br>
<p> </p>
<h1> </h1> </div>
<div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div> </div>
</body> </html>
7.2.2 User.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
90 | P a g e
<link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
<script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> <script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" /> <!--paging apply-->
<script src="../Js/jquery.js"></script> <script src="../Js/paging.js"></script>
<link href="../Css/paging.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!-- .style1 {font-size: small} -->
</style> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css"> <!-- .style12 {font-size: small; font-weight: bold; }
.style9 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style4 { font-size: small; font-weight: bold;
color: #FFFFFF; }
.style5 {color: #FFFFFF}
.style6 {color: #000000} -->
</style>
</head> <body>
<div id="container"> <?php
include "Header.php"; ?> <div id="content">
<div id="left"> <br><wel>Welcome</wel> <usr><?php
session_start();echo $_SESSION['Name'];?></usr><br><br>
<div id="TabbedPanels1" class="TabbedPanels"> <ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab style1" tabindex="0">Create New User</li>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
91 | P a g e
<li class="TabbedPanelsTab style1" tabindex="0">Display User</li> </ul>
<div class="TabbedPanelsContentGroup"> <div class="TabbedPanelsContent">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td>
</tr> <tr>
<td><form id="form1" name="form1" method="post" action="InsertUser.php"> <table width="100%" height="94" border="0" cellpadding="0"
cellspacing="0"> <tr>
<td>User Name:</td> <td><span id="sprytextfield1"> <label>
<input type="text" name="txtUserName" id="txtUserName" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr>
<tr> <td>Password:</td>
<td><span id="sprytextfield2"> <label> <input type="text" name="txtPassword" id="txtPassword" />
</label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr> <tr>
<td> </td> <td><label>
<input type="submit" name="button" id="button" value="Submit" /> </label></td> </tr>
</table> </form>
</td> </tr> </table>
</div> <div class="TabbedPanelsContent">
<table id='tablepaging' class='yui' width=100%> <thead class="style3"> <tr>
<th>Id</th>
<th>UserName</th>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
92 | P a g e
<th>Edit</th> <th>Delete</th>
</tr> </thead>
<tbody> <?php // Establish Connection with Database
$con = mysql_connect("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to execute $sql = "select * from User_Master";
// Execute query $result = mysql_query($sql,$con);
// Loop through each records while($row = mysql_fetch_array($result)) {
$Id=$row['User_Id']; $UserName=$row['User_Name'];
?> <tr>
<td><?php echo $Id;?></td> <td><?php echo $UserName;?></td>
<td><a href="EditUser.php?UserId=<?php echo $Id;?>">Edit</a></td> <td><a href="DeleteUser.php?UserId=<?php echo $Id;?>">Delete</a></td> </tr>
<?php }
// Retrieve Number of records returned $records = mysql_num_rows($result); ?>
<?php // Close the connection
mysql_close($con); // Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','View User
Profile',now(),now(),'Successful')"; // execute query
mysql_query ($sql,$con); // Close The Connection
mysql_close ($con);
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
93 | P a g e
?> </tbody>
</table>
<div id='pageNavPosition' style='padding-top: 20px;' align='center'></div>
<script type='text/javascript'> var pager = new Pager('tablepaging', 10);
pager.init(); pager.showPageNav('pager', 'pageNavPosition'); pager.showPage(1);
</script>
<!--Display no of records within frame--> <div style="text-align:right"> <wel>Total Users : <?php echo
$records;?></wel> </div><br>
</div> </div>
</div> <p> </p>
<h1> </h1> </div>
<div id="footerline"></div>
</div> <div id="footer"> <?php include 'footer.php'?></div>
</div> <script type="text/javascript">
<!-- var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2"); //-->
</script> </body> </html>
7.2.2.1 InsertUser.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
94 | P a g e
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title> </head>
<body> <?php
$UserName=$_POST['txtUserName'];
$Password=$_POST['txtPassword']; // Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record $sql = "insert into User_Master (User_Name,User_Password) values('".$UserName."','".$Password."')";
// execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con);
//Log Status Code // Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Delete User - Name :
$User_Name',now(),now(),'Successful')"; // execute query
mysql_query ($sql,$con); // Close The Connection
mysql_close ($con);
echo '<script type="text/javascript">alert("User Inserted Succesfully");window.location=\'User.php\';</script>';
?> </body>
</html>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
95 | P a g e
7.2.2.2 EditUser.php :
<?php if (!isset($_SESSION)) {
session_start();
} ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
<style type="text/css"> <!-- .style10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight:
bold; color: #FFFFFF; } .style8 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold;
} --> </style>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css"> <!-- .style11 {color: #000000}
--> </style>
</head> <body>
<div id="container"> <?php
include "Header.php"; ?> <div id="content">
<div id="left"> <br><wel>Welcome</wel> <usr><?php echo
$_SESSION['Name'];?></usr><br><br> <div id="prj">Edit User Information</div> <table width="100%" height="209" border="0" cellpadding="0"
cellspacing="0">
<tr>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
96 | P a g e
<td><?php $Id=$_GET['UserId'];
// Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con); // Specify the query to execute
$sql = "select * from User_Master where User_Id=".$Id.""; // Execute query
$result = mysql_query($sql,$con); // Loop through each records while($row = mysql_fetch_array($result))
{ $Id=$row['User_Id'];
$Name=$row['User_Name']; $Password=$row['User_Password']; }
?> <form method="post" action="UpdateUser.php">
<table width="100%" border="0"> <tr> <td height="32"><span class="style8">User Id</span></td>
<td><span id="sprytextfield1"> <label>
<?php echo $Id;?> </label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr> <td height="36"><span class="style8">User Name:</span></td> <td><span id="sprytextfield2">
<label> <input name="txtUserName" type="text" id="txtUserName" value="<?php
echo $Name;?>" /> </label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr> <td height="36"><span class="style8">Password:</span></td> <td><span id="sprytextfield3">
<label> <input name="txtPass" type="password" id="txtPass" value="<?php echo
$Password;?>" /> </label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
97 | P a g e
<td></td> <td><input type="submit" name="submit" value="Update Record" /></td>
</tr> </table>
</form> <?php
//Log status Maintain
// Close the connection mysql_close($con);
// Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Edit User - Id : $Id',now(),now(),'Successful')";
// execute query
mysql_query ($sql,$con); // Close The Connection mysql_close ($con);
?>
<form method="post" action="UpdateUser.php"> <table width="100%" border="0"> </table>
</form></td> </tr>
</table> <h1> </h1>
<p> </p>
<h1> </h1> </div>
<div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div> </div>
<script type="text/javascript"> <!--
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
98 | P a g e
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); //-->
</script> </body>
</html>
7.2.2.3 DeleteUser.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>
</head>
<body> <?php
$Id=$_GET['UserId']; // Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record $sql = "delete from User_Master where User_Id='".$Id."'";
// execute query mysql_query ($sql,$con); // Close The Connection
mysql_close ($con);
//Log Status Code // Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Delete User - Id :
$Id',now(),now(),'Successful')"; // execute query
mysql_query ($sql,$con); // Close The Connection
mysql_close ($con);
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
99 | P a g e
echo '<script type="text/javascript">alert("User Deleted
Succesfully");window.location=\'User.php\';</script>'; ?>
</body> </html>
7.2.3 Category.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" />
<title>OST</title> <script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<!--paging apple-->
<script src="../Js/jquery.js"></script> <script src="../Js/paging.js"></script> <link href="../Css/paging.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!-- .style1 {font-size: small} -->
</style> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css"> <!-- .style12 {font-size: small; font-weight: bold; }
.style9 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style4 {
font-size: small; font-weight: bold; color: #FFFFFF;
} .style5 {color: #FFFFFF}
.style6 {color: #000000} --> </style>
<!--pagin odd even color-->
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
100 | P a g e
</head>
<body> <div id="container">
<?php include "Header.php"; ?>
<div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr><?php session_start();echo $_SESSION['Name'];?></usr><br><br>
<div id="TabbedPanels1" class="TabbedPanels"> <ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab style1" tabindex="0">Create New Category</li> <li class="TabbedPanelsTab style1" tabindex="0">Display Quiz Category</li>
</ul> <div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>
<td> </td> </tr>
<tr> <td><form id="form1" name="form1" method="post" action="InsertCategory.php">
<table width="100%" height="94" border="0" cellpadding="0" cellspacing="0">
<tr> <td>Quiz Name:</td> <td><span id="sprytextfield1">
<label> <input type="text" name="txtName" id="txtName" />
</label> <span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr>
<tr> <td> </td> <td><label>
<input type="submit" name="button" id="button" value="Submit" /> </label></td>
</tr> </table> </form>
</td> </tr>
</table>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
101 | P a g e
</div> <div class="TabbedPanelsContent">
<table id='tablepaging' class='yui' width=100%> <thead class="style3">
<tr> <th>Id</th> <th>Quiz Category</th>
<th>Edit</th> <th>Delete</th>
</tr> </thead> <tbody>
<?php // Establish Connection with Database
$con = mysql_connect("localhost","root"); // Select Database mysql_select_db("ost", $con);
// Specify the query to execute $sql = "select * from quiz_Category";
// Execute query $result = mysql_query($sql,$con); // Loop through each records
while($row = mysql_fetch_array($result)) {
$Id=$row['Quiz_Id']; $Name=$row['Quiz_Name'];
?> <tr>
<td><?php echo $Id;?></td> <td><?php echo $Name;?></td> <td><a href="EditCategory.php?CatId=<?php echo $Id;?>">Edit</a></td>
<td ><a href="DeleteCategory.php?CatId=<?php echo $Id;?>">Delete</a></td>
</tr> <?php }
// Retrieve Number of records returned $records = mysql_num_rows($result);
?> </tbody> <?php
// Close the connection mysql_close($con);
//Log Status Code
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
102 | P a g e
// Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','View User
Profile',now(),now(),'Successful')"; // execute query
mysql_query ($sql,$con); // Close The Connection
mysql_close ($con); ?>
</table>
<div id='pageNavPosition' style='padding-top: 20px;' align='center'></div>
<script type='text/javascript'> var pager = new Pager('tablepaging', 10);
pager.init(); pager.showPageNav('pager', 'pageNavPosition'); pager.showPage(1);
</script>
<!--Display no of records within frame--> <div style="text-align:right">
<wel>Total Categories : <?php echo $records;?></wel>
</div><br> </div> </div>
</div> <p> </p>
<h1> </h1> </div>
<div id="footerline"></div>
</div> <div id="footer"> <?php include 'footer.php'?></div>
</div> <script type="text/javascript">
<!--
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
103 | P a g e
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
//--> </script>
</body> </html>
7.2.3.1 InsertCategory.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>
</head>
<body> <?php
$Name=$_POST['txtName'];
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql = "insert into quiz_category (Quiz_Name) values('".$Name."')"; // execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con);
//Log Status Code
// Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Insert Category - Name : $Name',now(),now(),'Successful')";
// execute query
mysql_query ($sql,$con);
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
104 | P a g e
// Close The Connection mysql_close ($con);
echo '<script type="text/javascript">alert("New Category Inserted
Succesfully");window.location=\'Category.php\';</script>'; ?>
</body> </html>
7.2.3.2 EditCategory.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title> <style type="text/css">
<!-- .style10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight:
bold; color: #FFFFFF; } .style8 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; }
--> </style>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> <style type="text/css">
<!-- .style11 {color: #000000}
--> </style> </head>
<body>
<div id="container"> <?php include "Header.php";
?> <div id="content">
<div id="left"> <br><wel>Welcome</wel> <usr><?php session_start();echo $_SESSION['Name'];?></usr><br><br>
<div id="prj">Edit Category Information</div>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
105 | P a g e
<table width="100%" height="209" border="0" cellpadding="0" cellspacing="0">
<tr> <td><?php
$Id=$_GET['CatId']; // Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con);
// Specify the query to execute $sql = "select * from quiz_Category where Quiz_Id=".$Id.""; // Execute query
$result = mysql_query($sql,$con); // Loop through each records
while($row = mysql_fetch_array($result)) { $Id=$row['Quiz_Id'];
$Name=$row['Quiz_Name'];
} ?> <form method="post" action="UpdateCategory.php">
<table width="100%" border="0"> <tr>
<td height="32"><span class="style8">Exam Id</span></td> <td><span id="sprytextfield1"> <label>
<?php echo $Id;?> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr>
<tr> <td height="36"><span class="style8">Exam Name:</span></td>
<td><span id="sprytextfield2"> <label> <input name="txtName" type="text" id="txtName" value="<?php echo
$Name;?>" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr>
<tr>
<td></td> <td><input type="submit" name="submit" value="Update Record" /></td> </tr>
</table> </form>
<?php
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
106 | P a g e
//Log status Maintain
// Close the connection mysql_close($con);
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`,
`status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Edit Category - Id : $Id',now(),now(),'Successful')";
// execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con); ?>
</td> </tr>
</table> <h1> </h1>
<p> </p>
<h1> </h1> </div>
<div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div> </div>
<script type="text/javascript"> <!--
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2"); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); //-->
</script> </body>
</html>
7.2.3.3 DeleteCategory.php :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
107 | P a g e
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head>
<body>
<?php $Id=$_GET['CatId'];
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql = "delete from quiz_category where Quiz_Id='".$Id."'"; // execute query
mysql_query ($sql,$con); // Close The Connection mysql_close ($con);
//Log Status Code
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`,
`status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Delete Category - Id : $Id',now(),now(),'Successful')";
// execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con);
echo '<script type="text/javascript">alert("Category Deleted
Succesfully");window.location=\'Category.php\';</script>'; ?>
</body> </html>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
108 | P a g e
7.2.4 Course.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title> <script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<!--paging apple-->
<script src="../Js/jquery.js"></script> <script src="../Js/paging.js"></script> <link href="../Css/paging.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!-- .style1 {font-size: small} -->
</style> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css"> <!-- .style12 {font-size: small; font-weight: bold; }
.style9 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style4 {
font-size: small; font-weight: bold; color: #FFFFFF;
} .style5 {color: #FFFFFF}
.style6 {color: #000000} --> </style>
<!--pagin odd even color-->
</head>
<body> <div id="container">
<?php
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
109 | P a g e
include "Header.php"; ?>
<div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr><?php session_start();echo $_SESSION['Name'];?></usr><br><br> <div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup"> <li class="TabbedPanelsTab style1" tabindex="0">Create New Course</li>
<li class="TabbedPanelsTab style1" tabindex="0">Display Course</li> </ul> <div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td> </td> </tr>
<tr> <td><form id="form1" name="form1" method="post"
action="InsertCourse.php"> <table width="100%" height="94" border="0" cellpadding="0" cellspacing="0">
<tr> <td>Course Name:</td>
<td><span id="sprytextfield1"> <label> <input type="text" name="txtName" id="txtName" />
</label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr> <td> </td>
<td><label> <input type="submit" name="button" id="button" value="Submit" /> </label></td>
</tr> </table>
</form> </td> </tr>
</table> </div>
<div class="TabbedPanelsContent"> <table id='tablepaging' class='yui' width=100%> <thead class="style3">
<tr> <th>Id</th>
<th>Course</th>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
110 | P a g e
<th>Edit</th> <th>Delete</th>
</tr> </thead>
<tbody> <?php // Establish Connection with Database
$con = mysql_connect("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to execute $sql = "select * from quiz_course";
// Execute query $result = mysql_query($sql,$con);
// Loop through each records while($row = mysql_fetch_array($result)) {
$Id=$row['Course_Id']; $Name=$row['Course_Name'];
?> <tr>
<td><?php echo $Id;?></td> <td><?php echo $Name;?></td>
<td><a href="EditCourse.php?CourseId=<?php echo $Id;?>">Edit</a></td> <td ><a href="DeleteCourse.php?CourseId=<?php echo $Id;?>">Delete</a></td>
</tr> <?php
} // Retrieve Number of records returned $records = mysql_num_rows($result);
?> </tbody>
<?php // Close the connection mysql_close($con);
?>
</table> <div id='pageNavPosition' style='padding-top: 20px;'
align='center'></div> <script type='text/javascript'>
var pager = new Pager('tablepaging', 10); pager.init(); pager.showPageNav('pager', 'pageNavPosition');
pager.showPage(1); </script>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
111 | P a g e
<!--Display no of records within frame-->
<div style="text-align:right"> <wel>Total Courses : <?php echo
$records;?></wel> </div><br>
</div> </div>
</div> <p> </p>
<h1> </h1> </div>
<div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div>
</div> <script type="text/javascript"> <!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
//--> </script> </body>
</html>
7.2.4.1 InsertCourse.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>
</head> <body>
<?php
$Name=$_POST['txtName']; // Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con);
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
112 | P a g e
// Specify the query to Insert Record $sql = "insert into quiz_course (Course_Name) values('".$Name."')";
// execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con);
//Log Status Code
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record $sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`,
`status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Insert Course - Name : $Name',now(),now(),'Successful')";
// execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con);
echo '<script type="text/javascript">alert("New Course Inserted Succesfully");window.location=\'Course.php\';</script>';
?>
</body> </html>
7.2.4.2 EditCourse.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" />
<title>OST</title> <style type="text/css">
<!-- .style10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; color: #FFFFFF; }
.style8 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; }
-->
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
113 | P a g e
</style> <script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> <style type="text/css">
<!-- .style11 {color: #000000} -->
</style> </head>
<body> <div id="container">
<?php include "Header.php";
?> <div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr><?php session_start();echo $_SESSION['Name'];?></usr><br><br>
<div id="prj">Edit Course Information</div> <table width="100%" height="209" border="0" cellpadding="0" cellspacing="0">
<tr> <td><?php
$Id=$_GET['CourseId']; // Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con);
// Specify the query to execute $sql = "select * from quiz_course where Course_Id=".$Id.""; // Execute query
$result = mysql_query($sql,$con); // Loop through each records
while($row = mysql_fetch_array($result)) { $Id=$row['Course_Id'];
$Name=$row['Course_Name'];
} ?> <form method="post" action="UpdateCourse.php">
<table width="100%" border="0"> <tr>
<td height="32"><span class="style8">Course Id</span></td> <td><span id="sprytextfield1"> <label>
<?php echo $Id;?> </label>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
114 | P a g e
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td height="36"><span class="style8">Course Name:</span></td> <td><span id="sprytextfield2"> <label>
<input name="txtName" type="text" id="txtName" value="<?php echo $Name;?>" />
</label> <span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr>
<tr> <td></td>
<td><input type="submit" name="submit" value="Update Record" /></td> </tr>
</table> </form> <?php
//Log status Maintain // Close the connection
mysql_close($con);
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Edit Course - Id :
$Id',now(),now(),'Successful')";
// execute query mysql_query ($sql,$con); // Close The Connection
mysql_close ($con); ?>
</td> </tr> </table>
</div>
<div id="footerline"></div>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
115 | P a g e
</div>
<div id="footer"> <?php include 'footer.php'?></div> </div>
<script type="text/javascript"> <!-- var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); //-->
</script> </body> </html>
7.2.4.3 DeleteCourse.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title> </head>
<body> <?php
$Id=$_GET['CourseId'];
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql = "delete from quiz_course where Course_Id='".$Id."'"; // execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con);
//Log Status Code
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
116 | P a g e
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Delete Course - Id :
$Id',now(),now(),'Successful')";
// execute query mysql_query ($sql,$con); // Close The Connection
mysql_close ($con);
echo '<script type="text/javascript">alert("Course Deleted Succesfully");window.location=\'Course.php\';</script>';
?> </body>
</html>
7.2.5 Subject.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
<style type="text/css"> <!--
.style1 {font-size: small}
.style12 {font-size: small; font-weight: bold; }
.style4 { font-size: small;
font-weight: bold; color: #FFFFFF;
} .style5 {color: #FFFFFF} .style6 {color: #000000}
.style9 {font-family: Verdana, Arial, Helvetica, sans-serif} -->
</style> <script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> <link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<!--paging apple-->
<script src="../Js/jquery.js"></script> <script src="../Js/paging.js"></script>
<link href="../Css/paging.css" rel="stylesheet" type="text/css" />
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
117 | P a g e
<style type="text/css">
<!-- .style15 {font-size: 10pt}
--> </style>
<!--pagin odd even color--> <script>
$(document).ready(function(){ $("#tablepaging tr:odd").css("background-color","#BBD9EE");
$("#tablepaging tr:even").css("background-color","#E4F0F8"); $("th").css("background-color","#00aaff");
$("th").css("color","#ffffff"); }); </script>
</head>
<body> <div id="container">
<?php include "Header.php";
?> <div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr><?php session_start();echo $_SESSION['Name'];?></usr><br><br>
<div id="TabbedPanels1" class="TabbedPanels"> <ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab style1" tabindex="0"><span class="style1">Create New Subject</span></li>
<li class="TabbedPanelsTab style15" tabindex="0">Display Subject</li> </ul> <div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td> </td> </tr>
<tr> <td><form id="form1" name="form1" method="post"
action="InsertSubject.php"> <table width="100%" height="94" border="0" cellpadding="0" cellspacing="0">
<tr> <td>Subject Name:</td>
<td><span id="sprytextfield1">
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
118 | P a g e
<label> <input type="text" name="txtSubName" id="txtSubName" />
</label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr> <tr>
<td>Semester:</td> <td><label>
<select name="cmbSem" id="cmbSem"> <option>1</option> <option>2</option>
<option>3</option> <option>4</option>
<option>5</option> <option>6</option> </select>
</label></td> </tr>
<tr> <td> </td> <td><label>
<input type="submit" name="button" id="button" value="Submit" /> </label></td>
</tr> </table> </form></td>
</tr> </table>
</div> <div class="TabbedPanelsContent"> <table id='tablepaging' class='yui' width=100%>
<thead class="style3"> <tr>
<th>Id</th> <th>Subject Name</th> <th>Semester</th>
<th>Edit</th> <th>Delete</th>
</tr> </thead> <tbody>
<?php // Establish Connection with Database
$con = mysql_connect("localhost","root"); // Select Database mysql_select_db("ost", $con);
// Specify the query to execute $sql = "select * from Subject_Master";
// Execute query
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
119 | P a g e
$result = mysql_query($sql,$con); // Loop through each records
while($row = mysql_fetch_array($result)) {
$Id=$row['Subject_Id']; $SubjectName=$row['Subject_Name']; $Semester=$row['Semester'];
?>
<tr> <td><?php echo $Id;?></td> <td><?php echo $SubjectName;?></td>
<td><?php echo $Semester;?></td> <td><a href="EditSubject.php?SubId=<?php echo $Id;?>">Edit</a></td>
<td><a href="DeleteSubject.php?SubId=<?php echo $Id;?>">Delete</a></td> </tr> <?php
} // Retrieve Number of records returned
$records = mysql_num_rows($result); ?> <?php
// Close the connection mysql_close($con);
?> </tbody> </table>
<div id='pageNavPosition' style='padding-top: 20px;' align='center'></div>
<script type='text/javascript'> var pager = new Pager('tablepaging', 10); pager.init();
pager.showPageNav('pager', 'pageNavPosition'); pager.showPage(1);
</script>
<!--Display no of records within frame--> <div style="text-align:right">
<wel>Total Subjects : <?php echo $records;?></wel> </div><br>
</div> <div class="TabbedPanelsContent">
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><form name="form1" method="post" action="InsertUser.php">
<table width="100%" height="94" border="0" cellpadding="0" cellspacing="0">
</table>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
120 | P a g e
</form></td> </tr>
</table> </div>
</div> </div> <p> </p>
<h1> </h1>
</div> <div id="footerline"></div>
</div>
<div id="footer"> <?php include 'footer.php'?></div> </div> <script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); //-->
</script> </body>
</html>
7.2.5.1 InsertSubject.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head>
<body>
<?php $Name=$_POST['txtSubName'];
$Sem=$_POST['cmbSem'];
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
121 | P a g e
$sql = "insert into Subject_Master (Subject_Name,Semester) values('".$Name."','".$Sem."')";
// execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con);
//Log Status Code // Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Insert Subject - Name :
$Name',now(),now(),'Successful')"; // execute query
mysql_query ($sql,$con); // Close The Connection
mysql_close ($con); echo '<script type="text/javascript">alert("New Subject Inserted
Succesfully");window.location=\'Subject.php\';</script>';
?> </body> </html>
7.2.5.2 EditSubject.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
<style type="text/css"> <!-- .style10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight:
bold; color: #FFFFFF; } .style8 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold;
}
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
122 | P a g e
--> </style>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css"> <!-- .style11 {color: #000000}
--> </style>
</head> <body>
<div id="container"> <?php
include "Header.php"; ?> <div id="content">
<div id="left"> <br><wel>Welcome</wel> <usr><?php session_start();echo
$_SESSION['Name'];?></usr><br><br> <div id="prj">Edit Subject Information</div> <table width="100%" height="209" border="0" cellpadding="0"
cellspacing="0"> <tr>
<td><?php $Id=$_GET['SubId']; // Establish Connection with Database
$con = mysql_connect("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to execute $sql = "select * from Subject_Master where Subject_Id=".$Id."";
// Execute query $result = mysql_query($sql,$con);
// Loop through each records while($row = mysql_fetch_array($result)) {
$Id=$row['Subject_Id']; $Name=$row['Subject_Name'];
$Sem=$row['Semester']; } ?>
<form method="post" action="UpdateSubject.php"> <table width="100%" border="0">
<tr> <td height="32"><span class="style8">Subject Id</span></td> <td><span id="sprytextfield1">
<label> <input name="txtId" type="text" id="txtId" value="<?php echo $Id;?>" />
</label>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
123 | P a g e
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td height="36"><span class="style8">Subject Name:</span></td> <td><span id="sprytextfield2"> <label>
<input name="txtName" type="text" id="txtName" value="<?php echo $Name;?>" />
</label> <span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td height="36"><span class="style8">Semester:</span></td> <td><span id="sprytextfield3"> <label></label>
<span class="textfieldRequiredMsg">A value is required.</span> <label>
<select name="cmbSem" id="cmbSem"> <option>1</option> <option>2</option>
<option>3</option> <option>4</option>
<option>5</option> <option>6</option> </select>
</label> </span></td>
</tr> <tr> <td></td>
<td><input type="submit" name="submit" value="Update Record" /></td> </tr>
</table> </form> <?php
// Close the connection mysql_close($con);
//Log status Maintain
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`,
`process`, `date`, `time`, `status`) VALUES
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
124 | P a g e
('".$_SESSION['ID']."','".$_SESSION['Name']."','Edit Subject - Id : $Id',now(),now(),'Successful')";
// execute query
mysql_query ($sql,$con); // Close The Connection mysql_close ($con);
?></td> </tr>
</table> <h1> </h1>
<p> </p>
<h1> </h1> </div>
<div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div> </div>
<script type="text/javascript"> <!--
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2"); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); //-->
</script> </body>
</html>
7.2.5.3 DeleteSubject.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head>
<body>
<?php $Id=$_GET['SubId'];
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
125 | P a g e
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql = "delete from Subject_Master where Subject_Id='".$Id."'"; // execute query
mysql_query ($sql,$con); // Close The Connection mysql_close ($con);
//Log Status Code // Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Delete Subject - Id :
$Id',now(),now(),'Successful')"; // execute query
mysql_query ($sql,$con); // Close The Connection
mysql_close ($con);
echo '<script type="text/javascript">alert("Subject Deleted Succesfully");window.location=\'Subject.php\';</script>';
?> </body>
</html>
7.2.6 Question.php :
<?php
if (!isset($_SESSION)) { session_start();
}
?> <?php require_once('../Connections/QUIZ.php'); ?> <?php
if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "",
$theNotDefinedValue = "")
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
126 | P a g e
{ $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ?
mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) {
case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break; case "long": case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; break;
case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break;
case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break; }
return $theValue; } }
mysql_select_db($database_QUIZ, $QUIZ);
$query_Recordset1 = "SELECT * FROM quiz_category"; $Recordset1 = mysql_query($query_Recordset1, $QUIZ) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_select_db($database_QUIZ, $QUIZ); $query_Recordset2 = "SELECT * FROM subject_master"; $Recordset2 = mysql_query($query_Recordset2, $QUIZ) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2); $totalRows_Recordset2 = mysql_num_rows($Recordset2);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title> <script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <script src="../SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
127 | P a g e
<!--paging apply--> <script src="../Js/jquery.js"></script>
<script src="../Js/paging.js"></script> <link href="../Css/paging.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!-- .style1 { font-size: small;
font-family: Verdana, Arial, Helvetica, sans-serif; }
.style2 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style3 {font-size: small} -->
</style> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="../SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css" /> </head>
<body> <div id="container">
<?php include "Header.php"; ?>
<div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr><?php echo $_SESSION['Name'];?></usr><br><br>
<div id="TabbedPanels1" class="TabbedPanels"> <ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab style1" tabindex="0">Create Question</li> <li class="TabbedPanelsTab style2 style3" tabindex="0">Display Questions</li>
</ul> <div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>
<td> </td> </tr>
<tr> <td><form id="form1" name="form1" method="post" action="InsertQuestion.php" enctype="multipart/form-data">
<table width="100%" height="281" border="0" cellpadding="0" cellspacing="0">
<tr>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
128 | P a g e
<td height="29"><strong>Question:</strong></td> <td><span id="sprytextarea1">
<label> <textarea name="txtQue" id="txtQue" cols="45" rows="2"></textarea>
</label> <span class="textareaRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td height="29"><strong>Image :</strong></td> <td><span id=""> <label>
<input type="file" name="file" id="file"><br>
</label> <span class="textareaRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td height="27"><strong>Option A:</strong></td> <td><span id="sprytextfield1"> <label>
<input type="text" name="txtA" id="txtA" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr>
<tr> <td height="27"><strong>Option B:</strong></td>
<td><span id="sprytextfield2"> <label> <input type="text" name="txtB" id="txtB" />
</label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr> <tr>
<td height="27"><strong>Option C:</strong></td> <td><span id="sprytextfield3">
<label> <input type="text" name="txtC" id="txtC" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr> <td height="27"><strong>Option D:</strong></td>
<td><span id="sprytextfield4"> <label>
<input type="text" name="txtD" id="txtD" />
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
129 | P a g e
</label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr> <td height="27"><strong>Answer:</strong></td> <td><span id="sprytextfield5">
<label> <input type="text" name="txtAns" id="txtAns" />
</label> <span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td height="27"><strong>Explanation:</strong></td> <td><span id="sprytextarea2"> <label>
<textarea name="txtExpl" id="txtExpl" cols="45" rows="2"></textarea> </label>
<span class="textareaRequiredMsg">A value is required.</span></span></td> </tr>
<tr>
<td height="27"><strong>Link:</strong></td> <td><span id="sprytextfield6"> <label>
<input type="text" name="txtLink" id="txtLink" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr>
<tr> <td height="27"><strong>Subject:</strong></td> <td><span id="sprytextfield7">
<label> <input type="text" name="txtSubject" id="txtSubject" />
</label> <span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr>
<tr> <td height="27"><strong>Concept:</strong></td> <td><span id="sprytextfield8">
<label> <input type="text" name="txtConcept" id="txtConcept" />
</label>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
130 | P a g e
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr>
<tr> <td height="27"><strong>Sub-Concept:</strong></td> <td><span id="sprytextfield9">
<label> <input type="text" name="txtSubConcept" id="txtSubConcept" />
</label> <span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr>
<tr> <td height="27"><strong>Question Type:</strong></td> <td><span id="sprytextfield10">
<label> <input type="text" name="txtQueType" id="txtQueType" />
</label> <span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr>
<tr> <td> </td>
<td><label> <input type="submit" name="button" id="button" value="Submit" />
</label></td> </tr> </table>
</form> </td>
</tr> </table> </div>
<div class="TabbedPanelsContent"> <?php
// Establish Connection with Database $con = mysql_connect("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to execute
$sql = "select *from test_question_master"; // Execute query $result = mysql_query($sql,$con);
// Loop through each records while($row = mysql_fetch_array($result))
{
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
131 | P a g e
$Id=$row['Que_Id']; $Question=$row['Que'];
$Img=$row['Img']; $OptionA=$row['Opt_A'];
$OptionB=$row['Opt_B']; $OptionC=$row['Opt_C']; $OptionD=$row['Opt_D'];
$Answer=$row['Ans']; $Expl=$row['Expl'];
$Link=$row['Link']; $Subject=$row['Subject']; $Concept=$row['Concept'];
$SubConcept=$row['SubConcept']; $QueType=$row['QueType'];
$Date=$row['Date']; $Time=$row['Time'];
?>
<table width="100%" height="184" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><strong>Date:<?php echo $Date?></strong></td> <td><strong>Time:<?php echo $Time?></strong></td>
</tr>
<tr> <td><strong>Question Id:<?php echo $Id;?></strong></td>
<!-- <td><strong>Quiz Name:<?php echo $Q;?></strong></td>--> </tr>
<tr> <td colspan="2"><strong>Question:<?php echo $Question;?></strong></td>
</tr> <tr>
<td colspan="2" align="center"> <?php
if($Img!=null) {
?> <image src="upload/<?php echo $Img?>" width=60% height=40%/>
<?php }
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
132 | P a g e
?>
</td> </tr>
<tr> <td>(A)<?php echo $OptionA;?></td>
<td>(B)<?php echo $OptionB;?></td> </tr>
<tr> <td>(C)<?php echo $OptionC;?></td> <td>(D)<?php echo $OptionD;?></td>
</tr>
<tr> <td colspan="2"><strong>Right Answer:<?php echo $Answer;?></strong></td>
</tr>
<tr> <td colspan="2"><strong>Explanation:<?php echo $Expl?></strong></td>
</tr>
<tr> <td colspan="2"><strong>Link:<a href="<?php echo $Link?>" target="_default"><?php echo $Link?></a></strong></td>
</tr>
<tr> <td colspan="2"><strong>Concept:<?php echo $Subject." > ".$Concept." > ".$SubConcept." > ".$QueType?></strong></td>
</tr>
<tr>
<td style="padding- left:170px;"><a href="EditQuestion.php?QueId=<?php echo $Id;?>"><strong>Edit</strong></a></td>
<td><a href="DeleteQuestion.php?QueId=<?php echo $Id;?>"><strong>Delete</strong></a></td>
</tr> <tr>
<td colspan="2"><hr/></td> </tr> </table>
<?php }
// Retrieve Number of records returned
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
133 | P a g e
$records = mysql_num_rows($result); // Close the connection
mysql_close($con); ?>
<!--Display no of records with in frame-->
<br> <div style="text-align:right"> <wel>Total Questions : <?php echo
$records;?></wel> </div><br>
</div> </div> </div>
</div>
<div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div> </div>
<script type="text/javascript"> <!-- var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1"); var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea2");
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2"); var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4"); var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5");
var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6"); var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7");
var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8"); var sprytextfield9 = new Spry.Widget.ValidationTextField("sprytextfield9");
var sprytextfield10 = new Spry.Widget.ValidationTextField("sprytextfield10"); //-->
</script> </body>
</html> <?php mysql_free_result($Recordset1);
mysql_free_result($Recordset2);
?>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
134 | P a g e
7.2.6.1 InsertQuestion.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>OST</title> </head>
<body>
<?php $Que=$_POST['txtQue'];
$optA=$_POST['txtA']; $optB=$_POST['txtB'];
$optC=$_POST['txtC']; $optD=$_POST['txtD']; $Ans=$_POST['txtAns'];
$Expl=$_POST['txtExpl']; $Link=$_POST['txtLink'];
$Subject=$_POST['txtSubject']; $Concept=$_POST['txtConcept']; $SubConcept=$_POST['txtSubConcept'];
$QueType=$_POST['txtQueType'];
$allowedExts = array("gif", "jpeg", "jpg", "png"); $temp = explode(".", $_FILES["file"]["name"]);
$extension = end($temp);
if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/jpg")
|| ($_FILES["file"]["type"] == "image/pjpeg") || ($_FILES["file"]["type"] == "image/x-png")
|| ($_FILES["file"]["type"] == "image/png")) && ($_FILES["file"]["size"] < 100000) && in_array($extension, $allowedExts)) {
if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br>";
} else { // echo "Upload: " . $_FILES["file"]["name"] . "<br>"; // echo "Type: " . $_FILES["file"]["type"] . "<br>";
// echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; // echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br>";
if (file_exists("upload/" . $_FILES["file"]["name"])) {
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
135 | P a g e
// echo $_FILES["file"]["name"] . " already exists. "; echo '<script type="text/javascript">alert($_FILES["file"]["name"] already
exists.");window.location=\'Question.php\';</script>';
} else { //echo $_FILES["file"];
// Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con); // Specify the query to execute
$sql = "select * from test_question_master"; // Execute query
$result = mysql_query($sql,$con); // Loop through each records
if($_FILES["file"]["type"] == "image/gif") $type=".gif";
if($_FILES["file"]["type"] == "image/jpeg") $type=".jpeg"; if($_FILES["file"]["type"] == "image/jpg")
$type=".jpg"; if($_FILES["file"]["type"] == "image/pjpeg")
$type=".pjpeg"; if($_FILES["file"]["type"] == "image/x-png") $type=".x-png";
if($_FILES["file"]["type"] == "image/png") $type=".png";
while($row = mysql_fetch_array($result)) {
$no=$row['Que_Id']+1; $_SERVER['file']=$no."".$type;
} move_uploaded_file($_FILES["file"]["tmp_name"],"upload/" . $_SERVER['file']);
//echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
// Close the connection mysql_close($con);
}
} } else { echo "Invalid file";
}
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
136 | P a g e
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record //echo $_SERVER['file'];
//echo '<script type="text/javascript">alert("'+$_SERVER['file']+'");window.location=\'Question.php\';</scr
ipt>'; $sql="INSERT INTO `test_question_master`(`Que`, `Img`, `Opt_A`, `Opt_B`,
`Opt_C`, `Opt_D`, `Ans`, `Expl̀ , `Link`, `Subject`, `Concept`, `SubConcept`, `QueType`, `Date`, `Time`) VALUES
('".$Que."','".$_SERVER['file']."','".$optA."','".$optB."','".$optC."','".$optD."','".$Ans."','".$Expl."','".$Link."','".$Subject."','".$Concept."','".$SubConcept."','".$QueType."',now(),now())";
// execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con);
//Log Status Code // Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Insert Que. - Id :
$no',now(),now(),'Successful')"; // execute query
mysql_query ($sql,$con); // Close The Connection
mysql_close ($con);
echo '<script type="text/javascript">alert("New Question Inserted Succesfully");window.location=\'Question.php\';</script>';
?> </body>
</html>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
137 | P a g e
7.2.6.2 EditQuestion.php :
<?php
if (!isset($_SESSION)) { session_start();
}
?> <?php require_once('../Connections/QUIZ.php'); ?> <?php
if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "",
$theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ?
mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) {
case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break; case "long": case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; break;
case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break;
case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break; }
return $theValue; } }
mysql_select_db($database_QUIZ, $QUIZ);
$query_Recordset1 = "SELECT * FROM quiz_category"; $Recordset1 = mysql_query($query_Recordset1, $QUIZ) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_select_db($database_QUIZ, $QUIZ);
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
138 | P a g e
$query_Recordset2 = "SELECT * FROM subject_master"; $Recordset2 = mysql_query($query_Recordset2, $QUIZ) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2); $totalRows_Recordset2 = mysql_num_rows($Recordset2);
?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
<style type="text/css"> <!--
.style10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; color: #FFFFFF; } .style11 {color: #000000}
.style8 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; }
--> </style> <script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <script src="../SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" /> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> <link href="../SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css" />
</head>
<body> <div id="container">
<?php include "Header.php";
?> <div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr><?php echo $_SESSION['Name'];?></usr><br><br>
<div id="prj">Edit Question</div>
<table width="100%" height="209" border="0" cellpadding="0" cellspacing="0">
<tr> <td> </td> </tr>
<tr> <td>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
139 | P a g e
<?php $Id=$_GET['QueId'];
// Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con); // Specify the query to execute
$sql = "select * from test_question_master where Que_Id=".$Id.""; // Execute query
$result = mysql_query($sql,$con); // Loop through each records while($row = mysql_fetch_array($result))
{ $Id=$row['Que_Id'];
$Question=$row['Que']; $Img=$row['Img']; $OptionA=$row['Opt_A'];
$OptionB=$row['Opt_B']; $OptionC=$row['Opt_C'];
$OptionD=$row['Opt_D']; $Answer=$row['Ans']; $Expl=$row['Expl'];
$Link=$row['Link']; $Subject=$row['Subject'];
$Concept=$row['Concept']; $SubConcept=$row['SubConcept']; $QueType=$row['QueType'];
$Date=$row['Date']; $Time=$row['Time'];
} ?>
<form id="form1" name="form1" method="post" action="UpdateQuestion.php" enctype="multipart/form-data">
<table width="100%" height="281" border="0" cellpadding="0" cellspacing="0"> <tr>
<td height="29"><strong>Question Id:</strong></td> <td><label><?php echo
$Id?></label></td> <input type="hidden" id="Img" name="Img" value="<?php echo $Img?>"/>
<input type="hidden" id="QueId" name="QueId" value="<?php echo $Id?>"/>
</tr> <tr>
<td height="29"><strong>Question:</strong></td> <td><span id="sprytextarea1">
<label>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
140 | P a g e
<textarea name="txtQue" id="txtQue" cols="45" rows="2"><?php echo $Question?></textarea>
</label> <span class="textareaRequiredMsg">A value is
required.</span></span></td> </tr> <tr>
<td height="29"><strong>Image :</strong></td>
<td><span id=""> <label> <input type="file" name="file"
id="file" value="<?php echo $Img?>"><br> </label>
<span class="textareaRequiredMsg">A value is required.</span></span></td>
<img src="upload/<?php echo $Img?>" width="20%" height="20%" align="center"/>
</tr> <tr> <td height="27"><strong>Option A:</strong></td>
<td><span id="sprytextfield1"> <label>
<input type="text" name="txtA" id="txtA" value="<?php echo $OptionA?>"/> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr> <td height="27"><strong>Option B:</strong></td>
<td><span id="sprytextfield2"> <label>
<input type="text" name="txtB" id="txtB" value="<?php echo $OptionB?>"/> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr> <td height="27"><strong>Option C:</strong></td>
<td><span id="sprytextfield3"> <label>
<input type="text" name="txtC" id="txtC" value="<?php echo $OptionC?>"/> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
141 | P a g e
<tr> <td height="27"><strong>Option D:</strong></td>
<td><span id="sprytextfield4"> <label>
<input type="text" name="txtD" id="txtD" value="<?php echo $OptionD?>"/> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr> <td height="27"><strong>Answer:</strong></td>
<td><span id="sprytextfield5"> <label>
<input type="text" name="txtAns" id="txtAns" value="<?php echo $Answer?>"/> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr> <td height="27"><strong>Explanation:</strong></td>
<td><span id="sprytextarea2"> <label>
<textarea name="txtExpl" id="txtExpl" cols="45" rows="2"><?php echo $Expl?></textarea> </label>
<span class="textareaRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td height="27"><strong>Link:</strong></td> <td><span id="sprytextfield6">
<label> <input type="text" name="txtLink" id="txtLink" value="<?php echo $Link?>"/>
</label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr>
<td height="27"><strong>Subject:</strong></td> <td><span id="sprytextfield7"> <label>
<input type="text" name="txtSubject" id="txtSubject" value="<?php echo $Subject?>"/>
</label>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
142 | P a g e
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr>
<tr> <td height="27"><strong>Concept:</strong></td> <td><span id="sprytextfield8">
<label> <input type="text" name="txtConcept" id="txtConcept" value="<?php
echo $Concept?>"/> </label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr> <td height="27"><strong>Sub-Concept:</strong></td>
<td><span id="sprytextfield9"> <label>
<input type="text" name="txtSubConcept" id="txtSubConcept" value="<?php echo $SubConcept?>" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td height="27"><strong>Question Type:</strong></td> <td><span id="sprytextfield10">
<label> <input type="text" name="txtQueType" id="txtQueType" value="<?php echo $QueType?>"/>
</label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr>
<td> </td> <td><label> <input type="submit" name="button" id="button" value="Update" />
</label></td> </tr>
</table> </form> </td>
</tr> </table>
</form>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
143 | P a g e
</td>
</tr> </table>
<p> </p> <h1> </h1>
</div>
<div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div> </div>
<script type="text/javascript"> <!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1");
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2"); var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4"); var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5");
//--> </script> </body>
</html>
<?php mysql_free_result($Recordset1);
mysql_free_result($Recordset2);
myqsql_close($con); //Log status Maintain
// Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Edit Question - Id :
$Id',now(),now(),'Successful')";
// execute query
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
144 | P a g e
mysql_query ($sql,$con); // Close The Connection
mysql_close ($con); ?>
7.2.6.3 DeleteQuestion.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title> </head>
<body> <?php
$Id=$_GET['QueId']; // Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record $sql = "delete from test_question_master where Que_Id='".$Id."'";
// execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con); echo '<script type="text/javascript">alert("Question Deleted
Succesfully");window.location=\'Question.php\';</script>';
?> </body> </html>
7.2.7 Faculty.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
<style type="text/css">
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
145 | P a g e
<!-- .style1 {font-size: small}
.style12 {font-size: small; font-weight: bold; }
.style4 { font-size: small; font-weight: bold; color: #FFFFFF;
} .style5 {color: #FFFFFF}
.style6 {color: #000000}
.style9 {font-family: Verdana, Arial, Helvetica, sans-serif} -->
</style> <script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> <link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<!--paging apple--> <script src="../Js/jquery.js"></script> <script src="../Js/paging.js"></script>
<link href="../Css/paging.css" rel="stylesheet" type="text/css" /> <style type="text/css">
<!-- .style15 {font-size: 10pt} -->
</style>
<!--pagin odd even color--> <script> $(document).ready(function(){
$("#tablepaging tr:odd").css("background-color","#BBD9EE");
$("#tablepaging tr:even").css("background-color","#E4F0F8"); $("th").css("background-color","#00aaff"); $("th").css("color","#ffffff");
}); </script>
</head>
<body> <div id="container">
<?php include "Header.php"; ?>
<div id="content"> <div id="left">
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
146 | P a g e
<br><wel>Welcome</wel> <usr><?php session_start();echo $_SESSION['Name'];?></usr><br><br>
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup"> <li class="TabbedPanelsTab style1" tabindex="0"><span class="style1">Create New Faculty</span></li>
<li class="TabbedPanelsTab style15" tabindex="0">Display Faculty</li> </ul>
<div class="TabbedPanelsContentGroup"> <div class="TabbedPanelsContent"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td> </td>
</tr> <tr> <td><form id="form1" name="form1" method="post"
action="InsertFaculty.php"> <table width="100%" height="186" border="0" cellpadding="0"
cellspacing="0"> <tr> <td height="35">Faculty Name:</td>
<td><span id="sprytextfield1"> <label>
<input type="text" name="txtName" id="txtName" /> </label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr> <td height="30">Email Id:</td> <td><label><span id="sprytextfield2">
<input type="text" name="txtEmail" id="txtEmail" /> <span class="textfieldRequiredMsg">A value is
required.</span></span></label></td> </tr> <tr>
<td height="29">Mobile Number:</td> <td><span id="sprytextfield3">
<label> <input type="text" name="txtMobile" id="txtMobile" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr> <td height="35">User Name:</td>
<td><span id="sprytextfield4"> <label>
<input type="text" name="txtUserName" id="txtUserName" />
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
147 | P a g e
</label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr> <td height="33">Password:</td> <td><span id="sprytextfield5">
<label> <input type="password" name="txtPassword" id="txtPassword" />
</label> <span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td> </td> <td><label> <input type="submit" name="button" id="button" value="Submit" />
</label></td> </tr>
</table> </form></td> </tr>
</table> </div>
<div class="TabbedPanelsContent"> <table id='tablepaging' class='yui' width=100%> <thead class="style3">
<tr> <th>Id</th>
<th>Faculty Name</th> <th>Email</th> <th>Mobile</th>
<th>Status</th>
<th>Edit</th> <th>Delete</th> </tr>
</thead> <tbody>
<?php // Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con);
// Specify the query to execute $sql = "select * from Faculty_Master"; // Execute query
$result = mysql_query($sql,$con); // Loop through each records
while($row = mysql_fetch_array($result))
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
148 | P a g e
{ $Id=$row['Faculty_Id'];
$FacultyName=$row['Faculty_Name']; $Email=$row['Faculty_Email'];
$Mobile=$row['Faculty_Mobile']; $UserName=$row['Faculty_User']; $Password=$row['Faculty_Password'];
$Status=$row['Status'];
?> <tr> <td><?php echo $Id;?></td>
<td><?php echo $FacultyName;?></td> <td><?php echo $Email;?></td>
<td><?php echo $Mobile;?></td> <td><?php echo $Status;?></td> <td><a href="EditFaculty.php?FacId=<?php echo $Id;?>">Edit</a></td>
<td><a href="DeleteFaculty.php?FacId=<?php echo $Id;?>">Delete</a></td> </tr>
<?php } // Retrieve Number of records returned
$records = mysql_num_rows($result); ?>
<?php // Close the connection mysql_close($con);
?> </tbody> </table>
<div id='pageNavPosition' style='padding-top: 20px;' align='center'></div>
<script type='text/javascript'> var pager = new Pager('tablepaging', 10); pager.init();
pager.showPageNav('pager', 'pageNavPosition'); pager.showPage(1);
</script>
<!--Display no of records within frame--> <div style="text-align:right">
<wel>Total Faculty : <?php echo $records;?></wel> </div><br>
</div> <div class="TabbedPanelsContent">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
149 | P a g e
<tr> <td><form name="form1" method="post" action="InsertUser.php">
<table width="100%" height="94" border="0" cellpadding="0" cellspacing="0">
</table> </form></td> </tr>
</table> </div>
</div> </div> <p> </p>
<h1> </h1>
</div> <div id="footerline"></div>
</div>
<div id="footer"> <?php include 'footer.php'?></div> </div> <script type="text/javascript">
<!-- var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2"); var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4"); var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5");
//--> </script> </body>
</html>
7.2.7.1 InsertFaculty.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>
</head> <body>
<?php
$Name=$_POST['txtName'];
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
150 | P a g e
$Email=$_POST['txtEmail']; $Mobile=$_POST['txtMobile'];
$UserName=$_POST['txtUserName']; $Password=$_POST['txtPassword'];
// Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record $sql = "insert into Faculty_Master
(Faculty_Name,Faculty_Email,Faculty_Mobile,Faculty_User,Faculty_Password,Status)
values('".$Name."','".$Email."','".$Mobile."','".$UserName."','".$Password."','Active')"; // execute query
mysql_query ($sql,$con); // Close The Connection
mysql_close ($con);
//Log Status Code
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Insert Faculty - Name :
$Name',now(),now(),'Successful')";
// execute query mysql_query ($sql,$con); // Close The Connection
mysql_close ($con);
echo '<script type="text/javascript">alert("New Faculty Inserted Succesfully");window.location=\'Faculty.php\';</script>';
?> </body>
</html>
7.2.7.2 EditFaculty.php :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
151 | P a g e
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
<style type="text/css"> <!--
.style10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; color: #FFFFFF; } .style8 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold;
} -->
</style> <script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css"> <!--
.style11 {color: #000000} --> </style>
</head>
<body> <div id="container"> <?php
include "Header.php"; ?>
<div id="content"> <div id="left"> <br><wel>Welcome</wel> <usr><?php session_start();echo
$_SESSION['Name'];?></usr><br><br> <table width="100%" height="209" border="0" cellpadding="0"
cellspacing="0"> <tr> <td><div id="prj">Edit Faculty Information</div></td>
</tr> <tr>
<td><?php $Id=$_GET['FacId']; // Establish Connection with Database
$con = mysql_connect("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to execute $sql = "select * from Faculty_Master where Faculty_Id=".$Id."";
// Execute query $result = mysql_query($sql,$con);
// Loop through each records
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
152 | P a g e
while($row = mysql_fetch_array($result)) {
$Id=$row['Faculty_Id']; $Name=$row['Faculty_Name'];
$Email=$row['Faculty_Email']; $Mobile=$row['Faculty_Mobile']; $UserName=$row['Faculty_User'];
$Password=$row['Faculty_Password']; }
?> <form method="post" action="UpdateFaculty.php?Id=<?php echo $Id;?>"> <table width="100%" border="0">
<tr> <td height="32"><span class="style8">Faculty Id</span></td>
<td><?php echo $Id;?></td> </tr> <tr>
<td height="36"><span class="style8">Faculty Name:</span></td> <td><input name="txtNm" type="text" id="txtNm" value="<?php echo
$Name;?>"/></td> </tr> <tr>
<td height="36"><span class="style8">Email Id:</span></td> <td><input name="txtEid" type="text" id="txtEid" value="<?php echo
$Email;?>"/></td> </tr> <tr>
<td height="31"><strong>Mobile Number:</strong></td> <td><input name="txtMno" type="text" id="txtMno" value="<?php echo
$Mobile;?>"/></td> </tr>
<tr> <td height="34"><strong>Status:</strong></td>
<td><label> <select name="cmbStatus" id="cmbStatus"> <option>Active</option>
<option>InActive</option> </select>
</label></td> </tr> <tr>
<td></td> <td><input type="submit" name="submit" value="Update Record" /></td>
</tr> </table> </form>
<?php
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
153 | P a g e
//Log status Maintain
// Close the connection mysql_close($con);
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record $sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`,
`status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Edit Faculty - Id : $Id',now(),now(),'Successful')";
// execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con);
?></td> </tr> </table>
<h1> </h1>
<p> </p> <h1> </h1>
</div>
<div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div> </div>
</body> </html>
7.2.7.3 DeleteFaculty.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title> </head>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
154 | P a g e
<body> <?php
$Id=$_GET['FacId'];
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql = "delete from Faculty_Master where Faculty_Id='".$Id."'"; // execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con);
//Log Status Code
// Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Delete Faculty - Id : $Id',now(),now(),'Successful')";
// execute query
mysql_query ($sql,$con); // Close The Connection mysql_close ($con);
echo '<script type="text/javascript">alert("Faculty Deleted
Succesfully");window.location=\'Faculty.php\';</script>'; ?>
</body> </html>
7.2.8 Student.php :
<?php if (!isset($_SESSION)) {
session_start();
}
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
155 | P a g e
?> <?php require_once('../Connections/QUIZ.php'); ?>
<?php if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) { case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long":
case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL";
break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break; case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break;
} return $theValue; }
}
mysql_select_db($database_QUIZ, $QUIZ); $query_Recordset1 = "SELECT * FROM quiz_course"; $Recordset1 = mysql_query($query_Recordset1, $QUIZ) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
<script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> <script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
156 | P a g e
<!--paging apple--> <script src="../Js/jquery.js"></script>
<script src="../Js/paging.js"></script> <link href="../Css/paging.css" rel="stylesheet" type="text/css" />
<style type="text/css"> <!--
.style2 {font-size: 12px}
.style12 {font-size: small; font-weight: bold; }
.style4 {font-size: small;
font-weight: bold; color: #FFFFFF;
} .style5 {color: #FFFFFF} .style6 {color: #000000}
.style9 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style15 {font-size: 10pt} --> </style>
<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<!--pagin odd even color--> <script> $(document).ready(function(){
$("#tablepaging tr:odd").css("background-color","#BBD9EE");
$("#tablepaging tr:even").css("background-color","#E4F0F8"); $("th").css("background-color","#00aaff"); $("th").css("color","#ffffff");
}); </script>
</head>
<body> <div id="container">
<?php include "Header.php"; ?>
<div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr><?php echo $_SESSION['Name'];?></usr><br><br>
<div id="TabbedPanels1" class="TabbedPanels"> <ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab style15" tabindex="0">Create Student</li>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
157 | P a g e
<li class="TabbedPanelsTab style15" tabindex="0">Manage Student</li> </ul>
<div class="TabbedPanelsContentGroup"> <div class="TabbedPanelsContent">
<form id="form1" name="form1" method="post" action="InsertStudent.php"> <table width="100%" height="259" border="0" cellpadding="0"
cellspacing="0"> <tr>
<td>Roll Number:</td> <td><span id="sprytextfield1"> <label>
<input type="text" name="txtRoll" id="txtRoll" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr>
<tr> <td>Name:</td>
<td><span id="sprytextfield2"> <label> <input type="text" name="txtName" id="txtName" />
</label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr> <tr>
<td height="30"><strong>Select Exam:</strong></td> <td><label>
<select name="cmbExam" id="cmbExam"> <?php do {
?> <option value="<?php echo
$row_Recordset1['Course_Id']?>"><?php echo $row_Recordset1['Course_Name']?></option> <?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1); if($rows > 0) {
mysql_data_seek($Recordset1, 0); $row_Recordset1 =
mysql_fetch_assoc($Recordset1); } ?>
</select> </label></td>
</tr>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
158 | P a g e
<tr> <td height="35">Semester:</td>
<td><select name="cmbSem" id="cmbSem"> <option>1</option> <option>2</option>
<option>3</option> <option>4</option>
<option>5</option> <option>6</option> </select></td>
</tr> <tr>
<td height="33">Email:</td> <td><span id="sprytextfield3"> <label>
<input type="text" name="txtEmail" id="txtEmail" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr>
<tr> <td>Mobile:</td>
<td><span id="sprytextfield4"> <label> <input type="text" name="txtMobile" id="txtMobile" />
</label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr> <tr>
<td>User Name:</td> <td><span id="sprytextfield5">
<label> <input type="text" name="txtUserName" id="txtUserName" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr> <td>Password:</td>
<td><span id="sprytextfield6"> <label>
<input type="password" name="txtPassword" id="txtPassword" /> </label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
159 | P a g e
<td> </td> <td><label>
<input type="submit" name="button" id="button" value="Submit" /> </label></td>
</tr> </table> </form>
</div> <div class="TabbedPanelsContent">
<table id='tablepaging' class='yui' width=100%> <thead class="style3"> <tr>
<th>Id</th> <th>Roll Number</th>
<th>Name</th> <th>Semester</th> <th>Email</th>
<th>Mobile</th> <th>Edit</th>
<th>Delete</th> </tr> </thead>
<tbody> <?php
// Establish Connection with Database $con = mysql_connect("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to execute
$sql = "select * from student_registration"; // Execute query $result = mysql_query($sql,$con);
// Loop through each records while($row = mysql_fetch_array($result))
{ $Id=$row['Student_Id']; $RollNumber=$row['RollNumber'];
$Name=$row['Name']; $Semester=$row['Semester'];
$Email=$row['Email']; $Mobile=$row['Mobile']; $UserName=$row['UserName'];
$Password=$row['Password']; $Status=$row['Status'];
?> <tr> <td><?php echo $Id;?></td>
<td><?php echo $RollNumber;?></td> <td><?php echo $Name;?></td>
<td><?php echo $Semester;?></td>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
160 | P a g e
<td><?php echo $Email;?></td> <td><?php echo $Mobile;?></td>
<td><a href="EditStudent.php?StuId=<?php echo $Id;?>">Edit</a></td> <td><a href="DeleteStudent.php?StuId=<?php echo $Id;?>">Delete</a></td>
</tr> <?php }
// Retrieve Number of records returned $records = mysql_num_rows($result);
?>
<?php // Close the connection
mysql_close($con); ?> </table>
<div id='pageNavPosition' style='padding-top: 20px;'
align='center'></div> <script type='text/javascript'> var pager = new Pager('tablepaging', 10);
pager.init(); pager.showPageNav('pager', 'pageNavPosition');
pager.showPage(1); </script>
<!--Display no of records within frame-->
<div style="text-align:right"> <wel>Total Students : <?php echo $records;?></wel>
</div><br> </div>
</div> </div> <p> </p>
<h1> </h1>
</div> <div id="footerline"></div>
</div>
<div id="footer"> <?php include 'footer.php'?></div> </div> <script type="text/javascript">
<!-- var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
161 | P a g e
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2"); var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4"); var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5");
var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6"); var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield7");
//--> </script>
</body> </html>
7.2.8.1 InsertStudent.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>
</head>
<body> <?php
$txtRoll=$_POST['txtRoll']; $txtName=$_POST['txtName'];
$cmbSem=$_POST['cmbSem']; $txtEmail=$_POST['txtEmail']; $txtMobile=$_POST['txtMobile'];
$txtUserName=$_POST['txtUserName']; $txtPassword=$_POST['txtPassword'];
$Status="Active"; // Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record $sql = "insert into student_registration (RollNumber,Name,Semester,Email,Mobile,UserName,Password,Status)
values('".$txtRoll."','".$txtName."','".$cmbSem."','".$txtEmail."','".$txtMobile."','".$txtUserName."','".$txtPassword."','Active')";
// execute query mysql_query ($sql,$con); // Close The Connection
mysql_close ($con);
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
162 | P a g e
//Log Status Code
// Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Insert Student - Roll No : $txtRoll',now(),now(),'Successful')";
// execute query
mysql_query ($sql,$con); // Close The Connection mysql_close ($con);
echo '<script type="text/javascript">alert("New Student Inserted
Succesfully");window.location=\'user.php\';</script>'; ?>
</body> </html>
7.2.8.2 EditStudent.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title> <style type="text/css">
<!-- .style10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight:
bold; color: #FFFFFF; } .style8 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; }
--> </style>
<style type="text/css"> <!--
.style11 {color: #000000} -->
</style>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
163 | P a g e
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
</head>
<body> <div id="container"> <?php
include "Header.php"; ?>
<div id="content"> <div id="left"> <br><wel>Welcome</wel> <usr><?php
session_start();echo $_SESSION['Name'];?></usr><br><br>
<table width="100%" height="209" border="0" cellpadding="0" cellspacing="0"> <tr>
<td><div id="prj">Edit Student Information</div></td> </tr>
<tr> <td><?php $Id=$_GET['StuId'];
// Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con); // Specify the query to execute
$sql = "select * from student_registration where Student_Id=".$Id.""; // Execute query
$result = mysql_query($sql,$con); // Loop through each records while($row = mysql_fetch_array($result))
{ $Id=$row['Student_Id'];
$RollNumber=$row['RollNumber']; $Name=$row['Name']; $Semester=$row['Semester'];
$Email=$row['Email']; $Mobile=$row['Mobile'];
$UserName =$row['UserName']; $Password=$row['Password']; $Status=$row['Status'];
} ?>
<form method="post" action="UpdateStudent.php?Id=<?php echo $Id;?>"> <table width="100%" border="0"> <tr>
<td height="32"><span class="style8">Student Id</span></td> <td><?php echo $Id;?></td>
</tr>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
164 | P a g e
<tr> <td height="36"><span class="style8">Roll Number:</span></td>
<td><?php echo $RollNumber;?></td> </tr>
<tr> <td height="31"><strong>Name:</strong></td>
<td><?php echo $Name;?></td> </tr>
<tr> <td height="31"><strong>Semester:</strong></td> <td><select name="cmbSem" id="cmbSem">
<option>1</option> <option>2</option>
<option>3</option> <option>4</option> <option>5</option>
<option>6</option> </select></td>
</tr> <tr> <td height="31"><strong>Mobile:</strong></td>
<td><?php echo $Mobile;?></td> </tr>
<tr> <td height="33"><strong>Email:</strong></td> <td><?php echo $Email;?></td>
</tr> <tr>
<td height="34"><strong>Status:</strong></td> <td><label> <select name="cmbStatus" id="cmbStatus">
<option>Active</option> <option>InActive</option>
</select> </label></td> </tr>
<tr> <td></td>
<td><input type="submit" name="submit" value="Update Record" /></td> </tr> </table>
</form> <?php
// Close the connection mysql_close($con);
//Log status Maintain
// Establish Connection with MYSQL
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
165 | P a g e
$con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES
('".$_SESSION['ID']."','".$_SESSION['Name']."','Edit Student - Id : $Id',now(),now(),'Successful')";
// execute query mysql_query ($sql,$con);
// Close The Connection mysql_close ($con);
?></td> </tr> </table>
<h1> </h1>
<p> </p> <h1> </h1>
</div>
<div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div> </div>
</body>
</html>
7.2.8.3 DeleteStudent.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>
</head> <body>
<?php
$Id=$_GET['StuId'];
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
166 | P a g e
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record $sql = "delete from student_registration where Student_Id='".$Id."'"; // execute query
mysql_query ($sql,$con); // Close The Connection
mysql_close ($con);
//Log Status Code
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Delete Student - Id :
$Id',now(),now(),'Successful')";
// execute query mysql_query ($sql,$con); // Close The Connection
mysql_close ($con);
echo '<script type="text/javascript">alert("Student Deleted Succesfully");window.location=\'Student.php\';</script>';
?> </body>
</html>
7.2.9 Interview.php :
As Visitors/Guest Page Code.
7.2.9.1 InsertInterQue.php :
As Visitors/Guest Page Code.
7.2.9.2 EditPaper.php :
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
167 | P a g e
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
<style type="text/css"> <!--
.style10 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold; color: #FFFFFF; } .style8 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold;
} -->
</style> <script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css"> <!--
.style11 {color: #000000} --> </style>
</head>
<body> <div id="container"> <?php
include "Header.php"; ?>
<div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr><?php session_start();echo $_SESSION['Name'];?></usr><br><br>
<div id="prj">Edit Interview Paper</div> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td> </td>
</tr> <tr> <td><form id="form1" name="form1" method="post"
action="UpdatePaper.php" enctype="multipart/form-data"> <table width="100%" height="281" border="0" cellpadding="0"
cellspacing="0"> <?php $Id=$_GET['PaperId'];
// Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
168 | P a g e
mysql_select_db("ost", $con); // Specify the query to execute
$sql = "select * from interview_master where CmpId=".$Id.""; // Execute query
$result = mysql_query($sql,$con); // Loop through each records while($row = mysql_fetch_array($result))
{ $CmpId=$row['CmpId'];
$CmpNm=$row['CmpName']; $LocDate=$row['LocDate']; $File=$row['PlacePaper'];
$Nm=$row['Name']; $Eid=$row['Email'];
} ?>
<input type="hidden" name="PaperId" id="PaperId" value="<?php echo $CmpId?>"/>
<input type="hidden" id="File" name="File" value="<?php echo $File?>"/>
<tr> <td height="27"><strong>Company Name:</strong></td>
<td><span id="sprytextfield1"> <label>
<input type="text" name="txtCmp" id="txtCmp" value="<?php echo
$CmpNm?>"/> </label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr> <td height="27"><strong>Location & Date:</strong></td> <td><span id="sprytextfield2">
<label> <input type="text" name="txtLD" id="txtLD" value="<?php echo
$LocDate?>"/> </label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr> <td height="29"><strong>Placement Paper & Interview
Experience:</strong></td> <td><span id="">
<label>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
169 | P a g e
<input type="file" name="file" id="file"><br>
</label> </td>
</tr> <tr> <td height="27"><strong>Your Name:</strong></td>
<td><span id="sprytextfield3"> <label>
<input type="text" name="txtNm" id="txtNm" value="<?php echo $Nm?>"/> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr> <td height="27"><strong>Your Email Id:</strong></td>
<td><span id="sprytextfield4"> <label>
<input type="text" name="txtEid" id="txtEid" value="<?php echo $Eid?>"/> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td> </td> <td><label>
<input type="submit" name="button" id="button" value="Submit" /> </label></td> </tr>
</table> </form>
</td> </tr> </table>
<?php
// Close the connection
mysql_close($con);
//Log status Maintain
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
170 | P a g e
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`,
`process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Edit Faculty - Id : $Id',now(),now(),'Successful')";
// execute query
mysql_query ($sql,$con); // Close The Connection mysql_close ($con);
?> </div>
<div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div>
</div> <script type="text/javascript"> <!--
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield1"); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield2");
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield3"); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield4"); //-->
</script> </body>
</html>
7.2.9.3 DeletePaper.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head>
<body>
<?php $Id=$_GET['PaperId'];
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root");
// Select Database
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
171 | P a g e
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql = "delete from interview_master where CmpId='".$Id."'"; // execute query
mysql_query ($sql,$con); // Close The Connection mysql_close ($con);
//Log Status Code // Establish Connection with MYSQL
$con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Delete Paper - Id :
$Id',now(),now(),'Successful')"; // execute query
mysql_query ($sql,$con); // Close The Connection
mysql_close ($con); echo '<script type="text/javascript">alert("Placement Paper Deleted
Succesfully");window.location=\'Interview.php\';</script>';
?> </body> </html>
7.2.10 LogStatus.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
<style type="text/css"> <!-- .style1 {font-size: small}
.style12 {font-size: small; font-weight: bold; }
.style4 { font-size: small;
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
172 | P a g e
font-weight: bold; color: #FFFFFF;
} .style5 {color: #FFFFFF}
.style6 {color: #000000}
.style9 {font-family: Verdana, Arial, Helvetica, sans-serif} -->
</style> <script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> <link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<!--paging apple--> <script src="../Js/jquery.js"></script> <script src="../Js/paging.js"></script>
<link href="../Css/paging.css" rel="stylesheet" type="text/css" /> <style type="text/css">
<!-- .style15 {font-size: 10pt} -->
</style>
<!--pagin odd even color--> <script> $(document).ready(function(){
$("#tablepaging tr:odd").css("background-color","#BBD9EE");
$("#tablepaging tr:even").css("background-color","#E4F0F8"); $("th").css("background-color","#00aaff"); $("th").css("color","#ffffff");
}); </script>
</head>
<body> <div id="container">
<?php include "Header.php"; ?>
<div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr><?php session_start();echo $_SESSION['Name'];?></usr><br><br>
<div id="TabbedPanels1" class="TabbedPanels">
<div class="TabbedPanelsContentGroup">
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
173 | P a g e
<div class="TabbedPanelsContent"> <table id='tablepaging' class='yui' width=100%>
<thead class="style3"> <tr>
<th>User Id</th> <th>User Name</th> <th>Process</th>
<th>Date</th> <th>Time</th>
<th>Status</th> <th>Delete</th>
</tr> </thead>
<tbody> <?php
// Establish Connection with Database $con = mysql_connect("localhost","root"); // Select Database
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
174 | P a g e
mysql_select_db("ost", $con); // Specify the query to execute
$sql = "select * from log_status"; // Execute query
$result = mysql_query($sql,$con); // Loop through each records while($row = mysql_fetch_array($result))
{ $Id=$row['id'];
$userid=$row['userid']; $usernm=$row['usernm']; $process=$row['process'];
$date=$row['date']; $time=$row['time'];
$status=$row['status']; ?>
<tr> <td><?php echo $userid;?></td>
<td><?php echo $usernm;?></td> <td><?php echo $process;?></td> <td><?php echo $date;?></td>
<td><?php echo $time;?></td> <td><?php echo $status;?></td>
<td><a href="DeleteStatus.php?Id=<?php echo $Id;?>">Delete</a></td> </tr> <?php
} // Retrieve Number of records returned
$records = mysql_num_rows($result); ?> <?php
// Close the connection mysql_close($con);
?> </tbody> </table>
<div id='pageNavPosition' style='padding-top: 20px;' align='center'></div> <script type='text/javascript'>
var pager = new Pager('tablepaging', 15); pager.init();
pager.showPageNav('pager', 'pageNavPosition'); pager.showPage(1); </script>
<a id="del" style="float:right" >Delete All</a><br>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
175 | P a g e
<!--Display no of records within frame--> <br>
<div style="text-align:right"> <wel>Total Records : <?php echo
$records;?></wel> </div><br> </div>
</div> </div>
</div> <div id="footerline"></div>
</div>
<div id="footer"> <?php include 'footer.php'?></div> </div> <script type="text/javascript">
<!-- var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2"); var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4"); var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5");
//--> </script> </body>
</html>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
176 | P a g e
7.3 FACULTY / RESEARCHER PANEL
7.3.1 index.php :
As Admin Panel Page.
7.3.2 Profile.php :
<?php if (!isset($_SESSION)) {
session_start();
} ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" />
<title>OST</title> </head>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
177 | P a g e
<body> <div id="container">
<?php include "Header.php";
?> <div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr><?php echo $_SESSION['Name'];?></usr><br><br>
<div id="prj">Faculty Profile Information</div><br> <?php
$ID=$_SESSION['ID']; // Establish Connection with Database
$con = mysql_connect("localhost","root"); // Select Database mysql_select_db("ost", $con);
// Specify the query to execute $sql = "select * from Faculty_Master where Faculty_Id ='".$ID."' ";
// Execute query $result = mysql_query($sql,$con); // Loop through each records
$row = mysql_fetch_array($result) ?>
<table width="100%" height="183" border="0" cellpadding="0" cellspacing="0"> <tr> <td><strong>Faculty ID:</strong></td>
<td><?php echo $row['Faculty_Id'];?></td> </tr>
<tr> <td><strong>Faculty Name:</strong></td> <td><?php echo $row['Faculty_Name'];?></td>
</tr> <tr>
<td><strong>Email ID:</strong></td> <td><?php echo $row['Faculty_Email'];?></td> </tr>
<tr> <td><strong>Mobile Number:</strong></td>
<td><?php echo $row['Faculty_Mobile'];?></td> </tr>
<tr> <td> </td>
<td><b><a href="EditFaculty.php?FacultyId=<?php echo $row['Faculty_Id']; ?>">Edit Profile</a></b></td> </tr>
</table> <h1> </h1>
</div>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
178 | P a g e
<div id="footerline"></div>
</div>
<div id="footer"> <?php include 'footer.php'?></div> </div> </body>
</html>
7.3.2.1 EditFaculty.php :
As Admin Panel Page.
7.3.3 Student.php :
As Admin Panel Page.
7.3.3.1 InsertStudent.php :
As Admin Panel Page.
7.3.3.2 EditStudent.php :
As Admin Panel Page.
7.3.3.3 DeleteStudent.php :
As Admin Panel Page.
7.3.4 Schedule.php :
<?php if (!isset($_SESSION))
{ session_start();
} ?>
<?php require_once('../Connections/QUIZ.php'); ?>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
179 | P a g e
<?php if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{ $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) { case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break;
case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL";
break; case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break;
case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break;
} return $theValue;
} }
mysql_select_db($database_QUIZ, $QUIZ); $query_Recordset1 = "SELECT * FROM quiz_category";
$Recordset1 = mysql_query($query_Recordset1, $QUIZ) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_select_db($database_QUIZ, $QUIZ);
$query_Recordset2 = "SELECT * FROM subject_master"; $Recordset2 = mysql_query($query_Recordset2, $QUIZ) or die(mysql_error()); $row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" />
<title>OST</title>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
180 | P a g e
<script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> <script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<!--paging apply--> <script src="../Js/jquery.js"></script>
<script src="../Js/paging.js"></script> <link href="../Css/paging.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!-- .style1 {
font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif; }
.style2 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style3 {font-size: small}
--> </style> <link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css"> <!--
.style12 {font-size: small; font-weight: bold; }
.style13 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small;
font-weight: bold; color: #000000;
} .style4 {font-size: small; font-weight: bold;
color: #FFFFFF; }
.style5 {color: #FFFFFF}
.style6 {color: #000000} -->
</style> <style type="text/css">
.ds_box { background-color:#336633;
border: 2px solid #666600; position: absolute;
z-index: 32767; }
.ds_tbl { background-color: #FFF;
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
181 | P a g e
}
.ds_head { background-color: #85A157;
color: #FFF; font-family: Arial, Helvetica, sans-serif; font-size: 13px;
font-weight: bold; text-align: center;
letter-spacing: 2px; }
.ds_subhead { background-color: #85A157;
color: #000; font-size: 12px; font-weight: bold;
text-align: center; font-family: Arial, Helvetica, sans-serif;
width: 32px; }
.ds_cell { background-color:#FFFFCC;
color: #000; font-size: 13px; text-align: center;
font-family: Arial, Helvetica, sans-serif; padding: 5px;
cursor: pointer; border: 1px solid #666600; }
.ds_cell:hover {
background-color: #F3F3F3; } /* This hover code won't work for IE */
</style> <script src="SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css" /> </head> <body>
<table class="ds_box" cellpadding="0" cellspacing="0" id="ds_conclass" style="display:
none;"> <tr><td id="ds_calclass"> </td></tr>
</table>
<script type="text/javascript">
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
182 | P a g e
// <!-- <![CDATA[
// Project: Dynamic Date Selector (DtTvB) - 2006-03-16 // Script featured on JavaScript Kit- http://www.javascriptkit.com
// Code begin... // Set the initial date. var ds_i_date = new Date();
ds_c_month = ds_i_date.getMonth() + 1; ds_c_year = ds_i_date.getFullYear();
// Get Element By Id function ds_getel(id) {
return document.getElementById(id); }
// Get the left and the top of the element. function ds_getleft(el) {
var tmp = el.offsetLeft; el = el.offsetParent
while(el) { tmp += el.offsetLeft; el = el.offsetParent;
} return tmp;
} function ds_gettop(el) { var tmp = el.offsetTop;
el = el.offsetParent while(el) {
tmp += el.offsetTop; el = el.offsetParent; }
return tmp; }
// Output Element var ds_oe = ds_getel('ds_calclass');
// Container var ds_ce = ds_getel('ds_conclass');
// Output Buffering var ds_ob = '';
function ds_ob_clean() { ds_ob = '';
} function ds_ob_flush() { ds_oe.innerHTML = ds_ob;
ds_ob_clean(); }
function ds_echo(t) {
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
183 | P a g e
ds_ob += t; }
var ds_element; // Text Element...
var ds_monthnames = [ 'January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December' ]; // You can translate it for your language.
var ds_daynames = [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'
]; // You can translate it for your language.
// Calendar template function ds_template_main_above(t) { return '<table cellpadding="3" cellspacing="1" class="ds_tbl">'
+ '<tr>' + '<td class="ds_head" style="cursor: pointer"
onclick="ds_py();"><<</td>' + '<td class="ds_head" style="cursor: pointer" onclick="ds_pm();"><</td>' + '<td class="ds_head" style="cursor: pointer" onclick="ds_hi();"
colspan="3">[Close]</td>' + '<td class="ds_head" style="cursor: pointer"
onclick="ds_nm();">></td>' + '<td class="ds_head" style="cursor: pointer" onclick="ds_ny();">>></td>'
+ '</tr>' + '<tr>'
+ '<td colspan="7" class="ds_head">' + t + '</td>' + '</tr>' + '<tr>';
}
function ds_template_day_row(t) { return '<td class="ds_subhead">' + t + '</td>'; // Define width in CSS, XHTML 1.0 Strict doesn't have width property for it.
}
function ds_template_new_week() { return '</tr><tr>'; }
function ds_template_blank_cell(colspan) {
return '<td colspan="' + colspan + '"></td>' }
function ds_template_day(d, m, y) { return '<td class="ds_cell" onclick="ds_onclick(' + d + ',' + m + ',' + y + ')">' + d +
'</td>';
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
184 | P a g e
// Define width the day row. }
function ds_template_main_below() {
return '</tr>' + '</table>'; }
// This one draws calendar...
function ds_draw_calendar(m, y) { // First clean the output buffer. ds_ob_clean();
// Here we go, do the header ds_echo (ds_template_main_above(ds_monthnames[m - 1] + ' ' + y));
for (i = 0; i < 7; i ++) { ds_echo (ds_template_day_row(ds_daynames[i])); }
// Make a date object. var ds_dc_date = new Date();
ds_dc_date.setMonth(m - 1); ds_dc_date.setFullYear(y); ds_dc_date.setDate(1);
if (m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) { days = 31;
} else if (m == 4 || m == 6 || m == 9 || m == 11) { days = 30; } else {
days = (y % 4 == 0) ? 29 : 28; }
var first_day = ds_dc_date.getDay(); var first_loop = 1; // Start the first week
ds_echo (ds_template_new_week()); // If sunday is not the first day of the month, make a blank cell...
if (first_day != 0) { ds_echo (ds_template_blank_cell(first_day)); }
var j = first_day; for (i = 0; i < days; i ++) {
// Today is sunday, make a new week. // If this sunday is the first day of the month, // we've made a new row for you already.
if (j == 0 && !first_loop) { // New week!!
ds_echo (ds_template_new_week()); } // Make a row of that day!
ds_echo (ds_template_day(i + 1, m, y)); // This is not first loop anymore...
first_loop = 0;
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
185 | P a g e
// What is the next day? j ++;
j %= 7; }
// Do the footer ds_echo (ds_template_main_below()); // And let's display..
ds_ob_flush(); // Scroll it into view.
ds_ce.scrollIntoView(); }
// A function to show the calendar. // When user click on the date, it will set the content of t.
function ds_sh(t) { // Set the element to set... ds_element = t;
// Make a new date, and set the current month and year. var ds_sh_date = new Date();
ds_c_month = ds_sh_date.getMonth() + 1; ds_c_year = ds_sh_date.getFullYear(); // Draw the calendar
ds_draw_calendar(ds_c_month, ds_c_year); // To change the position properly, we must show it first.
ds_ce.style.display = ''; // Move the calendar container! the_left = ds_getleft(t);
the_top = ds_gettop(t) + t.offsetHeight; ds_ce.style.left = the_left + 'px';
ds_ce.style.top = the_top + 'px'; // Scroll it into view. ds_ce.scrollIntoView();
}
// Hide the calendar. function ds_hi() { ds_ce.style.display = 'none';
}
// Moves to the next month... function ds_nm() { // Increase the current month.
ds_c_month ++; // We have passed December, let's go to the next year.
// Increase the current year, and set the current month to January. if (ds_c_month > 12) { ds_c_month = 1;
ds_c_year++; }
// Redraw the calendar.
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
186 | P a g e
ds_draw_calendar(ds_c_month, ds_c_year); }
// Moves to the previous month...
function ds_pm() { ds_c_month = ds_c_month - 1; // Can't use dash-dash here, it will make the page invalid.
// We have passed January, let's go back to the previous year. // Decrease the current year, and set the current month to December.
if (ds_c_month < 1) { ds_c_month = 12; ds_c_year = ds_c_year - 1; // Can't use dash-dash here, it will make the page
invalid. }
// Redraw the calendar. ds_draw_calendar(ds_c_month, ds_c_year); }
// Moves to the next year...
function ds_ny() { // Increase the current year. ds_c_year++;
// Redraw the calendar. ds_draw_calendar(ds_c_month, ds_c_year);
} // Moves to the previous year...
function ds_py() { // Decrease the current year.
ds_c_year = ds_c_year - 1; // Can't use dash-dash here, it will make the page invalid. // Redraw the calendar. ds_draw_calendar(ds_c_month, ds_c_year);
}
// Format the date to output. function ds_format_date(d, m, y) { // 2 digits month.
m2 = '00' + m; m2 = m2.substr(m2.length - 2);
// 2 digits day. d2 = '00' + d; d2 = d2.substr(d2.length - 2);
// YYYY-MM-DD return y + '-' + m2 + '-' + d2;
} // When the user clicks the day.
function ds_onclick(d, m, y) { // Hide the calendar.
ds_hi();
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
187 | P a g e
// Set the value of it, if we can. if (typeof(ds_element.value) != 'undefined') {
ds_element.value = ds_format_date(d, m, y); // Maybe we want to set the HTML in it.
} else if (typeof(ds_element.innerHTML) != 'undefined') { ds_element.innerHTML = ds_format_date(d, m, y); // I don't know how should we display it, just alert it to user.
} else { alert (ds_format_date(d, m, y));
} }
// And here is the end.
// ]]> --> </script>
</head>
<body> <div id="container"> <?php
include "Header.php"; ?>
<div id="content"> <div id="left"> <br><wel>Welcome</wel> <usr><?php echo
$_SESSION['Name'];?></usr><br><br>
<div id="TabbedPanels1" class="TabbedPanels"> <ul class="TabbedPanelsTabGroup"> <li class="TabbedPanelsTab style1" tabindex="0">Create QUIZ
Schedule</li> <li class="TabbedPanelsTab style2 style3" tabindex="0">Display QUIZ
Schedule</li> </ul> <div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td> </td> </tr>
<tr> <td><form id="form1" name="form1" method="post"
action="InsertSchedule.php"> <table width="100%" height="180" border="0" cellpadding="0" cellspacing="0">
<tr> <td>Select QUIZ:</td>
<td><label>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
188 | P a g e
<select name="cmbExam" id="cmbExam"> <?php
do { ?>
<option value="<?php echo $row_Recordset1['Quiz_Id']?>"><?php echo $row_Recordset1['Quiz_Name']?></option> <?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); $rows = mysql_num_rows($Recordset1);
if($rows > 0) { mysql_data_seek($Recordset1, 0); $row_Recordset1 = mysql_fetch_assoc($Recordset1);
} ?>
</select> </label></td> </tr>
<tr> <td height="32">Select Semester:</td>
<td><label> <select name="cmbSem" id="cmbSem"> <option>1</option>
<option>2</option> <option>3</option>
<option>4</option> <option>5</option> <option>6</option>
</select> </label></td>
</tr> <tr> <td>Select Subject:</td>
<td><label> <select name="cmbSubject" id="cmbSubject">
<?php do { ?>
<option value="<?php echo $row_Recordset2['Subject_Id']?>"><?php echo $row_Recordset2['Subject_Name']?></option>
<?php } while ($row_Recordset2 = mysql_fetch_assoc($Recordset2)); $rows = mysql_num_rows($Recordset2);
if($rows > 0) { mysql_data_seek($Recordset2, 0);
$row_Recordset2 = mysql_fetch_assoc($Recordset2); } ?>
</select> </label></td>
</tr>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
189 | P a g e
<tr> <td>Exam Date:</td>
<td><span id="sprytextfield1"> <label>
<input type="text" name="txtDate" id="txtDate" onclick="ds_sh(this);" /> </label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr> <td height="27">Exam Time:</td> <td><span id="sprytextfield2">
<label> <input type="text" name="txtTime" id="txtTime" />
</label> <span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td> </td> <td><label> <input type="submit" name="button" id="button" value="Submit" />
</label></td> </tr>
</table> </form> </td>
</tr> </table>
</div> <div class="TabbedPanelsContent"> <table id='tablepaging' class='yui' width=100%>
<thead class="style3"> <tr>
<th>Id</th> <th>QUIZ Type</th> <th>Semester</th>
<th>Subject</th> <th>Date</th>
<th>Time</th> <th>Delete</th> </tr>
</thead> <tbody>
<?php // Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con);
// Specify the query to execute
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
190 | P a g e
$sql = "SELECT quiz_schedule.Schedule_Id, quiz_schedule.Semester, quiz_schedule.QuizDate, quiz_schedule.QuizTime, quiz_category.Quiz_Name,
subject_master.Subject_Name FROM quiz_schedule, quiz_category, subject_master
WHERE quiz_schedule.Quiz_Id=quiz_category.Quiz_Id AND quiz_schedule.Subject_Id=subject_master.Subject_Id"; // Execute query
$result = mysql_query($sql,$con); // Loop through each records
while($row = mysql_fetch_array($result)) { $Id=$row['Schedule_Id'];
$Quiz=$row['Quiz_Name']; $Sem=$row['Semester'];
$Subject=$row['Subject_Name']; $Date=$row['QuizDate']; $Time=$row['QuizTime'];
?> <tr> <td><?php echo $Id;?></td>
<td><?php echo $Quiz;?></td> <td><?php echo $Sem;?></td>
<td><?php echo $Subject;?></td> <td><?php echo $Date;?></td> <td><?php echo $Time;?></td>
<td><a href="DeleteSchedule.php?SchId=<?php echo $Id;?>">Delete</a></td>
</tr> <?php }
// Retrieve Number of records returned $records = mysql_num_rows($result);
?> <?php // Close the connection
mysql_close($con); ?> </tbody>
</table>
<div id='pageNavPosition' style='padding-top: 20px;'
align='center'></div> <script type='text/javascript'> var pager = new Pager('tablepaging', 10);
pager.init(); pager.showPageNav('pager', 'pageNavPosition');
pager.showPage(1);
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
191 | P a g e
</script>
<!--Display no of records within frame--> <div style="text-align:right">
<wel>Total Schedules : <?php echo $records;?></wel> </div><br>
</div> </div>
</div> </div>
<div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div> </div>
<script type="text/javascript"> <!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
//--> </script>
</body> </html> <?php
mysql_free_result($Recordset1);
mysql_free_result($Recordset2); ?>
7.3.4.1 DeleteSchedule.php :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>
</head>
<body> <?php
$Id=$_GET['SchId']; // Establish Connection with MYSQL
$con = mysql_connect ("localhost","root");
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
192 | P a g e
// Select Database mysql_select_db("ost", $con);
// Specify the query to Insert Record $sql = "delete from quiz_schedule where Schedule_Id='".$Id."'";
// execute query mysql_query ($sql,$con); // Close The Connection
mysql_close ($con); echo '<script type="text/javascript">alert("Schedule Deleted
Succesfully");window.location=\'Schedule.php\';</script>'; ?>
</body> </html>
7.3.5 Question.php :
As Admin Panel Page.
7.3.5.1 InsertQuestion.php :
As Admin Panel Page.
7.3.5.2 EditQuestion.php :
As Admin Panel Page.
7.3.5.3 DeleteQuestion.php :
As Admin Panel Page.
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
193 | P a g e
7.4 STUDENT / USER PANEL
7.4.1 index.php :
As Admin Panel Page.
7.4.2 Profile.php :
As Faculty / Researcher Panel Page.
7.4.2.1 EditProfile.php :
As Faculty / Researcher Panel Page.
7.4.3 StartExam.php :
<?php
if (!isset($_SESSION)) { session_start();
} ?>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
194 | P a g e
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" />
<!--paging apply--> <script src="../Js/jquery.js"></script>
<script src="../Js/paging.js"></script> <link href="../Css/paging.css" rel="stylesheet" type="text/css" />
<title>OST</title>
</head> <body>
<div id="container"> <?php
include "Header.php"; ?> <div id="content">
<div id="left"> <br><wel>Welcome</wel> <usr><?php echo
$_SESSION['Name'];?></usr><br><br> <table id='tablepaging' class='yui' width=100%> <thead class="style3">
<tr> <th>Id</th>
<th>QUIZ Type</th> <th>Semester</th> <th>Subject</th>
<th>Date</th> <th>Time</th>
<th>Start</th> </tr> </thead>
<tbody> <?php
// Establish Connection with Database $con = mysql_connect("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to execute
$sql = "SELECT quiz_schedule.Schedule_Id, quiz_schedule.Semester, quiz_schedule.QuizDate, quiz_schedule.QuizTime, quiz_category.Quiz_Name, subject_master.Subject_Name
FROM quiz_schedule, quiz_category, subject_master WHERE quiz_schedule.Quiz_Id=quiz_category.Quiz_Id AND
quiz_schedule.Subject_Id=subject_master.Subject_Id AND
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
195 | P a g e
quiz_schedule.QuizDate='".date("Y-m-d")."' AND quiz_schedule.Semester='".$_SESSION['Sem']."'";
// Execute query $result = mysql_query($sql,$con);
// Loop through each records while($row = mysql_fetch_array($result)) {
$Id=$row['Schedule_Id']; $Quiz=$row['Quiz_Name'];
$Sem=$row['Semester']; $Subject=$row['Subject_Name']; $Date=$row['QuizDate'];
$Time=$row['QuizTime'];
?> <tr>
<td><?php echo $Id;?></td> <td><?php echo $Quiz;?></td>
<td><?php echo $Sem;?></td> <td><?php echo $Subject;?></td> <td><?php echo $Date;?></td>
<td><?php echo $Time;?></td> <td><a href="Exam.php?Id=<?php echo $Id;?>">Exam</a></td>
</tr> <?php }
// Retrieve Number of records returned $records = mysql_num_rows($result);
?> <?php // Close the connection
mysql_close($con); ?> </tbody>
</table>
<div id='pageNavPosition' style='padding-top: 20px;' align='center'></div>
<script type='text/javascript'> var pager = new Pager('tablepaging', 10); pager.init();
pager.showPageNav('pager', 'pageNavPosition'); pager.showPage(1);
</script> <!--Display no of records within frame-->
<div style="text-align:right"> <wel>Total Tests : <?php echo
$records;?></wel>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
196 | P a g e
</div><br> </div>
<div id="footerline"></div>
</div> <div id="footer"> <?php include 'footer.php'?></div>
</div> </body>
</html>
7.4.3.1 Exam.php :
<?php if (!isset($_SESSION))
{ session_start();
} ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
<style type="text/css"> <!-- .style1 {
color: #FFFFFF; font-weight: bold;
} --> </style>
</head>
<body> <div id="container"> <?php
include "Header.php"; ?>
<div id="content"> <div id="left"> <br><wel>Welcome</wel> <usr><?php echo
$_SESSION['Name'];?></usr><br><br>
<p>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
197 | P a g e
<?php $SID=$_GET['Id'];
// Establish Connection with Database $con1 = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con1); // Specify the query to execute
$sql1 = "SELECT * from quiz_schedule where Schedule_Id='".$SID."'"; // Execute query
$result1 = mysql_query($sql1,$con1); // Loop through each records while($row1 = mysql_fetch_array($result1))
{ $Quiz_Id=$row1['Quiz_Id'];
$Semester=$row1['Semester']; $Subject_Id=$row1['Subject_Id']; }
mysql_close($con1);
// Establish Connection with Database $con = mysql_connect("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to execute
$sql = "SELECT * from question_master where Quiz_Id='".$Quiz_Id."' and Sem='".$Semester."' and Subject_Id='".$Subject_Id."'"; // Execute query
$result = mysql_query($sql,$con); // Loop through each records
$i=1; while($row = mysql_fetch_array($result)) {
$Id=$row['Que_Id']; $Question=$row['Que'];
$OptionA=$row['Opt_A']; $OptionB=$row['Opt_B']; $OptionC=$row['Opt_C'];
$OptionD=$row['Opt_D']; ?>
</p> <form id="form2" name="form2" method="post" action="Display.php?Id=<?php echo $SID;?>">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr> <td height="36" colspan="2" bgcolor="#00aaff"><span class="style1">(<?php
echo $i;?>)<?php echo $Question;?></span></td> </tr>
<tr>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
198 | P a g e
<td colspan="2"><table width="100%" height="64" border="2" cellpadding="0" cellspacing="0" bordercolor="#00aaff">
<tr> <td height="32" width="50%"><input type="radio"
name="RadioGroup<?php echo $i;?>" value="<?php echo $OptionA;?>" id="OptionA" /> <?php echo $OptionA;?></td> <td width="50%"><input type="radio" name="RadioGroup<?php echo
$i;?>" value="<?php echo $OptionC;?>" id="OptionC" /> <?php echo $OptionC;?></td>
</tr> <tr> <td height="32" width="50%"><input type="radio"
name="RadioGroup<?php echo $i;?>" value="<?php echo $OptionB;?>" id="OptionB" /> <?php echo $OptionB;?></td>
<td width="50%"><input type="radio" name="RadioGroup<?php echo $i;?>" value="<?php echo $OptionD;?>" id="OptionD" /> <?php echo $OptionD;?></td>
</tr> </table></td>
</tr> </table>
<p> <?php
$i=$i+1; } ?>
</p>
<p align="center"> </p>
<div align="center"> <?php
// Retrieve Number of records returned $records = mysql_num_rows($result); if($records!=0)
{ ?>
<input type="submit" name="button" id="button" value="Submit" /> <?php }
// Close the connection mysql_close($con);
?> <!--Display no of records within frame-->
<div style="text-align:right">
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
199 | P a g e
<wel>Total Questions : <?php echo $records;?><wel>
</div><br>
</div> </form>
<p> </p> <h1> </h1>
</div> <div id="footerline"></div>
</div>
<div id="footer"> <?php include 'footer.php'?></div> </div> </body>
</html>
7.4.3.2 Display.php :
<?php
if (!isset($_SESSION)) { session_start();
}
?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" /> <title>OST</title>
<style type="text/css"> <!--
.style1 {color: #FFFFFF} --> </style>
</head>
<body> <div id="container"> <?php
include "Header.php"; ?>
<div id="content">
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
200 | P a g e
<div id="left"> <br><wel>Welcome</wel> <usr><?php echo
$_SESSION['Name'];?></usr><br><br>
<p> <table width="100%" height="66" border="1" cellpadding="0" cellspacing="0"
bordercolor="#a8ccff"> <tr>
<th height="33" bgcolor="#00aaff"><span class="style1">No</span></th> <th bgcolor="#00aaff"><span class="style1">Question</span></th> <th bgcolor="#00aaff"><span class="style1">Your Answer</span></th>
<th bgcolor="#00aaff"><span class="style1">Correct Answer</span></th> <th bgcolor="#00aaff"><span class="style1">Score</span></th>
</tr> <?php
$SID=$_GET['Id'];
// Establish Connection with Database $con1 = mysql_connect("localhost","root"); // Select Database
mysql_select_db("ost", $con1); // Specify the query to execute
$sql1 = "SELECT * from quiz_schedule where Schedule_Id='".$SID."'"; // Execute query $result1 = mysql_query($sql1,$con1);
// Loop through each records while($row1 = mysql_fetch_array($result1))
{ $Quiz_Id=$row1['Quiz_Id']; $Semester=$row1['Semester'];
$Subject_Id=$row1['Subject_Id']; }
mysql_close($con1);
$Exam=$Quiz_Id; $Sem=$Semester; $Subject=$Subject_Id;
// Establish Connection with Database $con = mysql_connect("localhost","root");
// Select Database mysql_select_db("ost", $con); // Specify the query to execute
$sql = "SELECT * from question_master where Quiz_Id='".$Exam."' and Sem='".$Sem."' and Subject_Id='".$Subject."'";
// Execute query
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
201 | P a g e
$result = mysql_query($sql,$con); // Loop through each records
$i=1; $Score=0;
$Correct=0; $Wrong=0; while($row = mysql_fetch_array($result))
{ $Id=$row['Que_Id'];
$Question=$row['Que']; $Answer=$row['Ans'];
if (!isset($_POST['RadioGroup'.$i])) $ans1="Skip";
else $ans1 = $_POST['RadioGroup'.$i];
?> </p>
<tr height="30"> <td><?php echo $i;?></td>
<td><?php echo $Question;?></td> <td><?php echo $ans1;?></td>
<td><?php echo $Answer;?></td> <td> <?php
if ($ans1==$Answer) {
echo "5 Points"; $Score=$Score+5; $Correct=$Correct+1;
} else
{ echo "0 Points"; $Wrong=$Wrong+1;
} ?> </td>
</tr>
<p> <?php
$i=$i+1; } // Retrieve Number of records returned
$records = mysql_num_rows($result); // Close the connection
mysql_close($con);
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
202 | P a g e
?> </p>
</table> <p> </p>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#a8ccff"> <tr height="30">
<td height="24" bgcolor="#00aaff"><div align="center"><span class="style1"><strong>Total Question</strong></span></div></td>
<td bgcolor="#00aaff"><div align="center"><span class="style1"><strong>Correct Answer</strong></span></div></td> <td bgcolor="#00aaff"><div align="center"><span class="style1"><strong>Wrong
Answer</strong></span></div></td> <td bgcolor="#00aaff"><div align="center"><span class="style1"><strong>Total
Score</strong></span></div></td> </tr> <tr height="30">
<td> <div align="center"><strong>
<?php $i=$i-1; echo $i;
?> </strong></div></td>
<td><div align="center"><strong><?php echo $Correct;?></strong></div></td> <td><div align="center"><strong><?php echo $Wrong;?></strong></div></td> <td><div align="center"><strong><?php echo $Score;?></strong></div></td>
</tr> </table>
<?php $con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql = "insert into result_master (Exam_Id,Subject_Id,Student_Id,Total,Correct,Wrong,Result) values('".$Exam."','".$Subject."','".$_SESSION['ID']."','".$i."','".$Correct."','".$Wrong."','".$S
core."')"; // execute query
mysql_query ($sql,$con); // Close The Connection mysql_close ($con);
?> <!--Display no of records within frame-->
<br><br> <div style="text-align:right"> <wel>Total Questions : <?php echo
$records;?><wel> </div><br>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
203 | P a g e
</div>
<div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div> </div>
</body> </html>
7.4.4 Result.php :
<?php if (!isset($_SESSION)) {
session_start();
} ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" />
<!--paging apply--> <script src="../Js/jquery.js"></script>
<script src="../Js/paging.js"></script> <link href="../Css/paging.css" rel="stylesheet" type="text/css" />
<title>OST</title> <style type="text/css">
<!-- .style12 {font-size: small; font-weight: bold; }
.style13 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight: bold;
color: #000000; }
.style4 {font-size: small; font-weight: bold; color: #FFFFFF;
} .style5 {color: #FFFFFF}
.style6 {color: #000000}
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
204 | P a g e
--> </style>
</head>
<body> <div id="container">
<?php include "Header.php";
?> <div id="content"> <div id="left">
<br><wel>Welcome</wel> <usr><?php echo $_SESSION['Name'];?></usr><br><br>
<table id='tablepaging' class='yui' width=100%> <thead class="style3">
<tr> <th>QUIZ Type</th>
<th>Semester</th> <th>Subject</th> <th>Total</th>
<th>Correct</th> <th>Wrong</th>
<th>Score</th> </tr> </thead>
<tbody> <?php
// Establish Connection with Database $con = mysql_connect("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to execute
$sql = "SELECT result_master.Result_Id, quiz_category.Quiz_Name, subject_master.Subject_Name, result_master.Student_Id,
student_registration.RollNumber, student_registration.Name,
student_registration.Semester, result_master.Total, result_master.Correct,
result_master.Wrong, result_master.`Result` FROM result_master, quiz_category, subject_master, student_registration
WHERE result_master.Exam_Id=quiz_category.Quiz_Id AND result_master.Subject_Id=subject_master.Subject_Id AND
result_master.Student_Id=student_registration.Student_Id AND
result_master.Student_Id='".$_SESSION['ID']."' order by quiz_category.Quiz_Name ";
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
205 | P a g e
// Execute query $result = mysql_query($sql,$con);
// Loop through each records while($row = mysql_fetch_array($result))
{ $Quiz=$row['Quiz_Name']; $Sem=$row['Semester'];
$Subject=$row['Subject_Name']; $Total=$row['Total'];
$Correct=$row['Correct']; $Wrong=$row['Wrong']; $Score=$row['Result'];
?>
<tr> <td><?php echo $Quiz;?></td>
<td><?php echo $Sem;?></td> <td><?php echo $Subject;?></td>
<td><?php echo $Total;?></td> <td><?php echo $Correct;?></td> <td><?php echo $Wrong;?></td>
<td><?php echo $Score;?></td> </tr>
<?php } // Retrieve Number of records returned
$records = mysql_num_rows($result); ?>
<?php // Close the connection mysql_close($con);
?> </tbody> </table>
<div id='pageNavPosition' style='padding-top: 20px;' align='center'></div>
<script type='text/javascript'> var pager = new Pager('tablepaging', 10);
pager.init(); pager.showPageNav('pager', 'pageNavPosition'); pager.showPage(1);
</script>
<!--Display no of records within frame--> <div style="text-align:right"> <wel>Total Results : <?php echo
$records;?></wel> </div><br>
</div>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
206 | P a g e
<div id="footerline"></div>
</div>
<div id="footer"> <?php include 'footer.php'?></div> </div> </body>
</html>
7.5 style.css :
body {
background-color:#BBD9EE; color:#000000; font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px; margin: 10px 10px;
padding: 0px; } .clear{clear:both;}
* { margin: 0px;
padding: 0px; } #container {
margin: 0px auto; text-align: left;
width: 717px; } a{
font-size:12px; }
p{ margin: 15px 0px; line-height:25px;
} /********************** Header ***************************/
#header { margin: 0px 0px 0px 0px; width:711px;
height:245px; background-image:url(images/header1.jpg);
border: 3px solid #a8ccff; position:relative; }
#header ul{ background-color:#00aaff;
width:711px;
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
207 | P a g e
border-top:3px solid #a8ccff; #border: 3px solid #a8ccff;
display:block; top:215px;
position:absolute; margin: 0px 0px 0px 0px; height:22px;
padding:5px 0px 0px 0px; text-align:center;
} #header li{ display:inline;
} #header ul a{
text-decoration:none; color:#FFFFFF; margin: 0px 2px;
}
#header ul a:hover{ text-decoration:none; color:#ffffff;
border-radius:2px; background-color:#a8ccff;
padding:2px 0px 3px 0px; } #logo_w1,#logo_w2 {
font-size: 24px; font-style:italic;
color:#FFFFFF; position:absolute; }
#logo_w1{ top:15px;
left:70px; } #logo_w2{
top:44px; left:94px;
} #header_text { top:90px;
left:43px; width:230px;
position:absolute; } #header_text p{
font-size: 18px; color:#FFFFFF;
}
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
208 | P a g e
#header_text a{color:#28556b;} #header_text a:hover{color:#c77e0c;}
/********************** Content ***************************/ #content {
background-image:url(images/content_bg1.png); width:717px; }
img{ border-width:0px;
} h1{ color:#000000;
font-size:14px; margin: 20px 0px 20px 0px;
} h2{
color:#85a157; font-size:14px;
text-align:center; width:200px; margin: 10px 0px 15px 0px;
} #left {
float:left; width:428px; margin- left:27px;
padding: 0px 10px 30px 0px; display:inline;
} #left a{color:#28556b;} #left a:hover{color:#c77e0c;}
#photos a{ margin-right:14px;
} #right { float:right;
width:210px; padding: 0px 15px 15px 15px;
margin-top:10px; margin-right:10px; #border-style: #FFF 2px solid;
color:#fff; border-style:#a8ccff solid;
background-color:#ffffff; } #right a{
color:#c77e0c; }
#right a:hover{
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
209 | P a g e
color:#85a157; }
/********************** Footer ***************************/ #footerline {
clear:both; background-image:url(images/footer_bg.png); font-size:1px;
height:10px; }
#footer { width:717px; text-align:center;
padding: 20px 0px; }
.login input[type="submit"] { background-color:#333300;
height:25px; width:80px;
border:#003300; font-size:12px; font-weight:bold;
border-radius:5px 0px 5px 0px; color:#FFFFFF;
} a#lnk:link {
border-width : 1px 1px 1px 1px; text-decoration : none;
border-radius:5px; padding:3px; background-color:#BBD9EE;
font-size:large;
} a#lnk:hover {
border-width : 1px 1px 1px 1px;
text-decoration : none; border-radius:5px; padding:3px;
background-color:#00aaff; color:#ffffff;
font-size:large; }
#rna {
color:#00aaff;
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
210 | P a g e
}
div#title {
border-width : 1px 1px 1px 1px; text-decoration : none; border-radius:5px 5px 0px 0px;
padding:3px; background-color:#a8ccff;
color:#ffffff; font-size:large; width:422px;
text-align:center; }
div#rec {
border-width : 1px 1px 1px 1px;
text-decoration : none; border-radius:0px 0px 7px 7px; padding:3px;
background-color:#a8ccff; color:#ffffff;
font-size:large; width:150px; text-align:center;
float:right; }
div#prj {
border-width : 1px 1px 1px 1px;
text-decoration : none; border-radius:5px; padding:3px;
background-color:#00aaff; color:#ffffff;
font-size:large; text-align:center; }
wel
{ border-width : 1px 1px 1px 1px;
text-decoration : none; border-radius:5px;
padding:3px;
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
211 | P a g e
background-color:#a8ccff; color:#ffffff;
font-size:large; text-align:center;
width:100px; }
usr {
border-width : 1px 1px 1px 1px; text-decoration : none;
border-radius:5px; padding:3px; background-color:#00aaff;
color:#ffffff; font-size:large;
text-align:center; width:100px; color:#99FF66;
}
foot {
border-width : 1px 1px 1px 1px; text-decoration : none;
border-radius:5px; padding:3px; background-color:#00aaff;
color:#ffffff; font-size:large;
text-align:center; width:100px;
}
7.6 Header.php :
<div id="header">
<ul style=""> <b><li><a href="index.php?Concept=">Home</a></li> |
<li><a href="Concept.php?Subject=Aptitude">Aptitude</a></li> | <li><a href="Concept.php?Subject=Logical Reasoning" >Logical Reasoning</a></li> |
<li><a href="Concept.php?Subject=Verbal Ability">Verbal Ability</a></li> |
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
212 | P a g e
<li><a href="Concept.php?Subject=Genral Knowledge">GK</a></li> | <li><a href="Interview.php">Interview</a></li> |
<li><a href="user.php">Online Test</a></li> | <li><a href="Contact.php">Contact Us</a></li></b>
</ul> </div>
7.7 footer.php :
<foot>Copyright © 2014 Online Self Test. All rights reserved.</foot>
7.8 login.php :
<?php session_start();
?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head>
<body>
<?php $UserName=$_POST['txtUserName'];
$Password=$_POST['txtPassword']; $UserType=$_POST['cmbType'];
if($UserType=="Admin") {
$con = mysql_connect("localhost","root"); mysql_select_db("ost", $con);
$sql = "select * from User_Master where User_Name='".$UserName."' and User_Password='".$Password."'"; $result = mysql_query($sql,$con);
$records = mysql_num_rows($result); $row = mysql_fetch_array($result);
echo $records; if ($records==0) {
echo '<script type="text/javascript">alert("Wrong UserName or Password");window.location=\'index.php\';</script>';
header("location:index.php");
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
213 | P a g e
} else
{ $_SESSION['ID']=$row['User_Id'];
$_SESSION['Name']=$row['User_Name']; session_start(); header("location:Admin/index.php");
} mysql_close($con);
} else if ($UserType=="Faculty") {
$con = mysql_connect("localhost","root"); mysql_select_db("ost", $con);
$sql = "select * from Faculty_Master where Faculty_User='".$UserName."' and Faculty_Password='".$Password."' and Status='Active'"; $result = mysql_query($sql,$con);
$records = mysql_num_rows($result); $row = mysql_fetch_array($result);
if ($records==0) { echo '<script type="text/javascript">alert("Wrong UserName or
Password");window.location=\'index.php\';</script>'; }
else { session_start();
$_SESSION['ID']=$row['Faculty_Id']; $_SESSION['Name']=$row['Faculty_Name'];
header("location:Faculty/index.php"); } mysql_close($con);
} else if ($UserType=="Student")
{ $con = mysql_connect("localhost","root");
mysql_select_db("ost", $con); $sql = "select * from student_registration where UserName='".$UserName."' and
Password='".$Password."' and Status='Active'"; $result = mysql_query($sql,$con); $records = mysql_num_rows($result);
$row = mysql_fetch_array($result); if ($records==0)
{ echo '<script type="text/javascript">alert("Wrong UserName or Password");window.location=\'index.php\';</script>';
} else
{
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
214 | P a g e
session_start(); $_SESSION['ID']=$row['Student_Id'];
$_SESSION['Name']=$row['Name']; $_SESSION['Sem']=$row['Semester'];
header("location:Student/index.php"); } mysql_close($con);
}
//include 'Log.php'; //log($_SESSION['ID'],$_SESSION['Name'],"Login Successfully","Successful");
// Establish Connection with MYSQL $con = mysql_connect ("localhost","root"); // Select Database
mysql_select_db("ost", $con); // Specify the query to Insert Record
$sql="INSERT INTO `log_status`(`userid`, `usernm`, `process`, `date`, `time`, `status`) VALUES ('".$_SESSION['ID']."','".$_SESSION['Name']."','Login
Successfully',now(),now(),'Successful')";
// execute query mysql_query ($sql,$con); // Close The Connection
mysql_close ($con);
?>
</body> </html>
7.9 Register.php :
<?php if (!isset($_SESSION)) {
session_start();
} ?> <?php require_once('Connections/QUIZ.php'); ?>
<?php if (!function_exists("GetSQLValueString")) {
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
215 | P a g e
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{ $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break;
case "long": case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break;
case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break;
case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break; } return $theValue;
} }
mysql_select_db($database_QUIZ, $QUIZ); $query_Recordset1 = "SELECT * FROM quiz_course";
$Recordset1 = mysql_query($query_Recordset1, $QUIZ) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" />
<title>OST</title> <style type="text/css"> <!--
.style1 {font-size: small}
.style12 {font-size: small; font-weight: bold; }
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
216 | P a g e
.style4 { font-size: small; font-weight: bold;
color: #FFFFFF; }
.style5 {color: #FFFFFF}
.style6 {color: #000000}
.style9 {font-family: Verdana, Arial, Helvetica, sans-serif}
--> </style>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script> <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<!--paging apple--> <script src="../Js/jquery.js"></script>
<script src="../Js/paging.js"></script> <link href="../Css/paging.css" rel="stylesheet" type="text/css" />
<style type="text/css"> <!-- .style15 {font-size: 10pt}
--> </style>
<!--pagin odd even color--> <script>
$(document).ready(function(){
$("#tablepaging tr:odd").css("background-color","#BBD9EE"); $("#tablepaging tr:even").css("background-color","#E4F0F8"); $("th").css("background-color","#00aaff");
$("th").css("color","#ffffff"); });
</script> </head>
<body>
<div id="container"> <?php include "Header.php";
?> <div id="content">
<div id="left"> <br><wel>Welcome</wel> <usr>Guest</usr><br><br>
<div id="TabbedPanels1" class="TabbedPanels"> <ul class="TabbedPanelsTabGroup">
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
217 | P a g e
<li class="TabbedPanelsTab style1" tabindex="0"><span class="style1">Faculty | Researcher</span></li>
<li class="TabbedPanelsTab style15" tabindex="0">Student | User</li> </ul>
<div class="TabbedPanelsContentGroup"> <div class="TabbedPanelsContent"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> <td> </td>
</tr> <tr> <td><form id="form1" name="form1" method="post"
action="InsertFaculty.php"> <table width="100%" height="186" border="0" cellpadding="0"
cellspacing="0"> <tr> <td height="35">Faculty/Researcher Name:</td>
<td><span id="sprytextfield1"> <label>
<input type="text" name="txtName" id="txtName" /> </label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr> <td height="30">Email Id:</td> <td><label><span id="sprytextfield2">
<input type="text" name="txtEmail" id="txtEmail" /> <span class="textfieldRequiredMsg">A value is
required.</span></span></label></td> </tr> <tr>
<td height="29">Mobile Number:</td> <td><span id="sprytextfield3">
<label> <input type="text" name="txtMobile" id="txtMobile" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr> <td height="35">User Name:</td>
<td><span id="sprytextfield4"> <label>
<input type="text" name="txtUserName" id="txtUserName" /> </label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
218 | P a g e
<td height="33">Password:</td> <td><span id="sprytextfield5">
<label> <input type="password" name="txtPassword" id="txtPassword" />
</label> <span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td> </td> <td><label> <input type="submit" name="button" id="button" value="Submit" />
</label></td> </tr>
</table> </form></td> </tr>
</table> </div>
<div class="TabbedPanelsContent"> <form id="form1" name="form1" method="post" action="InsertStudent.php">
<table width="100%" height="259" border="0" cellpadding="0" cellspacing="0">
<tr> <td>Roll Number:</td> <td><span id="sprytextfield1">
<label> <input type="text" name="txtRoll" id="txtRoll" />
</label> <span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td>Name:</td> <td><span id="sprytextfield2"> <label>
<input type="text" name="txtName" id="txtName" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr>
<tr> <td height="30">Select Exam:</td>
<td><label> <select name="cmbExam" id="cmbExam"> <?php
do { ?>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
219 | P a g e
<option value="<?php echo $row_Recordset1['Course_Id']?>"><?php echo
$row_Recordset1['Course_Name']?></option> <?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); $rows =
mysql_num_rows($Recordset1); if($rows > 0) {
mysql_data_seek($Recordset1, 0); $row_Recordset1 = mysql_fetch_assoc($Recordset1);
} ?>
</select> </label></td> </tr>
<tr> <td height="35">Semester:</td> <td><select name="cmbSem" id="cmbSem">
<option>1</option> <option>2</option>
<option>3</option> <option>4</option> <option>5</option>
<option>6</option> </select></td>
</tr> <tr> <td height="33">Email:</td>
<td><span id="sprytextfield3"> <label>
<input type="text" name="txtEmail" id="txtEmail" /> </label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr>
<tr> <td>Mobile:</td> <td><span id="sprytextfield4">
<label> <input type="text" name="txtMobile" id="txtMobile" />
</label> <span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr> <tr>
<td>User Name:</td>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
220 | P a g e
<td><span id="sprytextfield5"> <label>
<input type="text" name="txtUserName" id="txtUserName" /> </label>
<span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr>
<tr> <td>Password:</td>
<td><span id="sprytextfield6"> <label> <input type="password" name="txtPassword" id="txtPassword" />
</label> <span class="textfieldRequiredMsg">A value is
required.</span></span></td> </tr> <tr>
<td> </td> <td><label>
<input type="submit" name="button" id="button" value="Submit" /> </label></td> </tr>
</table> </form>
</div> </div> </div>
<p> </p>
<h1> </h1> </div>
<div id="footerline"></div> </div>
<div id="footer"> <?php include 'footer.php'?></div> </div>
<script type="text/javascript"> <!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3"); var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4");
var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5"); //--> </script>
</body> </html>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
221 | P a g e
7.10 Logout.php :
<?php // *** Logout the current user. $logoutGoTo = "../index.php";
if (!isset($_SESSION)) { session_start();
} $_SESSION['MM_Username'] = NULL; $_SESSION['MM_UserGroup'] = NULL;
unset($_SESSION['MM_Username']); unset($_SESSION['MM_UserGroup']);
if ($logoutGoTo != "") {header("Location: $logoutGoTo"); exit; }
?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title>
</head> <body>
</body> </html>
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
222 | P a g e
8. PURPOSED SITE
We have tried our best to develop this project. In future we want to remove our project’s
limitation as possible.
This project through we can change record or info of anyone admin to other admin as well as remove admin.
In this we can’t provide dashboard facility or chart facilty.
If admin is login then it can change and remove itself record which are main bug but we can
continue to solved it and solved during project duration.
In this project we can’t provide time limitation for test because it’s just practice point of
view, we can add it in next improved version.
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
223 | P a g e
9. BIBLOGRAPHY
To Complete this project we have taken references from the below :
Books :
o PHP 4.0
o Beginners of PHP
o Advanced PHP
Web Sites :
o www.tutorialpoints.com
o www.w3schools.com o www.sourcecodes.com
SUNSHINE GROUP OF INSTITUTION ONLINE SELF TEST
224 | P a g e
10. CONCLUSION
Using our project any user/student can practice his/her entrance and semester term
exam and give test for give improved performance. Faculty / Researcher can Issue
Paper / Test for User / Student. Anyone visitors can upload interview / placement
paper. Admin can manage and maintains all things about faculty, student and exam
process and schedule.
Recommended