예제 #1
0
 public function LoadView($listData = null)
 {
     $tmp = strtolower($GLOBALS["APP"]["INSTANCE"]->_controller->_module);
     $str_pth = "modules/{$GLOBALS["APP"]["MODULE_MAP"][$tmp]}/views/templates/{$this->_viewTpl}.php";
     if (!$this->ViewExists($str_pth)) {
         $errStr = "Tried to load a view template that does not exist: Path '{$this->_viewTpl}'";
         throw new Exception($errStr);
     } else {
         if (!isset($this->_pageTitle) || !TSApp::StringHasValue($this->_pageTitle)) {
             $this->_pageTitle = "TimeSheet Management Software | Presented by Arbor Solutions, INC.";
         }
         $PAGETITLE = $this->_pageTitle;
         $HTMLHEAD = $this->_htmlHead;
         if ($this->_displayOptions["head"]) {
             include_once "views/head.php";
         }
         if ($this->_displayOptions["nav"]) {
             include_once "views/nav.php";
         }
         $listData = !empty($listData) ? $listData : array();
         $TPLDATA = $this->_tplData;
         $FORCELOGIN = isset($GLOBALS["APP"]["FORCE_LOGIN"]) && $GLOBALS["APP"]["FORCE_LOGIN"] === true;
         if (TSApp::StringHasValue($this->_viewTpl)) {
             include_once $str_pth;
         }
         if ($this->_displayOptions["foot"]) {
             include_once "views/foot.php";
         }
         //            echo "<pre>";
         //            print_r(base::stack_trace());
         //            echo "</pre>";
         $viewData = ob_get_contents();
         return $viewData;
         ob_end_clean();
         /**
          * [file] => /opt/lampp/htdocs/TimeSheet/modules/User/views/index.php
          * [line] => 19
          * [function] => LoadView
          * [class] => TSView
          * [object] => index Object
          */
     }
 }
예제 #2
0
    echo $GLOBALS["APP"]["MSG"]["ERROR"];
    ?>
                </div>
        <?php 
}
?>
        <?php 
if (TSApp::StringHasValue($GLOBALS["APP"]["MSG"]["INFO"])) {
    ?>
          <div class="alert alert-info alert-dismissible" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <strong>Hey!</strong> <?php 
    echo $GLOBALS["APP"]["MSG"]["INFO"];
    ?>
          </div>
        <?php 
}
?>
        <?php 
if (TSApp::StringHasValue($GLOBALS["APP"]["MSG"]["SUCCESS"])) {
    ?>
          <div class="alert alert-success alert-dismissible" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <strong>Success!</strong> <?php 
    echo $GLOBALS["APP"]["MSG"]["SUCCESS"];
    ?>
          </div>
        <?php 
}
?>
      </div>
예제 #3
0
<?php

/* FOR DEBUG PURPOSES... comment out when ready */
error_reporting(E_ALL);
ini_set("display_errors", 1);
ini_set("display_startup_errors", 1);
ini_set("log_errors", 1);
ini_set("ignore_repeated_errors", 0);
ini_set("track_errors", 1);
ini_set("html_errors", 1);
/* END DEBUG SHIT */
/**********************************
 * only entry point for application
 *********************************/
include_once "include/app/initialize.php";
$app = new TSApp(array(), 0, false);
$app->SessionActivate();
$app->Boot();