当前位置: 首页>>代码示例>>PHP>>正文


PHP Support::saveSearchParams方法代码示例

本文整理汇总了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();
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:emails.php

示例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]));
     }
 }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:34,代码来源:class.support.php


注:本文中的Support::saveSearchParams方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。