本文整理汇总了PHP中Support::getParam方法的典型用法代码示例。如果您正苦于以下问题:PHP Support::getParam方法的具体用法?PHP Support::getParam怎么用?PHP Support::getParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Support
的用法示例。
在下文中一共展示了Support::getParam方法的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: saveSearchParams
/**
* Method used to save the current search parameters in a cookie.
*
* @access public
* @return array The search parameters
*/
function saveSearchParams()
{
$sort_by = Support::getParam('sort_by');
$sort_order = Support::getParam('sort_order');
$rows = Support::getParam('rows');
$cookie = array('rows' => $rows ? $rows : APP_DEFAULT_PAGER_SIZE, 'pagerRow' => Support::getParam('pagerRow'), 'hide_associated' => Support::getParam('hide_associated'), "sort_by" => $sort_by ? $sort_by : "sup_date", "sort_order" => $sort_order ? $sort_order : "DESC", 'keywords' => Support::getParam('keywords'), 'sender' => Support::getParam('sender'), 'to' => Support::getParam('to'), 'ema_id' => Support::getParam('ema_id'), 'filter' => Support::getParam('filter'));
// now do some magic to properly format the date fields
$date_fields = array('arrival_date');
foreach ($date_fields as $field_name) {
$field = Support::getParam($field_name);
if (empty($field) || $cookie['filter'][$field_name] != 'yes') {
continue;
}
$end_field_name = $field_name . '_end';
$end_field = Support::getParam($end_field_name);
@($cookie[$field_name] = array('Year' => $field['Year'], 'Month' => $field['Month'], 'Day' => $field['Day'], 'start' => $field['Year'] . '-' . $field['Month'] . '-' . $field['Day'], 'filter_type' => $field['filter_type'], 'end' => $end_field['Year'] . '-' . $end_field['Month'] . '-' . $end_field['Day']));
@($cookie[$end_field_name] = array('Year' => $end_field['Year'], 'Month' => $end_field['Month'], 'Day' => $end_field['Day']));
}
Search_Profile::save(Auth::getUserID(), Auth::getCurrentProject(), 'email', $cookie);
return $cookie;
}