5f376ade75e28f8a2c1f7b34d03113df4eefc1c5
[fa-stable.git] / includes / reserved.inc
1 <?php
2
3 // always use capitals in reserved words (for is_reserved_word comparisons)
4
5 $any_item = 'AN';
6 $any_number = -1;
7 $all_option = "___ALL___";
8 $all_option_numeric = -1;
9
10 class reserved_words 
11 {
12         
13         function get_any() 
14         {
15                 global $any_item;
16                 return $any_item;
17         } 
18         
19         function get_any_numeric() 
20         {
21                 global $any_number;
22                 return $any_number;
23         }
24         
25         function get_all() 
26         {
27                 global $all_option;
28                 return $all_option;
29         }
30         
31         function get_all_numeric() 
32         {
33                 global $all_option_numeric;
34                 return $all_option_numeric;
35         }
36         
37         function is_reserved_word($str) 
38         {
39                 $str = strtoupper($str);
40                 if ($str == get_any())
41                         return true;
42                 if ($str == get_all())
43                         return true;                    
44                 return false;
45         }
46         
47 }
48
49 ?>