forked from pouetnet/pouet2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
91 lines (84 loc) · 3.23 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?
require_once("bootstrap.inc.php");
require_once("include_pouet/box-login.php");
require_once("include_pouet/box-index-bbs-latest.php");
require_once("include_pouet/box-index-cdc.php");
require_once("include_pouet/box-index-watchlist.php");
require_once("include_pouet/box-index-latestadded.php");
require_once("include_pouet/box-index-latestreleased.php");
require_once("include_pouet/box-index-latestcomments.php");
require_once("include_pouet/box-index-latestparties.php");
require_once("include_pouet/box-index-upcomingparties.php");
require_once("include_pouet/box-index-topmonth.php");
require_once("include_pouet/box-index-topalltime.php");
require_once("include_pouet/box-index-news.php");
require_once("include_pouet/box-index-searchbox.php");
require_once("include_pouet/box-index-affilbutton.php");
require_once("include_pouet/box-index-stats.php");
require_once("include_pouet/box-index-user-topglops.php");
require_once("include_pouet/box-index-oneliner-latest.php");
require_once("include_pouet/header.php");
require("include_pouet/menu.inc.php");
// the reason this is done like this is so that later
// we can allow the user to customize/reorder/etc it.
$boxes = array(
"leftbar" => array(
array("box"=>"Login"),
array("box"=>"CDC" ,"limit"=>get_setting("indexcdc")),
array("box"=>"LatestAdded" ,"limit"=>get_setting("indexlatestadded")),
array("box"=>"LatestReleased","limit"=>get_setting("indexlatestreleased")),
array("box"=>"TopMonth" ,"limit"=>get_setting("indextopprods")),
array("box"=>"TopAlltime" ,"limit"=>get_setting("indextopkeops")),
),
"middlebar" => array(
array("box"=>"LatestOneliner","limit"=>get_setting("indexoneliner")),
array("box"=>"LatestBBS" ,"limit"=>get_setting("indexbbstopics")),
array("box"=>"NewsBoxes" ,"limit"=>get_setting("indexojnews")),
),
"rightbar" => array(
array("box"=>"SearchBox" ,"limit"=>get_setting("indexsearch")),
array("box"=>"Stats" ,"limit"=>get_setting("indexstats")),
array("box"=>"AffilButton" ,"limit"=>get_setting("indexlinks")),
array("box"=>"LatestComments" ,"limit"=>get_setting("indexlatestcomments")),
array("box"=>"Watchlist" ,"limit"=>get_setting("indexwatchlist")),
array("box"=>"LatestParties" ,"limit"=>get_setting("indexlatestparties")),
array("box"=>"UpcomingParties"),
array("box"=>"TopGlops" ,"limit"=>get_setting("indextopglops")),
),
);
echo "<div id='content' class='frontpage'>\n";
foreach($boxes as $bar=>$boxlist)
{
$timer["bar_".$bar]["start"] = microtime_float();
echo " <div id='"._html($bar)."'>\n";
foreach($boxlist as $box)
{
if (isset($box["limit"]) && (int)$box["limit"]==0)
continue;
$class = "PouetBox".$box["box"];
$p = new $class();
if (!$currentUser && !$p->IsVisibleLoggedOut())
continue;
$p->SetParameters($box);
$p->Load(true);
$p->Render();
}
echo " </div>\n";
$timer["bar_".$bar]["end"] = microtime_float();
}
echo "</div>\n";
?>
<script type="text/javascript">
<!--
document.observe("dom:loaded",function(){
if (Pouet.isMobile)
{
CollapsibleHeaders( $$(".pouettbl") );
}
});
//-->
</script>
<?
require("include_pouet/menu.inc.php");
require_once("include_pouet/footer.php");
?>