1 |
<?php |
---|
2 |
/** |
---|
3 |
* CWC2 application |
---|
4 |
* |
---|
5 |
* @project CWC2 |
---|
6 |
* @revision $Id: |
---|
7 |
* @purpose This is the layer information. |
---|
8 |
* @author Sacha Fournier (sfournierdmsolutions.ca) |
---|
9 |
* @copyright |
---|
10 |
* <b>Copyright (c) 2002, 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 |
|
---|
32 |
// include the supporting php code |
---|
33 |
define("LOAD_MAPSESSION", "1"); |
---|
34 |
|
---|
35 |
//set the language resource file |
---|
36 |
$szLanguageResource = str_replace("\\","/",dirname(__FILE__))."/LayerInfo.dbf"; |
---|
37 |
|
---|
38 |
|
---|
39 |
include_once("../session.inc.php"); |
---|
40 |
include_once(COMMON."/phpwms/dbf.php"); |
---|
41 |
include_once("../CWC2ButtonCache.php"); |
---|
42 |
|
---|
43 |
$oLayer = ""; |
---|
44 |
$szTitle = trim($oMLT->get("2", "No Layer")); |
---|
45 |
|
---|
46 |
if (isset($http_form_vars["layerId"])) |
---|
47 |
{ |
---|
48 |
$oLayer = $oMapSession->oMap->getlayer($http_form_vars["layerId"]); |
---|
49 |
$szTitle = $oLayer->getMetadata( "WMS_TITLE" ); |
---|
50 |
$oNewMapSession = $oMapSession; |
---|
51 |
} |
---|
52 |
else if (isset($http_form_vars["layerName"])) |
---|
53 |
{ |
---|
54 |
$oLayer = $oMapSession->oMap->getlayerbyname($http_form_vars["layerName"]); |
---|
55 |
$szTitle = $oLayer->getMetadata( "WMS_TITLE" ); |
---|
56 |
if ($szTitle == "") |
---|
57 |
$szTitle = $oLayer->name; |
---|
58 |
$oNewMapSession = $oMapSession; |
---|
59 |
} |
---|
60 |
?> |
---|
61 |
<html> |
---|
62 |
<head> |
---|
63 |
<title><?php echo trim($oMLT->get("1", "Layer Information")) ?>: <?php echo $szTitle ?></title> |
---|
64 |
<link href="<?php echo $szCSSFile; ?>" rel="stylesheet" type="text/css"> |
---|
65 |
</head> |
---|
66 |
<script language="JavaScript" src="<?php echo $_SESSION['gszCoreWebPath']; ?>/widgets/js/cwc_dhtml.js" type="text/javascript"></script> |
---|
67 |
<script language="JavaScript" src="<?php echo $_SESSION['gszCoreWebPath']; ?>/widgets/js/cwc_button.js" type="text/javascript"></script> |
---|
68 |
<script language="JavaScript" type="text/javascript"> |
---|
69 |
function CloseWindow() |
---|
70 |
{ |
---|
71 |
window.close(); |
---|
72 |
} |
---|
73 |
</script> |
---|
74 |
<body class="page" onLoad="self.focus()"> |
---|
75 |
<table border="0" cellpadding="1" cellspacing="10"> |
---|
76 |
<tr> |
---|
77 |
<td class="layoutTable"> |
---|
78 |
<table class="titleArea" width="440" border="0" cellpadding="4" cellspacing="0"> |
---|
79 |
<tr> |
---|
80 |
<td> <span class="title"><?php echo $szTitle ?></span></td> |
---|
81 |
</tr> |
---|
82 |
</table> |
---|
83 |
<table class="contentArea" width="440" border="0" cellpadding="4" cellspacing="0"> |
---|
84 |
<tr> |
---|
85 |
<td> |
---|
86 |
<?php |
---|
87 |
if ($oLayer != "") |
---|
88 |
{ |
---|
89 |
$szLang = strtoupper($_SESSION['gszCurrentLanguage']); |
---|
90 |
include_once(COMMON."/phpwms/layerinfo_body.phtml"); |
---|
91 |
} |
---|
92 |
else |
---|
93 |
echo "<font face=Arial size=3>".trim($oMLT->get("3", "No Layer Selected"))."</font>" |
---|
94 |
?> |
---|
95 |
|
---|
96 |
</td> |
---|
97 |
</tr> |
---|
98 |
</table> |
---|
99 |
</td> |
---|
100 |
</tr> |
---|
101 |
<tr> |
---|
102 |
<td align="right"> |
---|
103 |
<table border="0" cellspacing="0" cellpadding="0"> |
---|
104 |
<tr> |
---|
105 |
<td><?php echo makeButton( 'CloseWindow', '', 'LegendTemplate', "icons/icon_close.png", trim($oCommonMLT->get( "Close", "Close" )), trim($oCommonMLT->get( "CloseTip", "Close Dialog" )), array( 'width' => 75) ); ?></td> |
---|
106 |
</tr> |
---|
107 |
</table> |
---|
108 |
</td> |
---|
109 |
</tr> |
---|
110 |
</table> |
---|
111 |
</body> |
---|
112 |
</html> |
---|