forked from leonardoxc/leonardoxc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFN_brands.php
129 lines (116 loc) · 2.48 KB
/
FN_brands.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?
/************************************************************************/
/* Leonardo: Gliding XC Server */
/* ============================================ */
/* */
/* Copyright (c) 2004-5 by Andreadakis Manolis */
/* http://leonardo.thenet.gr */
/* */
/* 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. */
/************************************************************************/
function guessBrandID($gliderType,$gliderDesc){
global $brandsList;
if (!is_array($brandsList[$gliderType]) ) return 0;
$gliderDesc=strtolower($gliderDesc);
//$gliderDesc=str_replace(" ","",$gliderDesc);
$gliderDesc=preg_replace('/[^\w]/','',$gliderDesc);
foreach($brandsList[$gliderType] as $brandID=>$brandName) {
if ( ! ( strpos($gliderDesc,strtolower($brandName) ) === false ) ) {
return $brandID;
}
}
return 0;
}
//------------------- GLIDER BRANDS DEFINITIONS & RELATED FUNCTIONS ----------------------------
$brandsList[1]=array(
1=>"Advance",
"Airwave",
"Gin",
"Icaro",
"Nova", // 005
"Skywalk",
"Swing",
"UP",
"SOL",
"Gradient", //10
"FreeX",
"ProDesign",
"MacPara",
"UTurn",
"Apco", //15
"Woc",
"Windtech",
"Sky",
"Ozone",
"Aerodyne", //20
"Aircross",
"Paratech",
"Dudek",
"Firebird",
"FlightDesign", // 25
"Niviuk",
"Independence",
"Axis",
"Aeros", //29
"Edel", //30
"ITV",
"Nervunes",
"Pegas",
"Perche",
"Trekking", // 35
"XiX",
// to be added
// "FlyingPlanet", // not found
// "ADG", // not found
);
$brandsList[2]=array(
1=>"WillsWing",
"Moyes",
"Aeros",
);
$brandsList[4]=array(
1=>"WillsWing",
"Moyes",
"Aeros",
"AIR",
);
/*
$__brandsList=array(
"Airwave",
"Pegas",
"Trekking",
"Ozone",
"MacPara",
"UP",
"Swing",
"Paratech",
"Nove",
"Apco",
"Sol",
"Advance",
"Windtech",
"Aerodyne",
"Sky Paragliders",
"Perche",
"Aeros",
"FreeX",
"Wings Of Change",
"XIX",
"Gradient",
"ITV",
"Firebird",
"Nervures",
"ProDesign",
"Skywalk",
"Icaro",
"Dudek",
"Independence",
"U-Turn",
"Gin",
"Edel" );
*/
// now copy the paraglider array to the paramotor array\
$brandsList[16]= $brandsList[1];
?>