~ubuntu-branches/debian/stretch/alpine/stretch

« back to all changes in this revision

Viewing changes to web/cgi/alpine/main.tcl

  • Committer: Bazaar Package Importer
  • Author(s): Asheesh Laroia
  • Date: 2010-10-03 15:31:55 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20101003153155-2exypc96j1e8tw0p
Tags: 2.02-1
* New upstream release, based on re-alpine project
* Updated debian/copyright to reflect this fact
* re-alpine removed the non-free from the tarball, so now
  we do not repack the upstream tarball. (Yay!)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: main.tcl 391 2007-01-25 03:53:59Z mikes@u.washington.edu $
2
 
# ========================================================================
3
 
# Copyright 2006 University of Washington
4
 
#
5
 
# Licensed under the Apache License, Version 2.0 (the "License");
6
 
# you may not use this file except in compliance with the License.
7
 
# You may obtain a copy of the License at
8
 
#
9
 
#     http://www.apache.org/licenses/LICENSE-2.0
10
 
#
11
 
# ========================================================================
12
 
 
13
 
 
14
 
#  Input:
15
 
 
16
 
#  Output:
17
 
#
18
 
 
19
 
proc save_hack {} {
20
 
  if {[catch {WPImport f_name "x"}] == 0 && [catch {WPImport f_colid "x"}] == 0} {
21
 
    append parms "&f_name=${f_name}&f_colid=${f_colid}"
22
 
 
23
 
    if {[catch {WPImport send "x"}] == 0} {
24
 
      append parms "&send=${send}"
25
 
    }
26
 
 
27
 
    return $parms
28
 
  }
29
 
 
30
 
  error "not saving"
31
 
}
32
 
 
33
 
cgi_http_head {
34
 
  WPStdHttpHdrs
35
 
  WPExportCookie sessid "$_wp(sessid)@[info hostname]" $_wp(appdir)
36
 
}
37
 
 
38
 
cgi_html {
39
 
  cgi_head {
40
 
    WPStdHtmlHdr "WebPine"
41
 
  }
42
 
 
43
 
  cgi_frameset "cols=112,*" frameborder=0 framespacing=0 {
44
 
    cgi_frame gen=common.tcl?m=[WPCmd PEMailbox mailboxname]&c=[WPCmd PEInfo key]&v=[WPScriptVersion common]&q=[WPCmd PEInfo feature quit-without-confirm] title="Navigation Commands"
45
 
 
46
 
    if {[catch {WPCmd PEInfo set wp_spec_script} script]} {
47
 
      set script fr_index.tcl
48
 
    }
49
 
 
50
 
    set parms ""
51
 
 
52
 
    if {[info exists frame_vars]} {
53
 
      foreach v $frame_vars {
54
 
        if {[string length [subst $[lindex $v 0]]]} {
55
 
          append parms "&[lindex $v 0]=[subst $[lindex $v 0]]"
56
 
        }
57
 
      }
58
 
    }
59
 
 
60
 
    switch -regexp $script {
61
 
      ^fr_view.tcl$ {
62
 
        if {[catch {save_hack} x] == 0} {
63
 
          append parms "&$x"
64
 
        }
65
 
          
66
 
        if {[catch {WPCmd PEInfo set uid} uid] == 0} {
67
 
          append parms "&uid=$uid"
68
 
        }
69
 
 
70
 
        if {[catch {WPCmd PEInfo set op} op] == 0} {
71
 
          append parms "&op=$op"
72
 
        }
73
 
      }
74
 
      ^fr_index.tcl$ -
75
 
      ^fr_main.tcl$ {
76
 
        if {[catch {save_hack} x] == 0} {
77
 
          append parms "&$x"
78
 
        }
79
 
      }
80
 
    }
81
 
 
82
 
    cgi_frame spec=${script}?c=[WPCmd PEInfo key]${parms} frameborder=0 title="Message List and View"
83
 
  }
84
 
}