| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- class SE_Layout {
- public static function getTitle() {
- $title = 'SE';
- $host = $_SERVER['SERVER_NAME'];
- if (substr($host, 0, 5) == 'biuro') {
- $host = substr($host, 6);
- }
- // TODO: add current table name
- $title = "{$host}-SE";
- return $title;
- }
- public static function gora() {
- Lib::loadClass('S');
- SE_Layout::loadTemplate('_layout_gora');
- }
- public static function dol() {
- $version = (file_exists(APP_PATH_ROOT . '/VERSION'))? file_get_contents(APP_PATH_ROOT . '/VERSION') : null;
- if ($version) {
- echo '<div style="border-top:1px solid #ddd;margin-top:10px;padding:0 30px;font-size:xx-small;color:#888;">version: '.$version.'</div>';
- }
- echo "\n</body></html>";
- }
- public static function menu() {
- if (!User::logged()) return;
- if (User::hasAccess('menu')) {
- Lib::loadClass('ProcesMenu');
- $procesMenu = ProcesMenu::getInstance();
- $procesMenu->show();
- if (!V::get('MENU_INIT', '', $_GET)) {
- Lib::loadClass('UserActivity');
- //echo UserActivity::showListInContainer();
- }
- }
- else {
- SE_Layout::loadTemplate('menuLevel6');
- }
- }
- public static function loadTemplate($tmplName, $data = array()) {
- if (is_array($data) && !empty($data)) {
- extract($data);
- }
- include APP_PATH_LIB . "/tmpl/{$tmplName}.php";
- }
- public static function hotKeyDBG($str) {
- if (User::hasAccess('dbg')) {
- echo '<span class="hidden-dbg">' . htmlspecialchars($str) . '</span>';
- }
- }
- }
|