Index: openacs-4/packages/acs-admin/www/users/sessions-registered-summary.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/Attic/sessions-registered-summary.tcl,v diff -u -N --- openacs-4/packages/acs-admin/www/users/sessions-registered-summary.tcl 19 Jan 2018 21:23:51 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,73 +0,0 @@ -# $Id: sessions-registered-summary.tcl,v 1.4 2018/01/19 21:23:51 gustafn Exp $ -# -# sessions-registered-summary.tcl -# -# by philg@mit.edu sometime in 1999 -# -# displays a table of number of users who haven't logged in -# for X days - -set_the_usual_form_variables 0 - -# go_beyond_60_days_p (optional; default is to limit to 60 days) - -append whole_page "[ad_admin_header {Registered Sessions}] - -
- -- -[ad_admin_footer] -" -ns_return 200 text/html $whole_page -ad_script_abort - -# Local variables: -# mode: tcl -# tcl-indent-level: 4 -# indent-tabs-mode: nil -# End:-
- -- - -" - - - -# we have to query for pretty month and year separately because Oracle pads -# month with spaces that we need to trim - -set selection [ns_db select $db { - select round(sysdate-last_visit) as n_days, count(*) as n_sessions, count(second_to_last_visit) as n_repeats - from users - where last_visit is not null - group by round(sysdate-last_visit) - order by 1 -}] - -set table_rows "" - -while { [ns_db getrow $db $selection] } { - set_variables_after_query - if { $n_days > 60 && (![info exists go_beyond_60_days_p] || !$go_beyond_60_days_p) } { - append table_rows "N Days Since Last Visit Total Sessions Repeat Sessions - \n" - append table_rows " \n" - ns_db flush $db - break - } - append table_rows " go beyond 60 days... \n" -} - -db_release_unused_handles - -append whole_page "$table_rows - $n_days $n_sessions $n_repeats