本文整理汇总了PHP中Support::saveSearchParams方法的典型用法代码示例。如果您正苦于以下问题:PHP Support::saveSearchParams方法的具体用法?PHP Support::saveSearchParams怎么用?PHP Support::saveSearchParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Support
的用法示例。
在下文中一共展示了Support::saveSearchParams方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
// | Authors: João Prado Maia <jpm@mysql.com> |
// +----------------------------------------------------------------------+
require_once dirname(__FILE__) . '/../init.php';
$tpl = new Template_Helper();
$tpl->setTemplate('emails.tpl.html');
Auth::checkAuthentication(APP_COOKIE);
if (!Access::canAccessAssociateEmails(Auth::getUserID())) {
$tpl->assign('no_access', 1);
$tpl->displayTemplate();
exit;
}
$pagerRow = Support::getParam('pagerRow');
if (empty($pagerRow)) {
$pagerRow = 0;
}
$rows = Support::getParam('rows');
if (empty($rows)) {
$rows = APP_DEFAULT_PAGER_SIZE;
}
$options = Support::saveSearchParams();
$tpl->assign('options', $options);
$tpl->assign('sorting', Support::getSortingInfo($options));
$list = Support::getEmailListing($options, $pagerRow, $rows);
$tpl->assign('list', $list['list']);
$tpl->assign('list_info', $list['info']);
$tpl->assign('issues', Issue::getColList());
$tpl->assign('accounts', Email_Account::getAssocList(Auth::getCurrentProject()));
$prefs = Prefs::get(Auth::getUserID());
$tpl->assign('refresh_rate', $prefs['email_refresh_rate'] * 60);
$tpl->assign('refresh_page', 'emails.php');
$tpl->displayTemplate();
示例2: getListingSides
/**
* Method used to get the next and previous messages in order to build
* side links when viewing a particular email.
*
* @access public
* @param integer $sup_id The email ID
* @return array Information on the next and previous messages
*/
function getListingSides($sup_id)
{
$options = Support::saveSearchParams();
$stmt = "SELECT\n sup_id,\n sup_ema_id\n FROM\n (\n " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "support_email,\n " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "email_account\n )\n LEFT JOIN\n " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue\n ON\n sup_iss_id = iss_id";
if (!empty($options['keywords'])) {
$stmt .= "," . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "support_email_body";
}
$stmt .= Support::buildWhereClause($options);
$stmt .= "\n ORDER BY\n " . $options["sort_by"] . " " . $options["sort_order"];
$res = $GLOBALS["db_api"]->dbh->getAssoc($stmt);
if (PEAR::isError($res)) {
Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
return "";
} else {
// COMPAT: the next line requires PHP >= 4.0.5
$email_ids = array_keys($res);
$index = array_search($sup_id, $email_ids);
if (!empty($email_ids[$index + 1])) {
$next = $email_ids[$index + 1];
}
if (!empty($email_ids[$index - 1])) {
$previous = $email_ids[$index - 1];
}
return array("next" => array('sup_id' => @$next, 'ema_id' => @$res[$next]), "previous" => array('sup_id' => @$previous, 'ema_id' => @$res[$previous]));
}
}