Current File : /home/inlingua/public_html/noida/icentex_noida/headerOLD.php
<?php 
include("check_timesheet.php");
include("connection.php");
mysql_connect($SERVER,$USERNAME, $PASSWORD);
mysql_select_db($DATABASE);

$totalHours1=$_SESSION['startingHours'];

$query="select (sum(hours1) + sum(hours2) + sum(hours3) + sum(hours4) +  sum(hours5) +  sum(hours7) +  sum(hours8) + sum(hours9)) as totalhrs  from timesheet where instructorId='".$_SESSION[id]."' && status_send=1 &&  approve_status=1 && modify_status!='1' && modify_status!='3'";

$result=mysql_query($query) or die(mysql_error());

$num=mysql_fetch_array($result);

$totalHours1=$totalHours1+$num[totalhrs];

if($totalHours1<500)
{
$rate_1="Rate1";

}
elseif($totalHours1>=500 && $totalHours1<1000)
{
$rate_1="Rate2";
}
elseif($totalHours1>=1000 && $totalHours1<1500)
{
$rate_1="Rate3";
}
else if($totalHours1>=1500)
{
$rate_1="Rate4";
}

//$queryRU="update timesheet_user set rateGroup='".$rate_1."' where recNo='".$_SESSION['id']."'";
//$resultRU=mysql_query($queryRU) or die(mysql_query());
//mysql_close();
$permission=array("0095","0021","0230","0037","0164","0229","0047","0052","0017","0008","0040","0013","0018","0067","1000","0141","0103","0175","0014","0066","0204","0211","0120","0188","0093","0221","0075","0162","0016","0219","0185","0027","0136","0033","0039","0205","0049","0148","1001","0400");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>inlingua Soft(i-Centex)</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" />

<link href="../../menu/dbMenu/global.css" rel="stylesheet" type="text/css" />
	<link href="..menu/dbMenu/side.css" type="text/css" rel="stylesheet" media="screen">

<script src="js/jquery.js" type="text/javascript"></script> 
<link type="text/css" href="jquery/development-bundle/themes/base/ui.all.css" rel="stylesheet" /> 
	<script type="text/javascript" src="jquery/development-bundle/jquery-1.3.2.js"></script> 
	<script type="text/javascript" src="jquery/development-bundle/ui/ui.core.js"></script> 
	<script type="text/javascript" src="jquery/development-bundle/ui/ui.datepicker.js"></script> 
	<script type="text/javascript" src="jquery/development-bundle/ui/ui.slider.js"></script>
	<script language="javascript">
$(function() {
		$('#datepicker1').datepicker({
			changeMonth: true,
			changeYear: true
		});
	});
	$(function() {
		$('#datepicker2').datepicker({
			changeMonth: true,
			changeYear: true
		});
	});
</script>
<SCRIPT LANGUAGE="JavaScript">

function textCounter(field,cntfield,maxlimit) {
if (field.value.length > maxlimit) {// if too long...trim it!
alert("You have exceeded the allowed word limit");
field.value = field.value.substring(0, maxlimit);

}
// otherwise, update 'characters left' counter
else
cntfield.value = maxlimit - field.value.length;
}

</script>
<STYLE type="text/css">

INPUT.btnStyle { background-color: #cccccc; 
border-color: efefef; 
border:solid 1px #000000;
font-family: arial, verdana, ms sans serif; 
font-weight: bold; 
font-size: 12pt; 
}

INPUT.btnStyle1 { background-color: #cccccc; 
border-color: efefef; 
border:solid 1px #000000;
font-family: arial, verdana, ms sans serif; 
font-weight: normal; 
font-size: 12pt; 
}

</STYLE>
</head>
<body>
<div id="outer">
  <div id="content">
<div id="tertiaryContent">
<?php if(isset($_SESSION[id])){ ?>
<h4>Welcome, <?php echo $_SESSION[name1]; ?></h4>
<h3><?php echo "Total Hours:". $totalHours1; ?></h3>
<h4><a href='index.php?l=y'>Logout</a></h4>
<?php } else { ?>
			<h3>Instructor Login</h3>
			<font style="font-size:12px; color:#E84B1E"><?php if($_SESSION['wrongpass']) { echo $_SESSION['wrongpass']; unset (			$_SESSION['wrongpass']); }?></font>
			<form action="admin.action.php" method="post" name="login" id="form-login">
			<fieldset>
            <legend></legend>

			  <p>
			    <label>User ID:
			      <input type="text" name="username" id="userid" accesskey="1" tabindex="1" />
		        </label>
			  </p>
				<p>
				  <label>Password:
				    <input name="passwd" type="password" id="password" accesskey="2" tabindex="2" />
				  </label>
				</p>
				<p class="submit">
				  <label>
				    <input type="submit" name="go" id="go" value="Go!" accesskey="3" tabindex="3" />
				  </label>
				</p>
            </fieldset>
			</form>
<?php }?>			
			
			
			<!--<h3>Nunc pellentesque</h3>
			<ul>
				<li><a href="#">Vivamus id arcu</a></li>
				<li><a href="#">Duis congue ultricies</a></li>
				<li><a href="#">Purus in mollis purus</a></li>
				<li><a href="#">Orci nonummy fringilla</a></li>
				<li><a href="#">Pellentesque at lorem</a></li>
				<li><a href="#">Enim vivamus convallis</a></li>
			</ul>-->
			
            <p><a href="http://www.inlinguanewdelhi.com/"><img src="images/inlingua_com.jpg" alt="" width="162" height="128" /></a></p>
<div class="xbg"></div>
		</div>
		
		<div id="primaryContentContainer">
		<div id="primaryContent">