Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/iws8/html/iport/
Upload File :
Current File : /var/www/html/mmishra/iws8/html/iport/websessions.inc

<h3 align='left'><i class='fa fa-file-text' aria-hidden='true'></i> Login Sessions</h3>
<center>
<?php

$dated = $_REQUEST["dated"];

if (!$dated) $dated = date("Y-m-d");

$dated1 = date('Y-m-d', strtotime($dated .' -1 day'));
$dated2 = date('Y-m-d', strtotime($dated .' +1 day'));

echo "<a href='?pg=$pg&dated=$dated1'>&lt;&lt;</a> 
<font size='+1' color='red'>[ $dated ]</font>";

if ($dated != date("Y-m-d")) echo " <a href='?pg=$pg&dated=$dated2'>&gt;&gt;</a>";

$sql = "select * from websessions where";
if ($role == 'admin') 
	$sql .= " date(timeLogin)='$dated'";
else
	$sql .= " userID=$'user' and date(timeLogin)='$dated'";
$sql .= " order by timeLogin desc";
$rs = mysql_query($sql);
if ($rs) {
        $colHeads = mysql_num_fields($rs);

        echo "<table border='1' width='90%'><tr><th>#</th>";

        for ($i=0; $i < $colHeads; $i++) { // Header
                $fld = ucwords(str_replace("_"," ",mysql_field_name($rs, $i)));
                echo "<th>$fld</th>";
        }

        echo "</tr>";

	$j = $pgno;
        while ($row = mysql_fetch_row($rs)) { //data
                $j++;
		echo "<tr><th>$j</th><td>".implode($row,"</td><td>")."</td></tr>";
        }

        echo "</table>";

} else 
        echo 'None';

?>
</center>