NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/Chameleon/trunk/Chameleon/PrintProduction/preview.phtml

Revision 13 (checked in by jcleary, 17 years ago)

Latest Chameleon code checkout from previous repository

Line 
1 <?php
2 /**
3  * CWC application
4  *
5  * @project     CWC
6  * @revision    $Id: preview.phtml,v 1.4 2004/12/03 03:31:55 pspencer Exp $
7  * @purpose     This page previews the produced map.
8  * @author      William A. Bronsema, C.E.T. (bronsema@dmsolutions.ca)
9  * @copyright
10  * <b>Copyright (c) 2001, DM Solutions Group Inc.</b>
11  * Permission is hereby granted, free of charge, to any person obtaining a
12  * copy of this software and associated documentation files (the "Software"),
13  * to deal in the Software without restriction, including without limitation
14  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15  * and/or sell copies of the Software, and to permit persons to whom the
16  * Software is furnished to do so, subject to the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be included
19  * in all copies or substantial portions of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
24  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  */
29
30 /*****************************************************************************
31  * $Log: preview.phtml,v $
32  * Revision 1.4  2004/12/03 03:31:55  pspencer
33  * bug MT 866: modify script tags to input type='text/javascript'
34  *
35  * Revision 1.3  2004/11/16 15:23:40  pspencer
36  * bug MT 377: renamed PrintWidget to PrintProduction
37  *
38  * Revision 1.2  2004/04/28 13:43:14  pspencer
39  * fix file path related issues
40  *
41  * Revision 1.1  2004/04/23 16:51:10  pspencer
42  * moved preview.phtml to PrintProduction/preview.phtml
43  *
44  * Revision 1.20  2004/03/30 20:22:30  jlacroix
45  * Comment php code that is in html comment to avoid warnings
46  *
47  * Revision 1.19  2003/10/27 20:46:19  sfournier
48  * Overwrite main branch with 1.1 stuff
49  *
50  * Revision 1.14.2.2  2003/06/11 20:29:17  sacha
51  * Make some cleaning
52  *
53  * Revision 1.14.2.1  2003/05/27 17:40:59  sacha
54  * added support for skinning
55  *
56  * Revision 1.14  2003/04/23 17:30:56  pspencer
57  * use wait image from session if possible.
58  *
59  * Revision 1.13  2003/04/16 18:51:09  sacha
60  * Fixed few bugs related to the rendering preview of a map
61  *
62  * Revision 1.12  2003/03/14 23:17:10  fredrock
63  * modified the popup with css to make it skinnable
64  *
65  * Revision 1.11  2003/01/07 18:33:45  bronsema
66  * Added legend
67  *
68  * Revision 1.10  2003/01/03 18:51:01  bronsema
69  * Moved the download file capabiltiy to the production page.
70  *
71  * Revision 1.4  2002/12/18 02:45:08  bronsema
72  * Fixed problem with print resolution and percent size
73  *
74  * Revision 1.3  2002/12/17 20:23:57  bronsema
75  * Fixed download security hole
76  *
77  * Revision 1.2  2002/12/17 18:14:13  bronsema
78  * fixed misc bugs in production
79  *
80  * Revision 1.1  2002/10/28 15:07:31  bronsema
81  * Initial addition
82  *
83  * Revision 1.6  2002/08/15 12:59:13  bronsema
84  * Updated processing image
85  *
86  * Revision 1.5  2002/08/12 20:26:18  bronsema
87  * Added delayed drawing functionality to map production.
88  *
89  * Revision 1.4  2002/07/11 18:33:57  bronsema
90  * Changed "download" to "save"
91  *
92  * Revision 1.3  2002/07/05 02:22:46  bronsema
93  * Removed dependancy on register_globals setting to be on.
94  *
95  * Revision 1.2  2002/06/27 02:19:10  bronsema
96  * Finished translation
97  *
98  * Revision 1.1  2002/06/26 03:23:29  bronsema
99  * Initial addition
100  *
101  *****************************************************************************/
102 // define flag if necessary
103 if ( !defined( "LOAD_MAPSESSION" ) )
104 {
105     define("LOAD_MAPSESSION", 1);
106 }
107
108 // include session info
109 include("../session.inc.php");
110
111 /* ============================================================================
112  * Build an array with the HTTP GET or POST parameters.
113  * ========================================================================= */
114 $http_form_vars = sizeof( $_POST ) > 0 ? $_POST :
115                                     ( sizeof($_GET) > 0 ? $_GET : array("") );
116 //check for session wait image
117 if (isset($_SESSION["WAITIMAGE"]))
118     $waitImage = $_SESSION["WAITIMAGE"];
119 else
120     $waitImage = $_SESSION['gszCoreWebPath']."skins/default/images/spinner.gif";
121
122 if (isset($_SESSION["WAITIMAGEWIDTH"]))
123     $waitImageWidth = $_SESSION["WAITIMAGEWIDTH"];
124 else
125     $waitImageWidth = 216;
126
127 if (isset($_SESSION["WAITIMAGEHEIGHT"]))
128     $waitImageHeight = $_SESSION["WAITIMAGEHEIGHT"];
129 else
130     $waitImageHeight = 50;
131
132 ?>
133 <html>
134 <head>
135 <title>Preview</title>
136 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
137 <script language="javascript" type="text/javascript">
138 function doneLoading()
139 {
140     // hide processing images
141     document.forms.main.loadingImage.src = "<?php echo $_SESSION['gszCoreWebPath']."skins/default/images/a_pixel.gif"; ?>";
142 }
143 </script>
144 <link href="<?php echo $szCSSFile; ?>" rel="stylesheet" type="text/css">
145 </head>
146 <body class="page" onLoad="javascript:doneLoading()">
147 <form name="main">
148 <table width="100%" border=0 cellpadding=0 cellspacing=0>
149   <tr>
150     <td><img name="loadingImage" src="<?php echo $waitImage; ?>" width="<?php echo $waitImageWidth; ?>" height="<?php echo $waitImageHeight; ?>"></td>
151   </tr>
152 </table>
153 <table border=0 cellpadding=0 cellspacing=0>
154   <tr>
155     <td><img name="mainImage" src="<?php echo "./preview.php?".SID."&selImageFormat=".$http_form_vars["selImageFormat"] ?>" border=0></td>
156   </tr>
157 <!--  <tr>
158 <td><font face="Arial, Helvetica, sans-serif" size="2">[<a href=../download.phtml?file_name=<?php /*echo trim(stripslashes($szDownloadURL));*/ ?>&save_as=<?php /*echo $gsz_dl_name*/ ?> target="_self"><?php echo /*trim($oMLT->get(75, "save"))*/ ?></a>]</font><font face="Arial, Helvetica, sans-serif" size="2">[<a href="javascript:window.close()"><?php echo trim($oMLT->get(73, "close")) ?></a>]</font></td>
159   </tr>-->
160 </table>
161 <input type=hidden name=sid value="<?php echo $http_form_vars["sid"] ?>">
162 </form>
163 </body>
164 </html>
Note: See TracBrowser for help on using the browser.