Select Git revision
messenger.class.php
index.php 8.90 KiB
<?php
define("APP_VERSION", '2.0.0-ALPHA');
require_once('./classes/render-adminlte.class.php');
require_once('./classes/queryparam.class.php');
# require_once('./classes/icon.class.php');
$sPpage=queryparam::get('page', '/^[a-z]*$/');
$renderAdminLTE=new renderadminlte();
$aReplace=include("./ui/page_replacements.php");
// detect first run
$bFirstRun=!file_exists("../../config/config_custom.php") || !file_exists("../../config/inc_user2roles.php");
require_once("../../config/inc_projects_config.php");
require_once("./classes/logger.class.php");
require_once("./classes/user.class.php");
global $oCLog;
$oCLog = new logger();
$oCLog->enableDebugByIp($aConfig['showdebug']['ip']);
require_once("./inc_functions.php");
require_once("./classes/htmlguielements.class.php");
require_once("./classes/plugins_renderer.class.php");
$oHtml=new htmlguielements();
$sPrj = "";
$sAction = "overview";
// ----------------------------------------------------------------------
// check params
// ----------------------------------------------------------------------
if (array_key_exists("prj", $aParams)) {
$sPrj = $aParams["prj"];
}
if (array_key_exists("action", $aParams)) {
if (file_exists(__DIR__ . '/pages/act_' . $aParams["action"] . ".php")) {
$sAction = $aParams["action"];
}
}
$oCLog->add("parsing params "
. '<pre>GET '.print_r($_GET, true).'</pre>'
. '<pre>POST '.print_r($_POST, true).'</pre>'
. '<pre>aParams: '.print_r($aParams, true).'</pre>'
);
if($bFirstRun){
$sAction='installer';
}
// ----------------------------------------------------------------------
// html header
// ----------------------------------------------------------------------
$sHeader = "\n<!-- generated CSS for phases -->\n<style>\n";
foreach ($aConfig["phases"] as $sPhase => $aData) {
$sHeader.=array_key_exists("bgdark", $aData["css"]) ? 'th.' . $sPhase . '{' . $aData["css"]["bgdark"] . '}' : '';
$sHeader.=array_key_exists("bglight", $aData["css"]) ? 'td.' . $sPhase . ', div.' . $sPhase . '{' . $aData["css"]["bglight"] . '}' : '';
$sHeader.=array_key_exists("bgbutton", $aData["css"]) ? 'a.' . $sPhase . ',a.' . $sPhase . ':hover,button.' . $sPhase . ',button.' . $sPhase . ':hover{' . $aData["css"]["bgbutton"] . '}' : '';
}
$sHeader.="</style>\n";
// add shellcmd files
$sShellOuptut='';
$sTopRight='';