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 19 Jan 2018 21:23:51 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,72 +0,0 @@
-# $Id: session-history.tcl,v 1.6 2018/01/19 21:23:51 gustafn Exp $
-
-append whole_page "[ad_admin_header "Session History"]
-
-
Session History
-
-[ad_context_bar [list "./" "Users"] "Session History"]
-
-
-
-
-
-
-
- Month | Total Sessions | Repeat 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 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
- }
- set href [export_vars -base sessions-one-month {pretty_month pretty_year}]
- append whole_page [subst {
-$pretty_month $pretty_year
- | [util_commify_number $total_sessions] |
-[util_commify_number $total_repeats] |
-
\n}]
-}
-
-append whole_page "
-
-
-
-[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
-ad_script_abort
-
-# Local variables:
-# mode: tcl
-# tcl-indent-level: 4
-# indent-tabs-mode: nil
-# End:
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 19 Jan 2018 21:23:51 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,60 +0,0 @@
-# $Id: sessions-one-month.tcl,v 1.5 2018/01/19 21:23:51 gustafn 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"]
-
-
-
-
-
-
-
- Date
- | Sessions
- | Repeats
- |
-
-"
-
-
-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 "
-
- $pretty_month $day_number
- | [util_commify_number $session_count]
- | [util_commify_number $repeat_count]
- |
-"
-}
-
-append whole_page "
-
-
-
-
-[ad_admin_footer]
-"
-db_release_unused_handles
-ns_return 200 text/html $whole_page
-ad_script_abort
-
-# Local variables:
-# mode: tcl
-# tcl-indent-level: 4
-# indent-tabs-mode: nil
-# End: