Skip to content

Commit 2147a28

Browse files
author
Niklas Spanring
committed
TEST
1 parent 115afeb commit 2147a28

7 files changed

+571
-208
lines changed

convert/conv_testInput.conf.php

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
<?php
2+
/**
3+
************************************************************************************************************************************
4+
* Convert Template
5+
* DWD 06.10.15
6+
************************************************************************************************************************************
7+
*/
8+
9+
//-------------------------------------------------------------------------------------------------------------------------------------------------
10+
11+
//eventCode
12+
13+
$conv->info['tag'][] = "eventCode";
14+
$conv->info['ValueName'][] = "AREA_COLOR";
15+
16+
$conv->info['tag'][] = "eventCode";
17+
$conv->info['ValueName'][] = "GROUP";
18+
19+
$conv->info['tag'][] = "eventCode";
20+
$conv->info['ValueName'][] = "PROFILE_VERSION";
21+
22+
$conv->info['tag'][] = "eventCode";
23+
$conv->info['ValueName'][] = "LICENSE";
24+
25+
$conv->info['tag'][] = "eventCode";
26+
$conv->info['ValueName'][] = "II";
27+
28+
// geocode
29+
30+
$conv->info['tag'][] = "geocode";
31+
$conv->info['ValueName'][] = "STATE";
32+
33+
$conv->info['tag'][] = "geocode";
34+
$conv->info['ValueName'][] = "WARNCELLID";
35+
36+
$conv->info['tag'][] = "geocode";
37+
$conv->info['ValueName'][] = "SIGN";
38+
39+
$conv->info['tag'][] = "geocode";
40+
$conv->info['ValueName'][] = "ALTITUDE";
41+
42+
//-------------------------------------------------------------------------------------------------------------------------------------------------
43+
44+
// alert block
45+
$conv->structure['tag'][] = "identifier";
46+
$conv->structure['tag'][] = "sender";
47+
$conv->structure['tag'][] = "sent";
48+
$conv->structure['tag'][] = "status";
49+
$conv->structure['tag'][] = "msgType";
50+
$conv->structure['tag'][] = "scope";
51+
52+
// info block
53+
$conv->structure['tag']['info'][] = "language";
54+
$conv->structure['tag']['info'][] = "category";
55+
$conv->structure['tag']['info'][] = "event";
56+
$conv->structure['tag']['info'][] = "responseType";
57+
$conv->structure['tag']['info'][] = "eventCode";
58+
$conv->structure['tag']['info'][] = "urgency";
59+
$conv->structure['tag']['info'][] = "severity";
60+
$conv->structure['tag']['info'][] = "certainty";
61+
$conv->structure['tag']['info'][] = "effective";
62+
$conv->structure['tag']['info'][] = "onset";
63+
$conv->structure['tag']['info'][] = "expires";
64+
$conv->structure['tag']['info'][] = "senderName";
65+
$conv->structure['tag']['info'][] = "headline";
66+
$conv->structure['tag']['info'][] = "description";
67+
$conv->structure['tag']['info'][] = "instruction";
68+
$conv->structure['tag']['info'][] = "web";
69+
$conv->structure['tag']['info'][] = "contact";
70+
71+
// area block
72+
$conv->structure['tag']['info']['area'][] = "areaDesc";
73+
$conv->structure['tag']['info']['area'][] = "polygon";
74+
$conv->structure['tag']['info']['area'][] = "geocode";
75+
$conv->structure['tag']['info']['area'][] = "altitude";
76+
$conv->structure['tag']['info']['area'][] = "ceiling";
77+
78+
//-------------------------------------------------------------------------------------------------------------------------------------------------
79+
80+
81+
// do not move's
82+
$conv->move['PROFILE_VERSION'][] = "donotmove1";
83+
$conv->move['LICENSE'][] = "donotmove2";
84+
$conv->move['II'][] = "donotmove3";
85+
86+
$conv->move['WARNCELLID'][] = "donotmove4";
87+
$conv->move['SIGN'][] = "donotmove5";
88+
$conv->move['ALTITUDE'][] = "donotmove6";
89+
90+
$conv->move['STATE'][] = "area_code";
91+
92+
$conv->move['AREA_COLOR'][] = "hazard_level"; // lösche den source AREA_COLOR oder überschreibe den destinaion AREA_COLOR
93+
94+
$conv->translate["255 128 128"][] = 'Minor'; // Hellblau = Grün Keine
95+
$conv->translate["204 153 255"][] = 'Minor'; // Rosa Vorabinformation
96+
97+
$conv->translate["255 255 0"][] = 'Moderate'; // Gelb Wetterwarnung
98+
99+
$conv->translate["255 153 0"][] = 'Severe'; // Orange Markantes Wetter
100+
101+
$conv->translate["255 0 0"][] = 'Extreme'; // Rot Unwetterwarnung
102+
$conv->translate["175 0 100"][] = 'Extreme'; // Violett Extreme Wetterwarnung
103+
104+
105+
$conv->move['GROUP'][] = "hazard_type"; // lösche den source awareness_level oder überschreibe den destinaion awareness_level
106+
107+
$conv->translate['THUNDERSTORM'][] = "thunderstorm";
108+
$conv->translate['WIND'][] = "wind";
109+
$conv->translate['RAIN'][] = "rain";
110+
$conv->translate['HAIL'][] = "hail";
111+
$conv->translate['SNOWFALL'][] = "snow";
112+
$conv->translate['SNOWDRIFT'][] = "ice";
113+
$conv->translate['FOG'][] = "fog";
114+
$conv->translate['FROST'][] = "frost";
115+
$conv->translate['GLAZE'][] = "glaze";
116+
$conv->translate['THAW'][] = "thaw";
117+
$conv->translate['LAKE'][] = "lake";
118+
$conv->translate['HEAT'][] = "heat";
119+
$conv->translate['FROST'][] = "cold";
120+
121+
//-------------------------------------------------------------------------------------------------------------------------------------------------

convert/conv_testOutput.conf.php

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?php
2+
/**
3+
************************************************************************************************************************************
4+
* Convert Template
5+
* Meteoalarm 06.10.15
6+
************************************************************************************************************************************
7+
*/
8+
9+
//-------------------------------------------------------------------------------------------------------------------------------------------------
10+
11+
//$conv->info['tag'][] = "parameter";
12+
//$conv->info['ValueName'][] = "-1";
13+
14+
$conv->info['tag'][] = "parameter";
15+
$conv->info['ValueName'][] = "awareness_level";
16+
17+
$conv->info['tag'][] = "parameter";
18+
$conv->info['ValueName'][] = "awareness_type";
19+
20+
$conv->info['tag'][] = "geocode";
21+
$conv->info['ValueName'][] = "NUTS2";
22+
23+
//$conv->info['tag'][] = "web";
24+
//$conv->info['ValueName'][] = "-1";
25+
26+
//$conv->info['tag'][] = "headline";
27+
//$conv->info['ValueName'][] = "-1";
28+
29+
//-------------------------------------------------------------------------------------------------------------------------------------------------
30+
31+
// alert block
32+
$conv->structure['tag'][] = "identifier";
33+
$conv->structure['tag'][] = "sender";
34+
$conv->structure['tag'][] = "sent";
35+
$conv->structure['tag'][] = "status";
36+
$conv->structure['tag'][] = "msgType";
37+
$conv->structure['tag'][] = "scope";
38+
39+
// info block
40+
$conv->structure['tag']['info'][] = "language";
41+
$conv->structure['tag']['info'][] = "category";
42+
$conv->structure['tag']['info'][] = "event";
43+
$conv->structure['tag']['info'][] = "responseType";
44+
$conv->structure['tag']['info'][] = "urgency";
45+
$conv->structure['tag']['info'][] = "severity";
46+
$conv->structure['tag']['info'][] = "certainty";
47+
$conv->structure['tag']['info'][] = "effective";
48+
$conv->structure['tag']['info'][] = "onset";
49+
$conv->structure['tag']['info'][] = "expires";
50+
$conv->structure['tag']['info'][] = "senderName";
51+
$conv->structure['tag']['info'][] = "headline";
52+
$conv->structure['tag']['info'][] = "description";
53+
$conv->structure['tag']['info'][] = "instruction";
54+
$conv->structure['tag']['info'][] = "web";
55+
$conv->structure['tag']['info'][] = "parameter";
56+
57+
// area block
58+
$conv->structure['tag']['info']['area'][] = "areaDesc";
59+
$conv->structure['tag']['info']['area'][] = "geocode";
60+
61+
//-------------------------------------------------------------------------------------------------------------------------------------------------
62+
$conv->move['NUTS2'][] = "area_code";
63+
64+
//$conv->move['web'][] = "coninfo";
65+
66+
//$conv->insert['headline'][] = "copy_paste_event";
67+
//$conv->move['parameter'][] = "moveinfo";
68+
69+
$conv->move['awareness_level'][] = "hazard_level"; // lösche den source awareness_level oder überschreibe den destinaion awareness_level
70+
$conv->translate['1; green; Minor'][] = 'Minor';
71+
$conv->translate['2; yellow; Moderate'][] = 'Moderate';
72+
$conv->translate['3; orange; Severe'][] = 'Severe';
73+
$conv->translate['4; red; Extreme'][] = 'Extreme';
74+
75+
$conv->move['awareness_type'][] = "hazard_type"; // lösche den source awareness_level oder überschreibe den destinaion awareness_level
76+
$conv->translate['1; Wind'][] = "wind";
77+
$conv->translate['2; snow-ice'][] = "snow";
78+
$conv->translate['3; Thunderstorm'][] = "thunderstorm";
79+
$conv->translate['4; Fog'][] = "fog";
80+
$conv->translate['5; high-temperature'][] = "heat";
81+
$conv->translate['6; low-temperature'][] = "cold";
82+
$conv->translate['7; coastalevent'][] = "coastal";
83+
$conv->translate['8; forest-fire'][] = "forest fire";
84+
$conv->translate['9; avalanches'][] = "avalanches";
85+
$conv->translate['10; Rain'][] = "rain";
86+
$conv->translate['12; flooding'][] = "flooding";
87+
$conv->translate['13; rain-flood'][] = "rain-flood";

index.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,10 @@ function encrypt_decrypt($action, $string, $key = "")
263263
}
264264
elseif($_GET['conv'] == 1)
265265
{
266-
267266
if(! empty($_POST['location']) || ! empty($_FILES["uploadfile"]["name"]))
268267
{
268+
die("TEST");
269+
269270
require_once 'lib/cap.read.class.php';
270271
// Get TEST Cap
271272
if(! empty($_FILES["uploadfile"]["name"]))
@@ -282,7 +283,8 @@ function encrypt_decrypt($action, $string, $key = "")
282283

283284
// Convert
284285
$converter = new Convert_CAP_Class();
285-
$capconvertet = $converter->convert($cap, $_POST['stdconverter'], $_POST['areaconverter'], $_POST['inputconverter'], $_POST['outputconverter'], $configuration->conf["cap"]["output"]);
286+
$capconvertet = $converter->convert($cap, $_POST['inputconverter'], $_POST['outputconverter'], $configuration->conf["cap"]["output"]);
287+
286288
$form = new CAP_Form();
287289
print $form->CapView($capconvertet, $cap[identifier].'.conv.cap.xml'); // Cap Preview +
288290
}

0 commit comments

Comments
 (0)