[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/admin/includes/ -> abbreviate.php (source)

   1  <?php
   2  
   3  function abbreviate_country($country) {
   4      switch ($country) {
   5        case 'United States':
   6          $country = 'US';
   7          break;
   8              case 'Canada':
   9          $country = 'CA';
  10          break;                
  11                  }
  12              return $country;
  13              }                        
  14  
  15  function abbreviate_state($state) {
  16          switch ($state) {
  17        case 'Alabama':
  18          $state = 'AL';
  19          break;
  20        case 'Alaska':
  21          $state = 'AK';
  22          break;
  23        case 'American Samoa':
  24          $state = 'AS';
  25          break;
  26        case 'Arizona':
  27          $state = 'AZ';
  28          break;
  29        case 'Arkansas':
  30          $state = 'AR';
  31          break;
  32              case 'California':
  33          $state = 'CA';
  34          break;
  35              case 'Colorado':
  36          $state = 'CO';
  37          break;
  38              case 'Connecticut':
  39                $state = 'CT';
  40                break;
  41              case 'Delaware':
  42                $state = 'DE';
  43                break;
  44              case 'District of Columbia':
  45                $state = 'DC';
  46                break;
  47              case 'Federated States of Micronesia':
  48                $state = 'FM';
  49                break;
  50              case 'Florida':
  51                $state = 'FL';
  52                break;
  53              case 'Georgia':
  54                $state = 'GA';
  55                break;
  56              case 'Guam':
  57                $state = 'GU';
  58                break;
  59              case 'Hawaii':
  60                $state = 'HI';
  61                break;
  62              case 'Idaho':
  63                $state = 'ID';
  64                break;
  65              case 'Illinois':
  66                $state = 'IL';
  67                break;
  68              case 'Indiana':
  69                $state = 'IN';
  70                break;
  71              case 'Iowa':
  72                $state = 'IA';
  73                break;
  74              case 'Kansas':
  75                $state = 'KS';
  76                break;
  77              case 'Kentucky':
  78                $state = 'KY';
  79                break;
  80              case 'Louisiana':
  81                $state = 'LA';
  82                break;
  83              case 'Maine':
  84                $state = 'ME';
  85                break;
  86              case 'Marshall Islands':
  87                $state = 'MH';
  88                break;
  89              case 'Maryland':
  90                $state = 'MD';
  91                break;
  92              case 'Massachusetts':
  93                $state = 'MA';
  94                break;
  95              case 'Michigan':
  96                $state = 'MI';
  97                break;
  98              case 'Minnesota':
  99                $state = 'MN';
 100                break;
 101              case 'Mississippi':
 102                $state = 'MS';
 103                break;
 104              case 'Missouri':
 105                $state = 'MO';
 106                break;
 107              case 'Montana':
 108                $state = 'MT';
 109                break;
 110              case 'Nebraska':
 111                $state = 'NE';
 112                break;
 113              case 'Nevada':
 114                $state = 'NV';
 115                break;
 116              case 'New Hampshire':
 117                $state = 'NH';
 118                break;
 119              case 'New Jersey':
 120                $state = 'NJ';
 121                break;
 122              case 'New Mexico':
 123                $state = 'NM';
 124                break;
 125              case 'New York':
 126                $state = 'NY';
 127                break;
 128              case 'North Carolina':
 129                $state = 'NC';
 130                break;
 131              case 'North Dakota':
 132                $state = 'ND';
 133                break;
 134              case 'Northern Mariana Islands':
 135                $state = 'MP';
 136                break;
 137              case 'Ohio':
 138                $state = 'OH';
 139                break;
 140              case 'Oklahoma':
 141                $state = 'OK';
 142                break;
 143              case 'Oregon':
 144                $state = 'OR';
 145                break;
 146              case 'Palau':
 147                $state = 'PW';
 148                break;
 149              case 'Pennsylvania':
 150                $state = 'PA';
 151                break;
 152              case 'Puerto Rico':
 153                $state = 'PR';
 154                break;
 155              case 'Rhode Island':
 156                $state = 'RI';
 157                break;
 158              case 'South Carolina':
 159                $state = 'SC';
 160                break;
 161              case 'South Dakota':
 162                $state = 'SD';
 163                break;
 164              case 'Tennessee':
 165                $state = 'TN';
 166                break;
 167              case 'Texas':
 168                $state = 'TX';
 169                break;
 170              case 'Utah':
 171                $state = 'UT';
 172                break;
 173              case 'Vermont':
 174                $state = 'VT';
 175                break;
 176              case 'Virgin Islands':
 177                $state = 'VI';
 178                break;
 179              case 'Virginia':
 180                $state = 'VA';
 181                break;
 182              case 'Washington':
 183                $state = 'WA';
 184                break;
 185              case 'West Virginia':
 186                $state = 'WV';
 187                break;
 188              case 'Wisconsin':
 189                $state = 'WI';
 190                break;
 191              case 'Wyoming':
 192                $state = 'WY';
 193                break;
 194              }
 195          return $state;
 196          }
 197          
 198  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7