1 |
<?php |
2 |
/* This file is part of BBClone (A PHP based Web Counter on Steroids) |
3 |
* |
4 |
* SVN FILE $Id$ |
5 |
* |
6 |
* Copyright (C) 2001-2014, the BBClone Team (see doc/authors.txt for details) |
7 |
* |
8 |
* This program is free software: you can redistribute it and/or modify |
9 |
* it under the terms of the GNU General Public License as published by |
10 |
* the Free Software Foundation, either version 3 of the License, or |
11 |
* (at your option) any later version. |
12 |
* |
13 |
* This program is distributed in the hope that it will be useful, |
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 |
* GNU General Public License for more details. |
17 |
* |
18 |
* See doc/copying.txt for details |
19 |
*/ |
20 |
|
21 |
///////////////////////// |
22 |
// Show Config BBClone // |
23 |
///////////////////////// |
24 |
|
25 |
define("_BBC_PAGE_NAME", "BBClone - Show Config"); |
26 |
|
27 |
// START Time Measuring, load-time of the page (see config) |
28 |
$time = microtime(); |
29 |
$time = explode(' ', $time); |
30 |
$time = $time[1] + $time[0]; |
31 |
$start = $time; |
32 |
|
33 |
// Read constants |
34 |
if (is_readable("constants.php")) require_once("constants.php"); |
35 |
else exit("ERROR: Unable to open constants.php"); |
36 |
|
37 |
foreach (array($BBC_CONFIG_FILE, $BBC_LIB_PATH."selectlang.php", $BBC_ACCESS_FILE) as $i) { |
38 |
if (is_readable($i)) require_once($i); |
39 |
else exit(bbc_msg($i)); |
40 |
} |
41 |
|
42 |
// Determine whether we are allowed to display show_config.php |
43 |
if (empty($BBC_SHOW_CONFIG)) { |
44 |
header("Location: show_global.php"); |
45 |
return; |
46 |
} |
47 |
|
48 |
// Generate page |
49 |
echo $BBC_HTML->html_begin() |
50 |
.$BBC_HTML->topbar() |
51 |
."<table class=\"center\">\n" |
52 |
."<tr><td class=\"padding\">\n" |
53 |
."<table class=\"centerbox\">\n" |
54 |
."<tr><td>\n" |
55 |
."<table class=\"centerdata\">\n" |
56 |
// TABLE TITLES |
57 |
."<tr>\n" |
58 |
."<td class=\"label\" width=\"20%\">".$translation['config_variable_name']."</td>\n" |
59 |
."<td class=\"label\" width=\"60%\">".$translation['config_explanations']."</td>\n" |
60 |
."<td class=\"label\" width=\"20%\">".$translation['config_variable_value']."</td>\n" |
61 |
."</tr>\n" |
62 |
.$BBC_HTML->show_config("BBC_MAINSITE") |
63 |
.$BBC_HTML->show_config("BBC_SHOW_CONFIG", 1) |
64 |
.$BBC_HTML->show_config("BBC_TITLEBAR") |
65 |
.$BBC_HTML->show_config("BBC_LANGUAGE") |
66 |
.$BBC_HTML->show_config("BBC_MAXTIME") |
67 |
.$BBC_HTML->show_config("BBC_MAXVISIBLE") |
68 |
.$BBC_HTML->show_config("BBC_DETAILED_STAT_FIELDS") |
69 |
.$BBC_HTML->show_config("BBC_TIME_OFFSET") |
70 |
.$BBC_HTML->show_config("BBC_NO_DNS", 1) |
71 |
.$BBC_HTML->show_config("BBC_NO_HITS", 1) |
72 |
.$BBC_HTML->show_config("BBC_IGNORE_IP") |
73 |
.$BBC_HTML->show_config("BBC_IGNORE_REFER") |
74 |
.$BBC_HTML->show_config("BBC_IGNORE_BOTS") |
75 |
.$BBC_HTML->show_config("BBC_IGNORE_AGENT", 1) |
76 |
.$BBC_HTML->show_config("BBC_KILL_STATS", 1) |
77 |
.$BBC_HTML->show_config("BBC_PURGE_SINGLE", 1) |
78 |
// .$BBC_HTML->show_config("BBC_EXT_LOOKUP") |
79 |
// .$BBC_HTML->show_config("BBC_CSS_FILE") |
80 |
."</table>\n" |
81 |
."</td></tr></table>\n" |
82 |
."</td></tr></table>\n" |
83 |
.$BBC_HTML->copyright() |
84 |
.$BBC_HTML->topbar(0, 1); |
85 |
|
86 |
// END + DISPLAY Time Measuring, load-time of the page (see config) |
87 |
global $BBC_LOADTIME; |
88 |
|
89 |
if (!empty($BBC_LOADTIME)) { |
90 |
$time = microtime(); |
91 |
$time = explode(' ', $time); |
92 |
$time = $time[1] + $time[0]; |
93 |
$finish = $time; |
94 |
$total_time = round(($finish - $start), 4); |
95 |
echo "<div class=\"loadtime\">".$translation['generated'].$total_time.$translation['seconds']."</div>\n"; |
96 |
} |
97 |
|
98 |
// End of HTML |
99 |
echo $BBC_HTML->html_end() |
100 |
?> |