| Server IP : 172.64.80.1 / Your IP : 172.70.131.125 Web Server : Apache System : Linux mail.federalpolyede.edu.ng 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64 User : federalpolyede.edu.ng_idh35skikv ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/federalpolyede.edu.ng/httpdocs_backup/admin_main/ |
Upload File : |
<?php
include ('connect_john.php');
require_once('headMain_sidebar.php');
?>
<!-- Page Content -->
<div class="container">
<div class="row">
<div class="col-lg-12" style="color: #900000">
<h1 class="page-header"></h1>
<?php
if(isset($_POST['compute'])){
$_SESSION['compute'] = $_POST['compute'];
}
$con = new mysqli($hostname,$username,$password,$database);
if(mysqli_connect_errno()) {
printf("Failed to Connect to MYSQL", mysqli_connect_error());
exit();
}
if(isset($_SESSION['compute'])) {
?>
<table class="table">
<thead>
<tr class="success">
<th>SN</th>
<th>Registration No</th>
<th>Surname</th>
<th>Other Names</th>
<th>JAMB Number</th>
<th>UTME Score</th>
<th>Computed Score</th>
</tr>
</thead>
<?php
$rows_per_page = 100;
$query= "select count(formno) from stddata where `level`='utmeForm'";
$result = $con->query($query);
$total_records = $result->num_rows;
$total_pages = ceil($total_records / $rows_per_page);
if (isset($_GET["page"])) {
$page = $_GET["page"];
}
else
{
$page=1;
}
$begin = ($page-1) * $rows_per_page;
$query="select formno,surname,othernames,jambno,jambscore, computedScore from stddata where `level`='utmeForm' order by computedScore desc limit $begin, $rows_per_page";
$result=$con->query($query);
if(!$result)
{
echo "Error in querying database.<br>\n";
}
$i = $begin + 1;
while ($row=$result->fetch_assoc())
{
echo "<tr>";
echo "<td>".$i."</td>";
echo "<td>".$row["formno"]."</td>";
echo "<td>".$row["surname"]."</td>";
echo "<td>".$row["othernames"]."</td>";
echo "<td>".$row["jambno"]."</td>";
echo "<td style=\"text-align:center\">".$row["jambscore"]."</td>";
echo "<td style=\"text-align:center\">".$row["computedScore"]."</td>";
echo "</tr>\n";
$i++;
}
$result->free();
?>
</table>
<div id="pagination">
<?php
$query= "select * from stddata where `level`='utmeForm'";
$result = $con->query($query);
$total_records = $result->num_rows;
$total_pages = ceil($total_records / $rows_per_page);
for ($i=1; $i<=$total_pages; $i++) {
$pg_no = empty($_GET["page"])?1:$_GET["page"];
$class = ($i==$pg_no)? "current":"not_selected";
echo "<a class=".$class." href='admission_req_compute.php?page=".$i."'>".$i."</a> ";
};
if (isset($_GET["page"])) {
$next = $_GET["page"];
}
else
{
$next=1;
}
if($next<$total_pages)
{
$page = $next + 1;
}
else
{
$page = 1;
}
echo "<a href='admission_req_compute.php?page=$page'>".'Next >'."</a> "; // Goto 1st page
echo "<a href='admission_req_compute.php?page=$total_pages'>".'Last >>'."</a> "; // Goto last page
$result->free();
?>
</div>
<?php
}
?>
</div>
</div>
<hr>
<!-- Footer -->
<footer>
<div class="row">
<div class="col-lg-12">
<p style="color: #900000"; align="center">Powered By Information and Communication Technology | 2015</p>
</div>
</div>
</footer>
</div>
<!-- /.container -->
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>