Current File : /home/inlingua/public_html/noida/icentex_noida/admin/backup/list_modify.php |
<?php
// Copyright, Panalink Infotech Limited. Created on: 22-05-2010
// Include header
include "header.php";
//echo "<br>";
// 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();
// Records selection sql
$sqlQuery = "SELECT * FROM timesheet where status_send='1' && approve_status='1' && modify_status='1' order by count_send desc,recNo desc";
// Prepare page navigation
$resultsPerPage = 20; // number of rows to return per page
// Prepare add on URL
$addOnUrl = "";
$res=mysql_query($sqlQuery);
$totalrows=mysql_num_rows($res);
?>
<div class="clear"></div>
<?php include("left.php"); ?>
<div id="content-wrap" style="padding-top:20px;" >
<div id="content-box" >
<div id="toolbar-title" >
<h3>
List to Modify Timesheet
</h3>
<div class="clear"></div>
</div>
<div id="toolbar-box">
<div class="toolbar" id="toolbar"></div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<div id="element-box">
<div class="m">
<font style="font-size:12px; color:#E84B1E"><?php if($_SESSION['modtatus']) { echo $_SESSION['modtatus']; unset ($_SESSION['modtatus']); }?></font>
<table class="adminform">
<tbody><tr>
<td valign="top" width="100%">
<!--<a href="taxes.main.php">Add new tax</a>-->
<script language="javascript">
<!--
function delstatus(val)
{
if(confirm("Are you sure to delete?\nAll the timesheets after this period (if any) of the user will get deleted.\nInstructor will have to send all timesheet after this period (if any ) again."))
{
location.href="delet.timesheet.php?id="+val;
}
else
{
return false;
}
}
-->
</script>
<br>
<?php
// Print navigation bar
// Select records from table
$selectedRecords = $dbObject->Select($sqlQuery);
echo "<table border='0' class='pa-nor' cellspacing='0' width='100%'>";
echo "<tr valign='center' class='pa-sel-header' style='height:30px;'>";
//echo "<th><b>recNo</b></th>";
echo "<th><b>From Date</b></th>";
echo "<th><b>To Date</b></th>";
echo "<th><b>Name</b></th>";
echo "<th><b>Location</b></th>";
echo "<th>Action</th>";
echo "</tr>";
// If no records selected, print message
if (!$selectedRecords)
{ echo "<tr><td colspan='5'>There are no selected records</td></tr>"; }
$i=1;
while($objectData=$dbObject->SelectNext())
{
if($i%2==0) $bgcolor='#F3F3F3';
else $bgcolor='#EBEBEB';
if($objectData[first_id])
{
$bgcolor='#C9C9C9';
$first_id=$objectData[first_id];
}
if($first_id==$objectData[recNo]) $bgcolor='#C9C9C9';
echo "<tr valign='top' style='background:$bgcolor;height:25px;' onmouseover=\"this.className='pa-row-highlight'\" onmouseout=\"this.className='pa-nor'\" >";
//echo "<td>$objectData[recNo]</td>";
echo "<td>$objectData[fromDate]</td>";
echo "<td>$objectData[toDate]</td>";
echo "<td>$objectData[Instname]</td>";
echo "<td>$objectData[location]</td>";
//echo "<td><a href='timesheet.main.php?aC=sM&kV=". $objectData['recNo'] ."'>Modify</a> | ";
echo "<td><a href='timesheet.main.php?aC=sV&kV=". $objectData['recNo'] ."& id=arc'>View</a> ";
if($totalrows==$i)
{
echo "| <a href='timesheet.main.php?aC=sM&kV=". $objectData['recNo'] ."'><b>Modify</b></a>";
}
echo "</td>";
echo "</tr>";
$i++;
}
print "</table>";
?>
</div>
<br>
<div id="cpanel">
<div style="float: left;">
<div class="icon"></div>
</div>
<div style="float: left;">
<div class="icon"></div>
</div>
<div style="float: left;"></div>
</div>
</td>
<td valign="top" width="45%"> </td>
</tr>
</tbody></table>
</div>
</div>
<div class="clear"></div>
<p class="copyright"> </p>
</div>
</div>
</body></html>
<?php
$dbObject->CloseConnection();
// Include footer
//include "footer.php";
?>