-
Notifications
You must be signed in to change notification settings - Fork 1
/
guide2.php
91 lines (77 loc) · 1.86 KB
/
guide2.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
require_once("funcs.php");
$extra_headers = "<style>
/* Wiki Styling */
h2, h3, h4, h5, h6 {
background: none;
font-weight: bold;
margin: 0;
display: inline;
}
h2 {
border-bottom: 1px solid #aaa;
}
</style>";
if(!defined("PROMISANCE"))
die(" ");
if (auth_user(true)) {
include("header.php");
$attach = $authstr;
} else {
htmlbegincompact("Game Guide");
$attach = $skinstr;
}
/*
"view" => 3,
"info" => 3,
"links" => 3,
"edit" => 2,
"calendar" => 2,
"upload" => 2,
"view/SecretPage" => 1,
"delete" => 1,
"control" => 0,
"admin" => 0,
"*" => 2, #- anything else requires this ring level
*/
$ewiki_ring = 3;
if($users[disabled] == 2)
$ewiki_ring = 0;
switch($_GET['section']) {
case '':
case 'login':
case 'guide2':
case 'features':
$section = 'Table of Contents';
break;
default:
$section = $_GET['section'];
}
error_reporting(E_ALL);
$attach = str_replace('&', '&', $attach); /** Ewiki kludge **/
define("EWIKI_SCRIPT", "?guide2$attach§ion=");
define("EWIKI_SCRIPT_BINARY", "?guide2$attach§ion=");
define("EWIKI_IMAGE_MAXSIZE", 256 *1024);
if(strpos($section, "internal://") === 0) {
$section = str_replace("internal://", "internal:/", $section);
ob_clean();
define('DISPLAY', 0);
} else {
define('DISPLAY', 1);
}
include_once("external/ewiki.inc");
$faf_old_action = $action;
$content = ewiki_page($section);
$action = $faf_old_action;
if(DISPLAY) {
echo "<table width=\"100%\"><tr><td align='left'>";
echo "<h1><a href=\"?guide2$authstr\">Game Guide</a></h1>";
}
echo $content;
if(DISPLAY) {
echo "</td></tr></table>";
TheEnd("");
} else {
ob_end_flush();
}
?>