Menu

[r13]: / e9-core / codepage.class.php  Maximize  Restore  History

Download this file

38 lines (27 with data), 698 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
class e_codepage extends e_page
{
function __construct( $request )
{
global $_dir, $_var;
// Default settings, can be overriden in e9-app/*.php
$this->set_template( 'canvas_master' );
$this->set_subtemplate( $request->get_node() );
$file = $_dir['app'] . $request->get_node() . '.php';
include_once( $file );
// Ugly, I know
$this->set_subtemplate( $this->read_page( $this->get_subtemplate() ) );
}
function read_page( $str )
{
global $_dir;
$file = $_dir['theme'] . $str . '.html';
return file_get_contents( $file );
}
static function page_exists( $str )
{
global $_dir;
return file_exists( "{$_dir['theme']}templates/{$str}.html" );
}
};
?>