本文整理汇总了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;
}