-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.php
71 lines (61 loc) · 1.62 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?
//
// RevSense Ad Management System
// index.php
//
// (C) 2004,2005,2006,2007 W3matter LLC
// This is commercial software!
// Please read the license at:
// http://www.w3matter.com/license
//
// Get section and action
$section = $_REQUEST['section'];
$action = $_REQUEST['action'];
// Include our main lib
include_once("libs/startup.php");
// Determine if we need to install
if(!$DEFAULT['database'])
{
header("Location: install.php");
exit;
}
// Go to the home page if we have no section
if(!$section)
$section = "home";
// Call whatever modules we now have
$exc = "modules/" . $section . ".php";
if(file_exists($exc))
{
// Loadup the section
include_once($exc);
$s = new $section;
// Run the action if this is not an install
if($action != "install")
$s->main();
$action = $action ? $action : '_default';
$s->$action();
$template = "templates/{$section}/{$action}.php";
if (file_exists($template)) {
ob_start();
include_once($template);
$s->output->content = ob_get_contents();
ob_end_clean();
$s->output->display();
$s->output->printpage();
}
}
else
{
print "<h2>RevSense Error: [ $section ] not found</h2>";
print "That module does not exist. Several problems could cause this:<br>";
print "<ol>";
print "<li> You entered an invalid request (URL)";
print "<li> You did not upload files correctly";
print "<li> You do not have read permissions on the <b>modules</b> directory";
print "<li> The module you are requesting is an add-on to RevSense";
print "</ol>";
print "For help, please <a href=http://www.w3matter.com/support>contact us</a> for support and ";
print "refer to this screen.";
}
exit;
?>