本文整理汇总了PHP中post::delete_post方法的典型用法代码示例。如果您正苦于以下问题:PHP post::delete_post方法的具体用法?PHP post::delete_post怎么用?PHP post::delete_post使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类post
的用法示例。
在下文中一共展示了post::delete_post方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$sql->update_table('menublock', array('mb_title' => $_POST[$i . '_mb_title']), array('mb_type' => $i, 'mb_user' => $user->get_user_id()));
} else {
$sql->update_table('menublock', array('mb_title' => $_POST[$i . '_mb_title'], 'mb_limit' => $_POST[$i . '_mb_limit']), array('mb_type' => $i, 'mb_user' => $user->get_user_id()));
}
header('Location: index.php?p=menu');
}
break;
}
} elseif (isset($_GET["a"])) {
switch ($_GET["a"]) {
case 'logout':
unset($_COOKIE['ea_user']);
setcookie('ea_user', null, -1, '/');
break;
case 'delete_post':
post::delete_post($_GET['id']);
header("Location: index.php?p=" . (isset($_GET["is_page"]) ? "pages" : "archive"));
break;
case 'delete_category':
category::delete_category($_GET['id']);
header("Location: index.php?p=category");
break;
case 'delete_comment':
comment::delete_comment($_GET['id']);
header("Location: index.php?p=comment");
break;
case 'delete_image':
media::delete_media($_GET['id']);
header("Location: index.php?p=images");
break;
case 'delete_sm':
示例2: elseif
?>
</textarea>
</div>
<input type='hidden' name='auth_key' value='<?php
echo $key;
?>
' />
<div class="formwrap post-title">
<input type='submit' value=' + SUBMiT EDiT + ' onclick='return post_check()' name='submit-edit-post' class='post-button' />
</div>
</form>
<?php
}
} elseif (isset($_GET['delete-post']) && !empty($_GET['delete-post']) && $admcl->check_key_from_id($db, $id, $_GET['auth_key'])) {
if (isset($_GET['yes']) && empty($_GET['yes'])) {
$ret = $post->delete_post($db, $_GET['delete-post']);
if ($ret) {
if (isset($_GET['return']) && $_GET['return'] == 'main') {
$htmlinst->change_location('./index.php');
} elseif (isset($_GET['return']) && $_GET['return'] == 'mainid') {
$htmlinst->change_location('./index.php?id=' . htmlentities($_GET['delete-post']));
} else {
$htmlinst->admin_inform_ok_url(array('P0ST SUCCESSFUL DELETE!'), 'G0 BACK', '?list-post');
}
} else {
$htmlinst->error_admin_url(array('P0ST DELETE FAiLED', 'TRY AGAiN'), 'G0 BACK', '?list-post');
}
} else {
?>
<div class="formhead admin-object-change-pass">C0NFiRMATi0N</div>
<div class="formwrap admin-object-change-pass">