當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DataGrid::setDeleteUrl方法代碼示例

本文整理匯總了PHP中DataGrid::setDeleteUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataGrid::setDeleteUrl方法的具體用法?PHP DataGrid::setDeleteUrl怎麽用?PHP DataGrid::setDeleteUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DataGrid的用法示例。


在下文中一共展示了DataGrid::setDeleteUrl方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: elseif

if ($cgi->category == 'Sent') {
    $list = $msg->getSent(false, false, $limit, $cgi->offset, $cgi->orderBy, $cgi->sort);
} elseif ($cgi->category == 'Inbox') {
    $list = $msg->getFolder('', false, $limit, $cgi->offset, $cgi->orderBy, $cgi->sort);
} elseif ($cgi->category == 'Trash') {
    $list = $msg->getTrash($limit, $cgi->offset, $cgi->orderBy, $cgi->sort);
} else {
    $list = $msg->getFolder($cgi->category, false, $limit, $cgi->offset, $cgi->orderBy, $cgi->sort);
}
if ($cgi->category == 'Sent') {
    $dg = new DataGrid('sitellite_message', array('subject' => intl_get('Subject'), 'msg_date' => intl_get('Date'), 'recipients' => intl_get('To')), $limit);
    $dg->skipHeader('recipients');
} else {
    $dg = new DataGrid('sitellite_message', array('subject' => intl_get('Subject'), 'msg_date' => intl_get('Date'), 'from_user' => intl_get('From')), $limit);
    if ($cgi->category != 'Trash') {
        $dg->setDeleteUrl(site_prefix() . '/index/cms-messages-delete-action');
        $categories = $msg->categories();
        $dg->footer = template_simple('messages/footer.spt', array('list' => $categories, 'current' => $cgi->category));
    }
}
$dg->primaryKey('id');
$dg->setEditUrl(site_prefix() . '/index/cms-messages-view-action');
if ($cgi->category == 'Sent') {
    $dg->filter(array('subject' => 'filter_cms_messages_subject', 'msg_date' => 'filter_cms_messages_date', 'recipients' => 'filter_cms_messages_to'));
} else {
    $dg->filter(array('subject' => 'filter_cms_messages_subject', 'msg_date' => 'filter_cms_messages_date', 'from_user' => 'filter_cms_messages_from'));
}
$dg->rememberValue('category', $cgi->category);
$dg->list =& $list;
$dg->total =& $msg->total;
page_title(intl_get('Folder') . ': ' . $cgi->category);
開發者ID:vojtajina,項目名稱:sitellite,代碼行數:31,代碼來源:index.php


注:本文中的DataGrid::setDeleteUrl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。