forked from leonardoxc/leonardoxc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBLOCKS_end.php
40 lines (35 loc) · 908 Bytes
/
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
</td>
<td valign=top>
<?
// 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);
}
if (count($blocksList)) {
sort($blocksList);
foreach ($blocksList as $thisBlock) {
renderBlock($thisBlock);
}
}
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;
open_box($blockTitle,$blockwidth,"icon_help.png");
require_once dirname(__FILE__)."/blocks/$thisBlock/index.php";
close_box();
echo "<BR>";
}
?>
</td>
</tr>
</table>