<?php #Error handling, general checks and global variables require_once 'classes/Initialization.inc.php'; $controllerName = empty($_REQUEST['controller']) ? 'scanner' : $_REQUEST['controller']; $controller = NULL; if ($controllerName === 'scanner') { require_once 'classes/ScannerController.inc.php'; $controller = new ScannerController(); } else { if ($controllerName === 'executor') { require_once 'classes/ExecutorController.inc.php'; $controller = new ExecutorController(); } else { if ($controllerName === 'download') { require_once 'classes/DownloadController.inc.php'; $controller = new DownloadController(); } } } if ($controller) { $controller->start(); }
* * This page calls the User Manager Controller * * Copyright (c) 2012 OWASP * * LICENSE: * * This file is part of Hackademic CMS (https://www.owasp.org/index.php/OWASP_Hackademic_Challenges_Project). * * Hackademic CMS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public * License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any * later version. * * Hackademic CMS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with Hackademic CMS. If not, see * <http://www.gnu.org/licenses/>. * * * @author Pragya Gupta <pragya18nsit[at]gmail[dot]com> * @author Konstantinos Papapanagiotou <conpap[at]gmail[dot]com> * @license http://www.gnu.org/licenses/gpl.html * @copyright 2012 OWASP * */ require_once "../../init.php"; require_once HACKADEMIC_PATH . "admin/controller/class.DownloadController.php"; $controller = new DownloadController(); echo $controller->go();
require_once 'libs/controller/SearchController.class.php'; $controller = new SearchController(); $controller->handle(); break; case 'detail': require_once 'libs/controller/DetailController.class.php'; $controller = new DetailController(); $controller->handle(); break; case 'push': session_write_close(); require_once 'libs/controller/PushController.class.php'; $controller = new PushController(); $controller->doPush(); break; case 'download': require_once 'libs/controller/DownloadController.class.php'; $controller = new DownloadController($_GET['id']); $controller->handle(); break; case 'test': print_r($_SESSION['kindle']); break; default: $smarty = new Smarty(); $smarty->assign('logined', isLogined()); $smarty->display('libs/view/head.ctp'); $smarty->display('libs/view/home.ctp'); $smarty->display('libs/view/tail.ctp'); break; }
* sendtogeo@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ include_once "includes/sp-load.php"; checkLoggedIn(); include_once SP_CTRLPATH . "/download.ctrl.php"; $controller = new DownloadController(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { switch ($_POST['sec']) { } } else { switch ($_GET['sec']) { default: $controller->downloadFile($_GET); break; } }
/** * Proxy for getModel. * @since 1.6 */ public function &getModel($name = 'Downloads', $prefix = 'DownloadModel') { $model = parent::getModel($name, $prefix, array('ignore_request' => true)); return $model; }
//чтобы создать минимальное окружение define('IN_STDF', 1); require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stdf.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/config.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/globals.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/memBuff' . (defined('USE_MEMCACHED') ? 2 : 1) . '.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/log.php'; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/session.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/CFile.php"; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/DB.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/yii/tinyyii.php'; require_once __DIR__ . '/controllers/DownloadController.php'; session_start(); //Пока такой хак чтобы отдельно //конфиг не делать для миниокружения //так в DAV там хост другой if (is_release()) { $host = HTTP_PREFIX . 'www.fl.ru'; } elseif (is_beta()) { $host = HTTP_PREFIX . 'beta.fl.ru'; } elseif (!is_local()) { $host = HTTP_PREFIX . 'alpha.fl.ru'; } $path = __paramInit('string', 'path', 'path'); $module = new CModule('download'); $module->setBasePath(dirname(__FILE__)); $controller = new DownloadController('download', $module); $controller->init($path); // инициализация контролера $controller->run('index'); // запуск обработчика