123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <?php
- /*
- * DON'T REMOVE THE FOLLOWING LICENSE
- * INFORMATION!
- * ----------------------------------
- * Copyright by
- * Global Cube Business Solutions
- * Author: Dennis Ritz
- * info@global-cube.de
- * 2007-2008
- * ----------------------------------
- */
- class MISModel extends App {
-
- public function __construct() {
- parent::__construct(__file__);
- }
-
- /*
- * init
- * ----
- * This function sets the main workaround for this class.
- */
- public function __init() {
- return $this->__MODEL();
- }
-
- /*
- * getModel
- * --------
- * This function sets the main HTML Base.
- * Please see manual for detail description.
- */
- public function getModel() {
- $MISConfig = new MISConfig();
- $projectDOM = new DOMDocument('1.0', 'utf-8');
- $projectDOM->load($MISConfig->getConfigFile());
- $projectXpath = new DOMXpath($projectDOM);
- $configName = $projectXpath->query("/Configuration")->item(0)->getAttribute("Name");
- $tpl = $this->Template();
- $tpl->assign("TITLE",$configName." - ".$this->_getI18N("title"));
- $tpl->assign("CONFIG",$configName);
- $tpl->assign("PUBLISHER","© ".$this->_getI18N("publisher"));
- $tpl->assign("LANG",$this->_getLang());
- if($this->getAuth())
- $tpl->assign("USER",$this->getUsername()." ".$this->_getI18N("logout"));
- else
- $tpl->assign("USER",$this->_getI18N("login"));
- print $tpl->fetch('model.html');
- }
-
- public function getHead() {
- global $Core;
-
- $p_args = func_get_args();
- $p_comp = array_shift($p_args);
- return $Core->callComp($p_comp,"getMain",$p_args);
- }
- public function getLeftbar() {
- global $Core;
-
- $p_args = func_get_args();
- $p_comp = array_shift($p_args);
- return $Core->callComp($p_comp,"getMain",$p_args);
- }
- public function getMain($p_comp = null) {
- if($this->getAuth()) {
- global $Core;
-
- $p_args = func_get_args();
- $p_comp = array_shift($p_args);
- $res = $Core->callComp($p_comp,"getMain",$p_args);
- return array(
- $res[0]
- ,'
- Browser.setDisplay(Browser.getElementById("leftdivider"),true);
- Browser.setDisplay(Browser.getElementById("leftbar"),true);
- xonresize();
- '.$res[1]);
- } elseif($p_comp == "MISAuth") {
- $MISAuth = new MISAuth();
- return $MISAuth->getMain();
- } else {
- return array(''
- ,'
- Browser.setDisplay(Browser.getElementById("leftdivider"),false);
- Browser.setDisplay(Browser.getElementById("leftbar"),false);
- xonresize();CMgr.getMODEL().getMain(\'MISAuth\');');
- }
- }
-
- public function getFoot() {
- return '© Global Cube Business Solutions 2007-2008. All rights reserved. ';
- }
-
- public function getRetrieveInput(){
- if($this->getAuth()) {
- global $Core;
-
- $p_args = func_get_args();
- $p_comp = array_shift($p_args);
- $res = $Core->callComp($p_comp,"getRetrieveInput",$p_args);
- return array(
- $res[0]
- ,''.$res[1]);
- } else {
- return array(''
- ,'
- CMgr.getMODEL().__construct();
- ');
- }
- }
- }
- ?>
|