-
Notifications
You must be signed in to change notification settings - Fork 0
/
faq.php
40 lines (32 loc) · 820 Bytes
/
faq.php
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
39
40
<?php
class Faq extends Controller {
function __construct()
{
parent::Controller();
}
function index()
{
if (!CheckPermissions('public')) return;
$this->pages_model->SetPageCode('faq');
$data = array();
$data['faq'] = $this->pages_model->GetPropertyArray('faq', array(
// First index is [int]
array('pre' => '[', 'post' => ']', 'type' => 'int'),
// Second index is .string
array('pre' => '.', 'type' => 'enum',
'enum' => array(
array('question', 'text'),
array('answer', 'wikitext'),
),
),
));
if (FALSE === $data['faq']) {
$data['faq'] = array();
}
// Set up the public frame
$this->main_frame->SetContentSimple('faq/faq', $data);
// Load the public frame view (which will load the content view)
$this->main_frame->Load();
}
}
?>