]> jfr.im git - z_archive/KronOS.git/blob - dime/core/display.php
Simple 'desktop', menu, etc.
[z_archive/KronOS.git] / dime / core / display.php
1 <?php
2 define('WEBOS', TRUE);
3 require_once('common.php');
4
5 if (empty($_GET['app'])) {
6 make_error('No app specified to display.');
7 }
8 if ($_GET['app'] == 'core') {
9 if (empty($_GET['part']))
10 make_error('No part of core specified to display.');
11
12 if (strpos($_GET['part'], '/') !== FALSE) // there WAS a '/' in it
13 make_error('No such part of core.');
14
15 $fn = 'pages/'.$_GET['part'].'.html';
16 if (!is_file($fn)) // file doesn't exist or is not 'regular file'
17 make_error('No such part of core.');
18
19 $data = file_get_contents($fn);
20 make_reply($data);
21 } else { // $_GET['app'] != 'core'
22 make_error('Not implemented.');
23 }