%#============================================================================ %# ePortal - WEB Based daily organizer %# Author - S.Rusakov %# %# Copyright (c) 2000-2003 Sergey Rusakov. All rights reserved. %# This program is free software; you can redistribute it %# and/or modify it under the same terms as Perl itself. %# %#---------------------------------------------------------------------------- %# Short info about user statistics. %# 1. Anfo for administrators when the user is blocked %# 2. Info for user itself when it is blocked and redirected here %#---------------------------------------------------------------------------- <%perl> my $app = $ePortal->Application('SquidAcnt'); throw ePortal::Exception::ACL( -operation => 'read', -object => $app) unless $app->xacl_check_read; my $user_id = $ARGS{user_id}; # Lookup user object my $user_obj = $app->SAuser_extended; $user_obj->restore_where(where => "u.id=?", bind => [$user_id]); if ( ! $user_obj->restore_next ) { $m->comp('/message.mc', ErrorMessage => pick_lang(rus => "Пользователь не найден", eng => "User not found")); return; } # corresponding group object my $group_obj = new ePortal::App::SquidAcnt::SAgroup; $group_obj->restore($user_obj->group_id);

<% $user_obj->Title %>


<% pick_lang(rus => "Адрес:", eng => "Address:") %> <% $user_obj->address %>
<% pick_lang(rus => "Блокирован:", eng => "Blocked:") %> <% $user_obj->Blocked ? 'YES': 'no' %>
<% pick_lang(rus => "Срок действия:", eng => "Account expired:") %> <% $user_obj->end_date %> <% CGI::Tr({}, CGI::th({}, [ ' ', pick_lang(rus => "День", eng => "Day"), pick_lang(rus => "Неделя", eng => "Week"), pick_lang(rus => "Месяц", eng => "Month") ])) %> <% CGI::Tr({}, CGI::td({}, pick_lang(rus => "Порог предупреждения", eng => "Warning threshold")), CGI::td({ -align => 'center'}, [ $app->NiceFormat($user_obj->daily_alert), ' ', ' ' ])) %> <% CGI::Tr({}, CGI::td({}, pick_lang(rus => "Лимит", eng => "Limit")), CGI::td({ -align => 'center'}, [ $app->NiceFormat($user_obj->daily_limit), $app->NiceFormat($user_obj->weekly_limit), $app->NiceFormat($user_obj->mon_limit) ])) %> <% CGI::Tr({}, CGI::td({}, pick_lang(rus => "Фактический трафик", eng => "Traffic")), CGI::td({ -align => 'center'}, [ $app->NiceFormat($user_obj->daily_traf), $app->NiceFormat($user_obj->weekly_traf), $app->NiceFormat($user_obj->mon_traf) ])) %>

<% plink( pick_lang(rus => "Редактировать пользователя", eng => "Edit the user"), -href => href('user_edit.htm', objid => $user_id) ) %> <% plink( pick_lang(rus => "Статистика", eng => "Statistics"), -href => href('stat_users.htm', ss_period=> 'month', ss_rows => 100, user_id => $user_id) . "#$user_id" ) %>

%#=== @METAGS attr ========================================================= <%attr> Title => {rus => "Оперативная информация о пользователе", eng => "Operational user info"}