| Current Path : /var/www/html/mmishra/indem/poll/ |
| Current File : /var/www/html/mmishra/indem/poll/aspirants.inc |
<h3>Aspirants</h3>
<p> </p>
Below are the list of aspirants who have expressed their interest for nomination to this nobel meet.
<br>
<?php
$pno = $_REQUEST["pno"];
if (!$pno) $pno = 1;
$pgsize = 20;
$tbl = "emails";
$rs = mysql_query("select SQL_CALC_FOUND_ROWS * from $tbl");
$tro = mysql_fetch_object(mysql_query("select FOUND_ROWS() as t"));
$total = $tro->t;
echo "<div align='right'>Total: $total / Pages: ";
if ($total > $pgsize) {
if (ceil($total/$pgsize) > $pgsize) $firstpno = ceil($pno/2); else $firstpno = 1;
$lastpno = $firstpno + 9;
if (ceil($total/$pgsize) > $pgsize && $lastpno >= ceil($total/$pgsize)) $firstpno = ceil($total/$pgsize) - 10;
for($i = $firstpno; $i <= min($lastpno, ceil($total/$pgsize)); $i++) {
if ($i == $pno) echo "<b>$i</b> ";
else echo "<a href='$PHP_SELF?pg=$pg&pno=$i'>$i</a> ";
}
} else echo "1";
echo "</div><br><ul>";
$start = (($pno - 1) * $pgsize);
$rs = mysql_query("select * from $tbl order by dated desc,id LIMIT $start,$pgsize");
while($o = mysql_fetch_object($rs)) {
$start++;
echo "<li>$start) <a href='mailto:$o->email'>";
echo str_replace(".", " {dot} ", str_replace("@"," {at} ",$o->email));
echo "</a> ($o->ipaddress) Dated: $o->dated</li>";
}
echo "</ul>";
?>