| Current Path : /var/www/html/mmishra/indem/Parisarnews/ |
| Current File : /var/www/html/mmishra/indem/Parisarnews/weblogs.php |
<?php
$tbl = 'weblogs';
$dateaccess = $_REQUEST["dateaccess"];
$pno = $_REQUEST["pno"];
$submit = $_POST["submit"];
if (!$dateaccess) $dateaccess = '%';
if (!$pno) $pno = 1;
$pgsize = 20;
$start = (($pno - 1) * $pgsize);
echo "Filter by Date <input type='text' name='dateaccess' value='$dateaccess' size='20'>
<input type='submit' name='submit' value='VIEW' style='width: 80pt'><br>";
$rs = mysql_query("select SQL_CALC_FOUND_ROWS * from $tbl where dateaccess like '$dateaccess%'");
$tro = mysql_fetch_object(mysql_query("select FOUND_ROWS() as t"));
$total = $tro->t;
if ($total > $pgsize) {
$firstpno = max (1, ceil($start/$pgsize) - 2);
$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?conf=$conf&pno=$i&dateaccess=$dateaccess'>$i</a> ";
}
} else echo "1";
$sql = "select * from $tbl where webid='$webid' and dateaccess like '$dateaccess%' order by rowid desc limit $start,$pgsize";
$rs = mysql_query($sql);
while ($o = mysql_fetch_object($rs)) {
echo "<br>$o->dateaccess [$o->userid/$o->remoteip] <a href='o->weburl'>$o->weburl</a>";
//echo "<br>$o->dateaccess [$o->userid/$o->remoteip] <a href='o->weburl'>$o->weburl</a> [$o->referer]";
$i++;
}
if (!$i) echo "<br>None";
else echo "<br><b>Total entry: $total</b><br>";
?>