diff --git a/public_html/deployment/index.php b/public_html/deployment/index.php index 0257f34ef7baad382af24302d67a60d7db31ec0d..627335b6139941e2210945e349aa987f75cc1426 100644 --- a/public_html/deployment/index.php +++ b/public_html/deployment/index.php @@ -1,191 +1,253 @@ -<?php - -/* ###################################################################### - - IML DEPLOYMENT - - webgui - index file - controller like - ensure that you activated the rewrite rules - - RewriteEngine on - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_URI} !^/server-status$ - RewriteRule ^(.*)$ index.php [QSA,L] - - --------------------------------------------------------------------- - 2013-11-08 Axel <axel.hahn@iml.unibe.ch> - ###################################################################### */ - -session_start(); - -ini_set('display_errors', 1); -ini_set('display_startup_errors', 1); -error_reporting(E_ALL); - -require_once("./classes/page.class.php"); -require_once("./classes/plugins_renderer.class.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"); -$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=''; - -$CI_plugins=new plugin_renderer(isset($aConfig['plugins']) ? $aConfig['plugins'] : []); -$CI_plugins->setType('shellcmd'); - -$aEnabledShellPlugins=$CI_plugins->getEnabledPlugins('shellcmd'); -$sHeader.= count($aEnabledShellPlugins) - ? '' - ."\n<!-- for shellcmd plugins -->\n" - .'<script src="/vendor/axelhahn/js/ubd.class.js"></script>'."\n" - .'<script src="/vendor/winbox/0.2.82/winbox.min.js"></script>'."\n" - .'<link rel="stylesheet" type="text/css" href="/vendor/winbox/0.2.82/winbox.min.css"/>'."\n" - ."<!-- shellcmd scripts -->\n" - : '' - ; -foreach ($aEnabledShellPlugins as $sPlugin){ - if ($CI_plugins->testPlugin($sPlugin)){ - $aPluginConfig=$CI_plugins->getPluginConfig(); - $sHeader.=$CI_plugins->getHtmlLoadScript('render.js'); - $sShellOuptut.=$CI_plugins->getHtmlOutwindow(); - $sTopRight.='' - .'<li >' - .$oHtml->getLink(array( - 'href'=>'#', - // 'onclick'=>'toggleShellWindow(\''.$CI_plugins->getHtmlOutIdWrapper().'\', this);', - 'onclick'=>'toggleShellWindow(\''.$CI_plugins->getHtmlOutId().'\', this);', - 'role'=>'button', - 'aria-expanded'=>'false', - 'icon'=> (isset($aPluginConfig['icon']) ? $aPluginConfig['icon'] : ''), - 'label'=>$sPlugin, - )) - .'</li>' - ; - } -} - -// ---------------------------------------------------------------------- -// html body -// ---------------------------------------------------------------------- - -$sTopArea=getTopArea(['right'=>$sTopRight]); -$sBanner=isset($aConfig['banner']) && $aConfig['banner'] ? '<div class="alert alert-info">'.$aConfig['banner'].'</div>' : ''; -$sTopAction=getAction(); - -// ------ action -$oUser=new user(); -if (isset($aConfig["auth"]['forceuser']) && $aConfig["auth"]['forceuser']){ - $oCLog->add("Found config -> auth -> forceuser: using fake identity [".$aConfig["auth"]['forceuser'].']', "warning"); - $oUser->setUser($aConfig["auth"]['forceuser']); -} - -if ($oUser->hasPermission('page_'.$sAction)){ - - $sActionFile = __DIR__ . '/pages/act_' . $sAction . ".php"; - - $oCLog->add("including $sActionFile"); - ob_start(); - if (!@include($sActionFile)) { - include("./pages/error_404.php"); - } - $sPhpOut = ob_get_contents(); - ob_end_clean(); - $oCLog->add("including done $sActionFile"); - - $oCLog->add("adding actionlog.class"); - - if ($oUser->getUsername()){ - require_once("./classes/actionlog.class.php"); - $aFilter=array('limit'=>'0, 10'); - if ($sPrj && $sPrj!="all"){ - $aFilter['project']=$sPrj; - } - $oLog=new Actionlog($sPrj); - $sPhpOut.='<div class="logs">' . $oLog->renderLogs($aFilter).'</div>'; - } - $oCLog->add("adding actionlog.class done"); -} else { - $sPhpOut=$oUser->showDenied(); - // return false; -} - -// ---------------------------------------------------------------------- -// render page -// ---------------------------------------------------------------------- - -$oCLog->add("Finally: rendering page ..."); - -$sPhpOut = ' - <br> - ' - . $sTopArea - . $sShellOuptut - .' - <div id="content"> - ' . $sBanner . $sTopAction . ' - ' . $sPhpOut . ' - </div> - <div id="footer"> - '.t("menu-brand").' © 2013-' . date("Y") . ' <a href="https://git-repo.iml.unibe.ch/iml-open-source/imldeployment/" target="_blank">Institut für Medizinische Lehre; Universität Bern</a> - </div> - - ' - .$oCLog->render(); - -$oPage = new Page(); -$oPage->addResponseHeader("Pragma: no-cache"); -$oPage->setOutputtype('html'); -$oPage->setHeader($sHeader); -$oPage->addJsOnReady(''); - -$oPage->setContent($sPhpOut); -echo $oPage->render(); +<?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=''; + + $CI_plugins=new plugin_renderer(isset($aConfig['plugins']) ? $aConfig['plugins'] : []); + $CI_plugins->setType('shellcmd'); + + $aEnabledShellPlugins=$CI_plugins->getEnabledPlugins('shellcmd'); + $sHeader.= count($aEnabledShellPlugins) + ? '' + ."\n<!-- for shellcmd plugins -->\n" + .'<script src="/vendor/axelhahn/js/ubd.class.js"></script>'."\n" + .'<script src="/vendor/winbox/0.2.82/winbox.min.js"></script>'."\n" + .'<link rel="stylesheet" type="text/css" href="/vendor/winbox/0.2.82/winbox.min.css"/>'."\n" + ."<!-- shellcmd scripts -->\n" + : '' + ; + foreach ($aEnabledShellPlugins as $sPlugin){ + if ($CI_plugins->testPlugin($sPlugin)){ + $aPluginConfig=$CI_plugins->getPluginConfig(); + $sHeader.=$CI_plugins->getHtmlLoadScript('render.js'); + $sShellOuptut.=$CI_plugins->getHtmlOutwindow(); + $sTopRight.='' + .'<li >' + .$oHtml->getLink(array( + 'href'=>'#', + // 'onclick'=>'toggleShellWindow(\''.$CI_plugins->getHtmlOutIdWrapper().'\', this);', + 'onclick'=>'toggleShellWindow(\''.$CI_plugins->getHtmlOutId().'\', this);', + 'role'=>'button', + 'aria-expanded'=>'false', + 'icon'=> (isset($aPluginConfig['icon']) ? $aPluginConfig['icon'] : ''), + 'label'=>$sPlugin, + )) + .'</li>' + ; + } + } + + + // ---------------------------------------------------------------------- + // html body + // ---------------------------------------------------------------------- + $BODY="WARNING: $sAction did not set \$BODY"; + $TITLE="WARNING: $sAction did not set \$TITLE"; + + $sTopArea=getTopArea(['right'=>$sTopRight]); + $sBanner=isset($aConfig['banner']) && $aConfig['banner'] ? '<div class="alert alert-info">'.$aConfig['banner'].'</div>' : ''; + $sTopAction=getAction(); + + if(isset($aParams["prj"])){ + $oPrj = new project($aParams["prj"]); + $TITLE=$oPrj->getLabel().' <div class="description">'.$oPrj->getDescription().'</div>'; + } else { + $TITLE=t("overview-label") . '<div class="description">' . t("overview-hint") . '</div>'; + } + // $sReturn.='<h1>' . $oPrj->getLabel() . '</h1>' + // . '<span class="description">' . $oPrj->getDescription() . '</span>'; + + // ------ action + $oUser=new user(); + if (isset($aConfig["auth"]['forceuser']) && $aConfig["auth"]['forceuser']){ + $oCLog->add("Found config -> auth -> forceuser: using fake identity [".$aConfig["auth"]['forceuser'].']', "warning"); + $oUser->setUser($aConfig["auth"]['forceuser']); + } + + if ($oUser->hasPermission('page_'.$sAction)){ + + $sActionFile = __DIR__ . '/pages/act_' . $sAction . ".php"; + + $oCLog->add("including $sActionFile"); + ob_start(); + if (!@include($sActionFile)) { + include("./pages/error_404.php"); + } + $BODY = ob_get_contents(); + ob_end_clean(); + $oCLog->add("including done $sActionFile"); + + $oCLog->add("adding actionlog.class"); + + if ($oUser->getUsername()){ + require_once("./classes/actionlog.class.php"); + $aFilter=array('limit'=>'0, 10'); + if ($sPrj && $sPrj!="all"){ + $aFilter['project']=$sPrj; + } + $oLog=new Actionlog($sPrj); + $BODY.='<div class="logs">' . $oLog->renderLogs($aFilter).'</div>'; + } + $oCLog->add("adding actionlog.class done"); + } else { + $BODY=$oUser->showDenied(); + // return false; + } + + + + // ---------------------------------------------------------------------- + // render page + // ---------------------------------------------------------------------- + + $oCLog->add("Finally: rendering page ..."); + + $BODY = ' + ' + . $sHeader + // . $sTopArea + . $sShellOuptut + .' + ' . $sBanner . $sTopAction . ' + <div id="content"> + ' . $BODY . ' + </div> + + <!-- + <div id="footer"> + '.t("menu-brand").' © 2013-' . date("Y") . ' <a href="https://git-repo.iml.unibe.ch/iml-open-source/imldeployment/" target="_blank">Institut für Medizinische Lehre; Universität Bern</a> + </div> + --> + ' + .$oCLog->render(); + + /* + $oPage = new Page(); + $oPage->addResponseHeader("Pragma: no-cache"); + $oPage->setOutputtype('html'); + $oPage->setHeader($sHeader); + $oPage->addJsOnReady(''); + + $oPage->setContent($BODY); + echo $oPage->render(); + */ + +/* +$sObject=queryparam::get('object', '/^[a-z\_]*$/'); + +$sTabApp=queryparam::get('app', '/^[a-z\-]*$/'); +if(!$sTabApp && !$sPpage){ + // $sTabApp=array_key_first($aObjects); + header('location: ?page=home'); + return true; +} + +*/ +$aTopnav = [ + ['href'=>'#', 'label'=>'Menu A', 'icon'=>'fa-solid fa-home' ], + ['href'=>'#', 'label'=>'Menu B', 'icon'=>'fa-solid fa-tv'], + ['href'=>'#', 'label'=>'Menu C', 'icon'=>'fa-solid fa-truck-pickup', 'class'=>'active', + 'children'=>[ + ['href'=>'#', 'label'=>'FAQ' , 'icon'=>'fa-solid fa-truck-monster'], + ['href'=>'#', 'label'=>'Support' , 'icon'=>'fa-solid fa-truck-moving'], + ] + ] +]; + +$aReplace['{{NAVI_TOP}}']='' +. $renderAdminLTE->addWrapper( + 'nav', ['class'=>'main-header navbar navbar-expand navbar-white navbar-light'], + $renderAdminLTE->getTopNavigation($aTopnav) + // add 2nd navbar if needed +) +; +$aSidebarNav=[]; +$aReplace['{{NAVI_LEFT}}']='' + . $renderAdminLTE->addWrapper( + 'nav', ['class'=>'mt-2'], + $renderAdminLTE->getSidebarNavigation($aSidebarNav) + ); + + +// ---------- include page content +$sIncfile='pages/'.$sPpage.'.php'; +if(!file_exists($sIncfile)){ + $sIncfile='pages/error404.php'; +} + +// include($sIncfile); + + +// ---------- generate output +$aReplace['{{PAGE_BODY}}']=$BODY; +$aReplace['{{PAGE_BODY}}']=$BODY; +$aReplace['{{PAGE_HEADER_LEFT}}']='<h2>'.$TITLE.'</h2>'; + +$sTemplate=file_get_contents('ui/page.tpl.php'); +echo $renderAdminLTE->render($sTemplate,$aReplace); diff --git a/public_html/deployment/index_v1.php b/public_html/deployment/index_v1.php new file mode 100644 index 0000000000000000000000000000000000000000..0257f34ef7baad382af24302d67a60d7db31ec0d --- /dev/null +++ b/public_html/deployment/index_v1.php @@ -0,0 +1,191 @@ +<?php + +/* ###################################################################### + + IML DEPLOYMENT + + webgui - index file - controller like + ensure that you activated the rewrite rules + + RewriteEngine on + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_URI} !^/server-status$ + RewriteRule ^(.*)$ index.php [QSA,L] + + --------------------------------------------------------------------- + 2013-11-08 Axel <axel.hahn@iml.unibe.ch> + ###################################################################### */ + +session_start(); + +ini_set('display_errors', 1); +ini_set('display_startup_errors', 1); +error_reporting(E_ALL); + +require_once("./classes/page.class.php"); +require_once("./classes/plugins_renderer.class.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"); +$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=''; + +$CI_plugins=new plugin_renderer(isset($aConfig['plugins']) ? $aConfig['plugins'] : []); +$CI_plugins->setType('shellcmd'); + +$aEnabledShellPlugins=$CI_plugins->getEnabledPlugins('shellcmd'); +$sHeader.= count($aEnabledShellPlugins) + ? '' + ."\n<!-- for shellcmd plugins -->\n" + .'<script src="/vendor/axelhahn/js/ubd.class.js"></script>'."\n" + .'<script src="/vendor/winbox/0.2.82/winbox.min.js"></script>'."\n" + .'<link rel="stylesheet" type="text/css" href="/vendor/winbox/0.2.82/winbox.min.css"/>'."\n" + ."<!-- shellcmd scripts -->\n" + : '' + ; +foreach ($aEnabledShellPlugins as $sPlugin){ + if ($CI_plugins->testPlugin($sPlugin)){ + $aPluginConfig=$CI_plugins->getPluginConfig(); + $sHeader.=$CI_plugins->getHtmlLoadScript('render.js'); + $sShellOuptut.=$CI_plugins->getHtmlOutwindow(); + $sTopRight.='' + .'<li >' + .$oHtml->getLink(array( + 'href'=>'#', + // 'onclick'=>'toggleShellWindow(\''.$CI_plugins->getHtmlOutIdWrapper().'\', this);', + 'onclick'=>'toggleShellWindow(\''.$CI_plugins->getHtmlOutId().'\', this);', + 'role'=>'button', + 'aria-expanded'=>'false', + 'icon'=> (isset($aPluginConfig['icon']) ? $aPluginConfig['icon'] : ''), + 'label'=>$sPlugin, + )) + .'</li>' + ; + } +} + +// ---------------------------------------------------------------------- +// html body +// ---------------------------------------------------------------------- + +$sTopArea=getTopArea(['right'=>$sTopRight]); +$sBanner=isset($aConfig['banner']) && $aConfig['banner'] ? '<div class="alert alert-info">'.$aConfig['banner'].'</div>' : ''; +$sTopAction=getAction(); + +// ------ action +$oUser=new user(); +if (isset($aConfig["auth"]['forceuser']) && $aConfig["auth"]['forceuser']){ + $oCLog->add("Found config -> auth -> forceuser: using fake identity [".$aConfig["auth"]['forceuser'].']', "warning"); + $oUser->setUser($aConfig["auth"]['forceuser']); +} + +if ($oUser->hasPermission('page_'.$sAction)){ + + $sActionFile = __DIR__ . '/pages/act_' . $sAction . ".php"; + + $oCLog->add("including $sActionFile"); + ob_start(); + if (!@include($sActionFile)) { + include("./pages/error_404.php"); + } + $sPhpOut = ob_get_contents(); + ob_end_clean(); + $oCLog->add("including done $sActionFile"); + + $oCLog->add("adding actionlog.class"); + + if ($oUser->getUsername()){ + require_once("./classes/actionlog.class.php"); + $aFilter=array('limit'=>'0, 10'); + if ($sPrj && $sPrj!="all"){ + $aFilter['project']=$sPrj; + } + $oLog=new Actionlog($sPrj); + $sPhpOut.='<div class="logs">' . $oLog->renderLogs($aFilter).'</div>'; + } + $oCLog->add("adding actionlog.class done"); +} else { + $sPhpOut=$oUser->showDenied(); + // return false; +} + +// ---------------------------------------------------------------------- +// render page +// ---------------------------------------------------------------------- + +$oCLog->add("Finally: rendering page ..."); + +$sPhpOut = ' + <br> + ' + . $sTopArea + . $sShellOuptut + .' + <div id="content"> + ' . $sBanner . $sTopAction . ' + ' . $sPhpOut . ' + </div> + <div id="footer"> + '.t("menu-brand").' © 2013-' . date("Y") . ' <a href="https://git-repo.iml.unibe.ch/iml-open-source/imldeployment/" target="_blank">Institut für Medizinische Lehre; Universität Bern</a> + </div> + + ' + .$oCLog->render(); + +$oPage = new Page(); +$oPage->addResponseHeader("Pragma: no-cache"); +$oPage->setOutputtype('html'); +$oPage->setHeader($sHeader); +$oPage->addJsOnReady(''); + +$oPage->setContent($sPhpOut); +echo $oPage->render(); diff --git a/public_html/deployment/main.css b/public_html/deployment/main.css index b15d900de914b854fa591a1d94e224b6c89de0d2..7efa7efbd4bf0e602b57460e4e07294a3c3598d4 100644 --- a/public_html/deployment/main.css +++ b/public_html/deployment/main.css @@ -16,7 +16,9 @@ body{padding-top: 0; border-top: 0px solid #ddd; margin-top: 5em; } +/* .navbar {background:#436; border-radius: 0; position: fixed; top: 0px; width: 100%; left: 0; z-index: 100;} +*/ .navbar-inverse .navbar-nav > li > a { color: #fff; } @@ -28,7 +30,7 @@ body{padding-top: 0; } -.description{font-weight:bold; color:rgba(0,0,0,0.3); font-size: 150%; font-style: italic;} +.description{font-weight:normal; color:rgba(0,0,0,0.5); font-size: 70%; font-style: italic;} .navbar-brand {font-size: 150%;} .navbar-inverse .navbar-brand {color:#ddd !important;} @@ -47,15 +49,15 @@ body{padding-top: 0; } #content{ background: #fff; - margin: 0 2% 0; padding: 0.5em; border: 1px solid rgba(0,0,0,0.06); /* + margin: 0 2% 0; box-shadow: 1em 1em 2em #fff; */ } -div#navtop, div#navbuttom{background: #dde; padding: 0.5em;} +div#navtop, div#navbuttom{background: #d0d8e0; padding: 0.5em;} div#navtop{margin-bottom: 2em;} div#navtop .current{font-size: 170%; color: #667; padding: 0 0.2em; position: absolute;} div#navbuttom{ @@ -296,6 +298,11 @@ input[type="radio"]:checked+label, input[type="checkbox"]:checked+label{ .ciwinbox .bar{background: rgba(255,255,255,0.1);} .ciwinbox .progress{background: #85a;} +/* showIdAsModalMessage() - when using winbox */ +.ciwinboxinfos .wb-body{ + background: #fff !important; +} + .float-right{float: right;} .cmd-lines-10{height: 10em; max-height: 10em;} diff --git a/public_html/deployment/main_new_ui.css b/public_html/deployment/main_new_ui.css new file mode 100644 index 0000000000000000000000000000000000000000..fa956cec382b0a07bd1f75e5daa67ffab34f3861 --- /dev/null +++ b/public_html/deployment/main_new_ui.css @@ -0,0 +1,3 @@ +li.nav-item .active{background-color: #e8e8e8;} +pre.config{background:#f4f4f4; color:#448; border-radius: 0.5em; max-height: auto; transition: all ease-in-out 0.2s;} +.hidden{max-height: 0px; padding: 0; margin: 0;} diff --git a/public_html/deployment/ui/page.tpl.php b/public_html/deployment/ui/page.tpl.php new file mode 100644 index 0000000000000000000000000000000000000000..25e49daec3a1a358b4085e24ed328630568e2c00 --- /dev/null +++ b/public_html/deployment/ui/page.tpl.php @@ -0,0 +1,124 @@ +<!DOCTYPE html> + +<html lang="en"> + +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>{{PAGE_TITLE}}</title> + + <!-- + <script type="text/javascript" src="js/asimax.class.js"></script> + + visjs + <script type="text/javascript" src="vendor/vis/4.21.0/vis.min.js"></script> + <link href="vendor/vis/4.21.0/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css"/> + + --> + + <script type="text/javascript" src="/vendor/jquery/3.6.1/jquery.js"></script> + + <!-- datatable + <script type="text/javascript" src="../vendor/datatables/1.10.15/js/jquery.dataTables.min.js"></script> + <link href="../vendor/datatables/1.10.15/css/jquery.dataTables.min.css" rel="stylesheet" type="text/css"/> + --> + + <!-- fontawesome --> + <link href="/vendor/font-awesome/6.4.0/css/all.min.css" rel="stylesheet" type="text/css"/> + + <!-- Adminlte --> + <link rel="stylesheet" href="{{DIR_ADMINLTE}}/css/adminlte.min.css?v=3.2.0"> + + <link rel="stylesheet" href="{{DIR_ADMINLTEPLUGINS}}/summernote/summernote-bs4.min.css"> + <link rel="stylesheet" href="{{DIR_ADMINLTEPLUGINS}}/dropzone/dropzone.css" type="text/css" /> + + <link rel="stylesheet" href="/deployment/main.css"> + <link rel="stylesheet" href="/deployment/main_new_ui.css"> + +</head> + +<body class="hold-transition {{PAGE_SKIN}} {{PAGE_LAYOUT}}"> + <div class="wrapper"> + + {{NAVI_TOP}} + + <aside class="main-sidebar sidebar-dark-primary elevation-4"> + + {{BRAND}} + + <div class="sidebar"> + {{NAVI_LEFT}} + </div> + + </aside> + + <div class="content-wrapper px-4 py-2"> + + + <div class="content-header"> + <div class="container-fluid"> + <div class="row mb-2"> + <div class="col-sm-6"> + {{PAGE_HEADER_LEFT}} + + <!-- <h1 class="m-0">Starter Page</h1> --> + </div> + <div class="col-sm-6"> + <ol class="breadcrumb float-sm-right"> + {{PAGE_HEADER_RIGHT}} + <!-- + <li class="breadcrumb-item"><a href="#">Home</a></li> + <li class="breadcrumb-item active">Starter Page</li> + --> + </ol> + </div> + </div> + </div> + </div> + + + + <div class="content"> + <div class="container-fluid"> + {{PAGE_BODY}} + </div> + </div> + + </div> + + + <aside class="control-sidebar control-sidebar-dark"> + + <div class="p-3"> + <h5>Title</h5> + <p>Sidebar content</p> + </div> + </aside> + + + <footer class="main-footer"> + + <div class="float-right d-none d-sm-inline"> + {{PAGE_FOOTER_RIGHT}} + </div> + + {{PAGE_FOOTER_LEFT}} + </footer> + </div> + + <div id="divmodal"> + <div id="divmodalmessage">please wait ...</div> + </div> + + <script>{{INJECT_JS}}</script> + <script src="{{DIR_ADMINLTEPLUGINS}}/bootstrap/js/bootstrap.bundle.min.js"></script> + <!-- + <script src="{{DIR_ADMINLTEPLUGINS}}/summernote/summernote-bs4.min.js"></script> + <script src="{{DIR_ADMINLTEPLUGINS}}/dropzone/dropzone.js"></script> +--> + + <script src="{{DIR_ADMINLTE}}/js/adminlte.min.js?v=3.2.0"></script> + <script type="text/javascript" src="js/functions.js"></script> +</body> + +</html> \ No newline at end of file diff --git a/public_html/deployment/ui/page_replacements.php b/public_html/deployment/ui/page_replacements.php new file mode 100644 index 0000000000000000000000000000000000000000..e57e8099ddc6139f1b12b454430ecca0c8e15783 --- /dev/null +++ b/public_html/deployment/ui/page_replacements.php @@ -0,0 +1,69 @@ +<?php +/* + + this file is included by ../index.php + $cr=new cronlogrenderer(); + +*/ +return [ + '{{DIR_ADMINLTE}}' =>'/vendor/admin-lte/3.2.0', + '{{DIR_ADMINLTEPLUGINS}}' =>'/vendor/admin-lte-plugins', + '{{PAGE_SKIN}}' =>'', + '{{PAGE_TITLE}}' =>'', + '{{PAGE_LAYOUT}}' =>'layout-navbar-fixed layout-fixed sidebar-mini', + // '{{NAVI_TOP}}' =>'<nav class="main-header navbar navbar-expand navbar-white navbar-light"><ul class="navbar-nav" id="instances"></ul></nav>', + '{{BRAND}}' =>'<a href="?" class="brand-link bg-red"> + <i class="fa-solid fa-cubes"></i> + IML <span class="brand-text">CI server</span> + <span class="brand-text font-weight-light">v2</span> + </a>', + '{{NAVI_LEFT}}' =>' + <br> + <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false"> + <li class="nav-item"> + <a href="#" class="nav-link"> + <i class="far fa-pack"></i> + <p>Server</p> + </a> + </li> + </ul> + <!-- + --> + <div class="form-inline"> + <div class="input-group"> + <input id="serverfiltertext" class="form-control form-control-sidebar" type="search" placeholder="Search" + + onchange="filterServers();" + onkeypress="filterServers();" + onkeyup="filterServers();" + + > + <div class="input-group-append"> + <button class="btn btn-sidebar" + onclick="$(\'#serverfiltertext\').val(\'\'); filterServers();" > + × + </button> + </div> + </div> + </div> + <br> + + <div class="form-inline"> + <div id="selectserver" class="form-control-sidebar"></div> + </div> + <br> + + <div class="sidebar-infobox bottom"> + <i class="fas fa-info-circle"></i> PDO Class Admin v'.APP_VERSION.'<br> + <i class="fab fa-php"></i> PHP '.PHP_VERSION.'<br> + </div> + ', + + '{{PAGE_HEADER_LEFT}}'=>'{{PAGE_HEADER_LEFT}}', + '{{PAGE_HEADER_RIGHT}}'=>'{{PAGE_HEADER_RIGHT}}', + '{{PAGE_BODY}}'=>'{{PAGE_BODY}}', + // '{{INJECT_JS}}' => $cr->renderJSLang(), + '{{INJECT_JS}}' => '', + '{{PAGE_FOOTER_LEFT}}'=>' © 2013-' . date("Y") . ' <a href="https://www.iml.unibe.ch/" target="_blank">Institut für Medizinische Lehre; Universität Bern</a>', + '{{PAGE_FOOTER_RIGHT}}'=>'Source: <a href="https://git-repo.iml.unibe.ch/iml-open-source/imldeployment/" target="_blank">Git</a>', +]; \ No newline at end of file