172 |
172 |
'WB_URL' => WB_URL,
|
173 |
173 |
'WB_PATH' => WB_PATH,
|
174 |
174 |
'THEME_URL' => THEME_URL
|
175 |
|
)
|
176 |
|
);
|
|
175 |
)
|
|
176 |
);
|
177 |
177 |
|
178 |
178 |
// Insert variables
|
179 |
179 |
$template->set_var(array(
|
180 |
180 |
'VAR_PAGE_ID' => $results_array['page_id'],
|
181 |
181 |
'VAR_PAGE_TITLE' => $results_array['page_title'],
|
182 |
182 |
'SETTINGS_LINK' => ADMIN_URL.'/pages/settings.php?page_id='.$results_array['page_id'],
|
183 |
|
'MODIFY_LINK' => ADMIN_URL.'/pages/modify.php?page_id='.$results_array['page_id'],
|
184 |
|
) );
|
|
183 |
'MODIFY_LINK' => ADMIN_URL.'/pages/modify.php?page_id='.$results_array['page_id']
|
|
184 |
)
|
|
185 |
);
|
185 |
186 |
|
186 |
187 |
$query_sections = $database->query("SELECT section_id,module,position,block,publ_start,publ_end FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' ORDER BY position ASC");
|
187 |
188 |
if($query_sections->numRows() > 0) {
|
... | ... | |
203 |
204 |
'VAR_POSITION' => $section['position'],
|
204 |
205 |
'LINK_MODIFY_URL_VAR_MODUL_NAME' => $edit_page,
|
205 |
206 |
'SELECT' => '',
|
206 |
|
'SET_NONE_DISPLAY_OPTION' => '',
|
207 |
|
) );
|
|
207 |
'SET_NONE_DISPLAY_OPTION' => ''
|
|
208 |
)
|
|
209 |
);
|
208 |
210 |
// Add block options to the section_list
|
209 |
211 |
$template->clear_var('block_list');
|
210 |
212 |
foreach($block AS $number => $name) {
|
... | ... | |
230 |
232 |
'LINK_MODIFY_URL_VAR_MODUL_NAME' => $edit_page,
|
231 |
233 |
'NAME' => htmlentities(strip_tags($block[1])),
|
232 |
234 |
'VALUE' => 1,
|
233 |
|
'SET_NONE_DISPLAY_OPTION' => '',
|
234 |
|
) );
|
|
235 |
'SET_NONE_DISPLAY_OPTION' => ''
|
|
236 |
)
|
|
237 |
);
|
235 |
238 |
}
|
236 |
239 |
// Insert icon and images
|
237 |
240 |
$template->set_var(array(
|
238 |
241 |
'CLOCK_16_PNG' => 'clock_16.png',
|
239 |
242 |
'CLOCK_DEL_16_PNG' => 'clock_del_16.png',
|
240 |
|
'DELETE_16_PNG' => 'delete_16.png',
|
241 |
|
) );
|
|
243 |
'DELETE_16_PNG' => 'delete_16.png'
|
|
244 |
)
|
|
245 |
);
|
242 |
246 |
// set calendar start values
|
243 |
247 |
if($section['publ_start']==0) {
|
244 |
248 |
$template->set_var('VALUE_PUBL_START', '');
|
... | ... | |
260 |
264 |
</a>' );
|
261 |
265 |
} else {
|
262 |
266 |
$template->set_var(array(
|
263 |
|
'VAR_MOVE_UP_URL' => '',
|
264 |
|
) );
|
|
267 |
'VAR_MOVE_UP_URL' => ''
|
|
268 |
)
|
|
269 |
);
|
265 |
270 |
}
|
266 |
271 |
if($section['position'] != $num_sections ) {
|
267 |
272 |
$template->set_var(
|
... | ... | |
271 |
276 |
</a>' );
|
272 |
277 |
} else {
|
273 |
278 |
$template->set_var(array(
|
274 |
|
'VAR_MOVE_DOWN_URL' => '',
|
275 |
|
) );
|
|
279 |
'VAR_MOVE_DOWN_URL' => ''
|
|
280 |
)
|
|
281 |
);
|
276 |
282 |
}
|
277 |
283 |
}
|
278 |
284 |
$template->set_var(array(
|
279 |
285 |
'DISPLAY_DEBUG' => ' style="visibility="visible;"',
|
280 |
286 |
'TEXT_SID' => 'SID',
|
281 |
|
'DEBUG_COLSPAN_SIZE' => 9,
|
282 |
|
) );
|
|
287 |
'DEBUG_COLSPAN_SIZE' => 9
|
|
288 |
)
|
|
289 |
);
|
283 |
290 |
if($debug) {
|
284 |
291 |
$template->set_var(array(
|
285 |
292 |
'DISPLAY_DEBUG' => ' style="visibility="visible;"',
|
286 |
293 |
'TEXT_PID' => 'PID',
|
287 |
294 |
'TEXT_SID' => 'SID',
|
288 |
|
'POSITION' => $section['position'],
|
289 |
|
) );
|
|
295 |
'POSITION' => $section['position']
|
|
296 |
)
|
|
297 |
);
|
290 |
298 |
} else {
|
291 |
299 |
$template->set_var(array(
|
292 |
300 |
'DISPLAY_DEBUG' => ' style="display:none;"',
|
293 |
301 |
'TEXT_PID' => '',
|
294 |
|
'POSITION' => '',
|
295 |
|
) );
|
|
302 |
'POSITION' => ''
|
|
303 |
)
|
|
304 |
);
|
296 |
305 |
}
|
297 |
306 |
$template->parse('section_list', 'section_block', true);
|
298 |
307 |
}
|
... | ... | |
314 |
323 |
'start_date' => 'start_date'.$section['section_id'],
|
315 |
324 |
'end_date' => 'end_date'.$section['section_id'],
|
316 |
325 |
'trigger_start' => 'trigger_start'.$section['section_id'],
|
317 |
|
'trigger_end' => 'trigger_stop'.$section['section_id'],
|
318 |
|
) );
|
|
326 |
'trigger_end' => 'trigger_stop'.$section['section_id']
|
|
327 |
)
|
|
328 |
);
|
319 |
329 |
if(isset($jscal_use_time) && $jscal_use_time==TRUE) {
|
320 |
330 |
$template->set_var(array(
|
321 |
331 |
'showsTime' => "true",
|
322 |
|
'timeFormat' => "24",
|
323 |
|
) );
|
|
332 |
'timeFormat' => "24"
|
|
333 |
)
|
|
334 |
);
|
324 |
335 |
} else {
|
325 |
336 |
$template->set_var(array(
|
326 |
337 |
'showsTime' => "false",
|
327 |
|
'timeFormat' => "24",
|
328 |
|
) );
|
|
338 |
'timeFormat' => "24"
|
|
339 |
)
|
|
340 |
);
|
329 |
341 |
}
|
330 |
342 |
}
|
331 |
343 |
$template->parse('calendar_list', 'calendar_block', true);
|
... | ... | |
366 |
378 |
'TEXT_ADD_SECTION' => $TEXT['ADD_SECTION'],
|
367 |
379 |
'TEXT_MOVE_UP' => $TEXT['MOVE_UP'],
|
368 |
380 |
'TEXT_MOVE_DOWN' => $TEXT['MOVE_DOWN']
|
369 |
|
) );
|
|
381 |
)
|
|
382 |
);
|
370 |
383 |
$template->parse('main', 'main_block', false);
|
371 |
384 |
$template->pparse('output', 'page');
|
372 |
385 |
|
some code cleaning of admin/pages/sections.php