Rev 2111 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 2111 | Rev 2191 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | <?php |
1 | <?php |
| 2 | 2 | ||
| 3 | require_once("config.php"); |
3 | require_once("config.php"); |
| 4 | require_once("atomjs_interface.php"); |
4 | require_once("atomjs_interface.php"); |
| 5 | 5 | ||
| - | 6 | ||
| 6 | function GetSubfolders($directory) |
7 | function GetSubfolders($directory, $pageConfiguration) |
| 7 | { |
8 | { |
| 8 | $folders = array(); |
9 | $folders = array(); |
| 9 | 10 | ||
| 10 | if (file_exists($directory)) |
11 | if (file_exists($directory)) |
| 11 | { |
12 | { |
| 12 | $directory_handle = opendir($directory); |
13 | $directory_handle = opendir($directory); |
| 13 | 14 | ||
| 14 | while (false !== ($filename = readdir($directory_handle))) |
15 | while (false !== ($filename = readdir($directory_handle))) |
| 15 | { |
16 | { |
| 16 | if (is_dir($directory . "/" . $filename) && $filename[0] != ".") |
17 | if (is_dir($directory . "/" . $filename) && $filename[0] != ".") |
| 17 | { |
18 | { |
| - | 19 | $found = 0; |
|
| - | 20 | foreach($pageConfiguration as $page) { |
|
| - | 21 | if (strcmp($page['page'],$filename)==0) { |
|
| - | 22 | $found = 1; |
|
| - | 23 | } |
|
| - | 24 | } |
|
| - | 25 | if ($found == 1) |
|
| 18 | $folders[] = $filename; |
26 | $folders[] = $filename; |
| 19 | } |
27 | } |
| 20 | } |
28 | } |
| 21 | 29 | ||
| 22 | closedir($directory_handle); |
30 | closedir($directory_handle); |
| Line 53... | Line 61... | ||
| 53 | 61 | ||
| 54 | exit(0); |
62 | exit(0); |
| 55 | } |
63 | } |
| 56 | else |
64 | else |
| 57 | { |
65 | { |
| 58 | $pages = GetSubfolders("pages/"); |
66 | $pages = GetSubfolders("pages/", $pageConfiguration); |
| 59 | } |
67 | } |
| 60 | 68 | ||
| 61 | ?> |
69 | ?> |