本文整理匯總了PHP中XoopsBlock::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP XoopsBlock::delete方法的具體用法?PHP XoopsBlock::delete怎麽用?PHP XoopsBlock::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XoopsBlock
的用法示例。
在下文中一共展示了XoopsBlock::delete方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: XoopsBlock
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
示例2: die
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;
}
示例3: XoopsBlock
function delete_block_ok($bid)
{
$myblock = new XoopsBlock($bid);
$myblock->delete();
redirect_header('admin.php?fct=blocksadmin&t=' . time(), 1, _AM_DBUPDATED);
exit;
}