redirect_header('myblocksadmin.php', 1, $msg);
}
if ($op == 'delete_ok') {
    //if ( !admin_refcheck("/modules/$admin_mydirname/admin/") ) {
    //  exit('Invalid Referer');
    //}
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
    }
    // delete_block_ok($bid); GIJ imported from blocksadmin.php
    $myblock = new XoopsBlock($bid);
    if ($myblock->getVar('block_type') != 'D' && $myblock->getVar('block_type') != 'C') {
        redirect_header('myblocksadmin.php', 4, 'Invalid block');
        exit;
    }
    $myblock->delete();
    if ($myblock->getVar('template') != '' && !defined('XOOPS_ORETEKI')) {
        $tplfile_handler =& xoops_gethandler('tplfile');
        $btemplate =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $bid);
        if (count($btemplate) > 0) {
            $tplman->delete($btemplate[0]);
        }
    }
    redirect_header('myblocksadmin.php', 1, _AM_DBUPDATED);
    exit;
    // end of delete_block_ok() GIJ
    exit;
}
if ($op == 'delete') {
    xoops_cp_header();
    // delete_block($bid); GIJ imported from blocksadmin.php
Exemplo n.º 2
0
 function delete_block_ok($bid)
 {
     if (!xoops_confirm_validate()) {
         die("Ticket Error");
     }
     $myblock = new XoopsBlock($bid);
     $myblock->delete();
     if ($myblock->getVar('template') != '') {
         $tplfile_handler =& xoops_gethandler('tplfile');
         $btemplate =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $bid);
         if (count($btemplate) > 0) {
             $tplfile_handler->delete($btemplate[0]);
         }
     }
     redirect_header('admin.php?fct=blocksadmin&t=' . time(), 1, _AM_DBUPDATED);
     exit;
 }
Exemplo n.º 3
0
 function delete_block_ok($bid)
 {
     $myblock = new XoopsBlock($bid);
     $myblock->delete();
     redirect_header('admin.php?fct=blocksadmin&t=' . time(), 1, _AM_DBUPDATED);
     exit;
 }