Index: openacs-4/packages/acs-admin/www/users/session-history.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/Attic/session-history.tcl,v diff -u -N --- openacs-4/packages/acs-admin/www/users/session-history.tcl 9 Sep 2013 16:44:17 -0000 1.3.10.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,59 +0,0 @@ -# $Id: session-history.tcl,v 1.3.10.1 2013/09/09 16:44:17 gustafn Exp $ - -append whole_page "[ad_admin_header "Session History"] - -

Session History

- -[ad_context_bar [list "./" "Users"] "Session History"] - -
- -
- - - - - -" - - - -# 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 to_char(entry_date,'YYYYMM') as sort_key, rtrim(to_char(entry_date,'Month')) as pretty_month, to_char(entry_date,'YYYY') as pretty_year, sum(session_count) as total_sessions, sum(repeat_count) as total_repeats -from session_statistics -group by to_char(entry_date,'YYYYMM'), to_char(entry_date,'Month'), to_char(entry_date,'YYYY') -order by 1"] - -set last_year "" -while { [ns_db getrow $db $selection] } { - set_variables_after_query - if { $last_year != $pretty_year } { - if { $last_year ne "" } { - # insert a line break - append whole_page "\n" - } - set last_year $pretty_year - } - append whole_page " - - - -" -} - -append whole_page " -
MonthTotal SessionsRepeat Sessions -
 
$pretty_month $pretty_year -[util_commify_number $total_sessions][util_commify_number $total_repeats]
-
- -[ad_style_bodynote "Note: we distinguish between a repeat and a new session by seeing -whether the last_visit cookie is set. The new session figures are -inflated to the extent that users have disabled cookies."] - -[ad_admin_footer] -" -db_release_unused_handles -ns_return 200 text/html $whole_page Index: openacs-4/packages/acs-admin/www/users/sessions-one-month.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/Attic/sessions-one-month.tcl,v diff -u -N --- openacs-4/packages/acs-admin/www/users/sessions-one-month.tcl 18 Sep 2002 14:54:47 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,55 +0,0 @@ -# $Id: sessions-one-month.tcl,v 1.3 2002/09/18 14:54:47 jeffd Exp $ -set_the_usual_form_variables - -# pretty_month, pretty_year - -append whole_page "[ad_admin_header "Sessions in $pretty_month, $pretty_year"] - -

$pretty_month $pretty_year

- -[ad_context_bar [list "./" "Users"] [list "session-history" "Session History"] "One Month"] - -
- -
- - - - - -" - - -set selection [ns_db select $db "select - entry_date, - to_char(entry_date,'fmDD') as day_number, - session_count, - repeat_count -from session_statistics -where rtrim(to_char(entry_date,'Month')) = '$QQpretty_month' -and to_char(entry_date,'YYYY') = '$QQpretty_year' -order by entry_date"] - -while { [ns_db getrow $db $selection] } { - set_variables_after_query - append whole_page " - - -" -} - -append whole_page " - -
Date - Sessions - Repeats -
$pretty_month $day_number - [util_commify_number $session_count] - [util_commify_number $repeat_count] -
-
- -[ad_admin_footer] -" -db_release_unused_handles -ns_return 200 text/html $whole_page 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 6 Sep 2002 21:49:53 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,64 +0,0 @@ -# $Id: sessions-registered-summary.tcl,v 1.2 2002/09/06 21:49:53 jeffd 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"] - -

Registered Sessions

- -[ad_context_bar [list "./" "Users"] "Registered Sessions"] - -
- -
- - - - - -" - - - -# 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" - append table_rows "\n" - ns_db flush $db - break - } - append table_rows "\n" -} - -db_release_unused_handles - -append whole_page "$table_rows -
N Days Since Last VisitTotal SessionsRepeat Sessions -
 
go beyond 60 days...
$n_days$n_sessions$n_repeats
- -
- -[ad_admin_footer] -" -ns_return 200 text/html $whole_page