forked from leonardoxc/leonardoxc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGUI_sites.php
73 lines (62 loc) · 2.69 KB
/
GUI_sites.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?
/************************************************************************/
/* Leonardo: Gliding XC Server */
/* ============================================ */
/* */
/* Copyright (c) 2004-5 by Andreadakis Manolis */
/* http://sourceforge.net/projects/leonardoserver */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
$pilotsList=array();
$pilotsID=array();
list($takeoffs,$takeoffsID)=getTakeoffList();
list($countriesCodes,$countriesNames)=getCountriesList();
require_once $moduleRelPath."/CL_template.php";
$Ltemplate = new LTemplate($moduleRelPath.'/templates/'.$PREFS->themeName);
$Ltemplate ->set_filenames(array(
'body' => 'sites.html')
);
$COUNTRIES_OPTION_LIST="";
for($k=0;$k<count($countriesCodes);$k++) {
$sel=($countriesCodes[$k]==$FILTER_country1_select)?"selected":"";
$COUNTRIES_OPTION_LIST.="<option value='".$countriesCodes[$k]."' $sel>".$countriesNames[$k]." (".$countriesCodes[$k].")</option>\n";
}
$TAKEOFF_OPTION_LIST="";
for($k=0;$k<count($takeoffs);$k++) {
$sel=($takeoffsID[$k]==$FILTER_takeoff1_select)?"selected":"";
$TAKEOFF_OPTION_LIST.="<option value='".$takeoffsID[$k]."' $sel>".$takeoffs[$k]."</option>\n";
}
$countriesNum=count($countriesNames);
require_once dirname(__FILE__)."/FN_areas.php";
$i=0;
foreach($countriesNames as $countryName) {
$continentNum=$countries2continent[$countriesCodes[$i]];
$tkStrings[$continentNum].="<li><a href='javascript:selCountry(\"".$countriesCodes[$i]."\") '>$countryName </a></li>\n";
$i++;
}
/*
1=>"Europe ",
2=>"South America ",
3=>"North & Central America ",
4=>"Africa ",
5=>"Asia ",
6=>"Oceania "*/
for($continentNum=1;$continentNum<=6;$continentNum++) {
$continentString=$tkStrings[$continentNum];
$Ltemplate->assign_vars( array(
'continent_'.$continentNum=>"<ul><li><a href='#'><strong>".$continents[$continentNum]."</strong></a></li>".$continentString."<ul>"
) );
}
$Ltemplate->assign_vars( array(
'TAKEOFF_OPTION_LIST'=>$TAKEOFF_OPTION_LIST,
'COUNTRIES_OPTION_LIST'=>$COUNTRIES_OPTION_LIST,
'MODULE_REL_PATH'=>$moduleRelPath,
'MODULE_NAME'=>$module_name,
'TEMPLATE_REL_PATH'=>$moduleRelPath."/templates/".$PREFS->themeName ,
'LANG'=>$currentlang,
));
$Ltemplate->pparse('body');
?>