2
# $Id: queryprune.tcl 391 2007-01-25 03:53:59Z mikes@u.washington.edu $
3
# ========================================================================
4
# Copyright 2006 University of Washington
6
# Licensed under the Apache License, Version 2.0 (the "License");
7
# you may not use this file except in compliance with the License.
8
# You may obtain a copy of the License at
10
# http://www.apache.org/licenses/LICENSE-2.0
12
# ========================================================================
16
# After we've already determined that it's the
17
# beginning of the month (logon.tcl), we check
18
# what folders need pruning and offer them to
19
# the user. Currently doesn't do automatic
24
{cid "Missing Command ID"}
25
{start "Missing Start Page"}
32
# inherit global config
41
# * * * * DONE * * * *
42
cgi_submit_button prune=Continue
49
WPEval $prunetime_vars {
50
catch {WPCmd PEInfo prunetime} prunefldrs
54
foreach prunefldr $prunefldrs {
55
if {[llength [lindex $prunefldr 1]] > 0 || [llength [lindex $prunefldr 2]] > 0} {
66
WPStdHtmlHdr "Monthly Folder Pruning"
70
cgi_body BGCOLOR="$_wp(bordercolor)" {
72
cgi_form [file join $_wp(appdir) wp] method=post name=pruneit target=_top {
74
cgi_table border=0 cellspacing=0 cellpadding=2 width="100%" height="100%" {
77
# next comes the menu down the left side
79
cgi_table_data $_wp(menuargs) {
80
WPTFCommandMenu prune_menu {}
84
cgi_table_data valign=top align=center class=dialog "style=\"padding: 20\"" {
87
catch {WPCmd PEInfo statmsg "Pruning Failed: $prunefldrs"}
88
cgi_puts "No folders appear to need cleaning up this month."
90
cgi_puts "Please click [cgi_url "here" $start target=_top] to continue your session."
92
cgi_puts "At the beginning of every month, you are asked if you would like to clean up your sent-mail folder(s). Please answer the following questions and click [cgi_italic Continue]."
93
cgi_text "sessid=$_wp(sessid)" type=hidden notab
94
cgi_text "op=pruneit" type=hidden notab
95
cgi_text "cid=${cid}" type=hidden notab
96
cgi_text "page=prune" type=hidden notab
98
foreach prunefldr $prunefldrs {
99
set type [lindex $prunefldr 0]
100
set mv [lindex $prunefldr 1]
101
set dellist [lindex $prunefldr 2]
103
cgi_table border=0 cellpadding=8 cellspacing=0 "style=\"padding-top: 8\"" {
104
if {[llength $mv] > 1} {
107
cgi_puts [cgi_bold "Move current "[lindex $mv 0]" to "[lindex $mv 1]"?"]
112
cgi_table "style=\"padding-left: 20\"" {
114
cgi_radio_button "mv${cnt}=mv [lindex $mv 0] [lindex $mv 1]" checked class=body
120
cgi_radio_button "mv${cnt}=" class=body
130
if {[llength $dellist] > 0} {
135
if {[llength $dellist] > 1} {
138
if {[string compare $type ""] != 0} {
139
set typetxt "[string toupper $type] "
141
cgi_puts "[cgi_bold "To save disk space, delete the following ${typetxt}mail folder${plurtxt}:"] (Check to delete)"
147
cgi_table "style=\"padding-left: 20\"" {
148
foreach del $dellist {
151
cgi_checkbox "delList=$del" "style=\"background-color: #FFFFFF; padding-right: 8\""
162
cgi_text "mvcnt=${cnt}" type=hidden notab