Current File : /home/inlingua/public_html/icentex/indeed-test/ingl_test_instr.select.php
<?php
//  Created on: 28-03-2013
include("check.php");
/*
$loggedUserNo = $_SESSION['loggedUserNo'];
if ($loggedUserNo == "")
{	echo "Please <a href='index.php'>login</a> first.";
	exit(0);
}
*/

// Include header
include "header.php";
?>
<script>
javascript:window.history.forward(1);
</script>

<div id="contentnew">
<h2><span class='pa-nor-navbar'>Please read the instructions carefully:</span></h2>
<?php if ($_SESSION['dispMesg'][1] != "" && (date("U") - $_SESSION['dispMesg'][0] < 7)) 
{ 	?>
	<span id='mesgSpan'><font color='#da0000'><?php echo $_SESSION['dispMesg'][1];?></font></span>
	<script>
	setTimeout(function() {   $('#mesgSpan').fadeOut('slow'); }, 4000); // <-- time in milliseconds 
	</script>
	<br>
	<?php
}
unset($_SESSION['dispMesg']);
?>

<?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();

// Records selection sql
$sqlQuery = "SELECT * FROM ingl_test_instr";

// Prepare page navigation
$resultsPerPage = 100; // number of rows to return per page

// Prepare add on URL
$addOnUrl = "";
$offset=$_REQUEST['offset'];
if ($resultsPerPage > 0)
{	$prev_next_links = $dbObject->prev123Next($sqlQuery, $resultsPerPage,$addOnUrl);
	$sqlQuery .= " limit " . $offset . "," . $resultsPerPage ;
}

// Print navigation bar
function printArray($element) { echo "$element"; }

if ($resultsPerPage > 0 && $prev_next_links && count($prev_next_links) > 1)
{	//echo "Page: ";
	//array_walk($prev_next_links, 'printArray'); 
}

// Select records from table
$selectedRecords = $dbObject->Select($sqlQuery);
?>

<!--<table border='0' width="100%">
<tr valign='top'  class='rowH'>
<th>Id</th>
<th>Instruction</th>
<th >status</th>

<th width="15%">Action</th>
</tr>
-->
<form method="post" action="ingl_test.select.php">
<ul>
<?php
// If no records selected, print message
if (!$selectedRecords)
{	?>
	There are no entries. 
	<?php
}
$i=1;	
while($objectData=$dbObject->SelectNext())
{	?>

<li style="font-size: 14px;font-weight:bol;"><?php echo $objectData['instr'];?></li>
	<!--<tr valign='top' onmouseover="this.className='pa-row-highlight'" onmouseout="this.className='pa-nor'">
	<td><?php //echo $i;?></td>
	<td><?php //echo $objectData['instr'];?></td>
	<td><?php //echo $objectData['status'];?></td>

	<td>
	<a href='ingl_test_instr.main.php?aC=sM&kV=<?php echo $objectData['recNo'] ;?>' title='Modify entry'><img src='../images/edit.png' border='0' hspace='2'></a> |
	<a href='ingl_test_instr.main.php?aC=sV&kV=<?php echo $objectData['recNo'] ;?>' title='View entry'><img src='../images/view.png' border='0' hspace='2'></a> | 
	<a onclick='return confDel();' href='ingl_test_instr.main.php?aC=Delete&kV=<?php echo $objectData['recNo'] ;?>' title='Delete entry'><img src='../images/delete.png' border='0' hspace='2'></a>
	</td>
	</tr>
	--><?php
	$i++;
}
?>
<!--</table>-->
</ul>
<div style="width: 100%;text-align: center;padding-right:20px; "><input type="submit" value="Start Test >>"></div>
</form>
<?php
// Print navigation bar
if ($resultsPerPage > 0 && $prev_next_links  && count($prev_next_links) > 1)
{	//echo "Page: ";
	//array_walk($prev_next_links, 'printArray'); 
	//echo "<br>";
}
?>

<script type="text/javascript">
function confDel()
{	var agree = confirm("Click OK to delete permanently or cancel");
	if (agree)
		return true;
	else
		return false;
}
</script>
</div>
<?php 
$dbObject->CloseConnection();

// Include footer
include "footer.php";
?>