<?php include './class/TemplateClass.php'; include './class/DatabaseClass.php'; include './class/UserClass.php'; $template = new TemplateClass(); ?> <!DOCTYPE html> <html lang="lv"> <head> <?php $template->insertHead(); ?> </head> <body> <header role="banner"> <?php $template->showHeader(); ?> </header> <main role="main"> <div class="container"> <div class="col-md-12"> <div id="registretiesModal" role="dialog"> <!-- class="modal fade" --> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button>
if (empty($showEntry)) { $showEntry = array('Ok' => true, 'New' => true, 'Spam' => false, 'Delete' => false); } else { foreach ($showEntry as $strKey => $strValue) { $tmp_showEntry[$strValue] = true; } $showEntry = $tmp_showEntry; } // Init Smily Class $Smiley = new Smileys($smiley_path); // Read Guestbook from JSON File require 'json.read.admin.php'; // Template Header echo $tpl_header; // Template Main $template = new TemplateClass($tpl_path); if ($gb_login == $admin_user && $gb_password == $admin_secret) { $_SESSION['gb_login'] = $gb_login; $_SESSION['gb_password'] = $gb_password; // PUBLISH if ($_POST['action'] == "Publish") { $aac = new AdminActionClass(); $aac->AdminActionLoop($json_gbook, 'Ok'); $aac->AdminActionDo($json_file); } // PROOF if ($_POST['action'] == "Proof") { $aac = new AdminActionClass(); $aac->AdminActionLoop($json_gbook, 'New'); $aac->AdminActionDo($json_file); }
*/ function err_handler_stathtml($errno, $errmsg, $filename, $linenum) { $date = date('Y-m-d H:i:s (T)'); $err = "{$date}\r\n"; $err .= "{$errmsg}\r\n"; $err .= "{$filename}\r\n"; $err .= "on line: {$linenum}\r\n"; $err .= "\r\n\r\n"; file_put_contents('./app/log/html5.log', $err, FILE_APPEND); } # Текущий URL кабинета $urlHost = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://" . $_SERVER['HTTP_HOST']; # Создали экземпляр класса SystemClass $systemClass = new SystemsClass(); # Получаем массив с полными путями для запросов к бекенду $billLink = $systemClass->getBillLink($urlHost); # Получаем входные Get/Post $paramsInput = $systemClass->get_input_data(); # Создали экземпляр класса CabinetClass $cabinetClass = new CabinetClass($billLink, $paramsInput); # Выбор локализации: setLanguage($cabinetClass->_attributesOut); # Start обработчика запроса и информации $cabinetClass->proceedRequest(); # Страница которую необходимо вывести на экран $page = $cabinetClass->_outPage; # Вывод шаблона $tpl = new TemplateClass($cabinetClass->_attributesOut['config']['path_template']); $tpl->set('val', $cabinetClass->attributesArrayOut()); $tpl->display($page);
<?php include './class/TemplateClass.php'; $template = new TemplateClass(); ?> <!DOCTYPE html> <html lang="lv"> <head> <?php $template->insertHead(); ?> </head> <body> <header role="banner"> <?php $template->showHeader(); ?> </header> <main role="main"> <div class="container"> <div class="col-md-12"> <article role="article"> <h1> <a href="http://www.kenrockwell.com/tech/notcamera.htm" title="Raksts par fotoaparātiem" target="_blank"> Tavam fotoaparātam nav nozīmes </a> <br> <p>Kens Rokvels (angļu / krievu val.)</p> </h1>
public function menuNews() { # Создаем обьект класса $tplNews = new TemplateClass($this->_attributesOut['config']['path_template']); $outItemNews = $this->getNews(); $tplNews->set("newsitem", $outItemNews); $itemNews = $tplNews->out("newsitem"); $this->_attributesOut['news'] = array('cab_company_news' => $itemNews); }