Current File : /home/inlingua/public_html/noida/icentex/attendance/Oraltest.php |
<?php
include("header_attendance.php");
// Include the database connection details
require('../dbConnection.php');
// Include common functions
require('../commonFunc.php');
// Include common functions
require('../globalVars.php');
// Include the table handler class
require('../dbHandler.class.php');
// Init and connect to database
$dbObject = new dbHandler();
$dbObject->connect();
?>
<style type="text/css">
#dhtmltooltip{
position: absolute;
text-align: left;
border: 1px solid #cccccc;
padding: 2px;
background-color: lightyellow;
visibility: hidden;
z-index: 100;
/*Remove below line to remove shadow. Below line should always appear last within this CSS*/
filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135);
}
.borderright{
border-right: 1px solid #000000;
}
.borderleft{
border-left: 1px solid #000000;
}
.bordertop{
border-top: 1px solid #000000;
}
.borderbottom{
border-bottom: 1px solid #000000;
}
.borderall{
border: 1px solid #000000;
}
</style>
<script type="text/javascript" src="js/calendar.js"></script>
<script>
function lightb()
{
$(document).ready(function(){
$(".lightbox").colorbox({width:"80%", height:"85%", iframe:true,onClosed:function(){ update_cal() }});
});
}
function update_cal()
{
cid=document.getElementById('courseId').value;
//alert(cid);
//window.location.replace("http://inlinguanewdelhi.com/icentex/attendance/calendar.php?&CID=cid");
//debugger;
displaycalendar(cid);
}
/*function GetCustomerInfo()
{
var xmlHttp = null;
var CustomerNumber = document.getElementById( "TextBoxCustomerNumber" ).value;
var Url = "GetCustomerInfoAsJson.aspx?number=" + CustomerNumber;
xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = ProcessRequest;
xmlHttp.open( "GET", Url, true );
xmlHttp.send( null );
}*/
function submit_form()
{
// Perform basic checks on email address
if (document.email_report.email.value != "")
{
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
var address = document.email_report.email.value;
if(reg.test(address) == false) {
alert('Invalid Email Address');
document.email_report.email.focus();
return false;
}
}
else
{ alert("Email address cannot be blank. Please enter it.");
document.email_report.email.focus(); return false;
}
if(confirm("Are You Sure?"))
{
document.email_report.submit();
}
return true;
}
</script>
<div><h4>Add Course Records</h4>
<div style="margin-left:5px;">
<table width="100%" border="0">
<tr >
<td width="100%">Course ID
<?php
//echo date("Y-m-d H:i:s");
$id1=mktime(0,0,0,date("m"),date("d")-2,date("Y"));
$id2=mktime(0,0,0,date("m"),date("d")-30,date("Y"));
$td=date("Y-m-d",$id1);
$td1=date("Y-m-d",$id2);
$query="select * from ingl_course where instructor='".$_SESSION[id]."' && ((enddate>='".$td."') || ( enddate>='".$td1."' && course_prefix='C')) order by courseid";
//echo $query;
//$query="select * from ingl_course where instructor='".$_SESSION[id]."' order by courseid";
//$query="select * from ingl_course order by courseid";
$res=mysqli_query($conn,$query);
if(mysqli_num_rows($res)>0)
{
echo "<select name='courseId' id='courseId' onchange='displayoraltest(this.value)'>";
echo"<option value=''>Select Course ID</option>";
while($rsult=mysqli_fetch_array($res))
{
echo"<option value='".$rsult[recNo]."'" ;
echo">".$rsult['courseid']."</option>";
}
echo"</select>";
}
else
{
echo "Please enter the Course ID ";
}
?>
</td>
</tr>
<tr><td id="student_calendar_id" align="left"></td></tr>
<tr><td id="" align="left"> </td></tr>
<tr><td id="student_attendance_id" align="center"></td></tr>
</table>
</div></div>
<?php
include("footer_attendance.php");
//include("calendar.php");
?>
<div id="dhtmltooltip"></div>
<script type="text/javascript">
/***********************************************
*DHTML code library (vikas umrao)
***********************************************/
var offsetxpoint=-50 //Customize x offset of tooltip
var offsetypoint=10 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function ddrivetip(thetextDiv, thecolor, thewidth){
if (ns6||ie){
//if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=""+thetextDiv+"";
enabletip=true
return false
}
}
function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20
var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
else if (curX<leftedge)
tipobj.style.left="5px"
else
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetxpoint+"px"
//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"
}
}
function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}
document.onmousemove=positiontip
</script>