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


PHP search::get_results方法代码示例

本文整理汇总了PHP中search::get_results方法的典型用法代码示例。如果您正苦于以下问题:PHP search::get_results方法的具体用法?PHP search::get_results怎么用?PHP search::get_results使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在search的用法示例。


在下文中一共展示了search::get_results方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: action_search

 public function action_search()
 {
     $urlparams = array('search' => optional_param('search', null, PARAM_TEXT), 'group' => optional_param('group', 0, PARAM_INT), 'page' => optional_param('page', 1, PARAM_INT), 'role' => optional_param('role', 0, PARAM_INT), 'type' => optional_param('type', base::TYPE_ALL, PARAM_INT));
     if (optional_param('resetbutton', 0, PARAM_ALPHA)) {
         redirect(new \moodle_url('/mod/mediagallery/view.php', array('action' => 'search', 'id' => $this->cm->id)));
     }
     $params = array_merge($urlparams, array('collection' => $this->collection, 'courseid' => $this->course->id, 'context' => $this->context));
     $search = new search($params);
     $results = $search->get_results();
     if (optional_param('exportbutton', 0, PARAM_ALPHA)) {
         return $search->download_csv();
     }
     $form = new form\search(null, array('context' => $this->context, 'collection' => $this->collection), 'post', '', array('id' => 'searchform'));
     $pageurl = new \moodle_url('/mod/mediagallery/search.php', $urlparams);
     $perpage = 0;
     $totalcount = 0;
     $renderable = new output\searchresults\renderable($results, $pageurl, $totalcount, $params['page'], $perpage);
     return $this->renderer->search_page($form, $renderable);
 }
开发者ID:eSrem,项目名称:moodle-mod_mediagallery,代码行数:19,代码来源:viewcontroller.php

示例2: count

switch ($sub) {
    case "launch":
        if ((string) $page == "") {
            $_SESSION["CURRENT"] = count($_SESSION["session_history"]);
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["URI"] = "./catalog.php?categ=search&mode=8";
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["POST"] = $_POST;
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["GET"] = $_GET;
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["GET"]["sub"] = "";
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["POST"]["sub"] = "";
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["HUMAN_QUERY"] = $sc->make_human_query();
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["HUMAN_TITLE"] = $msg["search_exemplaire"];
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["SEARCH_TYPE"] = "EXPL";
            $_POST["page"] = 0;
            $page = 0;
        }
        $table = $sc->get_results("./catalog.php?categ=search&mode=8&sub=launch", "./catalog.php?categ=search&mode=8&option_show_notice_fille={$option_show_notice_fille}&option_show_expl={$option_show_expl}", true);
        print_results($sc, $table, "./catalog.php?categ=search&mode=8&sub=launch&option_show_notice_fille={$option_show_notice_fille}&option_show_expl={$option_show_expl}", "./catalog.php?categ=search&mode=8&option_show_notice_fille={$option_show_notice_fille}&option_show_expl={$option_show_expl}", true);
        if ($_SESSION["CURRENT"] !== false) {
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["URI"] = "./catalog.php?categ=search&mode=8";
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["POST"] = $_POST;
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["GET"] = $_GET;
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["PAGE"] = $page + 1;
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["HUMAN_QUERY"] = $sc->make_human_query();
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["SEARCH_TYPE"] = "expl";
            $_SESSION["session_history"][$_SESSION["CURRENT"]]["EXPL"]["TEXT_QUERY"] = "";
        }
        break;
    default:
        print $sc->show_form("./catalog.php?categ=search&mode=8&option_show_notice_fille={$option_show_notice_fille}&option_show_expl={$option_show_expl}", "./catalog.php?categ=search&mode=8&sub=launch");
        break;
}
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:31,代码来源:main.inc.php

示例3: count

     $_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["POST"]["sub"] = "";
     $_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["HUMAN_QUERY"] = $sc->make_human_query();
     $_SESSION["session_history"][$_SESSION["CURRENT"]]["QUERY"]["HUMAN_TITLE"] = $msg["search_emprunteur"];
     $_POST["page"] = 0;
     $page = 0;
 }
 if ($_SESSION["CURRENT"] !== false) {
     $_SESSION["session_history"][$_SESSION["CURRENT"]]["EMPR"]["URI"] = "./circ.php?categ=search&sub=launch";
     $_SESSION["session_history"][$_SESSION["CURRENT"]]["EMPR"]["POST"] = $_POST;
     $_SESSION["session_history"][$_SESSION["CURRENT"]]["EMPR"]["GET"] = $_GET;
     $_SESSION["session_history"][$_SESSION["CURRENT"]]["EMPR"]["PAGE"] = $page + 1;
     $_SESSION["session_history"][$_SESSION["CURRENT"]]["EMPR"]["HUMAN_QUERY"] = $sc->make_human_query();
     $_SESSION["session_history"][$_SESSION["CURRENT"]]["EMPR"]["SEARCH_TYPE"] = "empr";
     $_SESSION["session_history"][$_SESSION["CURRENT"]]["EMPR"]["TEXT_QUERY"] = "";
 }
 $table = $sc->get_results("./circ.php?categ=search&sub=launch", "./circ.php?categ=search", true);
 $sc->link = './circ.php?categ=empr_saisie&id=!!id!!';
 $url = "./circ.php?categ=search&sub=launch";
 $url_to_search_form = "./circ.php?categ=search";
 $search_target = "";
 if (!$page) {
     $page = 1;
 }
 $debut = ($page - 1) * $nb_per_page;
 $requete = "select count(1) from {$table}";
 $res = mysql_query($requete);
 if ($res) {
     $nbr_lignes = mysql_result($res, 0, 0);
 } else {
     $nbr_lignes = 0;
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:31,代码来源:empr_list.inc.php


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