avm99963 | 99bb77c | 2020-01-27 03:15:08 +0100 | [diff] [blame^] | 1 | <?php |
| 2 | class views { |
| 3 | const VIEW_L9N_OLD = 0; |
| 4 | const VIEW_L9N_NEW = 1; |
| 5 | const VIEW_L9S = 2; |
| 6 | |
| 7 | public static $views = [self::VIEW_L9N_OLD, self::VIEW_L9N_NEW, self::VIEW_L9S]; |
| 8 | public static $viewsNames = [ |
| 9 | self::VIEW_L9N_OLD => "VIEW_L9N_OLD", |
| 10 | self::VIEW_L9N_NEW => "VIEW_L9N_NEW", |
| 11 | self::VIEW_L9S => "VIEW_L9S" |
| 12 | ]; |
| 13 | public static $viewsInclude = [ |
| 14 | self::VIEW_L9N_OLD => "l9n.php", |
| 15 | self::VIEW_L9N_NEW => "l9n.php", |
| 16 | self::VIEW_L9S => "l9s.php" |
| 17 | ]; |
| 18 | |
| 19 | public static function renderPage($view) { |
| 20 | if (!in_array($view, self::$views)) return; |
| 21 | |
| 22 | $gtfs = new gtfs(); |
| 23 | |
| 24 | require_once(__DIR__."/../views/".self::$viewsInclude[$view]); |
| 25 | } |
| 26 | } |