1
0
mirror of https://github.com/Chouchen/ShikiProxy.git synced 2018-06-07 06:24:38 +02:00

Creation of the world

This commit is contained in:
Chouchen
2012-10-15 22:24:12 +02:00
commit 08d7614cb5
12 changed files with 499 additions and 0 deletions

37
index.php Normal file
View File

@@ -0,0 +1,37 @@
<?php
// No display, log everything
error_reporting(E_ALL);
ini_set('display_errors', 0);
ini_set('log_errors', 1);
ini_set('error_log',dirname(__FILE__).'/error.log');
// include everything
include_once 'FileToZip.php';
include_once 'FileToZipDispatcher.php';
include_once 'ToDownloadIndex.php';
include_once 'FileToZipEmail.php';
$action = filter_input(INPUT_GET, 'action');
$possibleActions = array('download', 'form', 'shortcut');
define('BASE_URL', 'http://mywebsite.com');
if($action == null || !in_array($action, $possibleActions)){
header('HTTP/1.0 404 Not Found');
exit;
}
if($action == 'form'){
include_once 'index.html';
exit;
}
if($action == 'download'){
include_once 'download.php';
exit;
}
if($action == 'shortcut'){
include_once 'shortcut.php';
exit;
}