diff options
| author | Nils Schwabe | 2014-06-04 14:27:03 +0200 |
|---|---|---|
| committer | Nils Schwabe | 2014-06-04 14:27:03 +0200 |
| commit | 155cf6aeea9ba7ecbc39face6442d3ce1b03ad8e (patch) | |
| tree | 1dcc8354eaf6ce216461fc434d9c1a6a67559914 /management-interface/api/models/Home.php | |
| parent | Improve login (diff) | |
| download | masterserver-155cf6aeea9ba7ecbc39face6442d3ce1b03ad8e.tar.gz masterserver-155cf6aeea9ba7ecbc39face6442d3ce1b03ad8e.tar.xz masterserver-155cf6aeea9ba7ecbc39face6442d3ce1b03ad8e.zip | |
Add webinterface with functionallity
Diffstat (limited to 'management-interface/api/models/Home.php')
| -rw-r--r-- | management-interface/api/models/Home.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/management-interface/api/models/Home.php b/management-interface/api/models/Home.php new file mode 100644 index 0000000..6fd384e --- /dev/null +++ b/management-interface/api/models/Home.php @@ -0,0 +1,21 @@ +<?php + +class Home { + + public function __construct() { + } + + public function tabHome($f3) { + // one command is 'sh -c' and the other command is 'grep' + // so we need more than two commands to find the server + if (shell_exec('ps aux | grep "org.openslx.imagemaster.App" | wc -l') > 2) { + $f3->set('serverstatus', true); + } else { + $f3->set('serverstatus', false); + } + // now render the view + echo Template::instance()->render('views/home.htm'); + } +} + +?> |
