96 |
96 |
$template->parse('main', 'main_block', false);
|
97 |
97 |
$template->pparse('output', 'page');
|
98 |
98 |
|
|
99 |
// get template used for the displayed page (for displaying block details)
|
|
100 |
if (SECTION_BLOCKS) {
|
|
101 |
$sql = "SELECT `template` from `" . TABLE_PREFIX . "pages` WHERE `page_id` = '$page_id' ";
|
|
102 |
$result = $database->query($sql);
|
|
103 |
if ($result && $result->numRows() == 1) {
|
|
104 |
$row = $result->fetchRow();
|
|
105 |
$page_template = ($row['template'] == '') ? DEFAULT_TEMPLATE : $row['template'];
|
|
106 |
// include template info file if exists
|
|
107 |
if (file_exists(WB_PATH . '/templates/' . $page_template . '/info.php')) {
|
|
108 |
include_once(WB_PATH . '/templates/' . $page_template . '/info.php');
|
|
109 |
}
|
|
110 |
}
|
|
111 |
}
|
|
112 |
|
99 |
113 |
// Get sections for this page
|
100 |
114 |
$module_permissions = $_SESSION['MODULE_PERMISSIONS'];
|
101 |
|
$query_sections = $database->query("SELECT section_id,module FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' ORDER BY position ASC");
|
|
115 |
$query_sections = $database->query("SELECT section_id, module, block
|
|
116 |
FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' ORDER BY position ASC");
|
102 |
117 |
if($query_sections->numRows() > 0) {
|
103 |
118 |
while($section = $query_sections->fetchRow()) {
|
104 |
119 |
$section_id = $section['section_id'];
|
... | ... | |
108 |
123 |
// Include the modules editing script if it exists
|
109 |
124 |
if(file_exists(WB_PATH.'/modules/'.$module.'/modify.php')) {
|
110 |
125 |
echo '<a name="'.$section_id.'"></a>';
|
|
126 |
// output block name if blocks are enabled
|
|
127 |
if (SECTION_BLOCKS) {
|
|
128 |
if (isset($block[$section['block']]) && trim(strip_tags(($block[$section['block']]))) != '') {
|
|
129 |
$block_name = htmlentities(strip_tags($block[$section['block']]));
|
|
130 |
} else {
|
|
131 |
if ($section['block'] == 1) {
|
|
132 |
$block_name = $TEXT['MAIN'];
|
|
133 |
} else {
|
|
134 |
$block_name = '#' . (int) $section['block'];
|
|
135 |
}
|
|
136 |
}
|
|
137 |
echo '<b>' . $TEXT['BLOCK'] . ': </b>' . $block_name;
|
|
138 |
}
|
111 |
139 |
require(WB_PATH.'/modules/'.$module.'/modify.php');
|
112 |
140 |
}
|
113 |
141 |
}
|
Added output of block names to modify pages dialogue if blocks are enabled