SlideShare a Scribd company logo
1 of 521
Caveats and Warnings: Make certain that all work is your own
work. You may use lectures, the book, the videos or other
materials, but you will need to cite any information you use that
is not your personal opinion. Cite any sources by simply
referring to the source within parentheses at the point you cite
it. Do not copy material from websites, other papers or other
resources unless it is a short quote with a citation. If you refer
to material from lectures, simply refer to the lecture by number
(e.g., Lecture 2b). If you refer to the book, you can refer to the
page number (e.g., Hanson, pg. 127), or, if from an assigned
video, simply refer to the video (e.g., as in "The Day We
Learned to Think"). If you cite something from outside of class
materials, provide the last name of the author in parentheses,
and provide a full citation at the bottom of the page. So, for an
outside source, it would be: your text (Smith).
and at the bottom of the page, something like:
Smith,
Arnold. http://yahoo.com/news/informationrelevantto1101exam
(Links to an external site.)
You may follow any format style with which you are familiar,
as long as you provide enough information for us to track down
a source if needed.
For each question write no more than a full page length, Single
Spaced, size 12 Times New Roman font.
Course Reading: Mass communication: Living in a media
world (5th edition). Washington, DC: CQ Press
Here are the questions:
1. Early in the class, we said that “communication and society
are inter-dependent.” Explain what the phrase means, then use
an example from lecture, assigned videos, or the book to help
you illustrate that meaning.
Hint: In your answer, you will need to provide a verbal
explanation that explains why this is true. In your example,
make certain that you explain how the example applies. To test
how well your example does, see if all of the information you
identified in your verbal explanation is covered by the example.
2. In class we talked about how both newspapers and motion
pictures developed amid serious objections from one or more
segments of society. Compare and contrast the development and
history of motion pictures in regard to regulation. Use
examples to clarify your answer. Describe how the history, to
the present day, of the newspaper and motion picture industries
has been affected by these early differences.
Hint: Make certain you indicate which aspects of society (e.g.,
government, the public, regulatory agencies) were involved in
the regulation of the two media, how they exerted pressures,
and how the pressure was relieved through regulatory
mechanisms or regulatory bodies. Then indicate how regulation
of the two industries has worked since those early days
3. Explain how the Camera Obscura and Magic Lantern led
eventually to the development of the synchronous mass
audience.
Hint: For this answer, first you’ll need to define the terms
related to audiences, then you’ll need to trace the Camera
Obscura and the Magic Lantern history from their invention to
commercial ventures, so that you can explain the audience’s
relationship with the technology, and explain how the audience
formed around these two technologies and their successors to
arrive at the synchronous mass audience.
oexam/admin/admwelcome.php
<?php
error_reporting(0);
session_start();
if(!isset($_SESSION['admname'])){
$_GLOBALS['message']="Session Timeout.Click here
to <a href="index.php">Log In</a>";
}
else if(isset($_REQUEST['logout'])){
unset($_SESSION['admname']);
$_GLOBALS['message']="Loggged Out.";
header('Location: index.php');
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Admin Home</title>
<link rel="stylesheet" type="text/css" href="../oes.css"/>
</head>
<body>
<?php
if($_GLOBALS['message'])
{
echo "<div
class="message">".$_GLOBALS['message']."</div>";
}
?>
<div class="container">
<header>
<a href="#"><img src="../images/examlogo.png" alt="Insert
Logo Here" width="200" height="90" id="Insert_logo"
style="background-color: #FFFFFF; display:block;" /></a>
</header>
<div class="sidebar1">
<form name="admwelcome" action="admwelcome.php"
method="post">
<?php if(isset($_SESSION['admname'])){ ?>
<ul class="nav">
<li><input type="submit" value="Log Out"
name="logout" class="linkbutn" title="CAREFUL !! Log
Out"/></li>
</ul>
<?php } ?>
</form>
<aside>
<p>
Use this page to do administrative work.
</p>
</aside>
<!-- end .sidebar1 --></div>
<article class="content">
<section>
<h1>Admin Home</h1>
<p>
<div id="content">
<?php if(isset($_SESSION['admname'])){ ?>
<table class="hometable" cellspacing="0">
<tr>
<td width="20"> <p title="Manage Users">
<a href="usermng.php"><img
src="../images/manageusers.png" name="imags" height="120"
width="200" /></a> </p>
<p><a href="usermng.php">Manage Students</a></p></td>
<td> <p title="Manage Examiners">
<a href="tcmng.php"><img
src="../images/managexaminer.png" name="imags"
height="120" width="200" /></a></p>
<p><a href="tcmng.php">Manage Examiners</a></p></td>
<td> <p title="Manage Subjects">
<a href="submng.php"><img
src="../images/managesubjects.png" name="imags"
height="120" width="200" /></a></p>
<p><a href="tcmng.php">Manage Subjects</a></p></td>
</tr>
</table>
<?php }?>
</div>
</p>
</section>
<!-- end .content --></article>
<!-- end .container --></div>
</body>
</html>
oexam/admin/index.php
<?php
error_reporting(0);
session_start();
include_once '../oesdb.php';
if(isset($_REQUEST['admsubmit']))
{
$result=executeQuery("select * from adminlogin where
admname='".htmlspecialchars($_REQUEST['name'],ENT_QUO
TES)."' and
admpassword='".md5(htmlspecialchars($_REQUEST['password'
],ENT_QUOTES))."'");
// $result=mysql_query("select * from adminlogin where
admname='".htmlspecialchars($_REQUEST['name'])."' and
admpassword='".md5(htmlspecialchars($_REQUEST['password'
]))."'");
if(mysql_num_rows($result)>0)
{
$r=mysql_fetch_array($result);
if(strcmp($r['admpassword'],md5(htmlspecialchars($_REQUES
T['password'],ENT_QUOTES)))==0)
{
$_SESSION['admname']=htmlspecialchars_decode($r['admname
'],ENT_QUOTES);
unset($_GLOBALS['message']);
header('Location: admwelcome.php');
}else
{
$_GLOBALS['message']="Check Your user name and
Password.";
}
}
else
{
$_GLOBALS['message']="Check Your user name and
Password.";
}
closedb();
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Admin Log In </title>
<link rel="stylesheet" type="text/css" href="../oes.css"/>
<script type="text/javascript" src="../validate.js" ></script>
</head>
<body>
<?php
if($_GLOBALS['message'])
{
echo "<div
class="message">".$_GLOBALS['message']."</div>";
}
?>
<div class="container">
<header>
<a href="#"><img src="../images/examlogo.png" alt="Insert
Logo Here" width="200" height="90" id="Insert_logo"
style="background-color: #FFFFFF; display:block;" /></a>
</header>
<div class="sidebar1">
<ul class="nav">
<li><a href="../index.php" title="Click here to
Register">Home</a></li>
</ul>
<aside>
<p>
This page allows you to login as the admin.
</p>
</aside>
<!-- end .sidebar1 --></div>
<article class="content">
<section>
<h1>Admin Login</h1>
<p>
<div id="content">
<table class="loginf">
<form id="indexform" action="index.php"
method="post">
<tr>
<td> Username </td>
<td><input type="text" name="name" tabindex="1"
value="" placeholder="Username" /></td>
</tr>
<tr>
<td> Password </td><td><input type="password"
name="password" value="" placeholder="Password" /></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="admsubmit"
value="Log In" /></td>
</tr>
</form>
</table>
</div>
</p>
</section>
<!-- end .content --></article>
<!-- end .container --></div>
</body>
</html>
oexam/admin/rsltmng.php
<?php
error_reporting(0);
session_start();
include_once '../oesdb.php';
if(!isset($_SESSION['admname'])) {
$_GLOBALS['message']="Session Timeout.Click here to <a
href="index.php">Log In</a>";
}
else if(isset($_REQUEST['logout'])) {
//Log out and redirect login page
unset($_SESSION['admname']);
header('Location: index.php');
}
else if(isset($_REQUEST['dashboard'])) {
//redirect to home
header('Location: admwelcome.php');
}
else if(isset($_REQUEST['back'])) {
//redirect to Result Management
header('Location: rsltmng.php');
}
?>
<html>
<head>
<title>Manage Results</title>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="../oes.css"/>
<script type="text/javascript" src="../validate.js"
></script>
</head>
<body>
<?php
if (isset($_GLOBALS['message'])) {
echo "<div class="message">" . $_GLOBALS['message'] .
"</div>";
}
?>
<div class="container">
<header>
<a href="#"><img src="../images/examlogo.png" alt="Insert
Logo Here" width="200" height="90" id="Insert_logo"
style="background-color: #FFFFFF; display:block;" /></a>
</header>
<form name="rsltmng" action="rsltmng.php"
method="post">
<?php if (isset($_SESSION['admname'])) { ?>
<div class="sidebar1">
<ul class="nav">
<?php if(isset($_REQUEST['testid'])) { ?>
<li><input type="submit" value="Back"
name="back" title="Manage Results"/></li>
<?php }else { ?>
<li><input type="submit" value="Home"
name="dashboard" title="Home"/></li>
<?php } ?>
<!-- For default add or delete functions-->
<li><input type="submit" value="Add New"
name="add" title="Add new records"/></li>
<li><input type="submit" value="Delete Selected"
name="delete" title="Delete Selected records"/></li>
<!-- log out function-->
<li><input type="submit" value="Log out"
name="logout" title="CAREFUL !! Log Out"/></li>
</ul>
<aside>
<p> Use this page to perform administrative duties on results
data.</p>
</aside>
<!-- end .sidebar1 --></div>
<?php } ?>
<article class="content">
<section>
<h1>Manage Results</h1>
<p>
<div id="content">
<?php if(isset($_REQUEST['testid'])) {
// Defualt Mode: Displays the Detailed Test Results.
$result=executeQuery("select
t.testname,DATE_FORMAT(t.testfrom,'%d %M %Y') as
fromdate,DATE_FORMAT(t.testto,'%d %M %Y %H:%i:%S') as
todate,sub.subname,IFNULL((select sum(marks) from question
where testid=".$_REQUEST['testid']."),0) as maxmarks from
test as t, subject as sub where sub.subid=t.subid and
t.testid=".$_REQUEST['testid'].";") ;
if(mysql_num_rows($result)!=0) {
$r=mysql_fetch_array($result);
?>
<table class="loginf">
<tr>
<td colspan="2"><h3
style="color:#0000cc;text-align:center;">Test
Summary</h3></td>
</tr>
<tr>
<td colspan="2" ><hr
style="color:#ff0000;border-width:4px;"/></td>
</tr>
<tr>
<td>Test Name</td>
<td><?php echo
htmlspecialchars_decode($r['testname'],ENT_QUOTES);
?></td>
</tr>
<tr>
<td>Subject Name</td>
<td><?php echo
htmlspecialchars_decode($r['subname'],ENT_QUOTES);
?></td>
</tr>
<tr>
<td>Validity</td>
<td><?php echo $r['fromdate']." To
".$r['todate']; ?></td>
</tr>
<tr>
<td>Max. Marks</td>
<td><?php echo $r['maxmarks']; ?></td>
</tr>
<tr><td colspan="2"><hr
style="color:#ff0000;border-width:2px;"/></td></tr>
<tr>
<td colspan="2"><h3
style="color:#0000cc;text-align:center;">Attempted
Students</h3></td>
</tr>
<tr>
<td colspan="2" ><hr
style="color:#ff0000;border-width:4px;"/></td>
</tr>
</table>
<?php
$result1=executeQuery("select
s.stdname,s.emailid,IFNULL((select sum(q.marks) from
studentquestion as sq,question as q where q.qnid=sq.qnid and
sq.testid=".$_REQUEST['testid']." and sq.stdid=st.stdid and
sq.stdanswer=q.correctanswer),0) as om from studenttest as st,
student as s where s.stdid=st.stdid and
st.testid=".$_REQUEST['testid'].";" );
if(mysql_num_rows($result1)==0) {
echo"<h3 style="color:#0000cc;text-
align:center;">No Students Yet Attempted this Test!</h3>";
}
else {
?>
<table cellpadding="30" cellspacing="10"
class="datatable">
<tr>
<th>Student Name</th>
<th>Email-ID</th>
<th>Obtained Marks</th>
<th>Result(%)</th>
</tr>
<?php
while($r1=mysql_fetch_array($result1)) {
?>
<tr>
<td><?php echo
htmlspecialchars_decode($r1['stdname'],ENT_QUOTES);
?></td>
<td><?php echo
htmlspecialchars_decode($r1['emailid'],ENT_QUOTES);
?></td>
<td><?php echo $r1['om']; ?></td>
<td><?php echo
($r1['om']/$r['maxmarks']*100)." %"; ?></td>
</tr>
<?php
}
}
}
else {
echo"<h3 style="color:#0000cc;text-
align:center;">Something went wrong. Please logout and Try
again.</h3>";
}
?>
</table>
<?php } else {
// Defualt Mode: Displays the Test Results.
$result=executeQuery("select
t.testid,t.testname,DATE_FORMAT(t.testfrom,'%d %M %Y') as
fromdate,DATE_FORMAT(t.testto,'%d %M %Y %H:%i:%S') as
todate,sub.subname,(select count(stdid) from studenttest where
testid=t.testid) as attemptedstudents from test as t, subject as
sub where sub.subid=t.subid;");
if(mysql_num_rows($result)==0) {
echo "<h3 style="color:#0000cc;text-
align:center;">No Tests Yet...!</h3>";
}
else {
$i=0;
?>
<table cellpadding="30" cellspacing="10"
class="datatable">
<tr>
<th>Test Name</th>
<th>Validity</th>
<th>Subject Name</th>
<th>Attempted Students</th>
<th>Details</th>
</tr>
<?php
while($r=mysql_fetch_array($result)) {
$i=$i+1;
if($i%2==0) {
echo "<tr class="alt">";
}
else { echo "<tr>";}
echo
"<td>".htmlspecialchars_decode($r['testname'],ENT_QUOTES).
"</td><td>".$r['fromdate']." To ".$r['todate']." PM </td>"
."<td>".htmlspecialchars_decode($r['subname'],ENT_QUOTES)
."</td><td>".$r['attemptedstudents']."</td>"
."<td class="tddata"><a
title="Details"
href="rsltmng.php?testid=".$r['testid'].""><img
src="../images/detail.png" height="30" width="40"
alt="Details" /></a></td></tr>";
}
?>
</table>
<?php } } closedb();
} ?>
</div>
</form>
</div>
</body>
</html>
oexam/admin/submng.php
<?php
error_reporting(0);
session_start();
include_once '../oesdb.php';
if (!isset($_SESSION['admname'])) {
$_GLOBALS['message'] = "Session Timeout.Click here to <a
href="index.php">Log In</a>";
} else if (isset($_REQUEST['logout'])) {
//Log out and redirect login page
unset($_SESSION['admname']);
header('Location: index.php');
} else if (isset($_REQUEST['dashboard'])) {
//redirect to home
header('Location: admwelcome.php');
} else if (isset($_REQUEST['delete'])) {
//delete selected subjects
unset($_REQUEST['delete']);
$hasvar = false;
foreach ($_REQUEST as $variable) {
if (is_numeric($variable)) { //some session values are also
passed with request
$hasvar = true;
if ([email protected]("delete from subject where
subid=$variable")) {
if (mysql_errno () == 1451) //Children are dependent
value
$_GLOBALS['message'] = "System will not allow
propagated deletions.<br/><b>Help:</b> If you still want to
delete this subject, manually delete all the records that are
dependent on it first.";
else
$_GLOBALS['message'] = mysql_errno();
}
}
}
if (!isset($_GLOBALS['message']) && $hasvar == true)
$_GLOBALS['message'] = "Selected subjects deleted";
else if (!$hasvar) {
$_GLOBALS['message'] = "Select the subjects to delete.";
}
} else if (isset($_REQUEST['savem'])) {
//updating the modified values
if (empty($_REQUEST['subname']) ||
empty($_REQUEST['subdesc'])) {
$_GLOBALS['message'] = "Some fields are empty.No
updates made.";
} else {
$query = "update subject set subname='" .
htmlspecialchars($_REQUEST['subname'], ENT_QUOTES) . "',
subdesc='" . htmlspecialchars($_REQUEST['subdesc'],
ENT_QUOTES) . "'where subid=" . $_REQUEST['subject'] . ";";
if ([email protected]($query))
$_GLOBALS['message'] = mysql_error();
else
$_GLOBALS['message'] = "Subject information
updated.";
}
closedb();
}
else if (isset($_REQUEST['savea'])) {
//Add the new subject information to db
$result = executeQuery("select max(subid) as sub from
subject");
$r = mysql_fetch_array($result);
if (is_null($r['sub']))
$newstd = 1;
else
$newstd=$r['sub'] + 1;
$result = executeQuery("select subname as sub from subject
where subname='" . htmlspecialchars($_REQUEST['subname'],
ENT_QUOTES) . "';");
// $_GLOBALS['message']=$newstd;
if (empty($_REQUEST['subname']) ||
empty($_REQUEST['subdesc'])) {
$_GLOBALS['message'] = "Some required fields are
empty";
} else if (mysql_num_rows($result) > 0) {
$_GLOBALS['message'] = "Subject already exists.";
} else {
$query = "insert into subject values($newstd,'" .
htmlspecialchars($_REQUEST['subname'], ENT_QUOTES) .
"','" . htmlspecialchars($_REQUEST['subdesc'], ENT_QUOTES)
. "',NULL)";
if ([email protected]($query)) {
if (mysql_errno () == 1062) //duplicate value
$_GLOBALS['message'] = "The subject name
voilates some constraints, try another name.";
else
$_GLOBALS['message'] = mysql_error();
}
else
$_GLOBALS['message'] = "Subject created.";
}
closedb();
}
?>
<html>
<head>
<title>Manage subjects</title>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="../oes.css"/>
<script type="text/javascript" src="../validate.js"
></script>
</head>
<body>
<?php
if (isset($_GLOBALS['message'])) {
echo "<div class="message">" . $_GLOBALS['message'] .
"</div>";
}
?>
<div class="container">
<header>
<a href="#"><img src="../images/examlogo.png" alt="Insert
Logo Here" width="200" height="90" id="Insert_logo"
style="background-color: #FFFFFF; display:block;" /></a>
</header>
<form name="submng" action="submng.php" method="post">
<?php if (isset($_SESSION['admname'])) { ?>
<div class="sidebar1">
<ul class="nav">
<li><input type="submit" value="Home"
name="dashboard" title="Home"/></li>
<!-- For default add or delete functions-->
<li><input type="submit" value="Add New"
name="add" title="Add new subjects"/></li>
<!-- log out function-->
<li><input type="submit" value="Log out"
name="logout" title="CAREFUL !! Log Out"/></li>
</ul>
<aside>
<p>
Use this page to do administrative work such subjects.
</p>
</aside>
<!-- end .sidebar1 --></div>
<?php } ?>
<article class="content">
<section>
<h1>Manage subjects</h1>
<p>
<div id="content">
<?php
if (isset($_SESSION['admname'])) { if
(isset($_REQUEST['add'])) { ?>
<!--Form for the new subject-->
<table class="loginf" >
<tr> <td>Subject Name</td>
<td><input type="text" name="subname" value=""
size="16" onKeyUp="isalphanum(this)"
onBlur="if(this.value==''){alert('Subject Name is
Empty');this.focus();this.value='';}"/></td>
</tr>
<tr> <td>Subject Description</td>
<td><textarea name="subdesc" cols="20" rows="3"
onBlur="if(this.value==''){alert('Subject Description is
Empty');this.focus();this.value='';}"></textarea></td>
</tr>
<!--For Add option-->
<?php if (isset($_REQUEST['add'])) { ?>
<tr>
<td> <input type="submit" value="Cancel"
name="cancel" class="subbtn" title="Cancel"/></td>
<td><input type="submit" value="Save" name="savea"
class="subbtn" onClick="validatesubform('submng')"
title="Save"/></td> </tr>
<?php } ?>
</table>
<?php } else if (isset($_REQUEST['edit'])) {
//Edit existing subjects and their details.
$result = executeQuery("select subid,subname,subdesc
from subject where subname='" .
htmlspecialchars($_REQUEST['edit'], ENT_QUOTES) . "';");
if (mysql_num_rows($result) == 0) {
header('submng.php');
} else if ($r = mysql_fetch_array($result)) {
//editing components
?>
<table class="loginf">
<tr>
<td>Subject Name</td>
<td><input type="text" name="subname" value="<?php
echo htmlspecialchars_decode($r['subname'], ENT_QUOTES);
?>" size="16" onKeyUp="isalphanum(this)"/></td>
</tr>
<tr>
<td>Subject Description</td>
<td><textarea name="subdesc" cols="20" rows="3"><?php
echo htmlspecialchars_decode($r['subdesc'], ENT_QUOTES);
?></textarea><input type="hidden" name="subject"
value="<?php echo $r['subid']; ?>"/></td>
</tr>
<!--For Edit option-->
<?php } if (isset($_REQUEST['edit'])) { ?>
<tr>
<td><input type="submit" value="Cancel" name="cancel"
class="subbtn" title="Cancel"/></td>
<td><input type="submit" value="Save" name="savem"
class="subbtn" onClick="validatesubform('submng')"
title="Save"/></td>
</tr>
</table>
<?php closedb(); }
} else {
// Default : displays existing subjects.
$result = executeQuery("select * from subject order
by subid;");
if (mysql_num_rows($result) == 0) {
echo "<h3 style="color:#0000cc;text-
align:center;">No Subjets Yet..!</h3>";
} else {
$i = 0;
?>
<table class="dashboards" cellspacing="10">
<tr>
<th>&nbsp;</th>
<th>Subject Name</th>
<th>Subject Description</th>
<th>Edit</th>
</tr>
<?php
while ($r = mysql_fetch_array($result)) {
$i = $i + 1;
if ($i % 2 == 0) {
echo "<tr class="alt">";
} else {
echo "<tr>";
}
echo "<td style="text-align:center;"><input
type="checkbox" name="d$i" value="" . $r['subid'] . ""
/></td><td>" . htmlspecialchars_decode($r['subname'],
ENT_QUOTES)
. "</td><td>" .
htmlspecialchars_decode($r['subdesc'], ENT_QUOTES) .
"</td>"
. "<td class="tddata"><a title="Edit " .
htmlspecialchars_decode($r['stdname'], ENT_QUOTES) .
""href="submng.php?edit=" .
htmlspecialchars_decode($r['subname'], ENT_QUOTES) .
""><img src="../images/edit.png" height="30" width="40"
alt="Edit" /></a></td></tr>";
}
?>
</table>
<?php
}
closedb();
}
}
?>
</div>
</form>
</div>
</body>
</html>
oexam/admin/tcmng.php
<?php
error_reporting(0);
session_start();
include_once '../oesdb.php';
if (!isset($_SESSION['admname'])) {
$_GLOBALS['message'] = "Session Timeout.Click here to <a
href="index.php">Log In</a>";
} else if (isset($_REQUEST['logout'])) {
//Log out and redirect login page
unset($_SESSION['admname']);
header('Location: index.php');
} else if (isset($_REQUEST['dashboard'])) {
//redirect to home
header('Location: admwelcome.php');
} else if (isset($_REQUEST['delete'])) {
//deleting the selected teachers records
unset($_REQUEST['delete']);
$hasvar = false;
foreach ($_REQUEST as $variable) {
if (is_numeric($variable)) { //some session values are also
passed with request
$hasvar = true;
if ([email protected]("delete from testconductor where
tcid=$variable")){
if (mysql_errno () == 1451) //Children are dependent
value
$_GLOBALS['message'] = "System will not allow
propagated deletions.<br/><b>Help:</b> Delete all records that
are associated with this user first.";
else
$_GLOBALS['message'] = mysql_errno();
}
//
$_GLOBALS['message']=$_GLOBALS['message'].$variable;
}
}
if (!isset($_GLOBALS['message']) && $hasvar == true)
$_GLOBALS['message'] = "Selected teacher/s records
deleted";
else if (!$hasvar) {
$_GLOBALS['message'] = "Select teacher/s records to
delete.";
}
} else if (isset($_REQUEST['savem'])) {
/* * ************************ Step 2 - Case 4
************************ */
//updating the modified values
if (empty($_REQUEST['cname']) ||
empty($_REQUEST['password']) ||
empty($_REQUEST['email'])) {
$_GLOBALS['message'] = "Some fields are empty.No
updates made.";
} else {
$query = "update testconductor set tcname='" .
htmlspecialchars($_REQUEST['cname'],ENT_QUOTES) . "',
tcpassword=ENCODE('" .
htmlspecialchars($_REQUEST['password'],ENT_QUOTES) .
"','oespass'),emailid='" .
htmlspecialchars($_REQUEST['email'],ENT_QUOTES) .
"',contactno='" .
htmlspecialchars($_REQUEST['contactno'],ENT_QUOTES) .
"',address='"
.htmlspecialchars($_REQUEST['address'],ENT_QUOTES) .
"',city='" .
htmlspecialchars($_REQUEST['city'],ENT_QUOTES) .
"',pincode='" .
htmlspecialchars($_REQUEST['pin'],ENT_QUOTES) . "' where
tcid='" . $_REQUEST['tc'] . "';";
if ([email protected]($query))
$_GLOBALS['message'] = mysql_error();
else
$_GLOBALS['message'] = "Teacher information
updated.";
}
closedb();
}
else if (isset($_REQUEST['savea'])) {
//Add the new test teacher information to the db
$result = executeQuery("select max(tcid) as tc from
testconductor");
$r = mysql_fetch_array($result);
if (is_null($r['tc']))
$newstd = 1;
else
$newstd=$r['tc'] + 1;
$result = executeQuery("select tcname as tc from
testconductor where tcname='" .
htmlspecialchars($_REQUEST['cname'],ENT_QUOTES) . "';");
if (empty($_REQUEST['cname']) ||
empty($_REQUEST['password']) ||
empty($_REQUEST['email'])) {
$_GLOBALS['message'] = "Some required fields are
empty";
} else if (mysql_num_rows($result) > 0) {
$_GLOBALS['message'] = "User already exists.";
} else {
$query = "insert into testconductor values($newstd,'" .
htmlspecialchars($_REQUEST['cname'],ENT_QUOTES) .
"',ENCODE('" .
htmlspecialchars($_REQUEST['password'],ENT_QUOTES) .
"','oespass'),'" .
htmlspecialchars($_REQUEST['email'],ENT_QUOTES) . "','" .
htmlspecialchars($_REQUEST['contactno'],ENT_QUOTES) .
"','" . htmlspecialchars($_REQUEST['address'],ENT_QUOTES)
. "','" . htmlspecialchars($_REQUEST['city'],ENT_QUOTES) .
"','" . htmlspecialchars($_REQUEST['pin'],ENT_QUOTES) .
"')";
if ([email protected]($query)) {
if(mysql_errno ()==1062) //duplicate value
$_GLOBALS['message'] = "The teacher name voilates
some constraints, try another name.";
else
$_GLOBALS['message'] = mysql_error();
}
else
$_GLOBALS['message'] = "Teacher record created.";
}
closedb();
}
?>
<html>
<head>
<title>Manage Teachers</title>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="../oes.css"/>
<script type="text/javascript" src="../validate.js"
></script>
</head>
<body>
<?php
if (isset($_GLOBALS['message'])) {
echo "<div class="message">" . $_GLOBALS['message'] .
"</div>";
}
?>
<div class="container">
<header>
<a href="#"><img src="../images/examlogo.png" alt="Insert
Logo Here" width="200" height="90" id="Insert_logo"
style="background-color: #FFFFFF; display:block;" /></a>
</header>
<form name="tcmng" action="tcmng.php" method="post">
<?php if (isset($_SESSION['admname'])) { ?>
<div class="sidebar1">
<ul class="nav">
<li><input type="submit" value="Home"
name="dashboard" title="Home"/></li>
<!-- For default add or delete functions-->
<li><input type="submit" value="Add New"
name="add" title="Add new Examiner"/></li>
<li><input type="submit" value="Delete Selected"
name="delete" title="Delete Selected records"/></li>
<!-- log out function-->
<li><input type="submit" value="Log out"
name="logout" title="CAREFUL !! Log Out"/></li>
</ul>
<aside>
<p> Use this page to perform administrative duties on
teachers data. You can edit teachers data where changes are
required.</p>
</aside>
<!-- end .sidebar1 --></div>
<?php } ?>
<article class="content">
<section>
<h1>Manage Examiners</h1>
<p>
<div id="content">
<?php
if (isset($_SESSION['admname'])) { if
(isset($_REQUEST['add'])) { ?>
<!--Form for the new teacher-->
<table class="loginf" >
<tr>
<td>Username</td>
<td><input type="text" name="cname" value=""
size="16" onKeyUp="isalphanum(this)"/></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="password"
value="" size="16" onKeyUp="isalphanum(this)" /></td>
</tr>
<tr>
<td>Retype Password</td>
<td><input type="password" name="repass"
value="" size="16" onKeyUp="isalphanum(this)" /></td>
</tr>
<tr>
<td>E mail</td>
<td><input type="text" name="email" value=""
size="16" /></td>
</tr>
<tr>
<td>Phone No</td>
<td><input type="number" pattern=".{9}"
maxlength="12" required title="Enter enough digits"
name="contactno" value="" size="16"
onKeyUp="isnum(this)"/></td>
</tr>
<tr>
<td>Address</td>
<td><textarea name="address" cols="20"
rows="3"></textarea></td>
</tr>
<tr>
<td>Town</td>
<td><input type="text" name="city" value=""
size="16" onKeyUp="isalpha(this)"/></td>
</tr>
<tr>
<td>PIN No</td>
<td><input type="text" name="pin" value=""
size="16" onKeyUp="isnum(this)" /></td>
</tr>
<!--For Add option-->
<?php if (isset($_REQUEST['add'])) { ?>
<tr>
<td><input type="submit" value="Cancel" name="cancel"
class="subbtn" title="Cancel"/></td>
<td><input type="submit" value="Save" name="savea"
class="subbtn" onClick="validateform('usermng')"
title="Save"/></td>
</tr>
<?php } ?>
</table>
<?php } else if (isset($_REQUEST['edit'])) {
//Edit existing teacher information
$result = executeQuery("select
tcid,tcname,DECODE(tcpassword,'oespass') as tcpass
,emailid,contactno,address,city,pincode from testconductor
where tcname='" .
htmlspecialchars($_REQUEST['edit'],ENT_QUOTES) . "';");
if (mysql_num_rows($result) == 0) {
header('Location: tcmng.php');
} else if ($r = mysql_fetch_array($result)) {
//editing components
?>
<!--Form to edit existing teachers-->
<table class="loginf">
<tr>
<td>Username</td>
<td><input type="text" name="cname" value="<?php
echo htmlspecialchars_decode($r['tcname'],ENT_QUOTES); ?>"
size="16" onKeyUp="isalphanum(this)"/></td>
</tr>
<tr>
<td>Password</td>
<td><input type="text" name="password" value="<?php
echo htmlspecialchars_decode($r['tcpass'],ENT_QUOTES); ?>"
size="16" onKeyUp="isalphanum(this)" /></td>
</tr>
<tr>
<td>E mail</td>
<td><input type="text" name="email" value="<?php echo
htmlspecialchars_decode($r['emailid'],ENT_QUOTES); ?>"
size="16" /></td>
</tr>
<tr>
<td>Phone No</td>
<td><input type="text" name="contactno" value="<?php
echo htmlspecialchars_decode($r['contactno'],ENT_QUOTES);
?>" size="16" onKeyUp="isnum(this)"/></td>
</tr>
<tr>
<td>Address</td>
<td><textarea name="address" cols="20" rows="3"><?php
echo htmlspecialchars_decode($r['address'],ENT_QUOTES);
?></textarea></td>
</tr>
<tr>
<td>Town</td>
<td><input type="text" name="city" value="<?php
echo htmlspecialchars_decode($r['city'],ENT_QUOTES); ?>"
size="16" onKeyUp="isalpha(this)"/></td>
</tr>
<tr>
<td>PIN Code</td>
<td><input type="hidden" name="tc" value="<?php echo
htmlspecialchars_decode($r['tcid'],ENT_QUOTES); ?>"/><input
type="text" name="pin" value="<?php echo
htmlspecialchars_decode($r['pincode'],ENT_QUOTES); ?>"
size="16" onKeyUp="isnum(this)" /></td>
</tr>
<!--For Edit option-->
<?php } else if (isset($_REQUEST['edit'])) { ?>
<tr>
<td><input type="submit" value="Cancel" name="cancel"
class="subbtn" title="Cancel"/></td>
<td><input type="submit" value="Save" name="savem"
class="subbtn" onClick="validateform('usermng')"
title="Save"/></td>
</tr>
</table>
<?php closedb(); }
} else {
// Default: displays the existing teachers.
$result = executeQuery("select * from
testconductor order by tcid;");
if (mysql_num_rows($result) == 0) {
echo "<h3 style="color:#0000cc;text-
align:center;">No Test Conductors Yet..!</h3>";
} else {
$i = 0;
?>
<table class="dashboards" cellspacing="10">
<tr>
<th>&nbsp;</th>
<th>Teacher name</th>
<th>Email-ID</th>
<th>Contact Number</th>
<th>Edit</th>
</tr>
<?php
while ($r = mysql_fetch_array($result)) {
$i = $i + 1;
if ($i % 2 == 0)
echo "<tr class="alt">";
else
echo "<tr>";
echo "<td style="text-
align:center;"><input type="checkbox" name="d$i"
value="" . $r['tcid'] . "" /></td><td>" .
htmlspecialchars_decode($r['tcname'],ENT_QUOTES)
. "</td><td>" .
htmlspecialchars_decode($r['emailid'],ENT_QUOTES) .
"</td><td>" .
htmlspecialchars_decode($r['contactno'],ENT_QUOTES) .
"</td>"
. "<td class="tddata"><a title="Edit " .
htmlspecialchars_decode($r['tcname'],ENT_QUOTES) .
""href="tcmng.php?edit=" .
htmlspecialchars_decode($r['tcname'],ENT_QUOTES) .
""><img src="../images/edit.png" height="30" width="40"
alt="Edit" /></a></td></tr>";
}
?>
</table>
<?php } closedb();
}
}
?>
</div>
</form>
</div>
</body>
</html>
oexam/admin/testmng.php
<?php
error_reporting(0);
session_start();
include_once '../oesdb.php';
if (!isset($_SESSION['admname'])) {
$_GLOBALS['message'] = "Session Timeout.Click here to <a
href="index.php">Log In</a>";
} else if (isset($_REQUEST['logout'])) {
//Log out and redirect login page
unset($_SESSION['admname']);
header('Location: index.php');
} else if (isset($_REQUEST['dashboard'])) {
//redirect to home
header('Location: admwelcome.php');
} else if (isset($_REQUEST['delete'])) {
//deleting the selected tests
unset($_REQUEST['delete']);
$hasvar = false;
foreach ($_REQUEST as $variable) {
if (is_numeric($variable)) { //some session values are also
passed with request
$hasvar = true;
if ([email protected]("delete from test where
testid=$variable")) {
if (mysql_errno () == 1451) //Children are dependent
value
$_GLOBALS['message'] = "System will not allow
propagated deletions.<br/><b>Help:</b> If you still want to
delete this test, manually delete all the records that are
associated with this test first.";
else
$_GLOBALS['message'] = mysql_errno();
}
}
}
if (!isset($_GLOBALS['message']) && $hasvar == true)
$_GLOBALS['message'] = "Selected test/s deleted";
else if (!$hasvar) {
$_GLOBALS['message'] = "First select the test/s to
delete.";
}
} else if (isset($_REQUEST['savem'])) {
//update modified values
$fromtime = $_REQUEST['testfrom'] . " " . date("H:i:s");
$totime = $_REQUEST['testto'] . " 23:59:59";
$_GLOBALS['message'] = strtotime($totime) . " " .
strtotime($fromtime) . " " . time();
if (strtotime($fromtime) > strtotime($totime) ||
strtotime($totime) < time())
$_GLOBALS['message'] = "Start date of test is less than
end date or last date of test is less than today's date.<br/>No
updates made";
else if (empty($_REQUEST['testname']) ||
empty($_REQUEST['testdesc']) ||
empty($_REQUEST['totalqn']) ||
empty($_REQUEST['duration']) ||
empty($_REQUEST['testfrom']) || empty($_REQUEST['testto'])
|| empty($_REQUEST['testcode'])) {
$_GLOBALS['message'] = "Some fields are empty.No
updates made";
} else {
$query = "update test set testname='" .
htmlspecialchars($_REQUEST['testname'], ENT_QUOTES) .
"',testdesc='" . htmlspecialchars($_REQUEST['testdesc'],
ENT_QUOTES) . "',subid=" .
htmlspecialchars($_REQUEST['subject'], ENT_QUOTES) .
",testfrom='" . $fromtime . "',testto='" . $totime . "',duration=" .
htmlspecialchars($_REQUEST['duration'], ENT_QUOTES) .
",totalquestions=" . htmlspecialchars($_REQUEST['totalqn'],
ENT_QUOTES) . ",testcode=ENCODE('" .
htmlspecialchars($_REQUEST['testcode'], ENT_QUOTES) .
"','oespass') where testid=" . $_REQUEST['testid'] . ";";
if ([email protected]($query))
$_GLOBALS['message'] = mysql_error();
else
$_GLOBALS['message'] = "Test information updated.";
}
closedb();
}
else if (isset($_REQUEST['savea'])) {
//Add the new test information in the database
$noerror = true;
$fromtime = $_REQUEST['testfrom'] . " " . date("H:i:s");
$totime = $_REQUEST['testto'] . " 23:59:59";
if (strtotime($fromtime) > strtotime($totime) ||
strtotime($fromtime) < (time() - 3600)) {
$noerror = false;
$_GLOBALS['message'] = "Start date of test is either less
than today's date or greater than last date of test.";
} else if ((strtotime($totime) - strtotime($fromtime)) <= 3600
* 24) {
$noerror = true;
$_GLOBALS['message'] = "Note:<br/>The test is valid
upto " . date(DATE_RFC850, strtotime($totime));
}
//$_GLOBALS['message']="time".date_format($first,
DATE_ATOM)."<br/>time ".date_format($second,
DATE_ATOM);
$result = executeQuery("select max(testid) as tst from test");
$r = mysql_fetch_array($result);
if (is_null($r['tst']))
$newstd = 1;
else
$newstd=$r['tst'] + 1;
// $_GLOBALS['message']=$newstd;
if (strcmp($_REQUEST['subject'], "<Choose the Subject>")
== 0 || empty($_REQUEST['testname']) ||
empty($_REQUEST['testdesc']) ||
empty($_REQUEST['totalqn']) ||
empty($_REQUEST['duration']) ||
empty($_REQUEST['testfrom']) || empty($_REQUEST['testto'])
|| empty($_REQUEST['testcode'])) {
$_GLOBALS['message'] = "Some of the required Fields
are Empty";
} else if ($noerror) {
$query = "insert into test values($newstd,'" .
htmlspecialchars($_REQUEST['testname'], ENT_QUOTES) .
"','" . htmlspecialchars($_REQUEST['testdesc'], ENT_QUOTES)
. "',(select curDate()),(select curTime())," .
htmlspecialchars($_REQUEST['subject'], ENT_QUOTES) . ",'" .
$fromtime . "','" . $totime . "'," .
htmlspecialchars($_REQUEST['duration'], ENT_QUOTES) . ","
. htmlspecialchars($_REQUEST['totalqn'], ENT_QUOTES) .
",0,ENCODE('" . htmlspecialchars($_REQUEST['testcode'],
ENT_QUOTES) . "','oespass'),NULL)";
if ([email protected]($query)) {
if (mysql_errno () == 1062) //duplicate value
$_GLOBALS['message'] = "The test name violates
some constraints, please try another name.";
else
$_GLOBALS['message'] = mysql_error();
}
else
$_GLOBALS['message'] = $_GLOBALS['message'] .
"<br/> New test created.";
}
closedb();
}
else if (isset($_REQUEST['manageqn'])) {
//Store the Test identity in session varibles and redirect to
prepare question section.
//$tempa=explode(" ",$_REQUEST['testqn']);
// $testname=substr($_REQUEST['manageqn'],0,-10);
$testname = $_REQUEST['manageqn'];
$result = executeQuery("select testid from test where
testname='" . htmlspecialchars($testname, ENT_QUOTES) .
"';");
if ($r = mysql_fetch_array($result)) {
$_SESSION['testname'] = $testname;
$_SESSION['testqn'] = $r['testid'];
// $_GLOBALS['message']=$_SESSION['testname'];
header('Location: prepqn.php');
}
}
?>
<html>
<head>
<title>Manage Tests</title>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="../oes.css"/>
<link rel="stylesheet" type="text/css" media="all"
href="../calendar/jsDatePick.css" />
<script type="text/javascript"
src="../calendar/jsDatePick.full.1.1.js"></script>
<script type="text/javascript">
window.onload = function(){
new JsDatePick({
useMode:2,
target:"testfrom"
//limitToToday:true <-- Add this should you want
to limit the calendar until today.
});
new JsDatePick({
useMode:2,
target:"testto"
//limitToToday:true <-- Add this should you want
to limit the calendar until today.
});
};
</script>
<script type="text/javascript" src="../validate.js" ></script>
</head>
<body>
<?php
if (isset($_GLOBALS['message'])) {
echo "<div class="message">" . $_GLOBALS['message'] .
"</div>";
}
?>
<div class="container">
<header>
<a href="#"><img src="../images/examlogo.png" alt="Insert
Logo Here" width="200" height="90" id="Insert_logo"
style="background-color: #FFFFFF; display:block;" /></a>
</header>
<form name="testmng" action="testmng.php" method="post">
<?php if (isset($_SESSION['admname'])) { ?>
<div class="sidebar1">
<ul class="nav">
<li><input type="submit" value="Home"
name="dashboard" title="Home"/></li>
<!-- For default add or delete functions-->
<li><input type="submit" value="Add New" name="add"
title="Add new test"/></li>
<li><input type="submit" value="Delete Selected"
name="delete" title="Delete Selected records"/></li>
<!-- log out function-->
<li><input type="submit" value="Log out"
name="logout" title="CAREFUL !! Log Out"/></li>
</ul>
<aside>
<p> Use this page to perform administrative duties on
students data.
You can edit student data where changes are required.
</p>
</aside>
<!-- end .sidebar1 --></div>
<?php } ?>
<article class="content">
<section>
<h1>Manage Tests</h1>
<p>
<div id="content">
<?php
if (isset($_SESSION['admname'])) {
// To display the Help Message
if (isset($_REQUEST['forpq']))
echo "<div class="pmsg" style="text-align:center">
Which test questions Do you want to Manage?
<br/><b>Help:</b>Click on Questions button to manage the
questions of respective tests</div>";
if (isset($_REQUEST['add'])) {
?>
<?php
if (isset($_SESSION['admname'])) { if
(isset($_REQUEST['add'])) { ?>
<!--Form for the new student-->
<table class="loginf">
<tr>
<td>Subject Name</td>
<td>
<select name="subject">
<option selected value="<Choose the
Subject>">&lt;Choose the Subject&gt;</option>
<?php
$result = executeQuery("select subid,subname from
subject;");
while ($r = mysql_fetch_array($result)) {
echo "<option value="" . $r['subid'] . "">" .
htmlspecialchars_decode($r['subname'], ENT_QUOTES) .
"</option>";
}
closedb();
?>
</select>
</td>
</tr>
<tr>
<td>Test Name</td>
<td><input type="text" name="testname"
value="" size="16" onKeyUp="isalphanum(this)" /></td>
<td><div
class="help"><b>Note:</b><br/>Test Name must be
Unique<br/> in order to identify different<br/> tests on same
subject.</div></td>
</tr>
<tr>
<td>Test Description</td>
<td><textarea name="testdesc" cols="20"
rows="3" ></textarea></td>
<td><div class="help"><b>Describe
here:</b><br/>What the test is all about?</div></td>
</tr>
<tr>
<td>Total Questions</td>
<td><input type="text" name="totalqn"
value="" size="16" onKeyUp="isnum(this)" /></td>
</tr>
<tr>
<td>Duration(Mins)</td>
<td><input type="text" name="duration"
value="" size="16" onKeyUp="isnum(this)" /></td>
</tr>
<tr>
<td>Test From </td>
<td><input id="testfrom" type="text"
name="testfrom" value="" size="16" readonly /></td>
</tr>
<tr>
<td>Test To </td>
<td><input id="testto" type="text"
name="testto" value="" size="16" readonly /></td>
</tr>
<tr>
<td>Test Secret Code</td>
<td><input type="text" name="testcode"
value="" size="16" onKeyUp="isalphanum(this)" /></td>
<td><div
class="help"><b>Note:</b><br/>Candidates must
enter<br/>this code in order to <br/> take the test</div></td>
</tr>
<!--For Add option-->
<?php if (isset($_REQUEST['add'])) { ?>
<tr>
<td> <input type="submit" value="Cancel"
name="cancel" class="subbtn" title="Cancel"/></td>
<td><input type="submit" value="Save" name="savea"
class="subbtn" onClick="validateform('testmng')"
title="Save"/></td> </tr>
<?php } ?>
</table>
<?php } else if (isset($_REQUEST['edit'])) {
// Edit existing test.
$result = executeQuery("select
t.totalquestions,t.duration,t.testid,t.testname,t.testdesc,t.subid,s.
subname,DECODE(t.testcode,'oespass') as
tcode,DATE_FORMAT(t.testfrom,'%Y-%m-%d') as
testfrom,DATE_FORMAT(t.testto,'%Y-%m-%d') as testto from
test as t,subject as s where t.subid=s.subid and t.testname='" .
htmlspecialchars($_REQUEST['edit'], ENT_QUOTES) . "';");
if (mysql_num_rows($result) == 0) {
header('Location: testmng.php');
} else if ($r = mysql_fetch_array($result)) {
//editing components
?>
<!--Form to edit existing tests-->
<table class="loginf">
<tr>
<td>Subject Name</td>
<td>
<select name="subject">
<?php
$result = executeQuery("select subid,subname from
subject;");
while ($r1 = mysql_fetch_array($result)) {
if (strcmp($r['subname'], $r1['subname']) == 0)
echo "<option value="" . $r1['subid'] . ""
selected>" . htmlspecialchars_decode($r1['subname'],
ENT_QUOTES) . "</option>";
else
echo "<option value="" . $r1['subid'] . "">" .
htmlspecialchars_decode($r1['subname'], ENT_QUOTES) .
"</option>";
}
closedb();
?>
</select>
</td>
</tr>
<tr>
<td>Test Name</td>
<td><input type="hidden" name="testid"
value="<?php echo $r['testid']; ?>"/><input type="text"
name="testname" value="<?php echo
htmlspecialchars_decode($r['testname'], ENT_QUOTES); ?>"
size="16" onKeyUp="isalphanum(this)" /></td>
<td><div
class="help"><b>Note:</b><br/>Test Name must be
Unique<br/> in order to identify different<br/> tests on same
subject.</div></td>
</tr>
<tr>
<td>Test Description</td>
<td><textarea name="testdesc" cols="20"
rows="3" ><?php echo htmlspecialchars_decode($r['testdesc'],
ENT_QUOTES); ?></textarea></td>
<td><div class="help"><b>Describe
here:</b><br/>What the test is all about?</div></td>
</tr>
<tr>
<td>Total Questions</td>
<td><input type="text" name="totalqn"
value="<?php echo
htmlspecialchars_decode($r['totalquestions'], ENT_QUOTES);
?>" size="16" onKeyUp="isnum(this)" /></td>
</tr>
<tr>
<td>Duration(Mins)</td>
<td><input type="text" name="duration"
value="<?php echo htmlspecialchars_decode($r['duration'],
ENT_QUOTES); ?>" size="16" onKeyUp="isnum(this)" /></td>
</tr>
<tr>
<td>Test From </td>
<td><input id="testfrom" type="text"
name="testfrom" value="<?php echo $r['testfrom']; ?>"
size="16" readonly /></td>
</tr>
<tr>
<td>Test To </td>
<td><input id="testto" type="text"
name="testto" value="<?php echo $r['testto']; ?>" size="16"
readonly /></td>
</tr>
<tr>
<td>Test Secret Code</td>
<td><input type="text" name="testcode"
value="<?php echo htmlspecialchars_decode($r['tcode'],
ENT_QUOTES); ?>" size="16" onKeyUp="isalphanum(this)"
/></td>
<td><div
class="help"><b>Note:</b><br/>Candidates must
enter<br/>this code in order to <br/> take the test</div></td>
</tr>
<!--For Edit option-->
<?php } if (isset($_REQUEST['edit'])) { ?>
<tr>
<td><input type="submit" value="Cancel" name="cancel"
class="subbtn" title="Cancel"/></td>
<td><input type="submit" value="Save" name="savem"
class="subbtn" onClick="validateform('testmng')"
title="Save"/></td>
</tr>
</table>
<?php closedb(); }
} else {
// Defualt Mode: Displays the Existing Test/s.
$result = executeQuery("select
t.testid,t.testname,t.testdesc,s.subname,DECODE(t.testcode,'oes
pass') as tcode,DATE_FORMAT(t.testfrom,'%d-%M-%Y') as
testfrom,DATE_FORMAT(t.testto,'%d-%M-%Y %H:%i:%s %p')
as testto from test as t,subject as s where t.subid=s.subid order
by t.testdate desc,t.testtime desc;");
if (mysql_num_rows($result) == 0) {
echo "<h3 style="color:#0000cc;text-
align:center;">No Tests Yet..!</h3>";
} else {
$i = 0;
?>
<table class="dashboards"
cellspacing="10">
<tr>
<th>&nbsp;</th>
<th>Test Description</th>
<th>Subject Name</th>
<th>Test Secret Code</th>
<th>Validity</th>
<th>Edit</th>
<th style="text-
align:center;">Manage<br/>Questions</th>
</tr>
<?php
while ($r = mysql_fetch_array($result))
{
$i = $i + 1;
if ($i % 2 == 0)
echo "<tr class="alt">";
else
echo "<tr>";
echo "<td style="text-
align:center;"><input type="checkbox" name="d$i"
value="" . $r['testid'] . "" /></td><td> " .
htmlspecialchars_decode($r['testname'], ENT_QUOTES) . " : " .
htmlspecialchars_decode($r['testdesc'], ENT_QUOTES)
. "</td><td>" .
htmlspecialchars_decode($r['subname'], ENT_QUOTES) .
"</td><td>" . htmlspecialchars_decode($r['tcode'],
ENT_QUOTES) . "</td><td>" . $r['testfrom'] . " To " .
$r['testto'] . "</td>"
. "<td class="tddata"><a
title="Edit " . htmlspecialchars_decode($r['testname'],
ENT_QUOTES) . ""href="testmng.php?edit=" .
htmlspecialchars_decode($r['testname'], ENT_QUOTES) .
""><img src="../images/edit.png" height="30" width="40"
alt="Edit" /></a></td>"
. "<td class="tddata"><a
title="Manage Questions of " .
htmlspecialchars_decode($r['testname'], ENT_QUOTES) .
""href="testmng.php?manageqn=" .
htmlspecialchars_decode($r['testname'], ENT_QUOTES) .
""><img src="../images/mngqn.png" height="30"
width="40" alt="Manage Questions" /></a></td></tr>";
}
?>
</table>
<?php
}
closedb();
}
}
?>
<?php }
} ?>
</div>
</form>
</div>
</body>
</html>
oexam/admin/usermng.php
<?php
error_reporting(0);
session_start();
include_once '../oesdb.php';
if (!isset($_SESSION['admname'])) {
$_GLOBALS['message'] = "Session Timeout.Click here to <a
href="index.php">Log In</a>";
} else if (isset($_REQUEST['logout'])) {
//Log out and redirect login page
unset($_SESSION['admname']);
header('Location: index.php');
} else if (isset($_REQUEST['dashboard'])) {
//redirect to home
header('Location: admwelcome.php');
} else if (isset($_REQUEST['tcmng'])) {
//redirect to home
header('Location: tcmng.php');
} else if (isset($_REQUEST['delete'])) {
//deleting the selected rows
unset($_REQUEST['delete']);
$hasvar = false;
foreach ($_REQUEST as $variable) {
if (is_numeric($variable)) { //some session values are also
passed with request
$hasvar = true;
if ([email protected]("delete from student where
stdid=$variable")) {
if (mysql_errno () == 1451) //Children are dependent
value
$_GLOBALS['message'] = "System will not allow
propagated deletions.<br/><b>Help:</b> If you still want to
delete this user, manually delete all the records that are
associated with this user first.";
else
$_GLOBALS['message'] = mysql_errno();
}
}
}
if (!isset($_GLOBALS['message']) && $hasvar == true)
$_GLOBALS['message'] = "Selected user/s deleted";
else if (!$hasvar) {
$_GLOBALS['message'] = "First select the users to be
deleted.";
}
} else if (isset($_REQUEST['savem'])) {
//update modified values
if (empty($_REQUEST['cname']) ||
empty($_REQUEST['password']) ||
empty($_REQUEST['email'])) {
$_GLOBALS['message'] = "Some fields are empty.No
updates made";
} else {
$query = "update student set stdname='" .
htmlspecialchars($_REQUEST['cname'], ENT_QUOTES) . "',
stdpassword=ENCODE('" .
htmlspecialchars($_REQUEST['password']) .
"','oespass'),emailid='" . htmlspecialchars($_REQUEST['email'],
ENT_QUOTES) . "',contactno='" .
htmlspecialchars($_REQUEST['contactno'], ENT_QUOTES) .
"',address='" . htmlspecialchars($_REQUEST['address'],
ENT_QUOTES) . "',city='" .
htmlspecialchars($_REQUEST['city'], ENT_QUOTES) .
"',pincode='" . htmlspecialchars($_REQUEST['pin'],
ENT_QUOTES) . "' where stdid='" .
htmlspecialchars($_REQUEST['student'], ENT_QUOTES) . "';";
if ([email protected]($query))
$_GLOBALS['message'] = mysql_error();
else
$_GLOBALS['message'] = "User information updated.";
}
closedb();
}
else if (isset($_REQUEST['savea'])) {
//Insert the user information in the database
$result = executeQuery("select max(stdid) as std from
student");
$r = mysql_fetch_array($result);
if (is_null($r['std']))
$newstd = 1;
else
$newstd=$r['std'] + 1;
$result = executeQuery("select stdname as std from student
where stdname='" . htmlspecialchars($_REQUEST['cname'],
ENT_QUOTES) . "';");
if (empty($_REQUEST['cname']) ||
empty($_REQUEST['password']) ||
empty($_REQUEST['email'])) {
$_GLOBALS['message'] = "Some of the required Fields
are Empty";
} else if (mysql_num_rows($result) > 0) {
$_GLOBALS['message'] = "User already exists.";
} else {
$query = "insert into student values($newstd,'" .
htmlspecialchars($_REQUEST['cname'], ENT_QUOTES) .
"',ENCODE('" . htmlspecialchars($_REQUEST['password'],
ENT_QUOTES) . "','oespass'),'" .
htmlspecialchars($_REQUEST['email'], ENT_QUOTES) . "','" .
htmlspecialchars($_REQUEST['contactno'], ENT_QUOTES) .
"','" . htmlspecialchars($_REQUEST['address'], ENT_QUOTES)
. "','" . htmlspecialchars($_REQUEST['city'], ENT_QUOTES) .
"','" . htmlspecialchars($_REQUEST['pin'], ENT_QUOTES) .
"')";
if ([email protected]($query)) {
if (mysql_errno () == 1062) //duplicate value
$_GLOBALS['message'] = "The username provided
voilates some constraints, please try another username.";
else
$_GLOBALS['message'] = mysql_error();
}
else
$_GLOBALS['message'] = "New user created.";
}
closedb();
}
?>
<html>
<head>
<title>Manage Students</title>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="../oes.css"/>
<script type="text/javascript" src="../validate.js"
></script>
</head>
<body>
<?php
if (isset($_GLOBALS['message'])) {
echo "<div class="message">" . $_GLOBALS['message'] .
"</div>";
}
?>
<div class="container">
<header>
<a href="#"><img src="../images/examlogo.png" alt="Insert
Logo Here" width="200" height="90" id="Insert_logo"
style="background-color: #FFFFFF; display:block;" /></a>
</header>
<form name="usermng" action="usermng.php" method="post">
<?php if (isset($_SESSION['admname'])) { ?>
<div class="sidebar1">
<ul class="nav">
<li><input type="submit" value="Home"
name="dashboard" title="Home"/></li>
<li><input type="submit" value="Teachers"
name="tcmng" title="Manage Teachers"/></li>
<!-- For default add or delete functions-->
<li><input type="submit" value="Add New" name="add"
title="Add new records"/></li>
<li><input type="submit" value="Delete Selected"
name="delete" title="Delete Selected records"/></li>
<!-- log out function-->
<li><input type="submit" value="Log out"
name="logout" title="CAREFUL !! Log Out"/></li>
</ul>
<aside>
<p> Use this page to perform administrative duties on
students data.
You can edit student data where changes are required.
</p>
</aside>
<!-- end .sidebar1 --></div>
<?php } ?>
<article class="content">
<section>
<h1>Manage Students</h1>
<p>
<div id="content">
<?php
if (isset($_SESSION['admname'])) { if
(isset($_REQUEST['add'])) { ?>
<!--Form for the new student-->
<table class="loginf">
<tr>
<td>Username</td>
<td><input type="text" name="cname" value=""
onKeyUp="isalphanum(this)"/></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="password"
value="" onKeyUp="isalphanum(this)" /></td>
</tr>
<tr>
<td>Retype Password</td>
<td><input type="password" name="repass"
value="" onKeyUp="isalphanum(this)" /></td>
</tr>
<tr>
<td>E mail</td>
<td><input type="text" name="email" value=""
/></td>
</tr>
<tr>
<td>Phone No</td>
<td><input type="text" name="contactno" value=""
onKeyUp="isnum(this)"/></td>
</tr>
<tr>
<td>Address</td>
<td><textarea name="address" cols="20"
rows="3"></textarea></td>
</tr>
<tr>
<td>Town</td>
<td><input type="text" name="city" value=""
onKeyUp="isalpha(this)"/></td>
</tr>
<tr>
<td>REG No</td>
<td><input type="text" name="pin" value=""
onKeyUp="isnum(this)" /></td>
</tr>
<!--For Add option-->
<?php if (isset($_REQUEST['add'])) { ?>
<tr>
<td> <input type="submit" value="Cancel"
name="cancel" class="subbtn" title="Cancel"/></td>
<td><input type="submit" value="Save" name="savea"
class="subbtn" onClick="validateform('usermng')"
title="Save"/></td> </tr>
<?php } ?>
</table>
<?php } else if (isset($_REQUEST['edit'])) {
//Edit existing student information
$result = executeQuery("select
stdid,stdname,DECODE(stdpassword,'oespass') as stdpass
,emailid,contactno,address,city,pincode from student where
stdname='" . htmlspecialchars($_REQUEST['edit'],
ENT_QUOTES) . "';");
if (mysql_num_rows($result) == 0) {
header('Location: usermng.php');
} else if ($r = mysql_fetch_array($result)) {
//editing components
?>
<!--Form to edit existing students-->
<table class="loginf">
<tr>
<td>Username</td>
<td><input type="text" name="cname" value="<?php echo
htmlspecialchars_decode($r['stdname'], ENT_QUOTES); ?>"
size="16" onKeyUp="isalphanum(this)"/></td>
</tr>
<tr>
<td>Password</td>
<td><input type="text" name="password" value="<?php
echo htmlspecialchars_decode($r['stdpass'], ENT_QUOTES);
?>" size="16" onKeyUp="isalphanum(this)" /></td>
</tr>
<tr>
<td>Email</td>
<td><input type="text" name="email" value="<?php echo
htmlspecialchars_decode($r['emailid'], ENT_QUOTES); ?>"
size="16" /></td>
</tr>
<tr>
<td>Phone No</td>
<td><input type="text" name="contactno" value="<?php
echo htmlspecialchars_decode($r['contactno'], ENT_QUOTES);
?>" size="16" onKeyUp="isnum(this)"/></td>
</tr>
<tr>
<td>Address</td>
<td><textarea name="address" cols="20" rows="3"><?php
echo htmlspecialchars_decode($r['address'], ENT_QUOTES);
?></textarea></td>
</tr>
<tr>
<td>Town</td>
<td><input type="text" name="city" value="<?php echo
htmlspecialchars_decode($r['city'], ENT_QUOTES); ?>"
size="16" onKeyUp="isalpha(this)"/></td>
</tr>
<tr>
<td>Reg No</td>
<td><input type="hidden" name="student" value="<?php
echo htmlspecialchars_decode($r['stdid'], ENT_QUOTES);
?>"/><input type="text" name="pin" value="<?php echo
$r['pincode']; ?>" size="16" onKeyUp="isnum(this)" /></td>
</tr>
<!--For Edit option-->
<?php } if (isset($_REQUEST['edit'])) { ?>
<tr>
<td><input type="submit" value="Cancel" name="cancel"
class="subbtn" title="Cancel"/></td>
<td><input type="submit" value="Save" name="savem"
class="subbtn" onClick="validateform('usermng')"
title="Save"/></td>
</tr>
</table>
<?php closedb(); }
} else {
// Default: displays the existing students.
$result = executeQuery("select * from student order
by stdid;");
if (mysql_num_rows($result) == 0) {
echo "<h3 style="color:#0000cc;text-
align:center;">No existing students.</h3>";
} else {
$i = 0;
?>
<table class="dashboards" cellspacing="10">
<tr>
<th>&nbsp;</th>
<th>USERNAME</th>
<th>E MAIL</th>
<th>PHONE NO</th>
<th>EDIT</th>
</tr>
<?php
while ($r = mysql_fetch_array($result)) {
$i = $i + 1;
if ($i % 2 == 0)
echo "<tr class="alt">";
else
echo "<tr>";
echo "<td style="text-align:center;"><input
type="checkbox" name="d$i" value="" . $r['stdid'] . ""
/></td><td>" . htmlspecialchars_decode($r['stdname'],
ENT_QUOTES)
. "</td><td>" .
htmlspecialchars_decode($r['emailid'], ENT_QUOTES) .
"</td><td>" . htmlspecialchars_decode($r['contactno'],
ENT_QUOTES) . "</td>"
. "<td class="tddata"><a title="Edit " .
htmlspecialchars_decode($r['stdname'], ENT_QUOTES) .
""href="usermng.php?edit=" .
htmlspecialchars_decode($r['stdname'], ENT_QUOTES) .
""><img src="../images/edit.png" height="30" width="40"
alt="Edit" /></a></td></tr>";
}
?>
</table>
<?php } closedb();
}
}
?>
</div>
</form>
</div>
</body>
</html>
oexam/calendar/example.html
JsDatePick's Javascript Calendar usage example
Look at the comments on the HTML source to fully
understand how this very simple example works.
oexam/calendar/img/aqua_dayDown.gif
oexam/calendar/img/aqua_dayNormal.gif
oexam/calendar/img/aqua_dayOver.gif
oexam/calendar/img/armygreen_dayDown.gif
oexam/calendar/img/armygreen_dayNormal.gif
oexam/calendar/img/armygreen_dayOver.gif
oexam/calendar/img/bananasplit_dayDown.gif
oexam/calendar/img/bananasplit_dayNormal.gif
oexam/calendar/img/bananasplit_dayOver.gif
oexam/calendar/img/beige_dayDown.gif
oexam/calendar/img/beige_dayNormal.gif
oexam/calendar/img/beige_dayOver.gif
oexam/calendar/img/boxBottomLeftCorner.png
oexam/calendar/img/boxBottomRightCorner.png
oexam/calendar/img/boxSideWallPx.gif
oexam/calendar/img/boxSideWallPx.png
oexam/calendar/img/boxTopLeftCorner.png
oexam/calendar/img/boxTopPx.gif
oexam/calendar/img/boxTopPx.png
oexam/calendar/img/boxTopRightCorner.png
oexam/calendar/img/closeButton_down.gif
oexam/calendar/img/closeButton_normal.gif
oexam/calendar/img/closeButton_over.gif
oexam/calendar/img/deepblue_dayDown.gif
oexam/calendar/img/deepblue_dayNormal.gif
oexam/calendar/img/deepblue_dayOver.gif
oexam/calendar/img/greenish_dayDown.gif
oexam/calendar/img/greenish_dayNormal.gif
oexam/calendar/img/greenish_dayOver.gif
oexam/calendar/img/lightgreen_dayDown.gif
oexam/calendar/img/lightgreen_dayNormal.gif
oexam/calendar/img/lightgreen_dayOver.gif
oexam/calendar/img/monthBackward_down.gif
oexam/calendar/img/monthBackward_normal.gif
oexam/calendar/img/monthBackward_over.gif
oexam/calendar/img/monthForward_down.gif
oexam/calendar/img/monthForward_normal.gif
oexam/calendar/img/monthForward_over.gif
oexam/calendar/img/ocean_blue_dayDown.gif
oexam/calendar/img/ocean_blue_dayNormal.gif
oexam/calendar/img/ocean_blue_dayOver.gif
oexam/calendar/img/orange_dayDown.gif
oexam/calendar/img/orange_dayNormal.gif
oexam/calendar/img/orange_dayOver.gif
oexam/calendar/img/peppermint_dayDown.gif
oexam/calendar/img/peppermint_dayNormal.gif
oexam/calendar/img/peppermint_dayOver.gif
oexam/calendar/img/pink_dayDown.gif
oexam/calendar/img/pink_dayNormal.gif
oexam/calendar/img/pink_dayOver.gif
oexam/calendar/img/purple_dayDown.gif
oexam/calendar/img/purple_dayNormal.gif
oexam/calendar/img/purple_dayOver.gif
oexam/calendar/img/Thumbs.db
oexam/calendar/img/torqoise_dayDown.gif
oexam/calendar/img/torqoise_dayNormal.gif
oexam/calendar/img/torqoise_dayOver.gif
oexam/calendar/img/yearBackward_down.gif
oexam/calendar/img/yearBackward_normal.gif
oexam/calendar/img/yearBackward_over.gif
oexam/calendar/img/yearForward_down.gif
oexam/calendar/img/yearForward_normal.gif
oexam/calendar/img/yearForward_over.gif
oexam/calendar/jsDatePick.css
/*
Copyright 2009 Itamar Arjuan
jsDatePick is distributed under the terms of the GNU
General Public License.
*/
.JsDatePickBox { position:relative; width:212px; font-
family:Arial; }
.JsDatePickBox .jsDatePickCloseButton { cursor:pointer;
position:absolute; z-index:1; top:1px; right:10px; width:33px;
height:13px; background:url(img/closeButton_normal.gif) left
top no-repeat; }
.JsDatePickBox .jsDatePickCloseButtonOver { cursor:pointer;
position:absolute; z-index:1; top:1px; right:10px; width:33px;
height:13px; background:url(img/closeButton_over.gif) left top
no-repeat; }
.JsDatePickBox .jsDatePickCloseButtonDown { cursor:pointer;
position:absolute; z-index:1; top:1px; right:10px; width:33px;
height:13px; background:url(img/closeButton_down.gif) left top
no-repeat; }
.JsDatePickBox .boxLeftWall { float:left; width:7px; margin:0;
padding:0; }
.JsDatePickBox .boxLeftWall .leftTopCorner{ margin:0;
padding:0; width:7px; height:8px;
background:url(img/boxTopLeftCorner.png) left top no-repeat;
overflow:hidden; }
.JsDatePickBox .boxLeftWall .leftBottomCorner{ margin:0;
padding:0; width:7px; height:8px;
background:url(img/boxBottomLeftCorner.png) left top no-
repeat; overflow:hidden; }
.JsDatePickBox .boxLeftWall .leftWall{ margin:0; padding:0;
width:7px; background:url(img/boxSideWallPx.gif) #ffffff left
top repeat-y; overflow:hidden; }
.JsDatePickBox .boxRightWall { float:left; width:7px;
margin:0; padding:0;}
.JsDatePickBox .boxRightWall .rightTopCorner{ margin:0;
padding:0; width:7px; height:8px;
background:url(img/boxTopRightCorner.png) left top no-repeat;
overflow:hidden; }
.JsDatePickBox .boxRightWall .rightBottomCorner{ margin:0;
padding:0; width:7px; height:8px;
background:url(img/boxBottomRightCorner.png) left top no-
repeat; overflow:hidden; }
.JsDatePickBox .boxRightWall .rightWall{ margin:0; padding:0;
width:7px; background:url(img/boxSideWallPx.gif) #ffffff right
top repeat-y; overflow:hidden; }
.JsDatePickBox .topWall { position:absolute; overflow:hidden;
top:0px; left:7px; width:198px; height:4px;
background:url(img/boxTopPx.gif) #ffffff left top repeat-x; }
.JsDatePickBox .bottomWall { position:absolute;
overflow:hidden; bottom:-1px; left:7px; width:198px;
height:4px; background:url(img/boxTopPx.gif) #ffffff left top
repeat-x; }
.JsDatePickBox .hiddenBoxLeftWall { float:left; width:0px;
overflow:hidden; overflow:hidden;}
.JsDatePickBox .hiddenBoxRightWall { float:left; width:0px;
overflow:hidden; overflow:hidden;}
.JsDatePickBox .boxMain { float:left; background-color:#ffffff;
margin:0; padding:15px 0 5px 0; }
.JsDatePickBox .boxMainStripped { background:#ffffff;
border:none; }
.JsDatePickBox .tooltip { height:12px; line-height:11px;
overflow:hidden; font-size:10px; color:#666666; text-align:left;
padding:0px; margin:2px 0 2px 0; }
.JsDatePickBox .weekDaysRow { height:12px; overflow:hidden;
line-height:11px; font-size:10px; color:#666666; text-
align:center; padding:0px; margin:2px 0 0 0; }
.JsDatePickBox .weekDaysRow .weekDay { float:left;
height:14px; overflow:hidden; width:24px; margin:0 5px 0 0;
padding:0; }
.JsDatePickBox .boxMainInner { background:#ffffff;
width:198px; float:left; margin:5px 0 0 0; padding:0; }
.JsDatePickBox .boxMainCellsContainer { background-
color:#ffffff; margin:0; padding:0; }
.JsDatePickBox .boxMainInner .controlsBar { overflow:hidden;
height:20px; position:relative; }
.JsDatePickBox .boxMainInner .controlsBarText {
overflow:hidden; height:20px; line-height:20px; color:#000000;
font-size:12px; text-align:center; }
.JsDatePickBox .boxMainInner .monthForwardButton {
overflow:hidden; cursor:pointer; width:20px; height:20px;
position:absolute; top:0px; right:22px;
background:url(img/monthForward_normal.gif) left top no-
repeat; }
.JsDatePickBox .boxMainInner .monthForwardButtonOver {
overflow:hidden; cursor:pointer; width:20px; height:20px;
position:absolute; top:0px; right:22px;
background:url(img/monthForward_over.gif) left top no-repeat;
}
.JsDatePickBox .boxMainInner .monthForwardButtonDown {
overflow:hidden; cursor:pointer; width:20px; height:20px;
position:absolute; top:0px; right:22px;
background:url(img/monthForward_down.gif) left top no-
repeat; }
.JsDatePickBox .boxMainInner .monthBackwardButton {
overflow:hidden; cursor:pointer; width:20px; height:20px;
position:absolute; top:0px; left:22px;
background:url(img/monthBackward_normal.gif) left top no-
repeat; }
.JsDatePickBox .boxMainInner .monthBackwardButtonOver {
overflow:hidden; cursor:pointer; width:20px; height:20px;
position:absolute; top:0px; left:22px;
background:url(img/monthBackward_over.gif) left top no-
repeat; }
.JsDatePickBox .boxMainInner .monthBackwardButtonDown {
overflow:hidden; cursor:pointer; width:20px; height:20px;
position:absolute; top:0px; left:22px;
background:url(img/monthBackward_down.gif) left top no-
repeat; }
.JsDatePickBox .boxMainInner .yearForwardButton {
overflow:hidden; cursor:pointer; width:20px; height:20px;
position:absolute; top:0px; right:0px;
background:url(img/yearForward_normal.gif) left top no-repeat;
}
.JsDatePickBox .boxMainInner .yearForwardButtonOver {
overflow:hidden; cursor:pointer; width:20px; height:20px;
position:absolute; top:0px; right:0px;
background:url(img/yearForward_over.gif) left top no-repeat; }
.JsDatePickBox .boxMainInner .yearForwardButtonDown {
overflow:hidden; cursor:pointer; width:20px; height:20px;
position:absolute; top:0px; right:0px;
background:url(img/yearForward_down.gif) left top no-repeat; }
.JsDatePickBox .boxMainInner .yearBackwardButton {
overflow:hidden; cursor:pointer; width:20px; height:20px;
position:absolute; top:0px; left:0px;
background:url(img/yearBackward_normal.gif) left top no-
repeat; }
.JsDatePickBox .boxMainInner .yearBackwardButtonOver {
overflow:hidden; cursor:pointer; width:20px; height:20px;
position:absolute; top:0px; left:0px;
background:url(img/yearBackward_over.gif) left top no-repeat;
}
.JsDatePickBox .boxMainInner .yearBackwardButtonDown {
overflow:hidden; cursor:pointer; width:20px; height:20px;
position:absolute; top:0px; left:0px;
background:url(img/yearBackward_down.gif) left top no-repeat;
}
.JsDatePickBox .boxMainInner .skipDay { cursor:default;
overflow:hidden; width:24px; height:25px; float:left;
margin:4px 5px 0 0; padding:0; }
.JsDatePickBox .boxMainInner .dayNormal { -khtml-user-
select: none; font-size:12px; cursor:pointer; overflow:hidden;
color:#4c4c4c; width:24px; height:25px; float:left; margin:4px
5px 0 0; padding:0; text-align:center; line-height:25px;
/*background:url(img/dayNormal.gif) left top no-repeat;*/ }
.JsDatePickBox .boxMainInner .dayNormalToday { -khtml-user-
select: none; font-size:12px; cursor:pointer; overflow:hidden;
color:#f40f0f; font-weight:bold; width:24px; height:25px;
float:left; margin:4px 5px 0 0; padding:0; text-align:center;
line-height:25px; /*background:url(img/dayNormal.gif) left top
no-repeat;*/ }
.JsDatePickBox .boxMainInner .dayDisabled { -khtml-user-
select: none; cursor:default; font-size:12px; overflow:hidden;
color:#999999; width:24px; height:25px; float:left; margin:4px
5px 0 0; padding:0; text-align:center; line-height:25px;
/*background:url(img/dayNormal.gif) left top no-repeat;*/ }
.JsDatePickBox .boxMainInner .dayOver { -khtml-user-select:
none; cursor:pointer; font-size:12px; overflow:hidden;
color:#4c4c4c; width:24px; height:25px; float:left; margin:4px
5px 0 0; padding:0; text-align:center; line-height:25px;
/*background:url(img/dayOver.gif) left top no-repeat;*/ }
.JsDatePickBox .boxMainInner .dayOverToday { -khtml-user-
select: none; cursor:pointer; font-size:12px; overflow:hidden;
font-weight:bold; color:#f40f0f; width:24px; height:25px;
float:left; margin:4px 5px 0 0; padding:0; text-align:center;
line-height:25px; /*background:url(img/dayOver.gif) left top
no-repeat;*/ }
.JsDatePickBox .boxMainInner .dayDown { -khtml-user-select:
none; cursor:pointer; font-size:12px; overflow:hidden;
color:#F9F9F9; width:24px; height:25px; float:left; margin:4px
5px 0 0; padding:0; text-align:center; line-height:25px;
/*background:url(img/dayDown.gif) left top no-repeat; */ }
.JsDatePickBox .boxMainInner .dayDownToday { -khtml-user-
select: none; cursor:pointer; font-size:12px; overflow:hidden;
color:#f40f0f; font-weight:bold; width:24px; height:25px;
float:left; margin:4px 5px 0 0; padding:0; text-align:center;
line-height:25px; /* background:url(img/dayDown.gif) left top
no-repeat;*/ }
oexam/calendar/jsDatePick.full.1.1.js
/*
Copyright 2009 Itamar Arjuan
jsDatePick is distributed under the terms of the GNU
General Public License.
*/
g_arrayOfUsedJsDatePickCalsGlobalNumbers = new Array();
g_currentDateObject = new Object();
g_currentDateObject.dateObject = new Date();
g_currentDateObject.day =
g_currentDateObject.dateObject.getDate();
g_currentDateObject.month =
g_currentDateObject.dateObject.getMonth() + 1;
g_currentDateObject.year =
g_currentDateObject.dateObject.getFullYear();
$ = function(id){
return document.getElementById(id);
};
String.prototype.trim = function() {
return this.replace(/^s+|s+$/g,"");
};
String.prototype.ltrim = function() {
return this.replace(/^s+/,"");
};
String.prototype.rtrim = function() {
return this.replace(/s+$/,"");
};
JsDatePick = function(configurationObject){
this.oConfiguration = new Object();
this.oCurrentDay = g_currentDateObject;
this.monthsTextualRepresentation = new
Array("Janaury","February","March","April","May","June","Jul
y","August","September","October","November","December");
this.lastPostedDay = null;
this.initialZIndex = 2;
this.globalNumber = this.getUnUsedGlobalNumber();
eval ("gRef_"+this.globalNumber+"=this;");
this.setConfiguration(configurationObject);
this.makeCalendar();
};
JsDatePick.prototype.getUnUsedGlobalNumber = function(){
var aNum = Math.floor(Math.random()*1000);
while ( ! this.isUnique_GlobalNumber(aNum) ){
aNum = Math.floor(Math.random()*1000);
}
return aNum;
};
JsDatePick.prototype.isUnique_GlobalNumber =
function(aNum){
var i;
for (i=0;
i<g_arrayOfUsedJsDatePickCalsGlobalNumbers.length; i++){
if (g_arrayOfUsedJsDatePickCalsGlobalNumbers[i]
== aNum){
return false;
}
}
return true;
};
JsDatePick.prototype.addOnSelectedDelegate =
function(aDelegatedFunction){
if (typeof(aDelegatedFunction) == "function"){
this.addonSelectedDelegate = aDelegatedFunction;
}
return false;
};
JsDatePick.prototype.setOnSelectedDelegate =
function(aDelegatedFunction){
if (typeof(aDelegatedFunction) == "function"){
this.onSelectedDelegate = aDelegatedFunction;
return true;
}
return false;
};
JsDatePick.prototype.executeOnSelectedDelegateIfExists =
function(){
if (typeof(this.onSelectedDelegate) == "function"){
this.onSelectedDelegate();
}
if (typeof(this.addonSelectedDelegate) == "function"){
this.addonSelectedDelegate();
}
};
JsDatePick.prototype.setRepopulationDelegate =
function(aDelegatedFunction){
if (typeof(aDelegatedFunction) == "function"){
this.repopulationDelegate = aDelegatedFunction;
return true;
}
return false;
};
JsDatePick.prototype.setConfiguration = function(aConf){
this.oConfiguration.isStripped =
(aConf["isStripped"] != null) ? aConf["isStripped"] : false;
this.oConfiguration.useMode =
(aConf["useMode"] != null) ? aConf["useMode"] : 1;
this.oConfiguration.selectedDate =
(aConf["selectedDate"] != null) ? aConf["selectedDate"] : null;
this.oConfiguration.target =
(aConf["target"] != null) ? aConf["target"] : null;
this.oConfiguration.yearsRange =
(aConf["yearsRange"] != null) ? aConf["yearsRange"] : new
Array(1971,2100);
this.oConfiguration.limitToToday =
(aConf["limitToToday"] != null) ? aConf["limitToToday"] :
false;
this.oConfiguration.field = (aConf["field"] !=
null) ? aConf["field"] : false;
this.oConfiguration.cellColorScheme =
(aConf["cellColorScheme"] != null) ?
aConf["cellColorScheme"] : "ocean_blue";
this.selectedDayObject = new Object();
this.flag_DayMarkedBeforeRepopulation = false;
this.flag_aDayWasSelected = false;
this.lastMarkedDayObject = null;
if (this.oConfiguration.selectedDate != null){
if (typeof(this.oConfiguration.selectedDate) ==
"object"){
if (!isNaN(this.oConfiguration.selectedDate.day)
&&
!isNaN(this.oConfiguration.selectedDate.month) &&
!isNaN(this.oConfiguration.selectedDate.year)){
this.currentDay =
this.oCurrentDay.day;
this.selectedDayObject.day =
this.oConfiguration.selectedDate.day;
this.currentMonth =
this.selectedDayObject.month =
this.oConfiguration.selectedDate.month;
this.currentYear =
this.selectedDayObject.year =
this.oConfiguration.selectedDate.year;
this.flag_aDayWasSelected = true;
} else {
alert("The initial selected date object is not
complete or invalid!");
}
} else {
alert("the initial selected date is wrong! you
need to supply an object containing 3 properties
(day,month,year)");
}
} else {
this.currentYear = this.oCurrentDay.year;
this.currentMonth = this.oCurrentDay.month;
this.currentDay = this.oCurrentDay.day;
}
};
JsDatePick.prototype.resizeCalendar = function(){
this.leftWallStrechedElement.style.height = "0px";
this.rightWallStrechedElement.style.height = "0px";
var totalHeight = this.JsDatePickBox.offsetHeight;
var newStrechedHeight = totalHeight-16;
if (newStrechedHeight < 0){
return;
}
this.leftWallStrechedElement.style.height =
newStrechedHeight+"px";
this.rightWallStrechedElement.style.height =
newStrechedHeight+"px";
return true;
};
JsDatePick.prototype.closeCalendar = function(){
this.JsDatePickBox.style.display = "none";
};
JsDatePick.prototype.populateFieldWithSelectedDate =
function(){
$(this.oConfiguration.target).value =
this.getSelectedDayFormatted();
this.closeCalendar();
};
JsDatePick.prototype.makeCalendar = function(){
var d = document;
var JsDatePickBox = d.createElement("div");
var clearfix = d.createElement("div");
var closeButton = d.createElement("div");
JsDatePickBox.setAttribute("class","JsDatePickBox");
clearfix.setAttribute("class","clearfix");
closeButton.setAttribute("class","jsDatePickCloseButton")
;
closeButton.setAttribute("globalNumber",this.globalNumb
er);
closeButton.onmouseover = function(){
this.setAttribute("class","jsDatePickCloseButtonOver");
var globalRef =
"gRef_"+this.getAttribute("globalNumber");
eval(globalRef + ".setTooltipText("Close the
calendar");");
};
closeButton.onmouseout = function(){
this.setAttribute("class","jsDatePickCloseButton");
var globalRef =
"gRef_"+this.getAttribute("globalNumber");
eval(globalRef + ".setTooltipText("");");
};
closeButton.onmousedown = function(){
this.setAttribute("class","jsDatePickCloseButtonDown");
var globalRef =
"gRef_"+this.getAttribute("globalNumber");
eval(globalRef + ".setTooltipText("Close the
calendar");");
};
closeButton.onmouseup = function(){
this.setAttribute("class","jsDatePickCloseButton");
var globalRef =
"gRef_"+this.getAttribute("globalNumber");
eval("gRef_"+this.getAttribute("globalNumber")+".closeC
alendar();");
eval(globalRef + ".setTooltipText("");");
};
this.JsDatePickBox = JsDatePickBox;
var leftWall = d.createElement("div");
var rightWall = d.createElement("div");
var topWall = d.createElement("div");
var bottomWall = d.createElement("div");
topWall.setAttribute("class","topWall");
bottomWall.setAttribute("class","bottomWall");
var topCorner = d.createElement("div");
var bottomCorner = d.createElement("div");
var wall = d.createElement("div");
topCorner.setAttribute("class","leftTopCorner");
bottomCorner.setAttribute("class","leftBottomCorner");
wall.setAttribute("class","leftWall");
this.leftWallStrechedElement = wall;
this.leftWall = leftWall;
this.rightWall = rightWall;
leftWall.appendChild(topCorner);
leftWall.appendChild(wall);
leftWall.appendChild(bottomCorner);
topCorner = d.createElement("div");
bottomCorner = d.createElement("div");
wall = d.createElement("div");
topCorner.setAttribute("class","rightTopCorner");
bottomCorner.setAttribute("class","rightBottomCorner");
wall.setAttribute("class","rightWall");
this.rightWallStrechedElement = wall;
rightWall.appendChild(topCorner);
rightWall.appendChild(wall);
rightWall.appendChild(bottomCorner);
if (this.oConfiguration.isStripped){
leftWall.setAttribute("class","hiddenBoxLeftWall");
rightWall.setAttribute("class","hiddenBoxRightWall");
} else {
leftWall.setAttribute("class","boxLeftWall");
rightWall.setAttribute("class","boxRightWall");
}
JsDatePickBox.appendChild(leftWall);
JsDatePickBox.appendChild(this.getDOMCalendarStripped
());
JsDatePickBox.appendChild(rightWall);
JsDatePickBox.appendChild(clearfix);
if (!this.oConfiguration.isStripped){
JsDatePickBox.appendChild(closeButton);
JsDatePickBox.appendChild(topWall);
JsDatePickBox.appendChild(bottomWall);
}
if (this.oConfiguration.useMode == 2){
if (this.oConfiguration.target != false){
if (typeof($(this.oConfiguration.target)) !=
null){
var inputElement =
$(this.oConfiguration.target);
var aSpan =
document.createElement("span");
if(inputElement!=null)
{
inputElement.parentNode.replaceChild(aSpan,inputElemen
t);
aSpan.appendChild(inputElement);
inputElement.setAttribute("globalNumber",this.globalNum
ber);
inputElement.onclick = function(){
eval("gRef_"+this.getAttribute("globalNumber")+".showC
alendar();");
};
aSpan.style.position = "relative";
this.initialZIndex++;
JsDatePickBox.style.zIndex =
this.initialZIndex.toString();
JsDatePickBox.style.position = "absolute";
JsDatePickBox.style.top = "18px";
JsDatePickBox.style.left = "0px";
JsDatePickBox.style.display = "none";
aSpan.appendChild(JsDatePickBox);
var aFunc = new
Function("gRef_"+this.globalNumber+".populateFieldWithSelec
tedDate();");
this.setOnSelectedDelegate(aFunc);
}
} else {
alert("There is no element with such an
ID!");
}
}
} else {
if (this.oConfiguration.target != null){
$(this.oConfiguration.target).appendChild(JsDatePickBox)
;
$(this.oConfiguration.target).style.position =
"relative";
JsDatePickBox.style.position = "absolute";
JsDatePickBox.style.top = "0px";
JsDatePickBox.style.left = "0px";
this.resizeCalendar();
this.executePopulationDelegateIfExists();
} else {
alert("No element ID to put this calendar on!
check JsDatePick configuration");
}
}
};
JsDatePick.prototype.determineFieldDate = function(){
var aField = $(this.oConfiguration.target);
if (aField.value.trim().length == 0){
this.unsetSelection();
return;
} else {
if (aField.value.trim().length > 7){
var array = aField.value.trim().split("-");
this.setSelectedDay({
year:parseInt(array[0]),
month:parseInt(array[1],10),
day:parseInt(array[2],10)
});
return;
} else {
this.unsetSelection();
return;
}
}
};
JsDatePick.prototype.showCalendar = function(){
if (this.JsDatePickBox.style.display == "none"){
this.determineFieldDate();
this.JsDatePickBox.style.display = "block";
this.resizeCalendar();
this.executePopulationDelegateIfExists();
} else {
return;
}
};
JsDatePick.prototype.isAvailable = function(y, m, d){
if (y > this.oCurrentDay.year){
return false;
}
if (m > this.oCurrentDay.month && y ==
this.oCurrentDay.year){
return false;
}
if (d > this.oCurrentDay.day && m ==
this.oCurrentDay.month && y == this.oCurrentDay.year ){
return false;
}
return true;
};
JsDatePick.prototype.getDOMCalendarStripped = function(){
var d = document;
var boxMain = d.createElement("div");
if (this.oConfiguration.isStripped){
boxMain.setAttribute("class","boxMainStripped");
} else {
boxMain.setAttribute("class","boxMain");
}
this.boxMain = boxMain;
var boxMainInner = d.createElement("div");
var clearfix = d.createElement("div");
var boxMainCellsContainer = d.createElement("div");
var tooltip =
d.createElement("div");
var weekDaysRow =
d.createElement("div");
var clearfix2 = d.createElement("div");
clearfix.setAttribute("class","clearfix");
clearfix2.setAttribute("class","clearfix");
boxMainInner.setAttribute("class","boxMainInner");
boxMainCellsContainer.setAttribute("class","boxMainCell
sContainer");
tooltip.setAttribute("class","tooltip");
weekDaysRow.setAttribute("class","weekDaysRow");
this.tooltip = tooltip;
boxMain.appendChild(boxMainInner);
this.controlsBar = this.getDOMControlBar();
this.makeDOMWeekDays(weekDaysRow);
boxMainInner.appendChild(this.controlsBar);
boxMainInner.appendChild(clearfix);
boxMainInner.appendChild(tooltip);
boxMainInner.appendChild(weekDaysRow);
boxMainInner.appendChild(boxMainCellsContainer);
boxMainInner.appendChild(clearfix2);
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx
Caveats and Warnings  Make certain that all work is your own work.docx

More Related Content

Similar to Caveats and Warnings  Make certain that all work is your own work.docx

College of Doctoral Studies RES-850 Using MaxQ.docx
                College of Doctoral Studies RES-850 Using MaxQ.docx                College of Doctoral Studies RES-850 Using MaxQ.docx
College of Doctoral Studies RES-850 Using MaxQ.docx
hallettfaustina
 
Smarthinking Tutor Response FormYour tutor has written overvie.docx
Smarthinking Tutor Response FormYour tutor has written overvie.docxSmarthinking Tutor Response FormYour tutor has written overvie.docx
Smarthinking Tutor Response FormYour tutor has written overvie.docx
whitneyleman54422
 
Customize all the Things! How to customize Windows and Web applications.
Customize all the Things! How to customize Windows and Web applications.Customize all the Things! How to customize Windows and Web applications.
Customize all the Things! How to customize Windows and Web applications.
Jason Conger
 
1a. Assignment 2 Responding to Technology Discussion To those.docx
1a. Assignment 2 Responding to Technology Discussion To those.docx1a. Assignment 2 Responding to Technology Discussion To those.docx
1a. Assignment 2 Responding to Technology Discussion To those.docx
vickeryr87
 
Student nea briefs_pt2
Student nea briefs_pt2Student nea briefs_pt2
Student nea briefs_pt2
elleguyan
 
305T Technical Writing Paper 1 ProposalFall 2013Due Date.docx
305T Technical Writing Paper 1 ProposalFall 2013Due Date.docx305T Technical Writing Paper 1 ProposalFall 2013Due Date.docx
305T Technical Writing Paper 1 ProposalFall 2013Due Date.docx
gilbertkpeters11344
 
MGMT 345Phase 2 IPBusiness MemoToWarehouse ManagerFrom[You.docx
MGMT 345Phase 2 IPBusiness MemoToWarehouse ManagerFrom[You.docxMGMT 345Phase 2 IPBusiness MemoToWarehouse ManagerFrom[You.docx
MGMT 345Phase 2 IPBusiness MemoToWarehouse ManagerFrom[You.docx
andreecapon
 
Assignment 7 (30 points)Accounting TheorySpring 2017Course Work Bo.docx
Assignment 7 (30 points)Accounting TheorySpring 2017Course Work Bo.docxAssignment 7 (30 points)Accounting TheorySpring 2017Course Work Bo.docx
Assignment 7 (30 points)Accounting TheorySpring 2017Course Work Bo.docx
rock73
 
Six Sigma Analysis SQM Measure & Analyze StageAss.docx
Six Sigma Analysis SQM Measure & Analyze StageAss.docxSix Sigma Analysis SQM Measure & Analyze StageAss.docx
Six Sigma Analysis SQM Measure & Analyze StageAss.docx
jennifer822
 
92315, 627 PMPage 1 of 2httpstlc.trident.educontent.docx
92315, 627 PMPage 1 of 2httpstlc.trident.educontent.docx92315, 627 PMPage 1 of 2httpstlc.trident.educontent.docx
92315, 627 PMPage 1 of 2httpstlc.trident.educontent.docx
evonnehoggarth79783
 
First paragraph will Executive summary about our company 100 w.docx
First  paragraph will  Executive summary about our company 100 w.docxFirst  paragraph will  Executive summary about our company 100 w.docx
First paragraph will Executive summary about our company 100 w.docx
ernestc3
 
Speculating about Causes or Effects--Prompt and Dropbox
Speculating about Causes or Effects--Prompt and DropboxSpeculating about Causes or Effects--Prompt and Dropbox
Speculating about Causes or Effects--Prompt and Dropbox
ChereCheek752
 
this the only thing do for 370 no forum or responses Threats &.docx
this the only thing do for 370 no forum or responses Threats &.docxthis the only thing do for 370 no forum or responses Threats &.docx
this the only thing do for 370 no forum or responses Threats &.docx
amit657720
 

Similar to Caveats and Warnings  Make certain that all work is your own work.docx (20)

Com 106 Success Begins / snaptutorial.com
Com 106  Success Begins / snaptutorial.comCom 106  Success Begins / snaptutorial.com
Com 106 Success Begins / snaptutorial.com
 
College of Doctoral Studies RES-850 Using MaxQ.docx
                College of Doctoral Studies RES-850 Using MaxQ.docx                College of Doctoral Studies RES-850 Using MaxQ.docx
College of Doctoral Studies RES-850 Using MaxQ.docx
 
Smarthinking Tutor Response FormYour tutor has written overvie.docx
Smarthinking Tutor Response FormYour tutor has written overvie.docxSmarthinking Tutor Response FormYour tutor has written overvie.docx
Smarthinking Tutor Response FormYour tutor has written overvie.docx
 
Customize all the Things! How to customize Windows and Web applications.
Customize all the Things! How to customize Windows and Web applications.Customize all the Things! How to customize Windows and Web applications.
Customize all the Things! How to customize Windows and Web applications.
 
COM 106 Technology levels--snaptutorial.com
COM 106 Technology levels--snaptutorial.comCOM 106 Technology levels--snaptutorial.com
COM 106 Technology levels--snaptutorial.com
 
1a. Assignment 2 Responding to Technology Discussion To those.docx
1a. Assignment 2 Responding to Technology Discussion To those.docx1a. Assignment 2 Responding to Technology Discussion To those.docx
1a. Assignment 2 Responding to Technology Discussion To those.docx
 
Student nea briefs_pt2
Student nea briefs_pt2Student nea briefs_pt2
Student nea briefs_pt2
 
305T Technical Writing Paper 1 ProposalFall 2013Due Date.docx
305T Technical Writing Paper 1 ProposalFall 2013Due Date.docx305T Technical Writing Paper 1 ProposalFall 2013Due Date.docx
305T Technical Writing Paper 1 ProposalFall 2013Due Date.docx
 
MGMT 345Phase 2 IPBusiness MemoToWarehouse ManagerFrom[You.docx
MGMT 345Phase 2 IPBusiness MemoToWarehouse ManagerFrom[You.docxMGMT 345Phase 2 IPBusiness MemoToWarehouse ManagerFrom[You.docx
MGMT 345Phase 2 IPBusiness MemoToWarehouse ManagerFrom[You.docx
 
Assignment 7 (30 points)Accounting TheorySpring 2017Course Work Bo.docx
Assignment 7 (30 points)Accounting TheorySpring 2017Course Work Bo.docxAssignment 7 (30 points)Accounting TheorySpring 2017Course Work Bo.docx
Assignment 7 (30 points)Accounting TheorySpring 2017Course Work Bo.docx
 
Abstract
AbstractAbstract
Abstract
 
Six Sigma Analysis SQM Measure & Analyze StageAss.docx
Six Sigma Analysis SQM Measure & Analyze StageAss.docxSix Sigma Analysis SQM Measure & Analyze StageAss.docx
Six Sigma Analysis SQM Measure & Analyze StageAss.docx
 
92315, 627 PMPage 1 of 2httpstlc.trident.educontent.docx
92315, 627 PMPage 1 of 2httpstlc.trident.educontent.docx92315, 627 PMPage 1 of 2httpstlc.trident.educontent.docx
92315, 627 PMPage 1 of 2httpstlc.trident.educontent.docx
 
Descriptions
DescriptionsDescriptions
Descriptions
 
First paragraph will Executive summary about our company 100 w.docx
First  paragraph will  Executive summary about our company 100 w.docxFirst  paragraph will  Executive summary about our company 100 w.docx
First paragraph will Executive summary about our company 100 w.docx
 
Speculating about Causes or Effects--Prompt and Dropbox
Speculating about Causes or Effects--Prompt and DropboxSpeculating about Causes or Effects--Prompt and Dropbox
Speculating about Causes or Effects--Prompt and Dropbox
 
this the only thing do for 370 no forum or responses Threats &.docx
this the only thing do for 370 no forum or responses Threats &.docxthis the only thing do for 370 no forum or responses Threats &.docx
this the only thing do for 370 no forum or responses Threats &.docx
 
As cie cwk guide
As cie cwk guideAs cie cwk guide
As cie cwk guide
 
AS cwk guide 10 steps
AS cwk guide 10 stepsAS cwk guide 10 steps
AS cwk guide 10 steps
 
Examples Of Introduction For Essay Writing
Examples Of Introduction For Essay WritingExamples Of Introduction For Essay Writing
Examples Of Introduction For Essay Writing
 

More from cravennichole326

Examine how nature is discussed throughout The Open Boat.”  Loo.docx
Examine how nature is discussed throughout The Open Boat.”  Loo.docxExamine how nature is discussed throughout The Open Boat.”  Loo.docx
Examine how nature is discussed throughout The Open Boat.”  Loo.docx
cravennichole326
 
Examine a scenario that includes an inter-group conflict. In this sc.docx
Examine a scenario that includes an inter-group conflict. In this sc.docxExamine a scenario that includes an inter-group conflict. In this sc.docx
Examine a scenario that includes an inter-group conflict. In this sc.docx
cravennichole326
 
Exam IT 505Multiple Choice (20 questions , 2 points each)Pleas.docx
Exam IT 505Multiple Choice (20 questions , 2 points each)Pleas.docxExam IT 505Multiple Choice (20 questions , 2 points each)Pleas.docx
Exam IT 505Multiple Choice (20 questions , 2 points each)Pleas.docx
cravennichole326
 
EXAMEstructura 8.1 - Miniprueba AVerbosCom.docx
EXAMEstructura 8.1 - Miniprueba AVerbosCom.docxEXAMEstructura 8.1 - Miniprueba AVerbosCom.docx
EXAMEstructura 8.1 - Miniprueba AVerbosCom.docx
cravennichole326
 
Examine current practice guidelines related to suicide screeni.docx
Examine current practice guidelines related to suicide screeni.docxExamine current practice guidelines related to suicide screeni.docx
Examine current practice guidelines related to suicide screeni.docx
cravennichole326
 
Examine Case Study Pakistani Woman with Delusional Thought Processe.docx
Examine Case Study Pakistani Woman with Delusional Thought Processe.docxExamine Case Study Pakistani Woman with Delusional Thought Processe.docx
Examine Case Study Pakistani Woman with Delusional Thought Processe.docx
cravennichole326
 
Examination of Modern LeadershipModule 1 Leadership History, F.docx
Examination of Modern LeadershipModule 1 Leadership History, F.docxExamination of Modern LeadershipModule 1 Leadership History, F.docx
Examination of Modern LeadershipModule 1 Leadership History, F.docx
cravennichole326
 
Executive Program Practical Connection Assignment .docx
Executive Program Practical Connection Assignment   .docxExecutive Program Practical Connection Assignment   .docx
Executive Program Practical Connection Assignment .docx
cravennichole326
 
Executive Program Practical Connection Assignment Component .docx
Executive Program Practical Connection Assignment Component .docxExecutive Program Practical Connection Assignment Component .docx
Executive Program Practical Connection Assignment Component .docx
cravennichole326
 
Executive Program Group Project Assignment Component Profi.docx
Executive Program Group Project Assignment Component Profi.docxExecutive Program Group Project Assignment Component Profi.docx
Executive Program Group Project Assignment Component Profi.docx
cravennichole326
 
Executive Practical Connection Activityit is a priority that stu.docx
Executive Practical Connection Activityit is a priority that stu.docxExecutive Practical Connection Activityit is a priority that stu.docx
Executive Practical Connection Activityit is a priority that stu.docx
cravennichole326
 
Executive FunctionThe Search for an Integrated AccountMari.docx
Executive FunctionThe Search for an Integrated AccountMari.docxExecutive FunctionThe Search for an Integrated AccountMari.docx
Executive FunctionThe Search for an Integrated AccountMari.docx
cravennichole326
 
Executive Compensation and IncentivesMartin J. ConyonEx.docx
Executive Compensation and IncentivesMartin J. ConyonEx.docxExecutive Compensation and IncentivesMartin J. ConyonEx.docx
Executive Compensation and IncentivesMartin J. ConyonEx.docx
cravennichole326
 
Executing the StrategyLearning ObjectivesAfter reading.docx
Executing the StrategyLearning ObjectivesAfter reading.docxExecuting the StrategyLearning ObjectivesAfter reading.docx
Executing the StrategyLearning ObjectivesAfter reading.docx
cravennichole326
 
Executing Strategies in a Global Environment Examining the Case of .docx
Executing Strategies in a Global Environment Examining the Case of .docxExecuting Strategies in a Global Environment Examining the Case of .docx
Executing Strategies in a Global Environment Examining the Case of .docx
cravennichole326
 

More from cravennichole326 (20)

Examine how nature is discussed throughout The Open Boat.”  Loo.docx
Examine how nature is discussed throughout The Open Boat.”  Loo.docxExamine how nature is discussed throughout The Open Boat.”  Loo.docx
Examine how nature is discussed throughout The Open Boat.”  Loo.docx
 
Examine All Children Can Learn. Then, search the web for effec.docx
Examine All Children Can Learn. Then, search the web for effec.docxExamine All Children Can Learn. Then, search the web for effec.docx
Examine All Children Can Learn. Then, search the web for effec.docx
 
Examine each of these items, which are available on the internet .docx
Examine each of these items, which are available on the internet .docxExamine each of these items, which are available on the internet .docx
Examine each of these items, which are available on the internet .docx
 
Examine a web browser interface and describe the various forms .docx
Examine a web browser interface and describe the various forms .docxExamine a web browser interface and describe the various forms .docx
Examine a web browser interface and describe the various forms .docx
 
Examine a scenario that includes an inter-group conflict. In this sc.docx
Examine a scenario that includes an inter-group conflict. In this sc.docxExamine a scenario that includes an inter-group conflict. In this sc.docx
Examine a scenario that includes an inter-group conflict. In this sc.docx
 
Examine a current law, or a bill proposing a law, that has to do wit.docx
Examine a current law, or a bill proposing a law, that has to do wit.docxExamine a current law, or a bill proposing a law, that has to do wit.docx
Examine a current law, or a bill proposing a law, that has to do wit.docx
 
Exam IT 505Multiple Choice (20 questions , 2 points each)Pleas.docx
Exam IT 505Multiple Choice (20 questions , 2 points each)Pleas.docxExam IT 505Multiple Choice (20 questions , 2 points each)Pleas.docx
Exam IT 505Multiple Choice (20 questions , 2 points each)Pleas.docx
 
EXAMEstructura 8.1 - Miniprueba AVerbosCom.docx
EXAMEstructura 8.1 - Miniprueba AVerbosCom.docxEXAMEstructura 8.1 - Miniprueba AVerbosCom.docx
EXAMEstructura 8.1 - Miniprueba AVerbosCom.docx
 
Examine current practice guidelines related to suicide screeni.docx
Examine current practice guidelines related to suicide screeni.docxExamine current practice guidelines related to suicide screeni.docx
Examine current practice guidelines related to suicide screeni.docx
 
Examine Case Study Pakistani Woman with Delusional Thought Processe.docx
Examine Case Study Pakistani Woman with Delusional Thought Processe.docxExamine Case Study Pakistani Woman with Delusional Thought Processe.docx
Examine Case Study Pakistani Woman with Delusional Thought Processe.docx
 
Examination of Modern LeadershipModule 1 Leadership History, F.docx
Examination of Modern LeadershipModule 1 Leadership History, F.docxExamination of Modern LeadershipModule 1 Leadership History, F.docx
Examination of Modern LeadershipModule 1 Leadership History, F.docx
 
Examine current international OB issues that challenge organizat.docx
Examine current international OB issues that challenge organizat.docxExamine current international OB issues that challenge organizat.docx
Examine current international OB issues that challenge organizat.docx
 
Executive Program Practical Connection Assignment .docx
Executive Program Practical Connection Assignment   .docxExecutive Program Practical Connection Assignment   .docx
Executive Program Practical Connection Assignment .docx
 
Executive Program Practical Connection Assignment Component .docx
Executive Program Practical Connection Assignment Component .docxExecutive Program Practical Connection Assignment Component .docx
Executive Program Practical Connection Assignment Component .docx
 
Executive Program Group Project Assignment Component Profi.docx
Executive Program Group Project Assignment Component Profi.docxExecutive Program Group Project Assignment Component Profi.docx
Executive Program Group Project Assignment Component Profi.docx
 
Executive Practical Connection Activityit is a priority that stu.docx
Executive Practical Connection Activityit is a priority that stu.docxExecutive Practical Connection Activityit is a priority that stu.docx
Executive Practical Connection Activityit is a priority that stu.docx
 
Executive FunctionThe Search for an Integrated AccountMari.docx
Executive FunctionThe Search for an Integrated AccountMari.docxExecutive FunctionThe Search for an Integrated AccountMari.docx
Executive FunctionThe Search for an Integrated AccountMari.docx
 
Executive Compensation and IncentivesMartin J. ConyonEx.docx
Executive Compensation and IncentivesMartin J. ConyonEx.docxExecutive Compensation and IncentivesMartin J. ConyonEx.docx
Executive Compensation and IncentivesMartin J. ConyonEx.docx
 
Executing the StrategyLearning ObjectivesAfter reading.docx
Executing the StrategyLearning ObjectivesAfter reading.docxExecuting the StrategyLearning ObjectivesAfter reading.docx
Executing the StrategyLearning ObjectivesAfter reading.docx
 
Executing Strategies in a Global Environment Examining the Case of .docx
Executing Strategies in a Global Environment Examining the Case of .docxExecuting Strategies in a Global Environment Examining the Case of .docx
Executing Strategies in a Global Environment Examining the Case of .docx
 

Recently uploaded

Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Recently uploaded (20)

Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 

Caveats and Warnings  Make certain that all work is your own work.docx

  • 1. Caveats and Warnings: Make certain that all work is your own work. You may use lectures, the book, the videos or other materials, but you will need to cite any information you use that is not your personal opinion. Cite any sources by simply referring to the source within parentheses at the point you cite it. Do not copy material from websites, other papers or other resources unless it is a short quote with a citation. If you refer to material from lectures, simply refer to the lecture by number (e.g., Lecture 2b). If you refer to the book, you can refer to the page number (e.g., Hanson, pg. 127), or, if from an assigned video, simply refer to the video (e.g., as in "The Day We Learned to Think"). If you cite something from outside of class materials, provide the last name of the author in parentheses, and provide a full citation at the bottom of the page. So, for an outside source, it would be: your text (Smith). and at the bottom of the page, something like: Smith, Arnold. http://yahoo.com/news/informationrelevantto1101exam (Links to an external site.) You may follow any format style with which you are familiar, as long as you provide enough information for us to track down a source if needed. For each question write no more than a full page length, Single Spaced, size 12 Times New Roman font. Course Reading: Mass communication: Living in a media world (5th edition). Washington, DC: CQ Press Here are the questions: 1. Early in the class, we said that “communication and society are inter-dependent.” Explain what the phrase means, then use an example from lecture, assigned videos, or the book to help you illustrate that meaning. Hint: In your answer, you will need to provide a verbal explanation that explains why this is true. In your example, make certain that you explain how the example applies. To test
  • 2. how well your example does, see if all of the information you identified in your verbal explanation is covered by the example. 2. In class we talked about how both newspapers and motion pictures developed amid serious objections from one or more segments of society. Compare and contrast the development and history of motion pictures in regard to regulation. Use examples to clarify your answer. Describe how the history, to the present day, of the newspaper and motion picture industries has been affected by these early differences. Hint: Make certain you indicate which aspects of society (e.g., government, the public, regulatory agencies) were involved in the regulation of the two media, how they exerted pressures, and how the pressure was relieved through regulatory mechanisms or regulatory bodies. Then indicate how regulation of the two industries has worked since those early days 3. Explain how the Camera Obscura and Magic Lantern led eventually to the development of the synchronous mass audience. Hint: For this answer, first you’ll need to define the terms related to audiences, then you’ll need to trace the Camera Obscura and the Magic Lantern history from their invention to commercial ventures, so that you can explain the audience’s relationship with the technology, and explain how the audience formed around these two technologies and their successors to arrive at the synchronous mass audience. oexam/admin/admwelcome.php <?php error_reporting(0);
  • 3. session_start(); if(!isset($_SESSION['admname'])){ $_GLOBALS['message']="Session Timeout.Click here to <a href="index.php">Log In</a>"; } else if(isset($_REQUEST['logout'])){ unset($_SESSION['admname']); $_GLOBALS['message']="Loggged Out."; header('Location: index.php'); } ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Admin Home</title> <link rel="stylesheet" type="text/css" href="../oes.css"/>
  • 4. </head> <body> <?php if($_GLOBALS['message']) { echo "<div class="message">".$_GLOBALS['message']."</div>"; } ?> <div class="container"> <header> <a href="#"><img src="../images/examlogo.png" alt="Insert Logo Here" width="200" height="90" id="Insert_logo" style="background-color: #FFFFFF; display:block;" /></a> </header> <div class="sidebar1">
  • 5. <form name="admwelcome" action="admwelcome.php" method="post"> <?php if(isset($_SESSION['admname'])){ ?> <ul class="nav"> <li><input type="submit" value="Log Out" name="logout" class="linkbutn" title="CAREFUL !! Log Out"/></li> </ul> <?php } ?> </form> <aside> <p> Use this page to do administrative work. </p> </aside> <!-- end .sidebar1 --></div> <article class="content"> <section>
  • 6. <h1>Admin Home</h1> <p> <div id="content"> <?php if(isset($_SESSION['admname'])){ ?> <table class="hometable" cellspacing="0"> <tr> <td width="20"> <p title="Manage Users"> <a href="usermng.php"><img src="../images/manageusers.png" name="imags" height="120" width="200" /></a> </p> <p><a href="usermng.php">Manage Students</a></p></td> <td> <p title="Manage Examiners"> <a href="tcmng.php"><img src="../images/managexaminer.png" name="imags" height="120" width="200" /></a></p> <p><a href="tcmng.php">Manage Examiners</a></p></td>
  • 7. <td> <p title="Manage Subjects"> <a href="submng.php"><img src="../images/managesubjects.png" name="imags" height="120" width="200" /></a></p> <p><a href="tcmng.php">Manage Subjects</a></p></td> </tr> </table> <?php }?> </div> </p> </section>
  • 8. <!-- end .content --></article> <!-- end .container --></div> </body> </html> oexam/admin/index.php <?php error_reporting(0); session_start(); include_once '../oesdb.php'; if(isset($_REQUEST['admsubmit'])) { $result=executeQuery("select * from adminlogin where admname='".htmlspecialchars($_REQUEST['name'],ENT_QUO TES)."' and admpassword='".md5(htmlspecialchars($_REQUEST['password' ],ENT_QUOTES))."'");
  • 9. // $result=mysql_query("select * from adminlogin where admname='".htmlspecialchars($_REQUEST['name'])."' and admpassword='".md5(htmlspecialchars($_REQUEST['password' ]))."'"); if(mysql_num_rows($result)>0) { $r=mysql_fetch_array($result); if(strcmp($r['admpassword'],md5(htmlspecialchars($_REQUES T['password'],ENT_QUOTES)))==0) { $_SESSION['admname']=htmlspecialchars_decode($r['admname '],ENT_QUOTES); unset($_GLOBALS['message']); header('Location: admwelcome.php'); }else { $_GLOBALS['message']="Check Your user name and Password.";
  • 10. } } else { $_GLOBALS['message']="Check Your user name and Password."; } closedb(); } ?> <!doctype html> <html> <head> <meta charset="utf-8">
  • 11. <title>Admin Log In </title> <link rel="stylesheet" type="text/css" href="../oes.css"/> <script type="text/javascript" src="../validate.js" ></script> </head> <body> <?php if($_GLOBALS['message']) { echo "<div class="message">".$_GLOBALS['message']."</div>"; } ?> <div class="container"> <header> <a href="#"><img src="../images/examlogo.png" alt="Insert Logo Here" width="200" height="90" id="Insert_logo" style="background-color: #FFFFFF; display:block;" /></a>
  • 12. </header> <div class="sidebar1"> <ul class="nav"> <li><a href="../index.php" title="Click here to Register">Home</a></li> </ul> <aside> <p> This page allows you to login as the admin. </p> </aside> <!-- end .sidebar1 --></div> <article class="content"> <section> <h1>Admin Login</h1> <p>
  • 13. <div id="content"> <table class="loginf"> <form id="indexform" action="index.php" method="post"> <tr> <td> Username </td> <td><input type="text" name="name" tabindex="1" value="" placeholder="Username" /></td> </tr> <tr> <td> Password </td><td><input type="password" name="password" value="" placeholder="Password" /></td> </tr> <tr> <td></td> <td><input type="submit" name="admsubmit" value="Log In" /></td> </tr>
  • 14. </form> </table> </div> </p> </section> <!-- end .content --></article> <!-- end .container --></div> </body> </html> oexam/admin/rsltmng.php <?php error_reporting(0); session_start(); include_once '../oesdb.php'; if(!isset($_SESSION['admname'])) { $_GLOBALS['message']="Session Timeout.Click here to <a href="index.php">Log In</a>"; }
  • 15. else if(isset($_REQUEST['logout'])) { //Log out and redirect login page unset($_SESSION['admname']); header('Location: index.php'); } else if(isset($_REQUEST['dashboard'])) { //redirect to home header('Location: admwelcome.php'); } else if(isset($_REQUEST['back'])) { //redirect to Result Management header('Location: rsltmng.php'); } ?>
  • 16. <html> <head> <title>Manage Results</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="stylesheet" type="text/css" href="../oes.css"/> <script type="text/javascript" src="../validate.js" ></script> </head> <body> <?php if (isset($_GLOBALS['message'])) { echo "<div class="message">" . $_GLOBALS['message'] . "</div>"; } ?> <div class="container">
  • 17. <header> <a href="#"><img src="../images/examlogo.png" alt="Insert Logo Here" width="200" height="90" id="Insert_logo" style="background-color: #FFFFFF; display:block;" /></a> </header> <form name="rsltmng" action="rsltmng.php" method="post"> <?php if (isset($_SESSION['admname'])) { ?> <div class="sidebar1"> <ul class="nav"> <?php if(isset($_REQUEST['testid'])) { ?> <li><input type="submit" value="Back" name="back" title="Manage Results"/></li> <?php }else { ?> <li><input type="submit" value="Home" name="dashboard" title="Home"/></li> <?php } ?> <!-- For default add or delete functions--> <li><input type="submit" value="Add New" name="add" title="Add new records"/></li> <li><input type="submit" value="Delete Selected" name="delete" title="Delete Selected records"/></li>
  • 18. <!-- log out function--> <li><input type="submit" value="Log out" name="logout" title="CAREFUL !! Log Out"/></li> </ul> <aside> <p> Use this page to perform administrative duties on results data.</p> </aside> <!-- end .sidebar1 --></div> <?php } ?> <article class="content"> <section> <h1>Manage Results</h1> <p> <div id="content"> <?php if(isset($_REQUEST['testid'])) {
  • 19. // Defualt Mode: Displays the Detailed Test Results. $result=executeQuery("select t.testname,DATE_FORMAT(t.testfrom,'%d %M %Y') as fromdate,DATE_FORMAT(t.testto,'%d %M %Y %H:%i:%S') as todate,sub.subname,IFNULL((select sum(marks) from question where testid=".$_REQUEST['testid']."),0) as maxmarks from test as t, subject as sub where sub.subid=t.subid and t.testid=".$_REQUEST['testid'].";") ; if(mysql_num_rows($result)!=0) { $r=mysql_fetch_array($result); ?> <table class="loginf"> <tr> <td colspan="2"><h3 style="color:#0000cc;text-align:center;">Test Summary</h3></td> </tr> <tr> <td colspan="2" ><hr style="color:#ff0000;border-width:4px;"/></td> </tr>
  • 20. <tr> <td>Test Name</td> <td><?php echo htmlspecialchars_decode($r['testname'],ENT_QUOTES); ?></td> </tr> <tr> <td>Subject Name</td> <td><?php echo htmlspecialchars_decode($r['subname'],ENT_QUOTES); ?></td> </tr> <tr> <td>Validity</td> <td><?php echo $r['fromdate']." To ".$r['todate']; ?></td> </tr> <tr> <td>Max. Marks</td> <td><?php echo $r['maxmarks']; ?></td> </tr>
  • 21. <tr><td colspan="2"><hr style="color:#ff0000;border-width:2px;"/></td></tr> <tr> <td colspan="2"><h3 style="color:#0000cc;text-align:center;">Attempted Students</h3></td> </tr> <tr> <td colspan="2" ><hr style="color:#ff0000;border-width:4px;"/></td> </tr> </table> <?php $result1=executeQuery("select s.stdname,s.emailid,IFNULL((select sum(q.marks) from studentquestion as sq,question as q where q.qnid=sq.qnid and sq.testid=".$_REQUEST['testid']." and sq.stdid=st.stdid and sq.stdanswer=q.correctanswer),0) as om from studenttest as st, student as s where s.stdid=st.stdid and st.testid=".$_REQUEST['testid'].";" );
  • 22. if(mysql_num_rows($result1)==0) { echo"<h3 style="color:#0000cc;text- align:center;">No Students Yet Attempted this Test!</h3>"; } else { ?> <table cellpadding="30" cellspacing="10" class="datatable"> <tr> <th>Student Name</th> <th>Email-ID</th> <th>Obtained Marks</th> <th>Result(%)</th> </tr> <?php while($r1=mysql_fetch_array($result1)) {
  • 23. ?> <tr> <td><?php echo htmlspecialchars_decode($r1['stdname'],ENT_QUOTES); ?></td> <td><?php echo htmlspecialchars_decode($r1['emailid'],ENT_QUOTES); ?></td> <td><?php echo $r1['om']; ?></td> <td><?php echo ($r1['om']/$r['maxmarks']*100)." %"; ?></td> </tr> <?php } } } else {
  • 24. echo"<h3 style="color:#0000cc;text- align:center;">Something went wrong. Please logout and Try again.</h3>"; } ?> </table> <?php } else { // Defualt Mode: Displays the Test Results. $result=executeQuery("select t.testid,t.testname,DATE_FORMAT(t.testfrom,'%d %M %Y') as fromdate,DATE_FORMAT(t.testto,'%d %M %Y %H:%i:%S') as todate,sub.subname,(select count(stdid) from studenttest where testid=t.testid) as attemptedstudents from test as t, subject as sub where sub.subid=t.subid;"); if(mysql_num_rows($result)==0) { echo "<h3 style="color:#0000cc;text- align:center;">No Tests Yet...!</h3>"; } else { $i=0;
  • 25. ?> <table cellpadding="30" cellspacing="10" class="datatable"> <tr> <th>Test Name</th> <th>Validity</th> <th>Subject Name</th> <th>Attempted Students</th> <th>Details</th> </tr> <?php while($r=mysql_fetch_array($result)) { $i=$i+1; if($i%2==0) { echo "<tr class="alt">"; } else { echo "<tr>";} echo "<td>".htmlspecialchars_decode($r['testname'],ENT_QUOTES).
  • 26. "</td><td>".$r['fromdate']." To ".$r['todate']." PM </td>" ."<td>".htmlspecialchars_decode($r['subname'],ENT_QUOTES) ."</td><td>".$r['attemptedstudents']."</td>" ."<td class="tddata"><a title="Details" href="rsltmng.php?testid=".$r['testid'].""><img src="../images/detail.png" height="30" width="40" alt="Details" /></a></td></tr>"; } ?> </table> <?php } } closedb(); } ?> </div> </form> </div> </body> </html> oexam/admin/submng.php <?php error_reporting(0);
  • 27. session_start(); include_once '../oesdb.php'; if (!isset($_SESSION['admname'])) { $_GLOBALS['message'] = "Session Timeout.Click here to <a href="index.php">Log In</a>"; } else if (isset($_REQUEST['logout'])) { //Log out and redirect login page unset($_SESSION['admname']); header('Location: index.php'); } else if (isset($_REQUEST['dashboard'])) { //redirect to home header('Location: admwelcome.php'); } else if (isset($_REQUEST['delete'])) { //delete selected subjects unset($_REQUEST['delete']); $hasvar = false; foreach ($_REQUEST as $variable) {
  • 28. if (is_numeric($variable)) { //some session values are also passed with request $hasvar = true; if ([email protected]("delete from subject where subid=$variable")) { if (mysql_errno () == 1451) //Children are dependent value $_GLOBALS['message'] = "System will not allow propagated deletions.<br/><b>Help:</b> If you still want to delete this subject, manually delete all the records that are dependent on it first."; else $_GLOBALS['message'] = mysql_errno(); } } } if (!isset($_GLOBALS['message']) && $hasvar == true) $_GLOBALS['message'] = "Selected subjects deleted"; else if (!$hasvar) { $_GLOBALS['message'] = "Select the subjects to delete.";
  • 29. } } else if (isset($_REQUEST['savem'])) { //updating the modified values if (empty($_REQUEST['subname']) || empty($_REQUEST['subdesc'])) { $_GLOBALS['message'] = "Some fields are empty.No updates made."; } else { $query = "update subject set subname='" . htmlspecialchars($_REQUEST['subname'], ENT_QUOTES) . "', subdesc='" . htmlspecialchars($_REQUEST['subdesc'], ENT_QUOTES) . "'where subid=" . $_REQUEST['subject'] . ";"; if ([email protected]($query)) $_GLOBALS['message'] = mysql_error(); else $_GLOBALS['message'] = "Subject information updated."; } closedb(); } else if (isset($_REQUEST['savea'])) {
  • 30. //Add the new subject information to db $result = executeQuery("select max(subid) as sub from subject"); $r = mysql_fetch_array($result); if (is_null($r['sub'])) $newstd = 1; else $newstd=$r['sub'] + 1; $result = executeQuery("select subname as sub from subject where subname='" . htmlspecialchars($_REQUEST['subname'], ENT_QUOTES) . "';"); // $_GLOBALS['message']=$newstd; if (empty($_REQUEST['subname']) || empty($_REQUEST['subdesc'])) { $_GLOBALS['message'] = "Some required fields are empty"; } else if (mysql_num_rows($result) > 0) { $_GLOBALS['message'] = "Subject already exists."; } else { $query = "insert into subject values($newstd,'" .
  • 31. htmlspecialchars($_REQUEST['subname'], ENT_QUOTES) . "','" . htmlspecialchars($_REQUEST['subdesc'], ENT_QUOTES) . "',NULL)"; if ([email protected]($query)) { if (mysql_errno () == 1062) //duplicate value $_GLOBALS['message'] = "The subject name voilates some constraints, try another name."; else $_GLOBALS['message'] = mysql_error(); } else $_GLOBALS['message'] = "Subject created."; } closedb(); } ?> <html> <head> <title>Manage subjects</title>
  • 32. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="stylesheet" type="text/css" href="../oes.css"/> <script type="text/javascript" src="../validate.js" ></script> </head> <body> <?php if (isset($_GLOBALS['message'])) { echo "<div class="message">" . $_GLOBALS['message'] . "</div>"; } ?> <div class="container"> <header> <a href="#"><img src="../images/examlogo.png" alt="Insert Logo Here" width="200" height="90" id="Insert_logo" style="background-color: #FFFFFF; display:block;" /></a> </header>
  • 33. <form name="submng" action="submng.php" method="post"> <?php if (isset($_SESSION['admname'])) { ?> <div class="sidebar1"> <ul class="nav"> <li><input type="submit" value="Home" name="dashboard" title="Home"/></li> <!-- For default add or delete functions--> <li><input type="submit" value="Add New" name="add" title="Add new subjects"/></li> <!-- log out function--> <li><input type="submit" value="Log out" name="logout" title="CAREFUL !! Log Out"/></li> </ul> <aside> <p> Use this page to do administrative work such subjects. </p>
  • 34. </aside> <!-- end .sidebar1 --></div> <?php } ?> <article class="content"> <section> <h1>Manage subjects</h1> <p> <div id="content"> <?php if (isset($_SESSION['admname'])) { if (isset($_REQUEST['add'])) { ?> <!--Form for the new subject--> <table class="loginf" > <tr> <td>Subject Name</td> <td><input type="text" name="subname" value="" size="16" onKeyUp="isalphanum(this)" onBlur="if(this.value==''){alert('Subject Name is Empty');this.focus();this.value='';}"/></td>
  • 35. </tr> <tr> <td>Subject Description</td> <td><textarea name="subdesc" cols="20" rows="3" onBlur="if(this.value==''){alert('Subject Description is Empty');this.focus();this.value='';}"></textarea></td> </tr> <!--For Add option--> <?php if (isset($_REQUEST['add'])) { ?> <tr> <td> <input type="submit" value="Cancel" name="cancel" class="subbtn" title="Cancel"/></td> <td><input type="submit" value="Save" name="savea" class="subbtn" onClick="validatesubform('submng')" title="Save"/></td> </tr> <?php } ?> </table> <?php } else if (isset($_REQUEST['edit'])) {
  • 36. //Edit existing subjects and their details. $result = executeQuery("select subid,subname,subdesc from subject where subname='" . htmlspecialchars($_REQUEST['edit'], ENT_QUOTES) . "';"); if (mysql_num_rows($result) == 0) { header('submng.php'); } else if ($r = mysql_fetch_array($result)) { //editing components ?> <table class="loginf"> <tr> <td>Subject Name</td> <td><input type="text" name="subname" value="<?php echo htmlspecialchars_decode($r['subname'], ENT_QUOTES); ?>" size="16" onKeyUp="isalphanum(this)"/></td> </tr> <tr>
  • 37. <td>Subject Description</td> <td><textarea name="subdesc" cols="20" rows="3"><?php echo htmlspecialchars_decode($r['subdesc'], ENT_QUOTES); ?></textarea><input type="hidden" name="subject" value="<?php echo $r['subid']; ?>"/></td> </tr> <!--For Edit option--> <?php } if (isset($_REQUEST['edit'])) { ?> <tr> <td><input type="submit" value="Cancel" name="cancel" class="subbtn" title="Cancel"/></td> <td><input type="submit" value="Save" name="savem" class="subbtn" onClick="validatesubform('submng')" title="Save"/></td> </tr> </table> <?php closedb(); } } else { // Default : displays existing subjects. $result = executeQuery("select * from subject order by subid;");
  • 38. if (mysql_num_rows($result) == 0) { echo "<h3 style="color:#0000cc;text- align:center;">No Subjets Yet..!</h3>"; } else { $i = 0; ?> <table class="dashboards" cellspacing="10"> <tr> <th>&nbsp;</th> <th>Subject Name</th> <th>Subject Description</th> <th>Edit</th> </tr> <?php while ($r = mysql_fetch_array($result)) { $i = $i + 1; if ($i % 2 == 0) { echo "<tr class="alt">";
  • 39. } else { echo "<tr>"; } echo "<td style="text-align:center;"><input type="checkbox" name="d$i" value="" . $r['subid'] . "" /></td><td>" . htmlspecialchars_decode($r['subname'], ENT_QUOTES) . "</td><td>" . htmlspecialchars_decode($r['subdesc'], ENT_QUOTES) . "</td>" . "<td class="tddata"><a title="Edit " . htmlspecialchars_decode($r['stdname'], ENT_QUOTES) . ""href="submng.php?edit=" . htmlspecialchars_decode($r['subname'], ENT_QUOTES) . ""><img src="../images/edit.png" height="30" width="40" alt="Edit" /></a></td></tr>"; } ?> </table> <?php } closedb(); }
  • 41. } else if (isset($_REQUEST['logout'])) { //Log out and redirect login page unset($_SESSION['admname']); header('Location: index.php'); } else if (isset($_REQUEST['dashboard'])) { //redirect to home header('Location: admwelcome.php'); } else if (isset($_REQUEST['delete'])) { //deleting the selected teachers records unset($_REQUEST['delete']); $hasvar = false; foreach ($_REQUEST as $variable) { if (is_numeric($variable)) { //some session values are also passed with request $hasvar = true; if ([email protected]("delete from testconductor where tcid=$variable")){
  • 42. if (mysql_errno () == 1451) //Children are dependent value $_GLOBALS['message'] = "System will not allow propagated deletions.<br/><b>Help:</b> Delete all records that are associated with this user first."; else $_GLOBALS['message'] = mysql_errno(); } // $_GLOBALS['message']=$_GLOBALS['message'].$variable; } } if (!isset($_GLOBALS['message']) && $hasvar == true) $_GLOBALS['message'] = "Selected teacher/s records deleted"; else if (!$hasvar) { $_GLOBALS['message'] = "Select teacher/s records to delete."; } } else if (isset($_REQUEST['savem'])) { /* * ************************ Step 2 - Case 4 ************************ */
  • 43. //updating the modified values if (empty($_REQUEST['cname']) || empty($_REQUEST['password']) || empty($_REQUEST['email'])) { $_GLOBALS['message'] = "Some fields are empty.No updates made."; } else { $query = "update testconductor set tcname='" . htmlspecialchars($_REQUEST['cname'],ENT_QUOTES) . "', tcpassword=ENCODE('" . htmlspecialchars($_REQUEST['password'],ENT_QUOTES) . "','oespass'),emailid='" . htmlspecialchars($_REQUEST['email'],ENT_QUOTES) . "',contactno='" . htmlspecialchars($_REQUEST['contactno'],ENT_QUOTES) . "',address='" .htmlspecialchars($_REQUEST['address'],ENT_QUOTES) . "',city='" . htmlspecialchars($_REQUEST['city'],ENT_QUOTES) . "',pincode='" . htmlspecialchars($_REQUEST['pin'],ENT_QUOTES) . "' where tcid='" . $_REQUEST['tc'] . "';"; if ([email protected]($query)) $_GLOBALS['message'] = mysql_error(); else $_GLOBALS['message'] = "Teacher information updated.";
  • 44. } closedb(); } else if (isset($_REQUEST['savea'])) { //Add the new test teacher information to the db $result = executeQuery("select max(tcid) as tc from testconductor"); $r = mysql_fetch_array($result); if (is_null($r['tc'])) $newstd = 1; else $newstd=$r['tc'] + 1; $result = executeQuery("select tcname as tc from testconductor where tcname='" . htmlspecialchars($_REQUEST['cname'],ENT_QUOTES) . "';"); if (empty($_REQUEST['cname']) || empty($_REQUEST['password']) ||
  • 45. empty($_REQUEST['email'])) { $_GLOBALS['message'] = "Some required fields are empty"; } else if (mysql_num_rows($result) > 0) { $_GLOBALS['message'] = "User already exists."; } else { $query = "insert into testconductor values($newstd,'" . htmlspecialchars($_REQUEST['cname'],ENT_QUOTES) . "',ENCODE('" . htmlspecialchars($_REQUEST['password'],ENT_QUOTES) . "','oespass'),'" . htmlspecialchars($_REQUEST['email'],ENT_QUOTES) . "','" . htmlspecialchars($_REQUEST['contactno'],ENT_QUOTES) . "','" . htmlspecialchars($_REQUEST['address'],ENT_QUOTES) . "','" . htmlspecialchars($_REQUEST['city'],ENT_QUOTES) . "','" . htmlspecialchars($_REQUEST['pin'],ENT_QUOTES) . "')"; if ([email protected]($query)) { if(mysql_errno ()==1062) //duplicate value $_GLOBALS['message'] = "The teacher name voilates some constraints, try another name."; else $_GLOBALS['message'] = mysql_error(); }
  • 46. else $_GLOBALS['message'] = "Teacher record created."; } closedb(); } ?> <html> <head> <title>Manage Teachers</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="stylesheet" type="text/css" href="../oes.css"/> <script type="text/javascript" src="../validate.js" ></script> </head> <body> <?php if (isset($_GLOBALS['message'])) {
  • 47. echo "<div class="message">" . $_GLOBALS['message'] . "</div>"; } ?> <div class="container"> <header> <a href="#"><img src="../images/examlogo.png" alt="Insert Logo Here" width="200" height="90" id="Insert_logo" style="background-color: #FFFFFF; display:block;" /></a> </header> <form name="tcmng" action="tcmng.php" method="post"> <?php if (isset($_SESSION['admname'])) { ?> <div class="sidebar1"> <ul class="nav"> <li><input type="submit" value="Home" name="dashboard" title="Home"/></li> <!-- For default add or delete functions--> <li><input type="submit" value="Add New" name="add" title="Add new Examiner"/></li> <li><input type="submit" value="Delete Selected"
  • 48. name="delete" title="Delete Selected records"/></li> <!-- log out function--> <li><input type="submit" value="Log out" name="logout" title="CAREFUL !! Log Out"/></li> </ul> <aside> <p> Use this page to perform administrative duties on teachers data. You can edit teachers data where changes are required.</p> </aside> <!-- end .sidebar1 --></div> <?php } ?> <article class="content"> <section> <h1>Manage Examiners</h1> <p> <div id="content">
  • 49. <?php if (isset($_SESSION['admname'])) { if (isset($_REQUEST['add'])) { ?> <!--Form for the new teacher--> <table class="loginf" > <tr> <td>Username</td> <td><input type="text" name="cname" value="" size="16" onKeyUp="isalphanum(this)"/></td> </tr> <tr> <td>Password</td> <td><input type="password" name="password" value="" size="16" onKeyUp="isalphanum(this)" /></td> </tr> <tr> <td>Retype Password</td>
  • 50. <td><input type="password" name="repass" value="" size="16" onKeyUp="isalphanum(this)" /></td> </tr> <tr> <td>E mail</td> <td><input type="text" name="email" value="" size="16" /></td> </tr> <tr> <td>Phone No</td> <td><input type="number" pattern=".{9}" maxlength="12" required title="Enter enough digits" name="contactno" value="" size="16" onKeyUp="isnum(this)"/></td> </tr> <tr> <td>Address</td> <td><textarea name="address" cols="20"
  • 51. rows="3"></textarea></td> </tr> <tr> <td>Town</td> <td><input type="text" name="city" value="" size="16" onKeyUp="isalpha(this)"/></td> </tr> <tr> <td>PIN No</td> <td><input type="text" name="pin" value="" size="16" onKeyUp="isnum(this)" /></td> </tr> <!--For Add option--> <?php if (isset($_REQUEST['add'])) { ?> <tr> <td><input type="submit" value="Cancel" name="cancel" class="subbtn" title="Cancel"/></td> <td><input type="submit" value="Save" name="savea"
  • 52. class="subbtn" onClick="validateform('usermng')" title="Save"/></td> </tr> <?php } ?> </table> <?php } else if (isset($_REQUEST['edit'])) { //Edit existing teacher information $result = executeQuery("select tcid,tcname,DECODE(tcpassword,'oespass') as tcpass ,emailid,contactno,address,city,pincode from testconductor where tcname='" . htmlspecialchars($_REQUEST['edit'],ENT_QUOTES) . "';"); if (mysql_num_rows($result) == 0) { header('Location: tcmng.php'); } else if ($r = mysql_fetch_array($result)) { //editing components ?> <!--Form to edit existing teachers--> <table class="loginf"> <tr>
  • 53. <td>Username</td> <td><input type="text" name="cname" value="<?php echo htmlspecialchars_decode($r['tcname'],ENT_QUOTES); ?>" size="16" onKeyUp="isalphanum(this)"/></td> </tr> <tr> <td>Password</td> <td><input type="text" name="password" value="<?php echo htmlspecialchars_decode($r['tcpass'],ENT_QUOTES); ?>" size="16" onKeyUp="isalphanum(this)" /></td> </tr> <tr> <td>E mail</td> <td><input type="text" name="email" value="<?php echo htmlspecialchars_decode($r['emailid'],ENT_QUOTES); ?>" size="16" /></td> </tr> <tr>
  • 54. <td>Phone No</td> <td><input type="text" name="contactno" value="<?php echo htmlspecialchars_decode($r['contactno'],ENT_QUOTES); ?>" size="16" onKeyUp="isnum(this)"/></td> </tr> <tr> <td>Address</td> <td><textarea name="address" cols="20" rows="3"><?php echo htmlspecialchars_decode($r['address'],ENT_QUOTES); ?></textarea></td> </tr> <tr> <td>Town</td> <td><input type="text" name="city" value="<?php echo htmlspecialchars_decode($r['city'],ENT_QUOTES); ?>" size="16" onKeyUp="isalpha(this)"/></td> </tr> <tr>
  • 55. <td>PIN Code</td> <td><input type="hidden" name="tc" value="<?php echo htmlspecialchars_decode($r['tcid'],ENT_QUOTES); ?>"/><input type="text" name="pin" value="<?php echo htmlspecialchars_decode($r['pincode'],ENT_QUOTES); ?>" size="16" onKeyUp="isnum(this)" /></td> </tr> <!--For Edit option--> <?php } else if (isset($_REQUEST['edit'])) { ?> <tr> <td><input type="submit" value="Cancel" name="cancel" class="subbtn" title="Cancel"/></td> <td><input type="submit" value="Save" name="savem" class="subbtn" onClick="validateform('usermng')" title="Save"/></td> </tr> </table> <?php closedb(); } } else {
  • 56. // Default: displays the existing teachers. $result = executeQuery("select * from testconductor order by tcid;"); if (mysql_num_rows($result) == 0) { echo "<h3 style="color:#0000cc;text- align:center;">No Test Conductors Yet..!</h3>"; } else { $i = 0; ?> <table class="dashboards" cellspacing="10"> <tr> <th>&nbsp;</th> <th>Teacher name</th> <th>Email-ID</th> <th>Contact Number</th> <th>Edit</th> </tr> <?php while ($r = mysql_fetch_array($result)) {
  • 57. $i = $i + 1; if ($i % 2 == 0) echo "<tr class="alt">"; else echo "<tr>"; echo "<td style="text- align:center;"><input type="checkbox" name="d$i" value="" . $r['tcid'] . "" /></td><td>" . htmlspecialchars_decode($r['tcname'],ENT_QUOTES) . "</td><td>" . htmlspecialchars_decode($r['emailid'],ENT_QUOTES) . "</td><td>" . htmlspecialchars_decode($r['contactno'],ENT_QUOTES) . "</td>" . "<td class="tddata"><a title="Edit " . htmlspecialchars_decode($r['tcname'],ENT_QUOTES) . ""href="tcmng.php?edit=" . htmlspecialchars_decode($r['tcname'],ENT_QUOTES) . ""><img src="../images/edit.png" height="30" width="40" alt="Edit" /></a></td></tr>"; } ?> </table> <?php } closedb();
  • 58. } } ?> </div> </form> </div> </body> </html> oexam/admin/testmng.php <?php error_reporting(0); session_start(); include_once '../oesdb.php'; if (!isset($_SESSION['admname'])) { $_GLOBALS['message'] = "Session Timeout.Click here to <a href="index.php">Log In</a>"; } else if (isset($_REQUEST['logout'])) { //Log out and redirect login page
  • 59. unset($_SESSION['admname']); header('Location: index.php'); } else if (isset($_REQUEST['dashboard'])) { //redirect to home header('Location: admwelcome.php'); } else if (isset($_REQUEST['delete'])) { //deleting the selected tests unset($_REQUEST['delete']); $hasvar = false; foreach ($_REQUEST as $variable) { if (is_numeric($variable)) { //some session values are also passed with request $hasvar = true; if ([email protected]("delete from test where testid=$variable")) { if (mysql_errno () == 1451) //Children are dependent value $_GLOBALS['message'] = "System will not allow propagated deletions.<br/><b>Help:</b> If you still want to delete this test, manually delete all the records that are
  • 60. associated with this test first."; else $_GLOBALS['message'] = mysql_errno(); } } } if (!isset($_GLOBALS['message']) && $hasvar == true) $_GLOBALS['message'] = "Selected test/s deleted"; else if (!$hasvar) { $_GLOBALS['message'] = "First select the test/s to delete."; } } else if (isset($_REQUEST['savem'])) { //update modified values $fromtime = $_REQUEST['testfrom'] . " " . date("H:i:s"); $totime = $_REQUEST['testto'] . " 23:59:59"; $_GLOBALS['message'] = strtotime($totime) . " " . strtotime($fromtime) . " " . time(); if (strtotime($fromtime) > strtotime($totime) || strtotime($totime) < time())
  • 61. $_GLOBALS['message'] = "Start date of test is less than end date or last date of test is less than today's date.<br/>No updates made"; else if (empty($_REQUEST['testname']) || empty($_REQUEST['testdesc']) || empty($_REQUEST['totalqn']) || empty($_REQUEST['duration']) || empty($_REQUEST['testfrom']) || empty($_REQUEST['testto']) || empty($_REQUEST['testcode'])) { $_GLOBALS['message'] = "Some fields are empty.No updates made"; } else { $query = "update test set testname='" . htmlspecialchars($_REQUEST['testname'], ENT_QUOTES) . "',testdesc='" . htmlspecialchars($_REQUEST['testdesc'], ENT_QUOTES) . "',subid=" . htmlspecialchars($_REQUEST['subject'], ENT_QUOTES) . ",testfrom='" . $fromtime . "',testto='" . $totime . "',duration=" . htmlspecialchars($_REQUEST['duration'], ENT_QUOTES) . ",totalquestions=" . htmlspecialchars($_REQUEST['totalqn'], ENT_QUOTES) . ",testcode=ENCODE('" . htmlspecialchars($_REQUEST['testcode'], ENT_QUOTES) . "','oespass') where testid=" . $_REQUEST['testid'] . ";"; if ([email protected]($query)) $_GLOBALS['message'] = mysql_error(); else $_GLOBALS['message'] = "Test information updated.";
  • 62. } closedb(); } else if (isset($_REQUEST['savea'])) { //Add the new test information in the database $noerror = true; $fromtime = $_REQUEST['testfrom'] . " " . date("H:i:s"); $totime = $_REQUEST['testto'] . " 23:59:59"; if (strtotime($fromtime) > strtotime($totime) || strtotime($fromtime) < (time() - 3600)) { $noerror = false; $_GLOBALS['message'] = "Start date of test is either less than today's date or greater than last date of test."; } else if ((strtotime($totime) - strtotime($fromtime)) <= 3600 * 24) { $noerror = true; $_GLOBALS['message'] = "Note:<br/>The test is valid upto " . date(DATE_RFC850, strtotime($totime)); } //$_GLOBALS['message']="time".date_format($first,
  • 63. DATE_ATOM)."<br/>time ".date_format($second, DATE_ATOM); $result = executeQuery("select max(testid) as tst from test"); $r = mysql_fetch_array($result); if (is_null($r['tst'])) $newstd = 1; else $newstd=$r['tst'] + 1; // $_GLOBALS['message']=$newstd; if (strcmp($_REQUEST['subject'], "<Choose the Subject>") == 0 || empty($_REQUEST['testname']) || empty($_REQUEST['testdesc']) || empty($_REQUEST['totalqn']) || empty($_REQUEST['duration']) || empty($_REQUEST['testfrom']) || empty($_REQUEST['testto']) || empty($_REQUEST['testcode'])) { $_GLOBALS['message'] = "Some of the required Fields are Empty"; } else if ($noerror) {
  • 64. $query = "insert into test values($newstd,'" . htmlspecialchars($_REQUEST['testname'], ENT_QUOTES) . "','" . htmlspecialchars($_REQUEST['testdesc'], ENT_QUOTES) . "',(select curDate()),(select curTime())," . htmlspecialchars($_REQUEST['subject'], ENT_QUOTES) . ",'" . $fromtime . "','" . $totime . "'," . htmlspecialchars($_REQUEST['duration'], ENT_QUOTES) . "," . htmlspecialchars($_REQUEST['totalqn'], ENT_QUOTES) . ",0,ENCODE('" . htmlspecialchars($_REQUEST['testcode'], ENT_QUOTES) . "','oespass'),NULL)"; if ([email protected]($query)) { if (mysql_errno () == 1062) //duplicate value $_GLOBALS['message'] = "The test name violates some constraints, please try another name."; else $_GLOBALS['message'] = mysql_error(); } else $_GLOBALS['message'] = $_GLOBALS['message'] . "<br/> New test created."; } closedb(); } else if (isset($_REQUEST['manageqn'])) {
  • 65. //Store the Test identity in session varibles and redirect to prepare question section. //$tempa=explode(" ",$_REQUEST['testqn']); // $testname=substr($_REQUEST['manageqn'],0,-10); $testname = $_REQUEST['manageqn']; $result = executeQuery("select testid from test where testname='" . htmlspecialchars($testname, ENT_QUOTES) . "';"); if ($r = mysql_fetch_array($result)) { $_SESSION['testname'] = $testname; $_SESSION['testqn'] = $r['testid']; // $_GLOBALS['message']=$_SESSION['testname']; header('Location: prepqn.php'); } } ?> <html>
  • 66. <head> <title>Manage Tests</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="stylesheet" type="text/css" href="../oes.css"/> <link rel="stylesheet" type="text/css" media="all" href="../calendar/jsDatePick.css" /> <script type="text/javascript" src="../calendar/jsDatePick.full.1.1.js"></script> <script type="text/javascript"> window.onload = function(){ new JsDatePick({ useMode:2, target:"testfrom" //limitToToday:true <-- Add this should you want to limit the calendar until today. }); new JsDatePick({ useMode:2,
  • 67. target:"testto" //limitToToday:true <-- Add this should you want to limit the calendar until today. }); }; </script> <script type="text/javascript" src="../validate.js" ></script> </head> <body> <?php if (isset($_GLOBALS['message'])) { echo "<div class="message">" . $_GLOBALS['message'] . "</div>"; } ?> <div class="container"> <header> <a href="#"><img src="../images/examlogo.png" alt="Insert Logo Here" width="200" height="90" id="Insert_logo"
  • 68. style="background-color: #FFFFFF; display:block;" /></a> </header> <form name="testmng" action="testmng.php" method="post"> <?php if (isset($_SESSION['admname'])) { ?> <div class="sidebar1"> <ul class="nav"> <li><input type="submit" value="Home" name="dashboard" title="Home"/></li> <!-- For default add or delete functions--> <li><input type="submit" value="Add New" name="add" title="Add new test"/></li> <li><input type="submit" value="Delete Selected" name="delete" title="Delete Selected records"/></li> <!-- log out function--> <li><input type="submit" value="Log out" name="logout" title="CAREFUL !! Log Out"/></li> </ul> <aside> <p> Use this page to perform administrative duties on students data.
  • 69. You can edit student data where changes are required. </p> </aside> <!-- end .sidebar1 --></div> <?php } ?> <article class="content"> <section> <h1>Manage Tests</h1> <p> <div id="content"> <?php if (isset($_SESSION['admname'])) { // To display the Help Message if (isset($_REQUEST['forpq'])) echo "<div class="pmsg" style="text-align:center"> Which test questions Do you want to Manage? <br/><b>Help:</b>Click on Questions button to manage the
  • 70. questions of respective tests</div>"; if (isset($_REQUEST['add'])) { ?> <?php if (isset($_SESSION['admname'])) { if (isset($_REQUEST['add'])) { ?> <!--Form for the new student--> <table class="loginf"> <tr> <td>Subject Name</td> <td> <select name="subject"> <option selected value="<Choose the Subject>">&lt;Choose the Subject&gt;</option> <?php $result = executeQuery("select subid,subname from subject;"); while ($r = mysql_fetch_array($result)) {
  • 71. echo "<option value="" . $r['subid'] . "">" . htmlspecialchars_decode($r['subname'], ENT_QUOTES) . "</option>"; } closedb(); ?> </select> </td> </tr> <tr> <td>Test Name</td> <td><input type="text" name="testname" value="" size="16" onKeyUp="isalphanum(this)" /></td> <td><div class="help"><b>Note:</b><br/>Test Name must be Unique<br/> in order to identify different<br/> tests on same subject.</div></td> </tr> <tr>
  • 72. <td>Test Description</td> <td><textarea name="testdesc" cols="20" rows="3" ></textarea></td> <td><div class="help"><b>Describe here:</b><br/>What the test is all about?</div></td> </tr> <tr> <td>Total Questions</td> <td><input type="text" name="totalqn" value="" size="16" onKeyUp="isnum(this)" /></td> </tr> <tr> <td>Duration(Mins)</td> <td><input type="text" name="duration" value="" size="16" onKeyUp="isnum(this)" /></td> </tr> <tr> <td>Test From </td>
  • 73. <td><input id="testfrom" type="text" name="testfrom" value="" size="16" readonly /></td> </tr> <tr> <td>Test To </td> <td><input id="testto" type="text" name="testto" value="" size="16" readonly /></td> </tr> <tr> <td>Test Secret Code</td> <td><input type="text" name="testcode" value="" size="16" onKeyUp="isalphanum(this)" /></td> <td><div class="help"><b>Note:</b><br/>Candidates must enter<br/>this code in order to <br/> take the test</div></td> </tr> <!--For Add option--> <?php if (isset($_REQUEST['add'])) { ?>
  • 74. <tr> <td> <input type="submit" value="Cancel" name="cancel" class="subbtn" title="Cancel"/></td> <td><input type="submit" value="Save" name="savea" class="subbtn" onClick="validateform('testmng')" title="Save"/></td> </tr> <?php } ?> </table> <?php } else if (isset($_REQUEST['edit'])) { // Edit existing test. $result = executeQuery("select t.totalquestions,t.duration,t.testid,t.testname,t.testdesc,t.subid,s. subname,DECODE(t.testcode,'oespass') as tcode,DATE_FORMAT(t.testfrom,'%Y-%m-%d') as testfrom,DATE_FORMAT(t.testto,'%Y-%m-%d') as testto from test as t,subject as s where t.subid=s.subid and t.testname='" . htmlspecialchars($_REQUEST['edit'], ENT_QUOTES) . "';"); if (mysql_num_rows($result) == 0) { header('Location: testmng.php'); } else if ($r = mysql_fetch_array($result)) {
  • 75. //editing components ?> <!--Form to edit existing tests--> <table class="loginf"> <tr> <td>Subject Name</td> <td> <select name="subject"> <?php $result = executeQuery("select subid,subname from subject;"); while ($r1 = mysql_fetch_array($result)) { if (strcmp($r['subname'], $r1['subname']) == 0) echo "<option value="" . $r1['subid'] . "" selected>" . htmlspecialchars_decode($r1['subname'], ENT_QUOTES) . "</option>"; else echo "<option value="" . $r1['subid'] . "">" . htmlspecialchars_decode($r1['subname'], ENT_QUOTES) . "</option>";
  • 76. } closedb(); ?> </select> </td> </tr> <tr> <td>Test Name</td> <td><input type="hidden" name="testid" value="<?php echo $r['testid']; ?>"/><input type="text" name="testname" value="<?php echo htmlspecialchars_decode($r['testname'], ENT_QUOTES); ?>" size="16" onKeyUp="isalphanum(this)" /></td> <td><div class="help"><b>Note:</b><br/>Test Name must be Unique<br/> in order to identify different<br/> tests on same subject.</div></td> </tr> <tr> <td>Test Description</td> <td><textarea name="testdesc" cols="20"
  • 77. rows="3" ><?php echo htmlspecialchars_decode($r['testdesc'], ENT_QUOTES); ?></textarea></td> <td><div class="help"><b>Describe here:</b><br/>What the test is all about?</div></td> </tr> <tr> <td>Total Questions</td> <td><input type="text" name="totalqn" value="<?php echo htmlspecialchars_decode($r['totalquestions'], ENT_QUOTES); ?>" size="16" onKeyUp="isnum(this)" /></td> </tr> <tr> <td>Duration(Mins)</td> <td><input type="text" name="duration" value="<?php echo htmlspecialchars_decode($r['duration'], ENT_QUOTES); ?>" size="16" onKeyUp="isnum(this)" /></td> </tr> <tr> <td>Test From </td>
  • 78. <td><input id="testfrom" type="text" name="testfrom" value="<?php echo $r['testfrom']; ?>" size="16" readonly /></td> </tr> <tr> <td>Test To </td> <td><input id="testto" type="text" name="testto" value="<?php echo $r['testto']; ?>" size="16" readonly /></td> </tr> <tr> <td>Test Secret Code</td> <td><input type="text" name="testcode" value="<?php echo htmlspecialchars_decode($r['tcode'], ENT_QUOTES); ?>" size="16" onKeyUp="isalphanum(this)" /></td> <td><div class="help"><b>Note:</b><br/>Candidates must enter<br/>this code in order to <br/> take the test</div></td> </tr> <!--For Edit option-->
  • 79. <?php } if (isset($_REQUEST['edit'])) { ?> <tr> <td><input type="submit" value="Cancel" name="cancel" class="subbtn" title="Cancel"/></td> <td><input type="submit" value="Save" name="savem" class="subbtn" onClick="validateform('testmng')" title="Save"/></td> </tr> </table> <?php closedb(); } } else { // Defualt Mode: Displays the Existing Test/s. $result = executeQuery("select t.testid,t.testname,t.testdesc,s.subname,DECODE(t.testcode,'oes pass') as tcode,DATE_FORMAT(t.testfrom,'%d-%M-%Y') as testfrom,DATE_FORMAT(t.testto,'%d-%M-%Y %H:%i:%s %p') as testto from test as t,subject as s where t.subid=s.subid order by t.testdate desc,t.testtime desc;"); if (mysql_num_rows($result) == 0) {
  • 80. echo "<h3 style="color:#0000cc;text- align:center;">No Tests Yet..!</h3>"; } else { $i = 0; ?> <table class="dashboards" cellspacing="10"> <tr> <th>&nbsp;</th> <th>Test Description</th> <th>Subject Name</th> <th>Test Secret Code</th> <th>Validity</th> <th>Edit</th> <th style="text- align:center;">Manage<br/>Questions</th> </tr> <?php while ($r = mysql_fetch_array($result)) {
  • 81. $i = $i + 1; if ($i % 2 == 0) echo "<tr class="alt">"; else echo "<tr>"; echo "<td style="text- align:center;"><input type="checkbox" name="d$i" value="" . $r['testid'] . "" /></td><td> " . htmlspecialchars_decode($r['testname'], ENT_QUOTES) . " : " . htmlspecialchars_decode($r['testdesc'], ENT_QUOTES) . "</td><td>" . htmlspecialchars_decode($r['subname'], ENT_QUOTES) . "</td><td>" . htmlspecialchars_decode($r['tcode'], ENT_QUOTES) . "</td><td>" . $r['testfrom'] . " To " . $r['testto'] . "</td>" . "<td class="tddata"><a title="Edit " . htmlspecialchars_decode($r['testname'], ENT_QUOTES) . ""href="testmng.php?edit=" . htmlspecialchars_decode($r['testname'], ENT_QUOTES) . ""><img src="../images/edit.png" height="30" width="40" alt="Edit" /></a></td>" . "<td class="tddata"><a title="Manage Questions of " . htmlspecialchars_decode($r['testname'], ENT_QUOTES) . ""href="testmng.php?manageqn=" . htmlspecialchars_decode($r['testname'], ENT_QUOTES) . ""><img src="../images/mngqn.png" height="30" width="40" alt="Manage Questions" /></a></td></tr>";
  • 83. </body> </html> oexam/admin/usermng.php <?php error_reporting(0); session_start(); include_once '../oesdb.php'; if (!isset($_SESSION['admname'])) { $_GLOBALS['message'] = "Session Timeout.Click here to <a href="index.php">Log In</a>"; } else if (isset($_REQUEST['logout'])) { //Log out and redirect login page unset($_SESSION['admname']); header('Location: index.php'); } else if (isset($_REQUEST['dashboard'])) { //redirect to home header('Location: admwelcome.php'); } else if (isset($_REQUEST['tcmng'])) {
  • 84. //redirect to home header('Location: tcmng.php'); } else if (isset($_REQUEST['delete'])) { //deleting the selected rows unset($_REQUEST['delete']); $hasvar = false; foreach ($_REQUEST as $variable) { if (is_numeric($variable)) { //some session values are also passed with request $hasvar = true; if ([email protected]("delete from student where stdid=$variable")) { if (mysql_errno () == 1451) //Children are dependent value $_GLOBALS['message'] = "System will not allow propagated deletions.<br/><b>Help:</b> If you still want to delete this user, manually delete all the records that are associated with this user first."; else $_GLOBALS['message'] = mysql_errno();
  • 85. } } } if (!isset($_GLOBALS['message']) && $hasvar == true) $_GLOBALS['message'] = "Selected user/s deleted"; else if (!$hasvar) { $_GLOBALS['message'] = "First select the users to be deleted."; } } else if (isset($_REQUEST['savem'])) { //update modified values if (empty($_REQUEST['cname']) || empty($_REQUEST['password']) || empty($_REQUEST['email'])) { $_GLOBALS['message'] = "Some fields are empty.No updates made"; } else { $query = "update student set stdname='" . htmlspecialchars($_REQUEST['cname'], ENT_QUOTES) . "', stdpassword=ENCODE('" .
  • 86. htmlspecialchars($_REQUEST['password']) . "','oespass'),emailid='" . htmlspecialchars($_REQUEST['email'], ENT_QUOTES) . "',contactno='" . htmlspecialchars($_REQUEST['contactno'], ENT_QUOTES) . "',address='" . htmlspecialchars($_REQUEST['address'], ENT_QUOTES) . "',city='" . htmlspecialchars($_REQUEST['city'], ENT_QUOTES) . "',pincode='" . htmlspecialchars($_REQUEST['pin'], ENT_QUOTES) . "' where stdid='" . htmlspecialchars($_REQUEST['student'], ENT_QUOTES) . "';"; if ([email protected]($query)) $_GLOBALS['message'] = mysql_error(); else $_GLOBALS['message'] = "User information updated."; } closedb(); } else if (isset($_REQUEST['savea'])) { //Insert the user information in the database $result = executeQuery("select max(stdid) as std from student"); $r = mysql_fetch_array($result); if (is_null($r['std']))
  • 87. $newstd = 1; else $newstd=$r['std'] + 1; $result = executeQuery("select stdname as std from student where stdname='" . htmlspecialchars($_REQUEST['cname'], ENT_QUOTES) . "';"); if (empty($_REQUEST['cname']) || empty($_REQUEST['password']) || empty($_REQUEST['email'])) { $_GLOBALS['message'] = "Some of the required Fields are Empty"; } else if (mysql_num_rows($result) > 0) { $_GLOBALS['message'] = "User already exists."; } else { $query = "insert into student values($newstd,'" . htmlspecialchars($_REQUEST['cname'], ENT_QUOTES) . "',ENCODE('" . htmlspecialchars($_REQUEST['password'], ENT_QUOTES) . "','oespass'),'" . htmlspecialchars($_REQUEST['email'], ENT_QUOTES) . "','" . htmlspecialchars($_REQUEST['contactno'], ENT_QUOTES) . "','" . htmlspecialchars($_REQUEST['address'], ENT_QUOTES)
  • 88. . "','" . htmlspecialchars($_REQUEST['city'], ENT_QUOTES) . "','" . htmlspecialchars($_REQUEST['pin'], ENT_QUOTES) . "')"; if ([email protected]($query)) { if (mysql_errno () == 1062) //duplicate value $_GLOBALS['message'] = "The username provided voilates some constraints, please try another username."; else $_GLOBALS['message'] = mysql_error(); } else $_GLOBALS['message'] = "New user created."; } closedb(); } ?> <html> <head>
  • 89. <title>Manage Students</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="stylesheet" type="text/css" href="../oes.css"/> <script type="text/javascript" src="../validate.js" ></script> </head> <body> <?php if (isset($_GLOBALS['message'])) { echo "<div class="message">" . $_GLOBALS['message'] . "</div>"; } ?> <div class="container"> <header> <a href="#"><img src="../images/examlogo.png" alt="Insert Logo Here" width="200" height="90" id="Insert_logo" style="background-color: #FFFFFF; display:block;" /></a>
  • 90. </header> <form name="usermng" action="usermng.php" method="post"> <?php if (isset($_SESSION['admname'])) { ?> <div class="sidebar1"> <ul class="nav"> <li><input type="submit" value="Home" name="dashboard" title="Home"/></li> <li><input type="submit" value="Teachers" name="tcmng" title="Manage Teachers"/></li> <!-- For default add or delete functions--> <li><input type="submit" value="Add New" name="add" title="Add new records"/></li> <li><input type="submit" value="Delete Selected" name="delete" title="Delete Selected records"/></li> <!-- log out function--> <li><input type="submit" value="Log out" name="logout" title="CAREFUL !! Log Out"/></li> </ul> <aside> <p> Use this page to perform administrative duties on
  • 91. students data. You can edit student data where changes are required. </p> </aside> <!-- end .sidebar1 --></div> <?php } ?> <article class="content"> <section> <h1>Manage Students</h1> <p> <div id="content"> <?php if (isset($_SESSION['admname'])) { if (isset($_REQUEST['add'])) { ?> <!--Form for the new student--> <table class="loginf">
  • 92. <tr> <td>Username</td> <td><input type="text" name="cname" value="" onKeyUp="isalphanum(this)"/></td> </tr> <tr> <td>Password</td> <td><input type="password" name="password" value="" onKeyUp="isalphanum(this)" /></td> </tr> <tr> <td>Retype Password</td> <td><input type="password" name="repass" value="" onKeyUp="isalphanum(this)" /></td> </tr> <tr>
  • 93. <td>E mail</td> <td><input type="text" name="email" value="" /></td> </tr> <tr> <td>Phone No</td> <td><input type="text" name="contactno" value="" onKeyUp="isnum(this)"/></td> </tr> <tr> <td>Address</td> <td><textarea name="address" cols="20" rows="3"></textarea></td> </tr> <tr> <td>Town</td> <td><input type="text" name="city" value=""
  • 94. onKeyUp="isalpha(this)"/></td> </tr> <tr> <td>REG No</td> <td><input type="text" name="pin" value="" onKeyUp="isnum(this)" /></td> </tr> <!--For Add option--> <?php if (isset($_REQUEST['add'])) { ?> <tr> <td> <input type="submit" value="Cancel" name="cancel" class="subbtn" title="Cancel"/></td> <td><input type="submit" value="Save" name="savea" class="subbtn" onClick="validateform('usermng')" title="Save"/></td> </tr> <?php } ?> </table> <?php } else if (isset($_REQUEST['edit'])) {
  • 95. //Edit existing student information $result = executeQuery("select stdid,stdname,DECODE(stdpassword,'oespass') as stdpass ,emailid,contactno,address,city,pincode from student where stdname='" . htmlspecialchars($_REQUEST['edit'], ENT_QUOTES) . "';"); if (mysql_num_rows($result) == 0) { header('Location: usermng.php'); } else if ($r = mysql_fetch_array($result)) { //editing components ?> <!--Form to edit existing students--> <table class="loginf"> <tr> <td>Username</td> <td><input type="text" name="cname" value="<?php echo htmlspecialchars_decode($r['stdname'], ENT_QUOTES); ?>" size="16" onKeyUp="isalphanum(this)"/></td> </tr> <tr>
  • 96. <td>Password</td> <td><input type="text" name="password" value="<?php echo htmlspecialchars_decode($r['stdpass'], ENT_QUOTES); ?>" size="16" onKeyUp="isalphanum(this)" /></td> </tr> <tr> <td>Email</td> <td><input type="text" name="email" value="<?php echo htmlspecialchars_decode($r['emailid'], ENT_QUOTES); ?>" size="16" /></td> </tr> <tr> <td>Phone No</td> <td><input type="text" name="contactno" value="<?php echo htmlspecialchars_decode($r['contactno'], ENT_QUOTES); ?>" size="16" onKeyUp="isnum(this)"/></td> </tr> <tr>
  • 97. <td>Address</td> <td><textarea name="address" cols="20" rows="3"><?php echo htmlspecialchars_decode($r['address'], ENT_QUOTES); ?></textarea></td> </tr> <tr> <td>Town</td> <td><input type="text" name="city" value="<?php echo htmlspecialchars_decode($r['city'], ENT_QUOTES); ?>" size="16" onKeyUp="isalpha(this)"/></td> </tr> <tr> <td>Reg No</td> <td><input type="hidden" name="student" value="<?php echo htmlspecialchars_decode($r['stdid'], ENT_QUOTES); ?>"/><input type="text" name="pin" value="<?php echo $r['pincode']; ?>" size="16" onKeyUp="isnum(this)" /></td> </tr> <!--For Edit option--> <?php } if (isset($_REQUEST['edit'])) { ?>
  • 98. <tr> <td><input type="submit" value="Cancel" name="cancel" class="subbtn" title="Cancel"/></td> <td><input type="submit" value="Save" name="savem" class="subbtn" onClick="validateform('usermng')" title="Save"/></td> </tr> </table> <?php closedb(); } } else { // Default: displays the existing students. $result = executeQuery("select * from student order by stdid;"); if (mysql_num_rows($result) == 0) { echo "<h3 style="color:#0000cc;text- align:center;">No existing students.</h3>"; } else {
  • 99. $i = 0; ?> <table class="dashboards" cellspacing="10"> <tr> <th>&nbsp;</th> <th>USERNAME</th> <th>E MAIL</th> <th>PHONE NO</th> <th>EDIT</th> </tr> <?php while ($r = mysql_fetch_array($result)) { $i = $i + 1; if ($i % 2 == 0) echo "<tr class="alt">"; else echo "<tr>"; echo "<td style="text-align:center;"><input type="checkbox" name="d$i" value="" . $r['stdid'] . ""
  • 100. /></td><td>" . htmlspecialchars_decode($r['stdname'], ENT_QUOTES) . "</td><td>" . htmlspecialchars_decode($r['emailid'], ENT_QUOTES) . "</td><td>" . htmlspecialchars_decode($r['contactno'], ENT_QUOTES) . "</td>" . "<td class="tddata"><a title="Edit " . htmlspecialchars_decode($r['stdname'], ENT_QUOTES) . ""href="usermng.php?edit=" . htmlspecialchars_decode($r['stdname'], ENT_QUOTES) . ""><img src="../images/edit.png" height="30" width="40" alt="Edit" /></a></td></tr>"; } ?> </table> <?php } closedb(); } } ?> </div> </form> </div>
  • 101. </body> </html> oexam/calendar/example.html JsDatePick's Javascript Calendar usage example Look at the comments on the HTML source to fully understand how this very simple example works. oexam/calendar/img/aqua_dayDown.gif oexam/calendar/img/aqua_dayNormal.gif oexam/calendar/img/aqua_dayOver.gif oexam/calendar/img/armygreen_dayDown.gif oexam/calendar/img/armygreen_dayNormal.gif oexam/calendar/img/armygreen_dayOver.gif oexam/calendar/img/bananasplit_dayDown.gif oexam/calendar/img/bananasplit_dayNormal.gif oexam/calendar/img/bananasplit_dayOver.gif oexam/calendar/img/beige_dayDown.gif
  • 105. /* Copyright 2009 Itamar Arjuan jsDatePick is distributed under the terms of the GNU General Public License. */ .JsDatePickBox { position:relative; width:212px; font- family:Arial; } .JsDatePickBox .jsDatePickCloseButton { cursor:pointer; position:absolute; z-index:1; top:1px; right:10px; width:33px; height:13px; background:url(img/closeButton_normal.gif) left top no-repeat; } .JsDatePickBox .jsDatePickCloseButtonOver { cursor:pointer; position:absolute; z-index:1; top:1px; right:10px; width:33px; height:13px; background:url(img/closeButton_over.gif) left top no-repeat; } .JsDatePickBox .jsDatePickCloseButtonDown { cursor:pointer; position:absolute; z-index:1; top:1px; right:10px; width:33px; height:13px; background:url(img/closeButton_down.gif) left top no-repeat; }
  • 106. .JsDatePickBox .boxLeftWall { float:left; width:7px; margin:0; padding:0; } .JsDatePickBox .boxLeftWall .leftTopCorner{ margin:0; padding:0; width:7px; height:8px; background:url(img/boxTopLeftCorner.png) left top no-repeat; overflow:hidden; } .JsDatePickBox .boxLeftWall .leftBottomCorner{ margin:0; padding:0; width:7px; height:8px; background:url(img/boxBottomLeftCorner.png) left top no- repeat; overflow:hidden; } .JsDatePickBox .boxLeftWall .leftWall{ margin:0; padding:0; width:7px; background:url(img/boxSideWallPx.gif) #ffffff left top repeat-y; overflow:hidden; } .JsDatePickBox .boxRightWall { float:left; width:7px; margin:0; padding:0;} .JsDatePickBox .boxRightWall .rightTopCorner{ margin:0; padding:0; width:7px; height:8px; background:url(img/boxTopRightCorner.png) left top no-repeat; overflow:hidden; } .JsDatePickBox .boxRightWall .rightBottomCorner{ margin:0; padding:0; width:7px; height:8px; background:url(img/boxBottomRightCorner.png) left top no- repeat; overflow:hidden; } .JsDatePickBox .boxRightWall .rightWall{ margin:0; padding:0; width:7px; background:url(img/boxSideWallPx.gif) #ffffff right top repeat-y; overflow:hidden; }
  • 107. .JsDatePickBox .topWall { position:absolute; overflow:hidden; top:0px; left:7px; width:198px; height:4px; background:url(img/boxTopPx.gif) #ffffff left top repeat-x; } .JsDatePickBox .bottomWall { position:absolute; overflow:hidden; bottom:-1px; left:7px; width:198px; height:4px; background:url(img/boxTopPx.gif) #ffffff left top repeat-x; } .JsDatePickBox .hiddenBoxLeftWall { float:left; width:0px; overflow:hidden; overflow:hidden;} .JsDatePickBox .hiddenBoxRightWall { float:left; width:0px; overflow:hidden; overflow:hidden;} .JsDatePickBox .boxMain { float:left; background-color:#ffffff; margin:0; padding:15px 0 5px 0; } .JsDatePickBox .boxMainStripped { background:#ffffff; border:none; } .JsDatePickBox .tooltip { height:12px; line-height:11px; overflow:hidden; font-size:10px; color:#666666; text-align:left; padding:0px; margin:2px 0 2px 0; } .JsDatePickBox .weekDaysRow { height:12px; overflow:hidden; line-height:11px; font-size:10px; color:#666666; text- align:center; padding:0px; margin:2px 0 0 0; }
  • 108. .JsDatePickBox .weekDaysRow .weekDay { float:left; height:14px; overflow:hidden; width:24px; margin:0 5px 0 0; padding:0; } .JsDatePickBox .boxMainInner { background:#ffffff; width:198px; float:left; margin:5px 0 0 0; padding:0; } .JsDatePickBox .boxMainCellsContainer { background- color:#ffffff; margin:0; padding:0; } .JsDatePickBox .boxMainInner .controlsBar { overflow:hidden; height:20px; position:relative; } .JsDatePickBox .boxMainInner .controlsBarText { overflow:hidden; height:20px; line-height:20px; color:#000000; font-size:12px; text-align:center; } .JsDatePickBox .boxMainInner .monthForwardButton { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:22px; background:url(img/monthForward_normal.gif) left top no- repeat; } .JsDatePickBox .boxMainInner .monthForwardButtonOver { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:22px; background:url(img/monthForward_over.gif) left top no-repeat; } .JsDatePickBox .boxMainInner .monthForwardButtonDown {
  • 109. overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:22px; background:url(img/monthForward_down.gif) left top no- repeat; } .JsDatePickBox .boxMainInner .monthBackwardButton { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:22px; background:url(img/monthBackward_normal.gif) left top no- repeat; } .JsDatePickBox .boxMainInner .monthBackwardButtonOver { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:22px; background:url(img/monthBackward_over.gif) left top no- repeat; } .JsDatePickBox .boxMainInner .monthBackwardButtonDown { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:22px; background:url(img/monthBackward_down.gif) left top no- repeat; } .JsDatePickBox .boxMainInner .yearForwardButton { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:0px; background:url(img/yearForward_normal.gif) left top no-repeat; } .JsDatePickBox .boxMainInner .yearForwardButtonOver { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:0px;
  • 110. background:url(img/yearForward_over.gif) left top no-repeat; } .JsDatePickBox .boxMainInner .yearForwardButtonDown { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:0px; background:url(img/yearForward_down.gif) left top no-repeat; } .JsDatePickBox .boxMainInner .yearBackwardButton { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:0px; background:url(img/yearBackward_normal.gif) left top no- repeat; } .JsDatePickBox .boxMainInner .yearBackwardButtonOver { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:0px; background:url(img/yearBackward_over.gif) left top no-repeat; } .JsDatePickBox .boxMainInner .yearBackwardButtonDown { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:0px; background:url(img/yearBackward_down.gif) left top no-repeat; } .JsDatePickBox .boxMainInner .skipDay { cursor:default; overflow:hidden; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; } .JsDatePickBox .boxMainInner .dayNormal { -khtml-user- select: none; font-size:12px; cursor:pointer; overflow:hidden; color:#4c4c4c; width:24px; height:25px; float:left; margin:4px
  • 111. 5px 0 0; padding:0; text-align:center; line-height:25px; /*background:url(img/dayNormal.gif) left top no-repeat;*/ } .JsDatePickBox .boxMainInner .dayNormalToday { -khtml-user- select: none; font-size:12px; cursor:pointer; overflow:hidden; color:#f40f0f; font-weight:bold; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; text-align:center; line-height:25px; /*background:url(img/dayNormal.gif) left top no-repeat;*/ } .JsDatePickBox .boxMainInner .dayDisabled { -khtml-user- select: none; cursor:default; font-size:12px; overflow:hidden; color:#999999; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; text-align:center; line-height:25px; /*background:url(img/dayNormal.gif) left top no-repeat;*/ } .JsDatePickBox .boxMainInner .dayOver { -khtml-user-select: none; cursor:pointer; font-size:12px; overflow:hidden; color:#4c4c4c; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; text-align:center; line-height:25px; /*background:url(img/dayOver.gif) left top no-repeat;*/ } .JsDatePickBox .boxMainInner .dayOverToday { -khtml-user- select: none; cursor:pointer; font-size:12px; overflow:hidden; font-weight:bold; color:#f40f0f; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; text-align:center; line-height:25px; /*background:url(img/dayOver.gif) left top no-repeat;*/ } .JsDatePickBox .boxMainInner .dayDown { -khtml-user-select:
  • 112. none; cursor:pointer; font-size:12px; overflow:hidden; color:#F9F9F9; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; text-align:center; line-height:25px; /*background:url(img/dayDown.gif) left top no-repeat; */ } .JsDatePickBox .boxMainInner .dayDownToday { -khtml-user- select: none; cursor:pointer; font-size:12px; overflow:hidden; color:#f40f0f; font-weight:bold; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; text-align:center; line-height:25px; /* background:url(img/dayDown.gif) left top no-repeat;*/ } oexam/calendar/jsDatePick.full.1.1.js /* Copyright 2009 Itamar Arjuan jsDatePick is distributed under the terms of the GNU General Public License. */ g_arrayOfUsedJsDatePickCalsGlobalNumbers = new Array(); g_currentDateObject = new Object(); g_currentDateObject.dateObject = new Date(); g_currentDateObject.day = g_currentDateObject.dateObject.getDate(); g_currentDateObject.month =
  • 113. g_currentDateObject.dateObject.getMonth() + 1; g_currentDateObject.year = g_currentDateObject.dateObject.getFullYear(); $ = function(id){ return document.getElementById(id); }; String.prototype.trim = function() { return this.replace(/^s+|s+$/g,""); }; String.prototype.ltrim = function() { return this.replace(/^s+/,""); }; String.prototype.rtrim = function() { return this.replace(/s+$/,""); }; JsDatePick = function(configurationObject){
  • 114. this.oConfiguration = new Object(); this.oCurrentDay = g_currentDateObject; this.monthsTextualRepresentation = new Array("Janaury","February","March","April","May","June","Jul y","August","September","October","November","December"); this.lastPostedDay = null; this.initialZIndex = 2; this.globalNumber = this.getUnUsedGlobalNumber(); eval ("gRef_"+this.globalNumber+"=this;"); this.setConfiguration(configurationObject); this.makeCalendar(); };
  • 115. JsDatePick.prototype.getUnUsedGlobalNumber = function(){ var aNum = Math.floor(Math.random()*1000); while ( ! this.isUnique_GlobalNumber(aNum) ){ aNum = Math.floor(Math.random()*1000); } return aNum; }; JsDatePick.prototype.isUnique_GlobalNumber = function(aNum){ var i;
  • 116. for (i=0; i<g_arrayOfUsedJsDatePickCalsGlobalNumbers.length; i++){ if (g_arrayOfUsedJsDatePickCalsGlobalNumbers[i] == aNum){ return false; } } return true; }; JsDatePick.prototype.addOnSelectedDelegate = function(aDelegatedFunction){ if (typeof(aDelegatedFunction) == "function"){ this.addonSelectedDelegate = aDelegatedFunction; } return false; }; JsDatePick.prototype.setOnSelectedDelegate = function(aDelegatedFunction){
  • 117. if (typeof(aDelegatedFunction) == "function"){ this.onSelectedDelegate = aDelegatedFunction; return true; } return false; }; JsDatePick.prototype.executeOnSelectedDelegateIfExists = function(){ if (typeof(this.onSelectedDelegate) == "function"){ this.onSelectedDelegate(); } if (typeof(this.addonSelectedDelegate) == "function"){ this.addonSelectedDelegate(); } }; JsDatePick.prototype.setRepopulationDelegate = function(aDelegatedFunction){
  • 118. if (typeof(aDelegatedFunction) == "function"){ this.repopulationDelegate = aDelegatedFunction; return true; } return false; }; JsDatePick.prototype.setConfiguration = function(aConf){ this.oConfiguration.isStripped = (aConf["isStripped"] != null) ? aConf["isStripped"] : false; this.oConfiguration.useMode = (aConf["useMode"] != null) ? aConf["useMode"] : 1; this.oConfiguration.selectedDate = (aConf["selectedDate"] != null) ? aConf["selectedDate"] : null; this.oConfiguration.target = (aConf["target"] != null) ? aConf["target"] : null; this.oConfiguration.yearsRange = (aConf["yearsRange"] != null) ? aConf["yearsRange"] : new Array(1971,2100); this.oConfiguration.limitToToday = (aConf["limitToToday"] != null) ? aConf["limitToToday"] :
  • 119. false; this.oConfiguration.field = (aConf["field"] != null) ? aConf["field"] : false; this.oConfiguration.cellColorScheme = (aConf["cellColorScheme"] != null) ? aConf["cellColorScheme"] : "ocean_blue"; this.selectedDayObject = new Object(); this.flag_DayMarkedBeforeRepopulation = false; this.flag_aDayWasSelected = false; this.lastMarkedDayObject = null; if (this.oConfiguration.selectedDate != null){ if (typeof(this.oConfiguration.selectedDate) == "object"){ if (!isNaN(this.oConfiguration.selectedDate.day) && !isNaN(this.oConfiguration.selectedDate.month) && !isNaN(this.oConfiguration.selectedDate.year)){
  • 120. this.currentDay = this.oCurrentDay.day; this.selectedDayObject.day = this.oConfiguration.selectedDate.day; this.currentMonth = this.selectedDayObject.month = this.oConfiguration.selectedDate.month; this.currentYear = this.selectedDayObject.year = this.oConfiguration.selectedDate.year; this.flag_aDayWasSelected = true; } else { alert("The initial selected date object is not complete or invalid!"); } } else { alert("the initial selected date is wrong! you need to supply an object containing 3 properties (day,month,year)"); }
  • 121. } else { this.currentYear = this.oCurrentDay.year; this.currentMonth = this.oCurrentDay.month; this.currentDay = this.oCurrentDay.day; } }; JsDatePick.prototype.resizeCalendar = function(){ this.leftWallStrechedElement.style.height = "0px"; this.rightWallStrechedElement.style.height = "0px"; var totalHeight = this.JsDatePickBox.offsetHeight; var newStrechedHeight = totalHeight-16; if (newStrechedHeight < 0){ return; }
  • 122. this.leftWallStrechedElement.style.height = newStrechedHeight+"px"; this.rightWallStrechedElement.style.height = newStrechedHeight+"px"; return true; }; JsDatePick.prototype.closeCalendar = function(){ this.JsDatePickBox.style.display = "none"; }; JsDatePick.prototype.populateFieldWithSelectedDate = function(){ $(this.oConfiguration.target).value = this.getSelectedDayFormatted(); this.closeCalendar(); }; JsDatePick.prototype.makeCalendar = function(){
  • 123. var d = document; var JsDatePickBox = d.createElement("div"); var clearfix = d.createElement("div"); var closeButton = d.createElement("div"); JsDatePickBox.setAttribute("class","JsDatePickBox"); clearfix.setAttribute("class","clearfix"); closeButton.setAttribute("class","jsDatePickCloseButton") ; closeButton.setAttribute("globalNumber",this.globalNumb er); closeButton.onmouseover = function(){ this.setAttribute("class","jsDatePickCloseButtonOver"); var globalRef = "gRef_"+this.getAttribute("globalNumber"); eval(globalRef + ".setTooltipText("Close the calendar");"); };
  • 124. closeButton.onmouseout = function(){ this.setAttribute("class","jsDatePickCloseButton"); var globalRef = "gRef_"+this.getAttribute("globalNumber"); eval(globalRef + ".setTooltipText("");"); }; closeButton.onmousedown = function(){ this.setAttribute("class","jsDatePickCloseButtonDown"); var globalRef = "gRef_"+this.getAttribute("globalNumber"); eval(globalRef + ".setTooltipText("Close the calendar");"); }; closeButton.onmouseup = function(){ this.setAttribute("class","jsDatePickCloseButton"); var globalRef =
  • 125. "gRef_"+this.getAttribute("globalNumber"); eval("gRef_"+this.getAttribute("globalNumber")+".closeC alendar();"); eval(globalRef + ".setTooltipText("");"); }; this.JsDatePickBox = JsDatePickBox; var leftWall = d.createElement("div"); var rightWall = d.createElement("div"); var topWall = d.createElement("div"); var bottomWall = d.createElement("div"); topWall.setAttribute("class","topWall"); bottomWall.setAttribute("class","bottomWall"); var topCorner = d.createElement("div"); var bottomCorner = d.createElement("div");
  • 126. var wall = d.createElement("div"); topCorner.setAttribute("class","leftTopCorner"); bottomCorner.setAttribute("class","leftBottomCorner"); wall.setAttribute("class","leftWall"); this.leftWallStrechedElement = wall; this.leftWall = leftWall; this.rightWall = rightWall; leftWall.appendChild(topCorner); leftWall.appendChild(wall); leftWall.appendChild(bottomCorner); topCorner = d.createElement("div"); bottomCorner = d.createElement("div"); wall = d.createElement("div");
  • 127. topCorner.setAttribute("class","rightTopCorner"); bottomCorner.setAttribute("class","rightBottomCorner"); wall.setAttribute("class","rightWall"); this.rightWallStrechedElement = wall; rightWall.appendChild(topCorner); rightWall.appendChild(wall); rightWall.appendChild(bottomCorner); if (this.oConfiguration.isStripped){ leftWall.setAttribute("class","hiddenBoxLeftWall"); rightWall.setAttribute("class","hiddenBoxRightWall"); } else { leftWall.setAttribute("class","boxLeftWall"); rightWall.setAttribute("class","boxRightWall"); }
  • 129. var aSpan = document.createElement("span"); if(inputElement!=null) { inputElement.parentNode.replaceChild(aSpan,inputElemen t); aSpan.appendChild(inputElement); inputElement.setAttribute("globalNumber",this.globalNum ber); inputElement.onclick = function(){ eval("gRef_"+this.getAttribute("globalNumber")+".showC alendar();"); }; aSpan.style.position = "relative"; this.initialZIndex++; JsDatePickBox.style.zIndex =
  • 130. this.initialZIndex.toString(); JsDatePickBox.style.position = "absolute"; JsDatePickBox.style.top = "18px"; JsDatePickBox.style.left = "0px"; JsDatePickBox.style.display = "none"; aSpan.appendChild(JsDatePickBox); var aFunc = new Function("gRef_"+this.globalNumber+".populateFieldWithSelec tedDate();"); this.setOnSelectedDelegate(aFunc); } } else { alert("There is no element with such an ID!"); } } } else { if (this.oConfiguration.target != null){
  • 131. $(this.oConfiguration.target).appendChild(JsDatePickBox) ; $(this.oConfiguration.target).style.position = "relative"; JsDatePickBox.style.position = "absolute"; JsDatePickBox.style.top = "0px"; JsDatePickBox.style.left = "0px"; this.resizeCalendar(); this.executePopulationDelegateIfExists(); } else { alert("No element ID to put this calendar on! check JsDatePick configuration"); } } }; JsDatePick.prototype.determineFieldDate = function(){ var aField = $(this.oConfiguration.target);
  • 132. if (aField.value.trim().length == 0){ this.unsetSelection(); return; } else { if (aField.value.trim().length > 7){ var array = aField.value.trim().split("-"); this.setSelectedDay({ year:parseInt(array[0]), month:parseInt(array[1],10), day:parseInt(array[2],10) }); return; } else { this.unsetSelection(); return;
  • 133. } } }; JsDatePick.prototype.showCalendar = function(){ if (this.JsDatePickBox.style.display == "none"){ this.determineFieldDate(); this.JsDatePickBox.style.display = "block"; this.resizeCalendar(); this.executePopulationDelegateIfExists(); } else { return; } }; JsDatePick.prototype.isAvailable = function(y, m, d){ if (y > this.oCurrentDay.year){ return false;
  • 134. } if (m > this.oCurrentDay.month && y == this.oCurrentDay.year){ return false; } if (d > this.oCurrentDay.day && m == this.oCurrentDay.month && y == this.oCurrentDay.year ){ return false; } return true; }; JsDatePick.prototype.getDOMCalendarStripped = function(){ var d = document; var boxMain = d.createElement("div");
  • 135. if (this.oConfiguration.isStripped){ boxMain.setAttribute("class","boxMainStripped"); } else { boxMain.setAttribute("class","boxMain"); } this.boxMain = boxMain; var boxMainInner = d.createElement("div"); var clearfix = d.createElement("div"); var boxMainCellsContainer = d.createElement("div"); var tooltip = d.createElement("div"); var weekDaysRow = d.createElement("div"); var clearfix2 = d.createElement("div"); clearfix.setAttribute("class","clearfix"); clearfix2.setAttribute("class","clearfix");
  • 136. boxMainInner.setAttribute("class","boxMainInner"); boxMainCellsContainer.setAttribute("class","boxMainCell sContainer"); tooltip.setAttribute("class","tooltip"); weekDaysRow.setAttribute("class","weekDaysRow"); this.tooltip = tooltip; boxMain.appendChild(boxMainInner); this.controlsBar = this.getDOMControlBar(); this.makeDOMWeekDays(weekDaysRow); boxMainInner.appendChild(this.controlsBar); boxMainInner.appendChild(clearfix); boxMainInner.appendChild(tooltip); boxMainInner.appendChild(weekDaysRow); boxMainInner.appendChild(boxMainCellsContainer); boxMainInner.appendChild(clearfix2);