| Current Path : /var/www/html/mmishra/iws8/html/ilight.bak/ |
| Current File : /var/www/html/mmishra/iws8/html/ilight.bak/home.inc |
<h1><img src='images/bulb7.jpg' height='12'> Welcome to iLight portal</h1>
<div align='right'><?php echo date("d M, Y h:i:s A");?></div>
<table width='100%' cellspacing='0' cellpadding='0' style="margin: 0px">
<tr valign='bottom' height='100'>
<td width='50%' nowrap>
<?php
if (!$user) {
echo "<b>Please login here using your LDAP@IIITA user credentials.
<br /><br />
<center><p>
<table width='100' border='1' style='border-collapse: collapse' cellspacing='20'>
<tr><td align='right'><b>Username</b></td><td><input type='text' name='txtID'></td></tr>
<tr><td align='right'><b>Password</b></td><td><input type='password' name='txtPWD'></td></tr>
<tr><td align='center' colspan='2'><input type='submit' name='login' value='LOGIN'></td></tr>
</table>
</p></center><br />";
}
?>
</td>
<td nowrap style='padding-left: 10px'>
<?php
if ($user) {
$tbl = 'el_licensee';
echo "<b>Licensees (Admissibility)</b><ul>";
$rs = mysql_query("select category,count(id) as no from $tbl group by category");
while ($o = mysql_fetch_object($rs)) {
echo "<li>$o->category: $o->no ".($o->no > 1 ? 'Nos.' : 'No.');
$sr = mysql_query("select rsubsidy,usubsidy from el_subsidy where category='$o->category'");
if (mysql_num_rows($rs)) {
$q = mysql_fetch_object($sr);
echo " (Rs. $q->rsubsidy, $q->usubsidy units)</li>";
}
}
echo "</ul>";
//dates
$tbl = 'el_config';
$rs = mysql_query("select * from $tbl");
if (mysql_num_rows($rs)) {
$o = mysql_fetch_object($rs);
echo "<b>Dates</b><dir>
Last Reading: $o->datereading<br>
Last Billing: $o->datebilling<br>
Last Mailing: $o->datemailing<br>
</dir>
<b>Rates:</b><ul>
<li>Rs. $o->unitrate/unit</li>
<li>Rs. $o->fixedrate/KVA/month</li>
<li>Rs. $o->plrate/KVA/month</li>
<li>@ $o->edrate%</li>
</ul>";
}
} else {
echo "<center><img src='images/electric.jpg' width='200' height='130' /></center>";
}
?>
</td></tr>
</table>