source: subversion/sites/other/tilesAtHome/lib/layers.inc @ 3655

Last change on this file since 3655 was 2424, checked in by ojw, 13 years ago

Add function to say which of the /x.php/ pages should be used for each
layer

File size: 761 bytes
Line 
1<?php
2
3function checkLayer($LayerString){
4  switch($LayerString){
5    case "Tile":
6    case "Tiles":
7    case "tile":
8      return(1);
9    case "cycle":
10      return(2);
11    case "maplint":
12      return(3);
13    case "landsea":
14      return(4);
15    default:
16      return(-1);
17    }
18}
19
20function layerValid($Name){
21  return($checkLayer($Name) != -1);
22}
23function layerDir($ID){
24  switch($ID){
25    case 1:
26      return("Tiles");
27    case 2:
28      return("cycle");
29    case 3:
30      return("maplint");
31    case 4:
32      return("landsea");
33    default:
34      return("");
35    }
36}
37function layerName($ID){
38  switch($ID){
39    case 1:
40      return("tile");
41    case 2:
42      return("cycle");
43    case 3:
44      return("maplint");
45    default:
46      return("");
47    }
48}
49
50
51?>
Note: See TracBrowser for help on using the repository browser.