forked from leonardoxc/leonardoxc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BLOCKS_end.php
79 lines (67 loc) · 2.05 KB
/
BLOCKS_end.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
<?
//************************************************************************
// Leonardo XC Server, http://www.leonardoxc.net
//
// Copyright (c) 2004-2010 by Andreadakis Manolis
//
// This program is free software. You can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License.
//
// $Id: BLOCKS_end.php,v 1.15 2012/01/16 07:21:22 manolis Exp $
//
//************************************************************************
?>
</td>
<td valign=top> <!-- right side blocks -->
<?
global $CONF;
if ($CONF['display']['blocks']['right_side'] && !isPrint() ) {
// render right side blocks
$dir=dirname(__FILE__)."/blocks";
$blocksList=array();
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if ( is_dir("$dir/$file") && $file!="." && $file!=".." && strtolower($file)!="cvs") {
array_push($blocksList,$file);
}
}
closedir($handle);
}
global $side_blocks_html;
$side_blocks_html="";
if (count($blocksList)) {
sort($blocksList);
foreach ($blocksList as $thisBlock) {
$side_blocks_html.= renderBlock($thisBlock);
}
}
// echo $side_blocks_html;
}
function renderBlock($thisBlock) {
global $op;
require dirname(__FILE__)."/blocks/$thisBlock/config.php";
if (!$blockActive) return;
if ( !in_array($op,$blockShow) && count($blockShow) ) return;
if (!$blockwidth) $blockwidth=230;
ob_start();
if (!$blockHideBox) {
echo "<div align=left class='main_text' style='width:".$blockwidth."px;'>
<div style='padding:4px; border-bottom:1px solid #444444;'>$blockTitle</div>";
// open_box($blockTitle,$blockwidth,"icon_help.png");
}
require_once dirname(__FILE__)."/blocks/$thisBlock/index.php";
if (!$blockHideBox) {
echo"</div>";
// close_box();
}
echo "<BR>";
$outRes = ob_get_contents();
ob_end_clean();
//while (@ob_end_clean());
return $outRes ;
}
?>
</td>
</tr>
</table>