showList() static public method

Display result table for search engine for an type
static public showList ( $itemtype, $params ) : nothing
$itemtype item type to manage
$params search params passed to prepareDatasForSearch function
return nothing
コード例 #1
0
 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;
 }
コード例 #2
0
 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);
 }
コード例 #3
0
ファイル: header.class.php プロジェクト: jcr0ch4/formcreator
 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);
 }
 /**
  * @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;
 }
コード例 #5
0
ファイル: search.php プロジェクト: jose-martins/glpi
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();
コード例 #6
0
 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>";
 }
コード例 #7
0
ファイル: report.dynamic.php プロジェクト: gaforeror/glpi
                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);
    }
}
コード例 #8
0
 /**
  * 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;
 }
コード例 #9
0
 function showList($get)
 {
     Search::manageGetValues("PluginMonitoringUnavailability");
     Search::showList("PluginMonitoringUnavailability", $get);
 }
コード例 #10
0
-------------------------------------------------------------------------

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();
コード例 #11
0
 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>";
 }
コード例 #12
0
ファイル: search.php プロジェクト: ryukansent/Thesis-SideB
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();
コード例 #13
0
-------------------------------------------------------------------------

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();
コード例 #14
0
ファイル: task.php プロジェクト: geldarr/hack-space
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();
 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);
 }
コード例 #16
0
ファイル: employment.php プロジェクト: geldarr/hack-space
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", "employment");
$employment = new PluginResourcesEmployment();
if ($employment->canView() || Session::haveRight("config", "w")) {
    Search::manageGetValues("PluginResourcesEmployment");
    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("PluginResourcesEmployment", $_GET);
    Search::showList("PluginResourcesEmployment", $_GET);
} else {
    Html::displayRightError();
}
Html::footer();
コード例 #17
0
ファイル: ideabox.php プロジェクト: geldarr/hack-space
} else {
    Html::helpHeader(PluginIdeaboxIdeabox::getTypeName(2));
}
$idea = new PluginIdeaboxIdeabox();
if ($idea->canView() || Session::haveRight("config", "w")) {
    if ($_SESSION['glpiactiveprofile']['interface'] != 'central') {
        if ($idea->canCreate()) {
            echo "<div align='center'><table class='tab_cadre_fixe' cellpadding='5'>";
            echo "<tr><th>" . __('Menu', 'ideabox') . "</th></tr>";
            echo "<tr class='tab_bg_1'><td class='center'>";
            echo "<a href=\"./ideabox.form.php\">";
            _e('Submit an idea', 'ideabox');
            echo "</a>";
            echo "</td></tr>";
            echo " </table></div>";
        }
        Search::manageGetValues("PluginIdeaboxIdeabox");
        $_GET["field"] = array(0 => "2");
        $_GET["contains"] = array(0 => $_SESSION["glpiname"]);
        Search::showList("PluginIdeaboxIdeabox", $_GET);
    } else {
        Search::show("PluginIdeaboxIdeabox");
    }
} else {
    Html::displayRightError();
}
if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
    Html::footer();
} else {
    Html::helpFooter();
}
コード例 #18
0
ファイル: report.dynamic.php プロジェクト: btry/glpi
                switch ($params["type"]) {
                    case "comp_champ":
                        $val = Stat::getItems($_GET["itemtype"], $params["date1"], $params["date2"], $params["dropdown"]);
                        Stat::showTable($_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::showTable($_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::showTable($_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;
                }
            }
            $params = Search::manageParams($_GET["item_type"], $_GET);
            Search::showList($_GET["item_type"], $params);
    }
}
コード例 #19
0
 /**
  * Display quick list logs
  *
  * @param $tasks_id integer id of task
  *
  * @return nothing
  */
 static function quickListLogs($tasks_id)
 {
     global $DB;
     $query = "SELECT * FROM `glpi_plugin_fusioninventory_taskjobstates`\n         LEFT JOIN `glpi_plugin_fusioninventory_taskjobs`\n            ON `plugin_fusioninventory_taskjobs_id` = `glpi_plugin_fusioninventory_taskjobs`.`id`\n         WHERE `plugin_fusioninventory_tasks_id`='" . $tasks_id . "'\n         ORDER BY uniqid DESC\n         LIMIT 1";
     $result = $DB->query($query);
     $uniqid = 0;
     $action = '';
     while ($data = $DB->fetch_array($result)) {
         $uniqid = $data['uniqid'];
         $action = $data['action'];
     }
     if ($uniqid == '0') {
         if ($action == '') {
             echo "<center><strong>No agent found for this task</strong></center>";
         }
     } else {
         $params = array();
         $params['field'][0] = '6';
         $params['searchtype'][0] = 'contains';
         $params['contains'][0] = $uniqid;
         $params['itemtype'] = 'PluginFusioninventoryTaskjoblog';
         $params['start'] = '0';
         Search::manageGetValues('PluginFusioninventoryTaskjoblog');
         Search::showList('PluginFusioninventoryTaskjoblog', $params);
     }
 }
コード例 #20
0
http://indepnet.net/   http://glpi-project.org
-------------------------------------------------------------------------

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']);
Search::manageGetValues('DocumentType');
Search::showList('DocumentType', $_GET);
Html::popFooter();
コード例 #21
0
ファイル: task.php プロジェクト: geldarr/hack-space
Projet 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.

Projet 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 Projet. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
$task = new PluginProjetTask();
Html::header(PluginProjetProjet::getTypeName(2), '', "plugins", "projet");
if ($task->canView() || Session::haveRight("config", "w")) {
    Search::manageGetValues("PluginProjetTask");
    //if $_GET["plugin_projet_projets_id"] exist this show list of tasks from a projet
    //else show all tasks
    if (isset($_GET["plugin_projet_projets_id"]) && !empty($_GET["plugin_projet_projets_id"])) {
        $_GET["field"] = array(0 => "23");
        $_GET["contains"] = array(0 => $_GET["plugin_projet_projets_id"]);
    }
    Search::showGenericSearch("PluginProjetTask", $_GET);
    Search::showList("PluginProjetTask", $_GET);
} else {
    Html::displayRightError();
}
Html::footer();