示例#1
0
 public function process()
 {
     $this->context->setDefault('action', 'ShowAdminHome');
     parent::process();
     $view = new AdminView();
     $view->setMain($this->context->getContent());
 }
 function render()
 {
     parent::render();
     $templateService = new TemplateService();
     $template = $templateService->Template($this->_templateName, "admin/xml");
     $template->assign($this->_params->getAsArray());
     print $template->fetch();
 }
 /**
  * Renders the view. It simply gets all the parameters we've been adding to it
  * and puts them in the context of the template renderer so that they can be accessed
  * as normal parameters from within the template
  */
 function render()
 {
     parent::render();
     $template = $this->_templateService->AdminTemplate($this->_templateName, $this->_blogInfo);
     // assign all the values
     $template->assign($this->_params->getAsArray());
     // and send the results
     print $template->fetch();
 }
 /**
  * Renders the view. It simply gets all the parameters we've been adding to it
  * and puts them in the context of the template renderer so that they can be accessed
  * as normal parameters from within the template
  *
  * @return Returns a rendered template
  */
 function render()
 {
     parent::render();
     // now, load the plugin's own template
     $template = $this->_templateService->PluginTemplate($this->_pluginId, $this->_templateName);
     // assign all the values
     $template->assign($this->_params->getAsArray());
     // and return the results
     print $template->fetch();
 }
 public function startLogProcess()
 {
     $logBLL = new LoggerBLL();
     $logAdminView = new AdminView($logBLL->getAllLoggs());
     $logOutputView = new OutputView();
     $body = "";
     if ($logAdminView->wantToSeeSessionOfIP()) {
         $body = $logAdminView->getSessionForIP();
     } else {
         if ($logAdminView->wantToSeeTracesOfSession()) {
             $body = $logAdminView->displayTracesOfSession();
         } else {
             $body = $logAdminView->displayIPAndSession();
         }
     }
     $logOutputView->standardOutput($body);
 }
 /**
  * Display.
  * 
  */
 function display($tpl = null)
 {
     parent::display($tpl);
 }
示例#7
0
 function __construct()
 {
     parent::__construct();
     //设置布局
     $this->set(array('layer' => 'login'));
 }
示例#8
0
 public function weeksviewAction()
 {
     if ($this->checkLogin()) {
         $model = new OrderModel();
         if (isset($_GET['id']) && ($id = $_GET['id'])) {
             $week = $model->getWinnersWeekId($id);
             $view = new AdminView();
             return $this->_controller->setPage($view->showWeek(['week' => $week], 'weeks'));
         }
     } else {
         header('Location: /admin/login');
         die;
     }
 }
示例#9
0
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 10.11.2015
 * Time: 0:08
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/AdminModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/AdminController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/AdminView.php';
$model = new AdminModel();
//It is important that the controller and the view share the model
$controller = new AdminController($model);
$view = new AdminView($model);
session_start();
if (!isset($_SESSION['admin'])) {
    header('Location: /admin/login');
}
session_write_close();
if (isset($_POST['delete_id'])) {
    $controller->actionDeleteData();
} else {
    if (isset($_POST['edit_category'])) {
        $view->DoctypeView('Admin');
        $controller->actionSaveData();
        $view->getForm();
    } else {
        if (isset($_POST['id'])) {
            $controller->actionUpdateData();
        } else {
示例#10
0
 /**
  * Display admin view
  */
 public function displayAdminView()
 {
     $AdminView = new AdminView($this->adminPassAsMD5);
     $AdminView->display();
 }
示例#11
0
文件: index.php 项目: naisly/WodenS
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 09.11.2015
 * Time: 23:29
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/AdminModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/AdminView.php';
$model = new AdminModel();
$view = new AdminView($model);
session_start();
if (!isset($_SESSION['admin'])) {
    header('Location: /admin/login');
}
session_write_close();
$view->DoctypeView('Admin');
$view->adminBlocks();
示例#12
0
文件: login.php 项目: naisly/WodenS
<?php

/**
 * Created by PhpStorm.
 * User: Home
 * Date: 09.11.2015
 * Time: 22:49
 */
include_once $_SERVER['DOCUMENT_ROOT'] . '/Model/AdminModel.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/Controllers/AdminController.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/View/AdminView.php';
$model = new AdminModel();
$controller = new AdminController($model);
$view = new AdminView($model);
$view->DoctypeView('Admin');
$view->getLoginForm();
if (isset($_POST['username'])) {
    $controller->actionLogin();
}