-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
32 lines (23 loc) · 823 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
// Start everything from here
namespace BBC;
// Sanitize inputs
require_once 'SanitizeInput.php';
// Include the test file
require_once 'TestBBC.php';
// A lot of functions are shared
require_once 'BBCHelpers.php';
$testBBC = new TestBBC;
$possible_tests = $testBBC->getPossibleTests();
// We can't set these until we get the possible tests
$input['tests'] = array(
'a' => isset($_GET['a']) && isset($possible_tests[$_GET['a']]) ? $possible_tests[$_GET['a']]['name'] : 'Old parse_bbc',
'b' => isset($_GET['b']) && isset($possible_tests[$_GET['b']]) ? $possible_tests[$_GET['b']]['name'] : 'Parser',
);
$testBBC->setInput($input);
if (isset($test_types[$type]))
{
call_user_func(array($testBBC, $test_types[$type]), $input);
$results = $testBBC->getResults();
}
require_once 'Templates/IndexTemplate.php';