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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Asheesh Laroia
  • Date: 2007-02-17 13:17:42 UTC
  • Revision ID: james.westby@ubuntu.com-20070217131742-99x5c6cpg1pbkdhw
Tags: upstream-0.82+dfsg
ImportĀ upstreamĀ versionĀ 0.82+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $Id: fr_ldapbrowse.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
#  fr_ldapbrowse.tcl
 
14
#
 
15
#  Purpose:  CGI script to generate frame set for selecting addresses
 
16
#            from an LDAP query in webpine-lite pages.  the idea is that this
 
17
#            page specifies a frameset that loads a "header" page 
 
18
#            used to keep the servlet alive via
 
19
#            periodic reloads and a "body" page containing static/form
 
20
#            elements that can't/needn't be periodically reloaded or
 
21
#            is blocked on user input.
 
22
 
 
23
#  Input: (NOTE: these are expected to be set when we get here)
 
24
set frame_vars {
 
25
  {ldapquery    ""      ""}
 
26
  {addresses    ""      ""}
 
27
  {field        ""      ""}
 
28
}
 
29
 
 
30
#  Output:
 
31
#
 
32
 
 
33
cgi_http_head {
 
34
  WPStdHttpHdrs
 
35
}
 
36
 
 
37
cgi_html {
 
38
  cgi_head {
 
39
  }
 
40
 
 
41
  cgi_frameset "rows=$_wp(titleheight),*" resize=yes border=0 frameborder=0 framespacing=0 {
 
42
 
 
43
    set parms ""
 
44
    if {[info exists frame_vars]} {
 
45
      foreach v $frame_vars {
 
46
        if {[string length [subst $[lindex $v 0]]]} {
 
47
          if {[string length $parms]} {
 
48
            append parms "&"
 
49
          } else {
 
50
            append parms "?"
 
51
          }
 
52
 
 
53
          append parms "[lindex $v 0]=[subst $[lindex $v 0]]"
 
54
        }
 
55
      }
 
56
    }
 
57
 
 
58
    cgi_frame subhdr=header.tcl?title=74
 
59
    cgi_frame subbody=ldapbrowse.tcl${parms}
 
60
  }
 
61
}