generated from roymjnet/faucetpay.io
-
Notifications
You must be signed in to change notification settings - Fork 2
/
page.php
41 lines (33 loc) · 936 Bytes
/
page.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
<?php
include("includes/core.php");
if($_GET['p']){
define('ADDON_ACTIVE', 1);
$addonList = array();
$addonListSQL = $mysqli->query("SELECT * FROM faucet_addon_list WHERE enabled = '1'");
while($addonRow = $addonListSQL->fetch_assoc())
$addonList[] = $addonRow['directory_name'];
switch($_GET['p']){
case(""):
default:
header("Location: index.php");
exit;
break;
case in_array($_GET['p'], $addonList):
include("addons/".$_GET['p']."/__page.php");
break;
}
} else {
$pageID = $mysqli->real_escape_string($_GET['pid']);
if(!is_numeric($pageID)){
header("Location: index.php");
exit;
}
$pageContent = $mysqli->query("SELECT * FROM faucet_pages WHERE id = '$pageID'");
if($pageContent->num_rows == 1){
$pageContent = $mysqli->query("SELECT * FROM faucet_pages WHERE id = '$pageID'")->fetch_assoc();
$content = $pageContent['content'];
}
}
$tpl->assign("content", $content);
$tpl->display();
?>