1# $Id: docancel.tcl 1204 2009-02-02 19:54:23Z hubert@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# Copyright 2006 University of Washington 14# 15# Licensed under the Apache License, Version 2.0 (the "License"); 16# you may not use this file except in compliance with the License. 17# You may obtain a copy of the License at 18# 19# http://www.apache.org/licenses/LICENSE-2.0 20# 21# ======================================================================== 22 23# post.tcl 24# 25# Purpose: CGI script to perform message posting via compose.tcl 26# generated form 27# 28# Input: 29set post_vars { 30 {cid "Missing Command ID"} 31 {postpost "" main} 32} 33 34# Output: 35# 36 37## read vars 38foreach item $post_vars { 39 if {[catch {cgi_import [lindex $item 0].x}]} { 40 if {[catch {eval WPImport $item} result]} { 41 error [list _action "Impart Variable" $result] 42 } 43 } else { 44 set [lindex $item 0] 1 45 } 46} 47 48if {$cid != [WPCmd PEInfo key]} { 49 error [list _action Postpone "Invalid Operation ID" "Click Back button to try again."] 50} 51 52# clean up attachments 53WPCmd PEInfo statmsg "Message cancelled" 54catch {WPCmd PEInfo unset suspended_composition} 55 56source [WPTFScript $postpost] 57