summaryrefslogtreecommitdiffstats
path: root/modules/main.inc.php
diff options
context:
space:
mode:
authorJonathan Bauer2016-04-01 16:50:13 +0200
committerJonathan Bauer2016-04-01 16:50:13 +0200
commitdbc0d9614421e064cc62aacf116ebb783c83f2f3 (patch)
tree091844b8578ff1d9ac18edfd3cee3e63210133d7 /modules/main.inc.php
parent[ldapauth] Add homedir conf to ldap wizard (diff)
downloadslx-admin-dbc0d9614421e064cc62aacf116ebb783c83f2f3.tar.gz
slx-admin-dbc0d9614421e064cc62aacf116ebb783c83f2f3.tar.xz
slx-admin-dbc0d9614421e064cc62aacf116ebb783c83f2f3.zip
[merge] merging c3sl / fr - initial commit
Diffstat (limited to 'modules/main.inc.php')
-rw-r--r--modules/main.inc.php54
1 files changed, 0 insertions, 54 deletions
diff --git a/modules/main.inc.php b/modules/main.inc.php
deleted file mode 100644
index 9af1afef..00000000
--- a/modules/main.inc.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-class Page_Main extends Page
-{
-
- private $sysconfig;
- private $minilinux;
- private $vmstore;
- private $ipxe;
- private $delPending;
-
- protected function doPreprocess()
- {
- User::load();
- if (User::isLoggedIn()) {
- $this->sysconfig = !file_exists(CONFIG_HTTP_DIR . '/default/config.tgz');
- $this->minilinux = !file_exists(CONFIG_HTTP_DIR . '/default/kernel') || !file_exists(CONFIG_HTTP_DIR . '/default/initramfs-stage31') || !file_exists(CONFIG_HTTP_DIR . '/default/stage32.sqfs');
- $this->vmstore = !is_array(Property::getVmStoreConfig());
- $this->ipxe = !preg_match('/^\d+\.\d+\.\d+\.\d+$/', Property::getServerIp());
- Property::setNeedsSetup(($this->sysconfig || $this->minilinux || $this->vmstore || $this->ipxe) ? 1 : 0);
- $res = Database::queryFirst("SELECT Count(*) AS cnt FROM sat.imageversion WHERE deletestate = 'SHOULD_DELETE'");
- $this->delPending = isset($res['cnt']) ? $res['cnt'] : 0;
- }
- }
-
- protected function doRender()
- {
- // Render::setTitle('abc');
-
- if (!User::isLoggedIn()) {
- Render::addTemplate('page-main-guest', array(
- 'register' => (Database::queryFirst('SELECT userid FROM user LIMIT 1') === false)
- ));
- return;
- }
- // Logged in here
-
- Render::addTemplate('page-main', array(
- 'user' => User::getName(),
- 'sysconfig' => $this->sysconfig,
- 'minilinux' => $this->minilinux,
- 'vmstore' => $this->vmstore,
- 'ipxe' => $this->ipxe,
- 'delpending' => $this->delPending
- ));
- }
-
- protected function doAjax()
- {
- User::isLoggedIn();
- die('Status: DB running');
- }
-
-}