SHOW:
|
|
- or go back to the newest paste.
| 1 | <?php | |
| 2 | - | |
| 2 | + | |
| 3 | - | include "header.php"; |
| 3 | + | include "header.php"; |
| 4 | - | |
| 4 | + | |
| 5 | - | $gallery_set = false; |
| 5 | + | if(isset($_GET['gallery'])) {
|
| 6 | - | if(isset($_GET['gallery'])) {
|
| 6 | + | $gallery = $_GET['gallery']; |
| 7 | - | $gallery_set = true; |
| 7 | + | } else {
|
| 8 | - | $gallery = $_GET['gallery']; |
| 8 | + | $gallery = "default_gallery"; |
| 9 | - | } |
| 9 | + | } |
| 10 | - | |
| 10 | + | |
| 11 | - | $file_path = "gallery/{$gallery}.php";
|
| 11 | + | $file_path = "gallery/{$gallery}.php";
|
| 12 | - | if($gallery_set && file_exists($file_path)) {
|
| 12 | + | if(file_exists($file_path)) {
|
| 13 | - | include($file_path); |
| 13 | + | include($file_path); |
| 14 | - | } else {
|
| 14 | + | } else {
|
| 15 | - | include("home.php");
|
| 15 | + | include("home.php");
|
| 16 | - | } |
| 16 | + | } |
| 17 | ||
| 18 | - | include "footer.php"; |
| 18 | + | include "footer.php"; |
| 19 | ||
| 20 | ?> |