Current File : /home/inlingua/www/noida/icentex_noida/header_home.php |
<?php
include("check.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=mysqli_query($conn,$query);
$num=mysqli_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=mysqli_query($conn,$queryRU) or die(mysqli_query($conn,));
//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" />
<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 src="menu/dbMenu/dbMenu.js" type="text/javascript"></script>
<link href="menu/dbMenu/global.css" type="text/css" rel="stylesheet" media="screen">
<link href="menu/dbMenu/side.css" type="text/css" rel="stylesheet" media="screen">
<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" style="padding-top:0px;">
<?php if(isset($_SESSION['id'])){ ?>
<h3>Welcome, <?php echo $_SESSION['name1']; ?></h3>
<h3><a href='index.php?l=y'>Logout</a></h3>
<ul id="menu" class="dbMenu_left onMouse" style="padding-left:2px;">
<?php
$allow_m=$_SESSION['allowed_modules'];
/*echo "<pre>";
print_r($allow_m);
exit;*/
?>
<?php
if(in_array('indeed',$allow_m) || in_array('timesheet_admin',$allow_m) || in_array('eoc_admin',$allow_m) || in_array('leavetrackeradmin',$allow_m)
|| in_array('courserecordadmin',$allow_m) || in_array('pauadmin',$allow_m) || in_array('workshops_admin',$allow_m) || in_array('admin_conveyance',$allow_m) || in_array('calendar_admin',$allow_m) || in_array('incenter_admin',$allow_m)|| in_array('admin_general_leave',$allow_m))
{
?>
<li><a href="#"> Admin Modules</a>
<?php
//print_r($allow_m);
$queryList="select * from ingl_modules where menu_id=0 && usertype='admin' order by modulesName";
$resultList=mysqli_query($conn,$queryList);
echo"<ul>";
while($numList=mysqli_fetch_array($resultList))
{
/*echo "<pre>";
print_r($allow_m);
exit;*/
if(in_array($numList['module_name_table'],$allow_m))
{
echo"<li> <a href='".$numList['link']."' style='color:#000000;font-size:12px;'>".$numList['modulesName']."</a></li>";
}
}
echo"</ul>";
}
?>
</li>
<?php
if(in_array('pau',$allow_m))
{
?>
<li><a href="procedures/admin_procedure.php"> Procedures</a></li>
<?php
}
?>
<?php
if(in_array('pau',$allow_m))
{
$querytotupdates="select recNo from messages where 1=1 && to_send='".$_SESSION['id']."' && to_viewed = '0' && to_deleted = '0'";
$resulttoupdates=mysqli_query($conn,$querytotupdates);
$selectedRecords_msg = mysqli_num_rows($resulttoupdates);
if($selectedRecords_msg>0)
{
$flag="<img src='procedures/images/new-blinking.gif' style='border:none;'>";
}
else
{
$flag="";
}
?>
<li><a href="procedures/private_messages.php"> Updates(<?php echo $selectedRecords_msg;?>)<span style="padding-top:10px;"><?php echo $flag; ?></span></a></li>
<?php
}
?>
<?php
if(in_array('toutorials_forms',$allow_m))
{
?>
<li><a href="tutorials.php"> Tutorials</a></li>
<?php
}
?>
<?php
if(in_array('toutorials_forms',$allow_m))
{
?>
<li><a href="tutorials_documents.php?document=forms"> Forms and Documents</a></li>
<?php
}
if($_SESSION['username']=='0459')
{
$querytotapproval="select recNo from ingl_course where approved='0' ";
$resulttoapproval=mysqli_query($conn,$querytotapproval);
$resulttoapproval_msg = mysqli_num_rows($resulttoapproval);
if($resulttoapproval_msg>0)
{
$flags="<img src='procedures/images/new-blinking.gif' style='border:none;'>";
}
else
{
$flags="";
}
?>
<li><a href="admin_fd/ingl_course.select.php?search=1&type=approval_pending&"> Batch Requisition(<?php echo $resulttoapproval_msg;?>)<span style="padding-top:10px;"><?php echo $flags; ?></span></a></li>
<? } ?>
<li> <a href='changepass.php'>Change Password</a></li>
</ul>
<?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">