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


PHP Search::showList方法代码示例

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


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

示例1: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Computer') {
         if (self::canView()) {
             // Show list filtered on computer, sorted on day descending ...
             $_GET = array('field' => array(22), 'searchtype' => array('equals'), 'contains' => array($item->getID()), 'itemtype' => 'PluginMonitoringServiceevent', 'start' => 0, 'sort' => 3, 'order' => 'DESC');
             Search::manageGetValues(self::getTypeName());
             Search::showList(self::getTypeName(), $_GET);
             return true;
         }
     }
     return true;
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:13,代码来源:serviceevent.class.php

示例2: displayTabContentForItem

 public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $CFG_GLPI;
     echo '<div class="tab_cadre_pager" style="padding: 2px; margin: 5px 0">
      <h3 class="tab_bg_2" style="padding: 5px">
        <a href="' . Toolbox::getItemTypeFormURL(__CLASS__) . '" class="submit">
             <img src="' . $CFG_GLPI['root_doc'] . '/pics/menu_add.png" alt="+" align="absmiddle" />
             ' . __('Add a form category', 'formcreator') . '
         </a>
      </h3>
   </div>';
     $params['sort'] = !empty($_POST['sort']) ? (int) $_POST['sort'] : 0;
     $params['order'] = !empty($_POST['order']) && in_array($_POST['order'], array('ASC', 'DESC')) ? $_POST['order'] : 'ASC';
     $params['start'] = !empty($_POST['start']) ? (int) $_POST['start'] : 0;
     Search::manageGetValues(__CLASS__);
     Search::showList(__CLASS__, $params);
 }
开发者ID:ChristopheG77,项目名称:formcreator,代码行数:17,代码来源:category.class.php

示例3: displayTabContentForItem

 public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     $header = new self();
     $found = $header->find('entities_id = ' . $_SESSION['glpiactive_entity']);
     if (count($found) > 0) {
         echo '<div class="tab_cadre_pager" style="padding: 2px; margin: 5px 0">
         <h3 class="tab_bg_2" style="padding: 5px">
             <img src="' . $GLOBALS['CFG_GLPI']['root_doc'] . '/pics/menu_add_off.png" alt="+" align="absmiddle" />
             ' . __('Add an header', 'formcreator') . '<br /><br />
            <em><i><img src="' . $GLOBALS['CFG_GLPI']['root_doc'] . '/pics/warning.png" alt="/!\\" align="absmiddle" height="16" />&nbsp;
            ' . __('An header already exists for this entity! You can have only one header per entity.', 'formcreator') . '</i></em>
         </h3>
      </div>';
     } else {
         $table = getTableForItemType('PluginFormcreatorHeader');
         $where = getEntitiesRestrictRequest("", $table, "", "", true, false);
         $found = $header->find($where);
         if (count($found) > 0) {
             echo '<div class="tab_cadre_pager" style="padding: 2px; margin: 5px 0">
            <h3 class="tab_bg_2" style="padding: 5px">
           <a href="' . Toolbox::getItemTypeFormURL(__CLASS__) . '" class="submit">
                <img src="' . $GLOBALS['CFG_GLPI']['root_doc'] . '/pics/menu_add.png" alt="+" align="absmiddle" />
                ' . __('Add an header', 'formcreator') . '
            </a><br /><br />
               <em><i><img src="' . $GLOBALS['CFG_GLPI']['root_doc'] . '/pics/warning.png" alt="/!\\" align="absmiddle" height="16" />&nbsp;
               ' . __('An header exists for a parent entity! Another header will overwrite the previous one.', 'formcreator') . '</i></em>
            </h3>
         </div>';
         } else {
             echo '<div class="tab_cadre_pager" style="padding: 2px; margin: 5px 0">
            <h3 class="tab_bg_2" style="padding: 5px">
              <a href="' . Toolbox::getItemTypeFormURL(__CLASS__) . '" class="submit">
                   <img src="' . $GLOBALS['CFG_GLPI']['root_doc'] . '/pics/menu_add.png" alt="+" align="absmiddle" />
                   ' . __('Add an header', 'formcreator') . '
               </a>
            </h3>
         </div>';
         }
     }
     $params['sort'] = !empty($_POST['sort']) ? (int) $_POST['sort'] : 0;
     $params['order'] = !empty($_POST['order']) && in_array($_POST['order'], array('ASC', 'DESC')) ? $_POST['order'] : 'ASC';
     $params['start'] = !empty($_POST['start']) ? (int) $_POST['start'] : 0;
     Search::manageGetValues(__CLASS__);
     //Search::showGenericSearch(__CLASS__, $_GET);
     Search::showList(__CLASS__, $params);
 }
开发者ID:jcr0ch4,项目名称:formcreator,代码行数:46,代码来源:header.class.php

示例4: displayTabContentForItem

 /**
  * @param $item         CommonGLPI object
  * @param $tabnum       (default 1)
  * @param $withtemplate (default 0)
  **/
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     switch ($tabnum) {
         case 0:
             $search_params = PluginFusioninventoryDeployGroup::getSearchParamsAsAnArray($item, false);
             if (isset($search_params['metacriteria']) && empty($search_params['metacriteria'])) {
                 unset($search_params['metacriteria']);
             }
             PluginFusioninventoryDeployGroup::showCriteria($item, true, $search_params);
             break;
         case 1:
             $params = PluginFusioninventoryDeployGroup::getSearchParamsAsAnArray($item, false);
             $params['massiveactionparams']['extraparams']['id'] = $_GET['id'];
             $params['sort'] = '';
             Search::showList('PluginFusioninventoryComputer', $params, array('2'));
             break;
     }
     return true;
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:24,代码来源:deploygroup_dynamicdata.class.php

示例5: trim

along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkCentralAccess();
Html::header(__('Search'), $_SERVER['PHP_SELF']);
if (!$CFG_GLPI['allow_search_global']) {
    Html::displayRightError();
}
if (isset($_GET["globalsearch"])) {
    $searchtext = trim($_GET["globalsearch"]);
    foreach ($CFG_GLPI["globalsearch_types"] as $itemtype) {
        if (($item = getItemForItemtype($itemtype)) && $item->canView()) {
            $_GET["reset"] = 'reset';
            $params = Search::manageParams($itemtype, $_GET, false, true);
            $params["display_type"] = Search::GLOBAL_SEARCH;
            $count = count($params["criteria"]);
            $params["criteria"][$count]["field"] = 'view';
            $params["criteria"][$count]["searchtype"] = 'contains';
            $params["criteria"][$count]["value"] = $searchtext;
            //          $_SESSION["glpisearchcount"][$itemtype]  = $count+1;
            //          $_SESSION["glpisearchcount2"][$itemtype] = 0;
            Search::showList($itemtype, $params);
            echo "<hr>";
        }
    }
}
Html::footer();
开发者ID:jose-martins,项目名称:glpi,代码行数:31,代码来源:search.php

示例6: addRule

 function addRule()
 {
     Search::manageGetValues($_GET['itemtype']);
     $pmSearch = new PluginMonitoringSearch();
     $pmSearch->showGenericSearch($_GET['itemtype'], $_GET);
     echo "<br/><br/>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr>";
     echo "<th>";
     echo __('Preview', 'monitoring');
     echo "</th>";
     echo "</tr>";
     echo "<tr>";
     echo "<td>";
     $pmComponentscatalog = new PluginMonitoringComponentscatalog();
     $pmComponentscatalog->getFromDB($_GET['plugin_monitoring_componentscalalog_id']);
     $default_entity = 0;
     if (isset($_SESSION['glpiactive_entity'])) {
         $default_entity = $_SESSION['glpiactive_entity'];
     }
     $entities_isrecursive = 0;
     if (isset($_SESSION['glpiactiveentities']) and count($_SESSION['glpiactiveentities']) > 1) {
         $entities_isrecursive = 1;
     }
     Session::changeActiveEntities($pmComponentscatalog->fields['entities_id'], $pmComponentscatalog->fields['is_recursive']);
     Search::showList($_GET['itemtype'], $_GET);
     Session::changeActiveEntities($default_entity, $entities_isrecursive);
     echo "</td>";
     echo "</tr>";
     echo "</table>";
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:31,代码来源:componentscatalog_rule.class.php

示例7: switch

                switch ($params["type"]) {
                    case "comp_champ":
                        $val = Stat::getItems($_GET["itemtype"], $params["date1"], $params["date2"], $params["dropdown"]);
                        Stat::show($_GET["itemtype"], $params["type"], $params["date1"], $params["date2"], $params["start"], $val, $params["dropdown"]);
                        break;
                    case "device":
                        $val = Stat::getItems($_GET["itemtype"], $params["date1"], $params["date2"], $params["dropdown"]);
                        Stat::show($_GET["itemtype"], $params["type"], $params["date1"], $params["date2"], $params["start"], $val, $params["dropdown"]);
                        break;
                    default:
                        $val2 = isset($params['value2']) ? $params['value2'] : 0;
                        $val = Stat::getItems($_GET["itemtype"], $params["date1"], $params["date2"], $params["type"], $val2);
                        Stat::show($_GET["itemtype"], $params["type"], $params["date1"], $params["date2"], $params["start"], $val, $val2);
                }
            } else {
                if (isset($_GET["type"]) && $_GET["type"] == "hardwares") {
                    Stat::showItems("", $_GET["date1"], $_GET["date2"], $_GET['start']);
                }
            }
            break;
        default:
            // Plugin case
            if ($plug = isPluginItemType($_GET["item_type"])) {
                if (Plugin::doOneHook($plug['plugin'], 'dynamicReport', $_GET)) {
                    exit;
                }
            }
            Search::manageGetValues($_GET["item_type"]);
            Search::showList($_GET["item_type"], $_GET);
    }
}
开发者ID:gaforeror,项目名称:glpi,代码行数:31,代码来源:report.dynamic.php

示例8: displayTabContentForItem

 /**
  * Display content of tab
  *
  * @param CommonGLPI $item
  * @param integer $tabnum
  * @param interger $withtemplate
  *
  * @return boolean true
  */
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     // Toolbox::logInFile("pm-downtime", "Downtime, displayTabContentForItem ($withtemplate), item concerned : ".$item->getTypeName()."/".$item->getID()."\n");
     if ($item->getType() == 'Ticket') {
         if (self::canView()) {
             // Show list filtered on item, sorted on day descending ...
             Search::manageGetValues(self::getTypeName());
             Search::showList(self::getTypeName(), array('field' => array(12), 'searchtype' => array('equals'), 'contains' => array($item->getID()), 'sort' => 4, 'order' => 'DESC'));
             return true;
         }
     }
     if ($item->getType() == 'Computer') {
         if (self::canView()) {
             // Show list filtered on item, sorted on day descending ...
             Search::manageGetValues(self::getTypeName());
             Search::showList(self::getTypeName(), array('field' => array(2), 'searchtype' => array('equals'), 'contains' => array($item->getID()), 'sort' => 4, 'order' => 'DESC'));
             return true;
         }
     }
     return true;
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:30,代码来源:downtime.class.php

示例9: showList

 function showList($get)
 {
     Search::manageGetValues("PluginMonitoringUnavailability");
     Search::showList("PluginMonitoringUnavailability", $get);
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:5,代码来源:unavailability.class.php

示例10:

-------------------------------------------------------------------------

LICENSE

This file is part of GLPI.

GLPI is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

GLPI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkLoginUser();
Html::popHeader(__('Setup'), $_SERVER['PHP_SELF']);
$params = Search::manageParams('DocumentType', $_GET);
$params['target'] = $_SERVER['PHP_SELF'];
Search::showList('DocumentType', $params);
Html::popFooter();
开发者ID:glpi-project,项目名称:glpi,代码行数:30,代码来源:documenttype.list.php

示例11: addRule

 function addRule()
 {
     // Verified
     global $CFG_GLPI;
     $params = Search::manageParams($_GET['itemtype'], $_GET);
     $params['showbookmark'] = false;
     $params['target'] = $CFG_GLPI['root_doc'] . "/plugins/monitoring/front/displayview_rule.form.php";
     $params['addhidden'] = array();
     $params['addhidden']['plugin_monitoring_displayviews_id'] = $_GET['plugin_monitoring_displayviews_id'];
     $params['addhidden']['name'] = $_GET['name'];
     if (isset($_GET['id'])) {
         $params['addhidden']['id'] = $_GET['id'];
     }
     ob_start();
     Search::showGenericSearch($_GET['itemtype'], $params);
     $form = ob_get_contents();
     ob_end_clean();
     if (isset($_GET['id'])) {
         $table = "<tr class='tab_bg_1'>" . "<td align='center'>" . "<input type='submit' name='updaterule' value=\"Update this rule\" class='submit' >" . "</td>" . "<td align='center'>" . "<input type='submit' name='deleterule' value=\"Delete this rule\" class='submit' >" . "</td>" . "</tr>" . "</table><input";
     } else {
         $table = "<tr class='tab_bg_1'>" . "<td align='center' colspan='2'>" . "<input type='submit' name='addrule' value=\"Add this rule\" class='submit' >" . "</td>" . "</tr>" . "</table><input";
     }
     $form = str_replace("</table>\n<input", $table, $form);
     echo $form;
     echo "<br/>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr>";
     echo "<th>";
     echo __('Preview', 'monitoring');
     echo "</th>";
     echo "</tr>";
     echo "<tr>";
     echo "<td>";
     $pmDisplayview = new PluginMonitoringDisplayview();
     $pmDisplayview->getFromDB($_GET['plugin_monitoring_displayviews_id']);
     $default_entity = 0;
     if (isset($_SESSION['glpiactive_entity'])) {
         $default_entity = $_SESSION['glpiactive_entity'];
     }
     $entities_isrecursive = 0;
     if (isset($_SESSION['glpiactiveentities']) and count($_SESSION['glpiactiveentities']) > 1) {
         $entities_isrecursive = 1;
     }
     Session::changeActiveEntities($pmDisplayview->fields['entities_id'], $pmDisplayview->fields['is_recursive']);
     Search::showList($_GET['itemtype'], $params);
     Session::changeActiveEntities($default_entity, $entities_isrecursive);
     echo "</td>";
     echo "</tr>";
     echo "</table>";
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:50,代码来源:displayview_rule.class.php

示例12: checkCentralAccess

include GLPI_ROOT . "/inc/includes.php";
checkCentralAccess();
commonHeader($LANG['search'][0], $_SERVER['PHP_SELF']);
if (isset($_GET["globalsearch"])) {
    $searchtext = $_GET["globalsearch"];
    $types = array('Ticket', 'Computer', 'Monitor', 'Software', 'NetworkEquipment', 'Peripheral', 'Printer', 'Phone', 'Contact', 'Supplier', 'Document');
    foreach ($types as $itemtype) {
        $item = new $itemtype();
        if ($item->canView()) {
            $_GET["reset"] = 'reset';
            $_GET["display_type"] = GLOBAL_SEARCH;
            Search::manageGetValues($itemtype, false, true);
            if ($_GET["field"][0] == 'view') {
                $_GET["contains"][0] = $searchtext;
                $_GET["searchtype"][0] = 'contains';
                $_SESSION["glpisearchcount"][$itemtype] = 1;
            } else {
                $_GET["field"][1] = 'view';
                $_GET["contains"][1] = $searchtext;
                $_GET["searchtype"][1] = 'contains';
                $_SESSION["glpisearchcount"][$itemtype] = 2;
            }
            Search::showList($itemtype, $_GET);
            unset($_GET["contains"]);
            unset($_GET["searchtype"]);
            echo "<hr>";
            $_GET = array();
        }
    }
}
commonFooter();
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:search.php

示例13: PluginResourcesChecklistconfig

-------------------------------------------------------------------------

LICENSE

This file is part of Resources.

Resources is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Resources is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Resources. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
Html::header(PluginResourcesResource::getTypeName(2), '', "plugins", "resources", "checklist");
$checklistconfig = new PluginResourcesChecklistconfig();
if ($checklistconfig->canView() || Session::haveRight("config", "w")) {
    Search::manageGetValues("PluginResourcesChecklistconfig");
    Search::showGenericSearch("PluginResourcesChecklistconfig", $_GET);
    Search::showList("PluginResourcesChecklistconfig", $_GET);
} else {
    Html::displayRightError();
}
Html::footer();
开发者ID:geldarr,项目名称:hack-space,代码行数:31,代码来源:checklistconfig.php

示例14: PluginResourcesTask

Resources is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Resources is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Resources. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
Html::header(PluginResourcesResource::getTypeName(2), '', "plugins", "resources");
$task = new PluginResourcesTask();
if ($task->canView() || Session::haveRight("config", "w")) {
    Search::manageGetValues("PluginResourcesTask");
    //if $_GET["plugin_resources_resources_id"] exist this show list of tasks from a resource
    //else show all resources
    if (isset($_GET["plugin_resources_resources_id"]) && !empty($_GET["plugin_resources_resources_id"])) {
        $_GET["field"] = array(0 => "13");
        $_GET["contains"] = array(0 => $_GET["plugin_resources_resources_id"]);
    }
    Search::showGenericSearch("PluginResourcesTask", $_GET);
    Search::showList("PluginResourcesTask", $_GET);
} else {
    Html::displayRightError();
}
Html::footer();
开发者ID:geldarr,项目名称:hack-space,代码行数:31,代码来源:task.php

示例15: showResults

 static function showResults(PluginFusioninventoryDeployGroup $group)
 {
     $computers_params['metacriteria'] = array();
     $computers_params['criteria'][] = array('searchtype' => 'equals', 'value' => $_GET['id'], 'field' => 6000);
     $search_params = Search::manageParams('PluginFusioninventoryComputer', $computers_params);
     //Add extra parameters for massive action display : only the Delete action should be displayed
     $search_params['massiveactionparams']['extraparams']['id'] = $_GET['id'];
     $search_params['massiveactionparams']['extraparams']['custom_action'] = 'delete_from_group';
     $search_params['massiveactionparams']['extraparams']['massive_action_fields'] = array('action', 'id');
     Search::showList('PluginFusioninventoryComputer', $search_params);
 }
开发者ID:korial29,项目名称:fusioninventory-for-glpi,代码行数:11,代码来源:deploygroup_staticdata.class.php


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