@@ 284-307 (lines=24) @@ | ||
281 | exit(); |
|
282 | } |
|
283 | ||
284 | if ($op == 'edit') { |
|
285 | ||
286 | xoops_cp_header(); |
|
287 | // edit_block($bid); GIJ imported from blocksadmin.php |
|
288 | $myblock = new XoopsBlock($bid); |
|
289 | ||
290 | $db =& XoopsDatabaseFactory :: getdatabaseconnection(); |
|
291 | $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.intval($bid); |
|
292 | $result = $db->query($sql); |
|
293 | $modules = array(); |
|
294 | while ($row = $db->fetchArray($result)) { |
|
295 | $modules[] = intval($row['module_id']); |
|
296 | } |
|
297 | $is_custom = ($myblock->getVar('block_type') == 'C' || $myblock->getVar('block_type') == 'E') ? true : false; |
|
298 | $block = array('form_title' => _AM_EDITBLOCK, 'name' => $myblock->getVar('name'), 'side' => $myblock->getVar('side'), 'weight' => $myblock->getVar('weight'), 'visible' => $myblock->getVar('visible'), 'title' => $myblock->getVar('title', 'E'), 'content' => $myblock->getVar('content', 'E'), 'modules' => $modules, 'is_custom' => $is_custom, 'ctype' => $myblock->getVar('c_type'), 'cachetime' => $myblock->getVar('bcachetime'), 'op' => 'update', 'bid' => $myblock->getVar('bid'), 'edit_form' => $myblock->getOptions(), 'template' => $myblock->getVar('template'), 'options' => $myblock->getVar('options'), 'submit_button' => _SUBMIT); |
|
299 | ||
300 | echo '<a href="myblocksadmin.php">'. _AM_BADMIN .'</a> <span style="font-weight:bold;">»»</span> '._AM_EDITBLOCK.'<br /><br />'; |
|
301 | include dirname(__FILE__).'/../admin/myblockform.php'; //GIJ |
|
302 | $form->addElement( $xoopsGTicket->getTicketXoopsForm( __LINE__ ) );//GIJ |
|
303 | $form->display(); |
|
304 | // end of edit_block() GIJ |
|
305 | xoops_cp_footer(); |
|
306 | exit(); |
|
307 | } |
|
308 | ||
309 | if ($op == 'clone') { |
|
310 | xoops_cp_header(); |
|
@@ 309-328 (lines=20) @@ | ||
306 | exit(); |
|
307 | } |
|
308 | ||
309 | if ($op == 'clone') { |
|
310 | xoops_cp_header(); |
|
311 | $myblock = new XoopsBlock($bid); |
|
312 | ||
313 | $db =& XoopsDatabaseFactory :: getdatabaseconnection(); |
|
314 | $sql = 'SELECT module_id FROM '.$db->prefix('block_module_link').' WHERE block_id='.intval($bid); |
|
315 | $result = $db->query($sql); |
|
316 | $modules = array(); |
|
317 | while ($row = $db->fetchArray($result)) { |
|
318 | $modules[] = intval($row['module_id']); |
|
319 | } |
|
320 | $is_custom = ($myblock->getVar('block_type') == 'C' || $myblock->getVar('block_type') == 'E') ? true : false; |
|
321 | $block = array('form_title' => _AM_CLONEBLOCK, 'name' => $myblock->getVar('name'), 'side' => $myblock->getVar('side'), 'weight' => $myblock->getVar('weight'), 'visible' => $myblock->getVar('visible'), 'content' => $myblock->getVar('content', 'N'), 'title' => $myblock->getVar('title','E'), 'modules' => $modules, 'is_custom' => $is_custom, 'ctype' => $myblock->getVar('c_type'), 'cachetime' => $myblock->getVar('bcachetime'), 'op' => 'clone_ok', 'bid' => $myblock->getVar('bid'), 'edit_form' => $myblock->getOptions(), 'template' => $myblock->getVar('template'), 'options' => $myblock->getVar('options'), 'submit_button' => _CLONE); |
|
322 | echo '<a href="myblocksadmin.php">'. _AM_BADMIN .'</a> <span style="font-weight:bold;">»»</span> '._AM_CLONEBLOCK.'<br /><br />'; |
|
323 | include dirname(__FILE__).'/../admin/myblockform.php'; |
|
324 | $form->addElement( $xoopsGTicket->getTicketXoopsForm( __LINE__ ) );//GIJ |
|
325 | $form->display(); |
|
326 | xoops_cp_footer(); |
|
327 | exit(); |
|
328 | } |
|
329 | ||
330 | if ($op == 'clone_ok') { |
|
331 | // Ticket Check |