-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
50 lines (37 loc) · 1011 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* @Author: James McCarthy <sjamesmccarthy>
* @Date: 05-02-2017 12:11:58
* @Email: [email protected]
* @Filename: index.php
* @Last modified by: sjamesmccarthy
* @Last modified time: 05-17-2017 6:56:49
* @Copyright: 2017
*/
ini_set('display_errors', 1);
error_reporting(E_ALL ^ E_NOTICE);
spl_autoload_register(function ($class) {
include 'controller/' . $class . '.php';
});
if(!isset($_REQUEST['a'])) { $_REQUEST['a'] = 'showsplash'; }
$listings= new Listings;
switch($_REQUEST['a']) {
case "states":
$layout = $listings->showStates();
break;
case "cities":
$layout = $listings->showCities($_REQUEST['state']);
break;
case "locations":
$layout= $listings->showLocations($_REQUEST['city'],$_REQUEST['state']);
break;
case "currentlocations":
// $listings->showCurrentLocations(0,0);
include($_SERVER['DOCUMENT_ROOT'] . '/view/view_listings_currentlocations.php');
break;
case "showsplash":
$layout = $listings->showSplash();
break;
}
print $layout;
?>