<%@ page import="java.util.Date,
java.sql.Time"%>
<%@ page contentType="text/html;charset=cp1251" %>
<jsp:useBean id="dm" class="local.datamodule"/>
<%
dm.init();
if (!dm.checkgrp(session.getAttribute("uid"), 1)) {pageContext.forward ("/index.jsp");};
java.sql.ResultSet online, users;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<link rel=stylesheet href="i/style.css" type="text/css">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
<title>Cake: пЮЯУНД, АЮКЮМЯ, ЯНЯРНЪМХЕ</title>
</head>
<body bgcolor=ffffff leftmargin=0 topmargin=0 marginheight=0 marginwidth=0>
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr height=1% bgcolor=d0d0d0 valign=bottom><td width=1%><img src="i/1x1.gif" width=50 height=1 alt=""><td>
<p>
<a href="stat.all.jsp" class="menusel">яРЮРСЯ</a>
<a href="user.list.jsp" class="menu">оНКЭГНБЮРЕКХ</a>
<a href="tariff.list.jsp" class="menu">рЮПХТШ</a>
<a href="report.list.jsp" class="menu">нРВ╦РШ</a>
<a href="settings.list.jsp" class="menu">мЮЯРПНИЙХ</a>
<a href="_act.jsp?action=doLogout" class="menu">бШУНД »</a>
<td width=1%><img src="i/1x1.gif" width=50 height=1 alt="">
<tr><td width=1%><img src="i/1x1.gif" width=50 height=1 alt=""><td valign=top style="padding-top:10px">
<%
online=dm.sql("select distinct s_begin, login, name, svolume, ip_addr\n" +
"from cake.session, cake.users\n" +
"where cake.session.id_user=cake.users.id\n" +
"and cake.session.s_end is null order by s_begin, login;");
int cnt=0;
%>
<h1>яЕИВЮЯ МЮ КХМХХ</h1>
<table cellspacing=1 cellpadding=4 bgcolor=d0d0d0>
<tr bgcolor=f0f0f0 height=25><td><b>╧<td valign=bottom colspan=2><b>оНКЭГНБЮРЕКЭ<td><b>ip<td valign=bottom><b>бПЕЛЪ ЯРЮПРЮ<td valign=bottom><b>рПЮТТХЙ ГЮ ЯЕЮМЯ<!--<td><b>яАПНЯ</tr>-->
<% while (online.next()) {
java.sql.Date odate=online.getDate("s_begin");
java.sql.Time otime=online.getTime("s_begin");
cnt++;
%>
<tr bgcolor=ffffff>
<td style="text-align:right" width=1><%=cnt%><td><b><%=online.getString("name")%></b><td><%=online.getString("login")%></td>
<td widht=1 align=right><%=online.getString("ip_addr")%>
<td><%=dm.datetostr2(odate)+", "+dm.timetostr(otime)%></td>
<td style="text-align:right"><%=(float)(Math.round(online.getInt("svolume")/10485))/100%> ЛА.</td>
<!-- <td><a href="/act.jsp?action=DoReset&user=<%=online.getString("login")%>"><b>яАПНЯХРЭ</a></td> -->
</tr><% } %>
</table>
<%
users=dm.sql("select * from cake.u_mwb_report(true) order by userblock, overtraffblock, traf_month desc;");
cnt=0;
%>
<h1>пЮЯУНД, АЮКЮМЯ, ЯНЯРНЪМХЕ</h1>
<table cellspacing=1 cellpadding=4 width=100% bgcolor=d0d0d0>
<tr bgcolor=f0f0f0 height=25><td><b>╧<td valign=bottom colspan=2><nobr><b>оНКЭГНБЮРЕКЭ<td valign=bottom colspan=2 style="text-align:center"><b>аЮКЮМЯ<td valign=bottom colspan=2 style="text-align:center"><b>пЮЯУНД ГЮ ЛЕЯЪЖ<td valign=bottom colspan=2 style="text-align:center"><b>бМЕЯЕМН ГЮ ЛЕЯЪЖ<td valign=bottom><b>оНДЙКЧВЕМХЕ<td valign=bottom><b>сОПЮБКЕМХЕ</tr>
<% while (users.next()) { cnt++; %>
<tr bgcolor=ffffff>
<td style="text-align:right;"><%=cnt%>
<td><b><%=users.getString("uname")%></b><td><%=users.getString("ulogin")%>
<td style="text-align:right;"><nobr><%=dm.f2f(users.getFloat("bal_mb"))%> ЛА.
<td style="text-align:right;"><nobr><font color=<%=(users.getFloat("bal_cur")>=0)?"808080":"ff0000"%>><%=dm.f2f(users.getFloat("bal_cur"))%> usd.
<td style="text-align:right;"><nobr><%=dm.f2f(users.getFloat("traf_month"))%> ЛА.
<td style="text-align:right;"><nobr><font color=808080><%=dm.f2f(users.getFloat("cur_month"))%> usd.
<td style="text-align:right;"><nobr><%=dm.f2f(users.getFloat("traf_week"))%> ЛА.
<td style="text-align:right;"><nobr><font color=808080><%=dm.f2f(users.getFloat("cur_week"))%> usd.
<td>
<%
if (users.getBoolean("userblock")) {out.print("<font color=909090><b>аКНЙХПНБЮМ");} else{
if ((users.getFloat("bal_cur")<0)&&(users.getBoolean("overtraffblock"))) {out.print("<font color=ff0000><b>оЕПЕПЮЯУНД");} else {
out.print("<font color=000050>пЮГПЕЬЕМН");
}
}
%>
<td><a href="user.list.jsp?user=<%=users.getString("ulogin")%>"><b>оЮПЮЛЕРПШ
</tr>
<% } %>
<%
users=dm.sql("select * from cake.u_mwb_report_all(true) order by traf_month desc;");
%>
<% if (users.next()) { %>
<tr bgcolor=f5f5f5 height=30 valign=bottom>
<td style="text-align:right;">
<td colspan=2><b>[бяе]
<td style="text-align:right;"><nobr><%=dm.f2f(users.getFloat("bal_mb"))%> ЛА.
<td style="text-align:right;"><nobr><font color=808080><%=dm.f2f(users.getFloat("bal_cur"))%> usd.
<td style="text-align:right;"><nobr><%=dm.f2f(users.getFloat("traf_month"))%> ЛА.
<td style="text-align:right;"><nobr><font color=808080><%=dm.f2f(users.getFloat("cur_month"))%> usd.
<td style="text-align:right;"><nobr><%=dm.f2f(users.getFloat("traf_week"))%> ЛА.
<td style="text-align:right;"><nobr><font color=808080><%=dm.f2f(users.getFloat("cur_week"))%> usd.
<td colspan=2>...
</tr>
<% } %>
</table>
<p>
<p>
<td width=1%><img src="i/1x1.gif" width=50 height=1 alt="">
</table>
</body>
</html>
<%
dm.done();
%>[root@server cake]#