Menu

[r30]: / e9-core / dbpage.class.php  Maximize  Restore  History

Download this file

24 lines (18 with data), 514 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
<?php
class e_dbpage extends e_page
{
function __construct( $request )
{
global $db;
global $_var;
$this->data = $db->row( "SELECT * FROM `{$db->prefix}pages` page WHERE `url` = '{$request->get_node()}'" );
$this->set_template( 'canvas_' . $this->data['canvas'] );
$this->set_subtemplate( $this->data['body'] );
}
static function page_exists( $str )
{
global $db;
return $db->value( "SELECT COUNT(*) FROM `{$db->prefix}pages` page WHERE `url` = '{$str}' AND `menu_only` = 0" );
}
};
?>