]>
jfr.im git - z_archive/KronOS.git/blob - application/controllers/control.php
1 <?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
3 /* TODO: error handling */
5 class Control
extends CI_Controller
{
7 public function __construct() {
9 $this->load
->model('user');
10 $this->load
->model('session');
13 public function index() {
16 public function open($aid) {
17 if ($this->user
->is_logged_in()) {
18 $instance = $this->session
->openApp($aid);
20 $repl = array('id' => $instance->iid(), 'name' => $instance->appName(), 'title' => $instance->windowTitle(), 'interior' => $instance->windowContents());
21 $this->json
->reply($this->user
->is_logged_in());
23 $this->json
->error('Not logged in.');
27 public function act($iid, $action) {
28 // return $this->session->getAppInst($iid)->act($action);
31 public function close($iid) {
32 $this->session
->closeApp($iid);