/**
  * Execute the Parent Run function
  */
 public function run()
 {
     if ($this->oPrediggoSearchConfig->search_active) {
         parent::run();
     } else {
         header("Location: ../");
     }
 }
Ejemplo n.º 2
0
 function __construct()
 {
     if (isset($_GET['r'])) {
         //разбить запрос
         $splitReq = explode('/', $_GET['r']);
         //получить имя файла, достать последний массив из конца сстроки запроса
         $this->filename = array_pop($splitReq);
         //все остальное в массиве, это путь к файлу
         $this->sect = $splitReq;
         //process request
         $this->processRequest();
     } else {
         if (isset($_GET['route'])) {
             $frontController = new FrontController();
             $frontController->run();
             exit;
         }
         ST::redirectToRoute("Index/index");
     }
 }
Ejemplo n.º 3
0
 public function run(FrontController $frontController)
 {
     try {
         // Enable output buffering.
         ob_start();
         // Build the HTTP context data.
         $requestPath = $frontController->buildContext($this->configuration);
         // Build the controller path string for controller class autoloading.
         $this->controllerPath = "{$this->applicationPath}/controllers{$requestPath}";
         // Execute the front controller.
         $frontController->run();
         $frontController->renderView();
         // Send HTTP response and turn off output buffering.
         ob_end_flush();
     } catch (Exception $exception) {
         // Destroy any output buffer contents that could have been added.
         ob_clean();
         $frontController->renderErrorView(implode('<br>', [$exception->getMessage(), "<strong>Fichier</strong> : " . $exception->getFile(), "<strong>Ligne</strong> : " . $exception->getLine()]));
     }
 }
Ejemplo n.º 4
0
                    Tools::redirectLink(__PS_BASE_URI__ . '/modules/paypal/express_checkout/submit.php?' . $query);
                } else {
                    $controller = new FrontController();
                    $controller->init();
                    Tools::redirect(Context::getContext()->link->getModuleLink('paypal', 'submit', $values));
                }
            }
        } else {
            // If Cart changed, no need to keep the paypal data
            unset(Context::getContext()->cookie->{PaypalExpressCheckout::$COOKIE_NAME});
            $ppec->logs[] = $ppec->l('Cart changed since the last checkout express, please make a new Paypal checkout payment');
        }
    }
    if (_PS_VERSION_ < '1.5') {
        $display = new BWDisplay();
    } else {
        $display = new FrontController();
    }
    // Display payment confirmation
    if ($ppec->ready && Tools::getValue('get_confirmation')) {
        if (_PS_VERSION_ < '1.5') {
            $currency = new Currency((int) $ppec->getContext()->cart->id_currency);
            $ppec->getContext()->smarty->assign(array('form_action' => PayPal::getShopDomainSsl(true, true) . _MODULE_DIR_ . $ppec->name . '/express_checkout/submit.php', 'total' => Tools::displayPrice($ppec->getContext()->cart->getOrderTotal(true), $currency), 'logos' => $ppec->paypal_logos->getLogos(), 'use_mobile' => (bool) $ppec->getContext()->getMobileDevice()));
            $display->setTemplate(_PS_MODULE_DIR_ . 'paypal/views/templates/front/order-summary.tpl');
        }
    } else {
        $ppec->getContext()->smarty->assign(array('message' => $ppec->l('Error occurred:'), 'logs' => $ppec->logs, 'use_mobile' => $ppec->getContext()->getMobileDevice()));
        $display->setTemplate(_PS_MODULE_DIR_ . 'paypal/views/templates/front/error.tpl');
    }
    $display->run();
}
Ejemplo n.º 5
0
<?php

/**
 * smac entry point
 */
define('DEBUG', true);
/* loading core */
require_once 'smac.php';
new Request();
@(list($route, $action, $param) = Request::ParseUri());
$fc = new FrontController($route, $action, $param);
$fc->run();
Ejemplo n.º 6
0
<?php

require dirname(__FILE__) . "/include/common.php";
$frontController = new FrontController();
$frontController->run();
Ejemplo n.º 7
0
 * Elefant CMS - http://www.elefantcms.com/
 *
 * Copyright (c) 2011 Johnny Broadway
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
/**
 * This is the front controller of Elefant. All dynamic requests
 * are sent here to be handled and served.
 */
require 'lib/FrontController.php';
$argc = isset($argc) ? $argc : null;
$argv = isset($argv) ? $argv : null;
return FrontController::run($argv, $argc);
Ejemplo n.º 8
0
 * Created by PhpStorm.
 * User: gilles.azais
 * Date: 1/25/2016
 * Time: 2:28 PM
 */
define('APPLICATION_PATH', "model");
require 'routeHelper.php';
require 'view/_partials/partialFunctions.php';
require 'controller/Loader.php';
require 'controller/FrontController.php';
require 'controller/Controller.php';
require 'controller/Mapper.php';
require 'controller/db.php';
require 'model/entities/Entity.php';
/*require('controller/controllers/BestelController.php');
  require('controller/Controllers/RegisterController.php');
  require('controller/Controllers/ContactController.php');
  require('controller/Controllers/HomeController.php');
  require('controller/Controllers/LoginController.php');
  require('controller/Controllers/OverOnsController.php');
  require('controller/Controllers/WinkelWagenController.php');*/
function pr($var)
{
    echo "<pre>";
    var_dump($var);
    echo "</pre>";
}
session_start();
$frontcontroller = new FrontController();
$frontcontroller->run();
Ejemplo n.º 9
0
        }
    }
    public function actionGetAll()
    {
        $this->success($this->data);
    }
    public function actionGetCount()
    {
        $this->success(array('count' => $this->data['count']));
    }
    public function actionGetSpeed()
    {
        $this->success(array('speed' => $this->data['speed']));
    }
    protected function success($data)
    {
        $out = array_merge(array('status' => 'OK'), $data);
        echo json_encode($out);
        exit;
    }
    protected function error($code, $message)
    {
        http_response_code($code);
        echo json_encode(array('status' => 'ERROR', 'message' => $message));
        exit;
    }
}
// Go go go!
$frontController = new FrontController();
$frontController->run('Api');
Ejemplo n.º 10
0
<?php

require_once 'config/_definitions.php';
//load main node config
require_once CORE_REPOSITORY_REAL_PATH . 'config/_version.php';
//version
require_once CORE_APP_PATH . 'config/_definitions.php';
//central planner Load
require_once 'config/config.php';
//local config
require_once 'config/autoloader.php';
//local autoloader
require_once CORE_REPOSITORY_REAL_PATH . 'vendor/autoload.php';
//vendor
$app = App::get_instance($params);
require_once CORE_REPOSITORY_REAL_PATH . 'config/_services.php';
//load services
require_once 'init.php';
$app->user = new Auth();
$app->node = MY_NODE;
$app->tbId = CAAttendance::where('name', 'like', '%' . TB_PATTERN . '%')->where('is_tb', 1)->first(['id'])->id;
if (!$app->tbId) {
    App::$instance->MQ->setMessage('Внимание: нет связи с Планировщиком ЦА, вы не получаете события с центрального сервера', 'danger');
}
header($app->opt->header);
date_default_timezone_set($app->opt->timezone);
$router = new FrontController();
$router->run();
Ejemplo n.º 11
0
<?php

/*
 * formatar corretamente os acentos
 */
header('Content-Type: text/html; charset=utf-8');
/*
 * CARREGA INTERFACE E CLASSE PRIMARIAS
 */
require_once "interface/iController.php";
require_once "controller/FrontController.php";
/*
 * INICIALIZA APLICACAO
 */
$controller = new FrontController();
$controller->run();