本文整理汇总了PHP中xajaxResponse::loadcommands方法的典型用法代码示例。如果您正苦于以下问题:PHP xajaxResponse::loadcommands方法的具体用法?PHP xajaxResponse::loadcommands怎么用?PHP xajaxResponse::loadcommands使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xajaxResponse
的用法示例。
在下文中一共展示了xajaxResponse::loadcommands方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
function delete($table, $bid, $cid, $pageid, $TotalRows)
{
$objResponse = new xajaxResponse();
include 'settings/config.php';
include 'settings/tables.php';
include 'settings/template.php';
require_once 'lib/modify.php';
if ($table == $tbl_blog_comments) {
$comment = new ModifyEntry();
$comment->table = $tbl_blog_comments;
$comment->changes = " deleted = '1' ";
$comment->condition = " id = '{$cid}' ";
$comment->update();
unset($comment);
}
$TotalRows = $TotalRows - 1;
$max_pages = ceil($TotalRows / $set[0]["perpage_comments"]);
if ($pageid > $max_pages) {
$pageid = $pageid - 1;
}
$p_name = "p_num_" . $bid;
$objResponse->assign($p_name, "innerHTML", $TotalRows);
if ($max_pages == 0) {
$p_main = "p_comments_" . $bid;
$p_out = "p_page_" . $bid;
$p_out2 = "p_page2_" . $bid;
$objResponse->remove($p_main);
$objResponse->remove($p_out);
$objResponse->remove($p_out2);
} else {
$objResponse->loadcommands(page($table, $bid, $pageid, $TotalRows));
}
return $objResponse;
}