/** * Container section * * @param array $§ * * @return string */ function section_container(array &$§) : string { $§['vars']['tag'] = $§['vars']['tag'] ?? null; $html = ''; if (!empty($§['children']) && is_array($§['children'])) { asort($§['children'], SORT_NUMERIC); foreach (array_keys($§['children']) as $id) { $html .= §($id); } } return $html && $§['vars']['tag'] ? html_tag($§['vars']['tag'], ['id' => $§['as']], $html) : $html; }
use ErrorException; use Throwable; /** * Initialize application */ foreach (glob(__DIR__ . '/../src/*.php') as $file) { include_once $file; } /** * Error handler */ set_error_handler(function (int $severity, string $message, string $file, int $line) { throw new ErrorException($message, 0, $severity, $file, $line); }); set_exception_handler(function (Throwable $e) { critical((string) $e); }); register_shutdown_function(function () { $error = error_get_last(); $errors = [E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING]; if ($error && in_array($error['type'], $errors)) { critical(print_r($error, 1)); } }); /** * Run application */ app(); echo §('root');
<a href="" onclick="javascript: execButton(this,'upload'); return false;" name="upload" class="buttonBox" > <img src="<?php echo _FM_HOME_FOLDER; ?>/images/upload.png" /> <span><?php §(MText::_("upload"));?></span> </a> <a href="" onclick="javascript: execButton(this,'download'); return false;" name="download" class="buttonBox" > <img src="<?php echo _FM_HOME_FOLDER; ?>/images/download.png" /> <span><?php §(MText::_("download"));?></span> </a> <a href="" onclick="javascript: execButton(this,'chmod'); return false;" name="chmod" class="buttonBox" > <img src="<?php echo _FM_HOME_FOLDER; ?>/images/lock.png" /> <span><?php §(MText::_("rights"));?></span> </a> <a href="" onclick="javascript: execButton(this,'remove'); return false;" name="remove" class="buttonBox" > <img src="<?php echo _FM_HOME_FOLDER; ?>/images/trash.png" /> <span><?php §(MText::_("remove"));?></span> </a> <ul id="mSearch"> <li onclick="javascript: mSearch.setFreeze();"> <img src="<?php echo _FM_HOME_FOLDER; ?>/images/search.png" /> <span><?php §(MText::_("search"));?></span> <ul id="mDisplaySearch"> <li> <input id="mSearchField"></input> <img src="<?php echo _FM_HOME_FOLDER; ?>/images/no.png" id="mSearchFieldClean" /> <img src="<?php echo _FM_HOME_FOLDER; ?>/images/search_small.png" id="mSearchFire" /> </li> </ul> </li> </ul>
<div id="dndon" class="windowWrap windowWrapOuter" style="display:block; border: 1px solid #afa; width: 390px; background-color:#efe; min-height: 250px; float:left; margin-top: 15px;"> <div style="padding:10px;"> <span style="font-weight: bold; font-size: 14px; color: #282;"><?php §(MText::_("dnduploadyes"));?></span> <br/><br/> <span style="font-weight: bold; font-size: 14px; padding-top: 10px;"><?php §(MText::_("dnduploaddesc"));?></span> </div> </div> <div id="dndoff" class="windowWrap windowWrapOuter" style="display:block; border: 1px solid #faa; width: 390px; background-color:#fee; min-height: 250px; float:left; margin-top: 15px;"> <div style="padding:10px;"> <span style="font-weight: bold; font-size: 14px; color: #822;"><?php §(MText::_("dnduploadno"));?></span> <br/><br/> <span style="font-weight: bold; font-size: 14px; padding-top: 10px;"><?php §(MText::_("dnduploaddesc"));?></span> </div> </div> <script type="text/javascript"> var dndon = document.getElementById("dndon").style; var dndoff = document.getElementById("dndoff").style; if(_isXHRUpload()){ dndon.display = "block"; dndoff.display = "none"; }else{ dndon.display = "none"; dndoff.display = "block"; } </script>
class="buttonBox <?php if(! $GLOBALS["task"]) echo 'active'; ?>" onclick="window.location.href= this.href;" > <img src="<?php echo _FM_HOME_FOLDER; ?>/images/rootfolder.png" /> <span><?php §(MText::_("rootfolder"));?></span> </a> <a href="<?PHP echo MURL::_("rootsandrights",null,"rights"). (isset($rootfolderid) ? '&id='. $rootfolderid : ''); ?>" name="rights" class="buttonBox <?php if($GLOBALS["task"]== "rights") echo 'active'; ?>" onclick="window.location.href= this.href;"> <img src="<?php echo _FM_HOME_FOLDER; ?>/images/rights.png" /> <span><?php §(MText::_("rights"));?></span> </a> <div class="toRight"> <?php $_id = MRequest::int("id", 1); $isDisabled = ' id="disabled"'; $cursor = "default"; if(!$GLOBALS["task"] && $_id > -1){ $isDisabled = ''; $cursor= "pointer"; } ?> <a name="delete" <?php echo $isDisabled; ?> style="cursor: <?php echo $cursor;?>;" class="buttonBox " onclick="javascript: if(this.id == 'disabled') return false; askRemove();" > <img src="<?php echo _FM_HOME_FOLDER; ?>/images/trash.png" /> <span><?php §(MText::_("delete"));?></span> </a> <a name="save" style="cursor: pointer;" class="buttonBox " onclick="javascript: _('rightsFormNode').submit();"> <img src="<?php echo _FM_HOME_FOLDER; ?>/images/accept.png" /> <span><?php §(MText::_("save"));?></span> </a> </div>
function render() { if ($this->template) { §(MTemplater::get($this->template, $this->slots)); } else { if (isset($this->slots['content'])) { §($this->slots['content']); } } }