blob: 42a980e3d571470da3eb4f4019bc16849b84f6ce (
plain) (
blame)
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
|
<?php
class Page_Main extends Page
{
protected function doPreprocess()
{
User::load();
}
protected function doRender()
{
// Render::setTitle('abc');
if (!User::isLoggedIn()) {
Render::addTemplate('page-main-guest');
return;
}
// Logged in here
$sysconfig = !file_exists(CONFIG_HTTP_DIR . '/default/config.tgz');
$minilinux = !file_exists(CONFIG_HTTP_DIR . '/default/kernel') || !file_exists(CONFIG_HTTP_DIR . '/default/initramfs-stage31') || !file_exists(CONFIG_HTTP_DIR . '/default/stage32.sqfs');
$vmstore = !is_array(Property::getVmStoreConfig());
Render::addTemplate('page-main', array(
'user' => User::getName(),
'sysconfig' => $sysconfig,
'minilinux' => $minilinux,
'vmstore' => $vmstore
));
}
}
|