| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <?php
- Lib::loadClass('Request');
- class ThemeDefault {
- function __construct() {
- DBG::log("ThemeDefault()...");
- }
- function head() { // inside UI::gora()
- // echo '<link rel="stylesheet" href="stuff/bootstrap/css/bootstrap-theme.min.css" type="text/css" />'; // TODO: dodać bootsrap-theme?
- }
- function top() {
- // echo ''; // TODO: UI::menu + breacrumbs
- Lib::loadClass('ProcesMenu');
- $procesMenu = ProcesMenu::getInstance();
- $procesMenu->show();
- // if (!V::get('MENU_INIT', '', $_GET)) {
- // Lib::loadClass('UserActivity');
- // //echo UserActivity::showListInContainer();
- // }
- }
- function footer() { // inside UI::dol()
- $version = (file_exists(APP_PATH_ROOT . '/VERSION'))? file_get_contents(APP_PATH_ROOT . '/VERSION') : null;
- $footerHtml = (file_exists(APP_PATH_ROOT . '/config/.footer.html'))? file_get_contents(APP_PATH_ROOT . '/config/.footer.html') : null;
- if ($version || $footerHtml) {
- echo '<div style="' . UI::fixFooterPosition('footer_style') . 'border-top:1px solid #ddd; margin-top:10px; padding:0 30px; font-size:xx-small; color:#888">';
- if ($version) echo 'version: '.$version . ' ';
- if ($footerHtml) echo $footerHtml;
- echo '</div>';
- }
- if (User::logged() && '1' === V::get('TEST_FEEDBACK', '', $_GET)) {
- // 1. lib: html2canvas - not everything supported
- echo UI::h('script', [ 'type' => "text/javascript", 'src' => "https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.min.js" ]);
- // 2. lib: html-screen-capture (MIT)
- UI::inlineJS(APP_PATH_ROOT . '/static/html-screen-capture.js');
- UI::inlineJS(APP_PATH_ROOT . '/static/p5UI/feedback.js', [
- 'URL_BASE_PATH' => Request::getPathUri(),
- ]);
- }
- echo UI::fixFooterPosition('footer_js_tag');
- }
- function login($data) {
- if (is_array($data) && !empty($data)) {
- extract($data);
- }
- include APP_PATH_WWW . '/se-lib/tmpl/login.php';
- }
- function remind($data) {
- if (is_array($data) && !empty($data)) {
- extract($data);
- }
- $loginLink = Request::getPathUri();
- die('TODO: remind password');
- // include APP_PATH_WWW . '/se-lib/tmpl/remind.php';
- }
- function remindSent($data) {
- if (is_array($data) && !empty($data)) {
- extract($data);
- }
- $loginLink = Request::getPathUri();
- die('TODO: remind password sent info');
- // include APP_PATH_WWW . '/se-lib/tmpl/remindSent.php';
- }
- function remindSetNewPassword($data) {
- if (is_array($data) && !empty($data)) {
- extract($data);
- }
- $loginLink = Request::getPathUri();
- die('TODO: remind set new password');
- // include APP_PATH_WWW . '/se-lib/tmpl/remindSetNewPass.php';
- }
- function remindNewPasswordSet($data) {
- if (is_array($data) && !empty($data)) {
- extract($data);
- }
- $loginLink = Request::getPathUri();
- die('TODO: remind new password set');
- // include APP_PATH_WWW . '/se-lib/tmpl/remindNewPassSetConfirm.php';
- }
- function logout($data) {
- if (is_array($data) && !empty($data)) {
- extract($data);
- }
- include APP_PATH_WWW . '/se-lib/tmpl/logout.php';
- }
- function home($data) {
- if (is_array($data) && !empty($data)) {
- extract($data);
- }
- include APP_PATH_WWW . '/se-lib/tmpl/defaultPage.php';
- }
- function asset($relativeUrl) {
- if ('ThemeDefault' === get_class($this)) return $relativeUrl;
- $projName = substr(get_class($this), strlen('Theme_'));
- return "projects/{$projName}/theme/{$relativeUrl}";
- }
- }
|