displayProgressBar() static public méthode

Display a simple progress bar
static public displayProgressBar ( $width, $percent, $options = [] ) : nothing
$width Width of the progress bar
$percent Percent of the progress bar
$options array of possible options: - title : string title to display (default Progesssion) - simple : display a simple progress bar (no title / only percent) - forcepadding : boolean force str_pad to force refresh (default true)
Résultat nothing
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
Session::checkRight("plugin_ocsinventoryng", UPDATE);
Html::header('OCS Inventory NG', '', "tools", "pluginocsinventoryngmenu", "sync");
$display_list = true;
if (isset($_SESSION["ocs_update"]['computers'])) {
    if ($count = count($_SESSION["ocs_update"]['computers'])) {
        $percent = min(100, round(100 * ($_SESSION["ocs_update_count"] - $count) / $_SESSION["ocs_update_count"], 0));
        $key = array_pop($_SESSION["ocs_update"]['computers']);
        $cfg_ocs = PluginOcsinventoryngOcsServer::getConfig($_SESSION["plugin_ocsinventoryng_ocsservers_id"]);
        $dohistory = isset($cfg_ocs['dohistory']) ? $cfg_ocs['dohistory'] : false;
        $action = PluginOcsinventoryngOcsServer::updateComputer($key, $_SESSION["plugin_ocsinventoryng_ocsservers_id"], $dohistory);
        PluginOcsinventoryngOcsServer::manageImportStatistics($_SESSION["ocs_update"]['statistics'], $action['status']);
        PluginOcsinventoryngOcsServer::showStatistics($_SESSION["ocs_update"]['statistics']);
        Html::displayProgressBar(400, $percent);
        Html::redirect($_SERVER['PHP_SELF']);
    } else {
        if (isset($_SESSION["ocs_update"]['statistics'])) {
            PluginOcsinventoryngOcsServer::showStatistics($_SESSION["ocs_update"]['statistics'], true);
        } else {
            echo "<div class='center b red'>";
            _e('No synchronization: the plugin will not synchronize these elements', 'ocsinventoryng');
            echo "</div>";
        }
        unset($_SESSION["ocs_update"]);
        $display_list = false;
        echo "<div class='center b'><br>";
        echo "<a href='" . $_SERVER['PHP_SELF'] . "'>" . __('Back') . "</a></div>";
    }
}
 /**
  * Print the computers disks
  *
  * @param $comp                  Computer object
  * @param $withtemplate boolean  Template or basic item (default '')
  *
  * @return Nothing (call to classes members)
  **/
 static function showForComputer(Computer $comp, $withtemplate = '')
 {
     global $DB;
     $ID = $comp->fields['id'];
     if (!$comp->getFromDB($ID) || !$comp->can($ID, READ)) {
         return false;
     }
     $canedit = $comp->canEdit($ID);
     if ($canedit && !(!empty($withtemplate) && $withtemplate == 2)) {
         echo "<div class='center firstbloc'>" . "<a class='vsubmit' href='computerdisk.form.php?computers_id={$ID}&amp;withtemplate=" . $withtemplate . "'>";
         _e('Add a volume');
         echo "</a></div>\n";
     }
     echo "<div class='center'>";
     $query = "SELECT `glpi_filesystems`.`name` AS fsname,\n                       `glpi_computerdisks`.*\n                FROM `glpi_computerdisks`\n                LEFT JOIN `glpi_filesystems`\n                          ON (`glpi_computerdisks`.`filesystems_id` = `glpi_filesystems`.`id`)\n                WHERE `computers_id` = '{$ID}'\n                      AND `is_deleted` = '0'";
     if ($result = $DB->query($query)) {
         echo "<table class='tab_cadre_fixehov table-striped table-hover'>";
         $colspan = 7;
         if (Plugin::haveImport()) {
             $colspan++;
         }
         echo "<tr class='noHover'><th colspan='{$colspan}'>" . self::getTypeName($DB->numrows($result)) . "</th></tr>";
         if ($DB->numrows($result)) {
             $header = "<tr><th>" . __('Name') . "</th>";
             if (Plugin::haveImport()) {
                 $header .= "<th>" . __('Automatic inventory') . "</th>";
             }
             $header .= "<th>" . __('Partition') . "</th>";
             $header .= "<th>" . __('Mount point') . "</th>";
             $header .= "<th>" . __('File system') . "</th>";
             $header .= "<th>" . __('Global size') . "</th>";
             $header .= "<th>" . __('Free size') . "</th>";
             $header .= "<th>" . __('Free percentage') . "</th>";
             $header .= "</tr>";
             echo $header;
             Session::initNavigateListItems(__CLASS__, sprintf(__('%1$s = %2$s'), Computer::getTypeName(1), $comp->getName()));
             $disk = new self();
             while ($data = $DB->fetch_assoc($result)) {
                 $disk->getFromDB($data['id']);
                 echo "<tr class='tab_bg_2'>";
                 echo "<td>" . $disk->getLink() . "</td>";
                 if (Plugin::haveImport()) {
                     echo "<td>" . Dropdown::getYesNo($data['is_dynamic']) . "</td>";
                 }
                 echo "<td>" . $data['device'] . "</td>";
                 echo "<td>" . $data['mountpoint'] . "</td>";
                 echo "<td>" . $data['fsname'] . "</td>";
                 //TRANS: %s is a size
                 $tmp = sprintf(__('%s Mio'), Html::formatNumber($data['totalsize'], false, 0));
                 echo "<td class='right'>{$tmp}<span class='small_space'></span></td>";
                 $tmp = sprintf(__('%s Mio'), Html::formatNumber($data['freesize'], false, 0));
                 echo "<td class='right'>{$tmp}<span class='small_space'></span></td>";
                 echo "<td>";
                 $percent = 0;
                 if ($data['totalsize'] > 0) {
                     $percent = round(100 * $data['freesize'] / $data['totalsize']);
                 }
                 Html::displayProgressBar('100', $percent, array('simple' => true, 'forcepadding' => false));
                 echo "</td>";
                 echo "</tr>";
                 Session::addToNavigateListItems(__CLASS__, $data['id']);
             }
             echo $header;
         } else {
             echo "<tr class='tab_bg_2'><th colspan='{$colspan}'>" . __('No item found') . "</th></tr>";
         }
         echo "</table>";
     }
     echo "</div><br>";
 }
Exemple #3
0
if (isset($_POST["change_import_mode"])) {
    if ('id' == "false") {
        $_SESSION["change_import_mode"] = false;
    } else {
        $_SESSION["change_import_mode"] = true;
    }
}
if (isset($_SESSION["ocs_link"])) {
    if ($count = count($_SESSION["ocs_link"])) {
        $percent = min(100, round(100 * ($_SESSION["ocs_link_count"] - $count) / $_SESSION["ocs_link_count"], 0));
        Html::displayProgressBar(400, $percent);
        $key = array_pop($_SESSION["ocs_link"]);
        PluginOcsinventoryngOcsServer::linkComputer($key["ocsid"], $_SESSION["plugin_ocsinventoryng_ocsservers_id"], $key["computers_id"]);
        Html::redirect($_SERVER['PHP_SELF']);
    } else {
        Html::displayProgressBar(400, 100);
        unset($_SESSION["ocs_link"]);
        echo "<div class='center b'>" . __('Successful importation') . "<br>";
        echo "<a href='" . $_SERVER['PHP_SELF'] . "'>" . __('Back') . "</a></div>";
    }
}
if (!isset($_POST["import_ok"])) {
    if (!isset($_GET['check'])) {
        $_GET['check'] = 'all';
    }
    if (!isset($_GET['start'])) {
        $_GET['start'] = 0;
    }
    PluginOcsinventoryngOcsServer::manageDeleted($_SESSION["plugin_ocsinventoryng_ocsservers_id"]);
    PluginOcsinventoryngOcsServer::showComputersToAdd($_SESSION["plugin_ocsinventoryng_ocsservers_id"], $_SESSION["change_import_mode"], $_GET['check'], $_GET['start'], $_SESSION['glpiactiveentities'], 1);
} else {
Exemple #4
0
 /**
  * Display a report about system performance
  * - opcode cache (opcache)
  * - user data cache (apcu / apcu-bc)
  *
  * @since 9.1
  **/
 function showPerformanceInformations()
 {
     global $CFG_GLPI;
     if (!Config::canUpdate()) {
         return false;
     }
     echo "<div class='center' id='tabsbody'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr><th colspan='4'>" . __('PHP opcode cache') . "</th></tr>";
     $ext = 'Zend OPcache';
     if (extension_loaded($ext) && ($info = opcache_get_status(false))) {
         echo "<tr><td>" . sprintf(__('The "%s" extension is installed'), $ext) . "</td>\n               <td>" . phpversion($ext) . "</td>\n               <td></td>\n               <td><img src='" . $CFG_GLPI['root_doc'] . "/pics/ok_min.png' alt='{$ext}'></td></tr>";
         // echo "<tr><td><pre>".print_r($info, true)."</pre></td></tr>";
         // Memory
         $used = $info['memory_usage']['used_memory'];
         $free = $info['memory_usage']['free_memory'];
         $rate = round(100.0 * $used / ($used + $free));
         $max = Toolbox::getSize($used + $free);
         $used = Toolbox::getSize($used);
         echo "<tr><td>" . __('Memory') . "</td>\n               <td>" . sprintf(__('%1$s / %2$s'), $used, $max) . "</td><td>";
         Html::displayProgressBar('100', $rate, array('simple' => true, 'forcepadding' => false));
         echo "</td><td><img src='" . $CFG_GLPI['root_doc'] . "/pics/" . ($rate > 5 && $rate < 75 ? 'ok_min.png' : 'ko_min.png') . "' alt='{$ext}'></td></tr>";
         // Hits
         $hits = $info['opcache_statistics']['hits'];
         $miss = $info['opcache_statistics']['misses'];
         $max = $hits + $miss;
         $rate = round($info['opcache_statistics']['opcache_hit_rate']);
         echo "<tr><td>" . __('Hits rate') . "</td>\n               <td>" . sprintf(__('%1$s / %2$s'), $hits, $max) . "</td><td>";
         Html::displayProgressBar('100', $rate, array('simple' => true, 'forcepadding' => false));
         echo "</td><td><img src='" . $CFG_GLPI['root_doc'] . "/pics/" . ($rate > 90 ? 'ok_min.png' : 'ko_min.png') . "' alt='{$ext}'></td></tr>";
         // Restart (1 seems ok, can happen)
         $max = $info['opcache_statistics']['oom_restarts'];
         echo "<tr><td>" . __('Out of memory restart') . "</td>\n               <td>{$max}</td><td>";
         echo "</td><td><img src='" . $CFG_GLPI['root_doc'] . "/pics/" . ($max < 2 ? 'ok_min.png' : 'ko_min.png') . "' alt='{$ext}'></td></tr>";
         if ($_SESSION['glpi_use_mode'] == Session::DEBUG_MODE) {
             echo "<tr><td></td><td colspan='3'>";
             echo "<a class='vsubmit' href='config.form.php?reset_opcache=1'>";
             _e('Reset');
             echo "</a></td></tr>\n";
         }
     } else {
         echo "<tr><td>" . sprintf(__('Installing and enabling the "%s" extension may improve GLPI performance'), $ext) . "</td>\n               <td></td>\n               <td><img src='" . $CFG_GLPI['root_doc'] . "/pics/ko_min.png' alt='{$ext}'></td></tr>";
     }
     echo "<tr><th colspan='4'>" . __('User data cache') . "</th></tr>";
     $ext = PHP_MAJOR_VERSION < 7 ? 'APCu' : 'apcu-bc';
     if (function_exists('apc_fetch')) {
         echo "<tr><td>" . sprintf(__('The "%s" extension is installed'), $ext) . "</td>\n               <td>" . phpversion('apc') . "</td>\n               <td></td>\n               <td><img src='" . $CFG_GLPI['root_doc'] . "/pics/ok_min.png' alt='{$ext}'></td></tr>";
         $info = apc_sma_info(true);
         $stat = apc_cache_info('user', true);
         // echo "<tr><td><pre>Info:".print_r($info, true)."Stat:".print_r($stat, true)."</pre></td></tr>";
         // Memory
         $max = $info['num_seg'] * $info['seg_size'];
         $free = $info['avail_mem'];
         $used = $max - $free;
         $rate = round(100.0 * $used / $max);
         $max = Toolbox::getSize($used + $free);
         $used = Toolbox::getSize($used);
         echo "<tr><td>" . __('Memory') . "</td>\n               <td>" . sprintf(__('%1$s / %2$s'), $used, $max) . "</td><td>";
         Html::displayProgressBar('100', $rate, array('simple' => true, 'forcepadding' => false));
         echo "</td><td><img src='" . $CFG_GLPI['root_doc'] . "/pics/" . ($rate > 5 && $rate < 50 ? 'ok_min.png' : 'ko_min.png') . "' alt='{$ext}'></td></tr>";
         // Hits
         $hits = $stat['num_hits'];
         $miss = $stat['num_misses'];
         $max = $hits + $miss;
         $rate = round(100 * $hits / ($hits + $miss));
         echo "<tr><td>" . __('Hits rate') . "</td>\n               <td>" . sprintf(__('%1$s / %2$s'), $hits, $max) . "</td><td>";
         Html::displayProgressBar('100', $rate, array('simple' => true, 'forcepadding' => false));
         echo "</td><td><img src='" . $CFG_GLPI['root_doc'] . "/pics/" . ($rate > 90 ? 'ok_min.png' : 'ko_min.png') . "' alt='{$ext}'></td></tr>";
         if ($_SESSION['glpi_use_mode'] == Session::DEBUG_MODE) {
             echo "<tr><td></td><td colspan='3'>";
             echo "<a class='vsubmit' href='config.form.php?reset_apcu=1'>";
             _e('Reset');
             echo "</a></td></tr>\n";
         }
     } else {
         echo "<tr><td>" . sprintf(__('Installing the "%s" extension may improve GLPI performance'), $ext) . "</td>\n               <td></td>\n               <td><img src='" . $CFG_GLPI['root_doc'] . "/pics/ko_min.png' alt='{$ext}'></td></tr>";
     }
     echo "</table></div>\n";
 }
 /**
  * Display state of taskjob
  *
  * @param $taskjobs_id integer id of the taskjob
  * @param $width integer how large in pixel display array
  * @param $return value display or return in var (html or htmlvar or other value
  *        to have state number in %)
  * @param $style '' = normal or 'simple' for very simple display
  *
  * @return nothing, html or pourcentage value
  *
  **/
 function stateTaskjob($taskjobs_id, $width = '930', $return = 'html', $style = '')
 {
     $state = array();
     $state[0] = 0;
     $state[1] = 0;
     $state[2] = 0;
     $state[3] = 0;
     $a_taskjobstates = $this->find("`plugin_fusioninventory_taskjobs_id`='" . $taskjobs_id . "' AND `state`!='" . self::FINISHED . "'");
     $total = 0;
     if (count($a_taskjobstates) > 0) {
         foreach ($a_taskjobstates as $data) {
             $total++;
             $state[$data['state']]++;
         }
         $globalState = 0;
         if ($total == '0') {
             $globalState = 0;
         } else {
             $first = 25;
             $second = ($state[1] + $state[2] + $state[3]) * 100 / $total / 4;
             $third = ($state[2] + $state[3]) * 100 / $total / 4;
             $fourth = $state[3] * 100 / $total / 4;
             $globalState = $first + $second + $third + $fourth;
         }
         if ($return == 'html') {
             if ($style == 'simple') {
                 Html::displayProgressBar($width, ceil($globalState), array('simple' => 1));
             } else {
                 Html::displayProgressBar($width, ceil($globalState));
             }
         } else {
             if ($return == 'htmlvar') {
                 if ($style == 'simple') {
                     return PluginFusioninventoryDisplay::getProgressBar($width, ceil($globalState), array('simple' => 1));
                 } else {
                     return PluginFusioninventoryDisplay::getProgressBar($width, ceil($globalState));
                 }
             } else {
                 return ceil($globalState);
             }
         }
     }
 }
            echo "</table></div>";
        }
        echo "<a href='" . $CFG_GLPI["root_doc"] . "/plugins/ocsinventoryng/front/ocsng.php'>";
        _e('Back');
        echo "</a>";
    }
} else {
    if (empty($_SESSION["ocs_deleted_equiv"]["total"])) {
        PluginOcsinventoryngOcsServer::manageDeleted($_SESSION["plugin_ocsinventoryng_ocsservers_id"]);
    }
    if ($_SESSION["ocs_deleted_equiv"]["total"] != $_SESSION["ocs_deleted_equiv"]["deleted"] && $_SESSION["ocs_deleted_equiv"]["last_req"]) {
        echo $_SESSION["ocs_deleted_equiv"]["deleted"] . "/" . $_SESSION["ocs_deleted_equiv"]["total"];
        $count = $_SESSION["ocs_deleted_equiv"]["deleted"];
        $percent = min(100, round(100 * $count / $_SESSION["ocs_deleted_equiv"]["total"], 0));
        PluginOcsinventoryngOcsServer::manageDeleted($_SESSION["plugin_ocsinventoryng_ocsservers_id"]);
        Html::displayProgressBar(400, $percent, $param['forcepadding'] = true);
        Html::redirect($_SERVER['PHP_SELF']);
    } else {
        if ($_SESSION["ocs_deleted_equiv"]["total"] === 0) {
            echo "<div class='center b'>" . __('No new computers to delete', 'ocsinventoryng') . ".</div>";
        } else {
            $total = $_SESSION["ocs_deleted_equiv"]["total"];
            $_SESSION["ocs_deleted_equiv"]["total"] = 0;
            $count = $_SESSION["ocs_deleted_equiv"]["deleted"];
            $_SESSION["ocs_deleted_equiv"]["deleted"] = 0;
            echo "<div class='center b'>";
            echo "<table class='tab_cadre_fixe'>";
            echo "<th colspan='2'>" . __('Clean OCSNG deleted computers', 'ocsinventoryng');
            echo "</th>";
            echo "<tr class='tab_bg_1'><td>" . __('Pc deleted', 'ocsinventoryng') . "</td><td>" . $count . "/" . $total . "</td></tr>";
            echo "</table></div>";
 function showNetworkEquipmentInformation(CommonDBTM $item, $options)
 {
     global $DB;
     $id = $item->getID();
     if (!($data = $this->find("`networkequipments_id`='" . $id . "'", '', 1))) {
         // Add in database if not exist
         $input = array();
         $input['networkequipments_id'] = $id;
         $_SESSION['glpi_plugins_fusinvsnmp_table'] = 'glpi_networkequipments';
         $ID_tn = $this->add($input);
         $this->getFromDB($ID_tn);
     } else {
         foreach ($data as $datas) {
             $this->fields = $datas;
         }
     }
     // Form networking informations
     echo "<form name='form' method='post' action='" . $options['target'] . "'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr class='tab_bg_1'>";
     echo "<th colspan='4'>";
     echo __('SNMP information', 'fusioninventory');
     echo "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td align='center' rowspan='4'>";
     echo __('Sysdescr', 'fusioninventory') . "&nbsp;:";
     echo "</td>";
     echo "<td rowspan='4'>";
     echo "<textarea name='sysdescr' cols='45' rows='5'>";
     echo $this->fields['sysdescr'];
     echo "</textarea>";
     echo "<td align='center'></td>";
     echo "<td align='center'>";
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td align='center'>" . __('SNMP authentication', 'fusioninventory') . "&nbsp;:</td>";
     echo "<td align='center'>";
     PluginFusioninventoryConfigSecurity::auth_dropdown($this->fields['plugin_fusioninventory_configsecurities_id']);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td align='center'>";
     echo __('CPU usage (in %)', 'fusioninventory') . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     Html::displayProgressBar(250, $this->fields['cpu'], array('simple' => TRUE));
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td align='center'>";
     echo __('Memory usage (in %)', 'fusioninventory') . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     $query2 = "SELECT *\n                 FROM `glpi_networkequipments`\n                 WHERE `id`='" . $id . "';";
     $result2 = $DB->query($query2);
     $data2 = $DB->fetch_assoc($result2);
     $ram_pourcentage = 0;
     if (!empty($data2["ram"]) and !empty($this->fields['memory'])) {
         $ram_pourcentage = ceil(100 * ($data2["ram"] - $this->fields['memory']) / $data2["ram"]);
     }
     if ($data2["ram"] - $this->fields['memory'] < 0 or empty($this->fields['memory'])) {
         echo "<center><strong>" . __('Datas not available', 'fusioninventory') . "</strong></center>";
     } else {
         Html::displayProgressBar(250, $ram_pourcentage, array('title' => " (" . ($data2["ram"] - $this->fields['memory']) . " Mo / " . $data2["ram"] . " Mo)"));
     }
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2 center'>";
     echo "<td colspan='4'>";
     echo "<input type='hidden' name='id' value='" . $id . "'>";
     echo "<input type='submit' name='update' value=\"" . __('Update') . "\" class='submit' >";
     echo "</td>";
     echo "</tr>";
     echo "</table>";
     Html::closeForm();
 }
Exemple #8
0
        echo '<li class="ui-li ui-li-static ui-body-c">' . $row['name'] . '</li>';
        echo '<li class="ui-li ui-li-divider ui-btn ui-bar-b ui-btn-up-undefined" data-role="list-divider" role="heading"> ' . $LANG['computers'][5] . ': </li>';
        echo '<li class="ui-li ui-li-static ui-body-c">' . $row['mountpoint'] . '</li>';
        echo '<li class="ui-li ui-li-divider ui-btn ui-bar-b ui-btn-up-undefined" data-role="list-divider" role="heading"> ' . $LANG['computers'][4] . ': </li>';
        echo '<li class="ui-li ui-li-static ui-body-c">' . $row['fsname'] . '</li>';
        $total = $row['totalsize'] / 1000;
        echo '<li class="ui-li ui-li-divider ui-btn ui-bar-b ui-btn-up-undefined" data-role="list-divider" role="heading"> ' . $LANG['computers'][3] . ': </li>';
        echo '<li class="ui-li ui-li-static ui-body-c">' . $total . ' GB</li>';
        $livre = $row['freesize'] / 1000;
        echo '<li class="ui-li ui-li-divider ui-btn ui-bar-b ui-btn-up-undefined" data-role="list-divider" role="heading"> ' . $LANG['computers'][2] . ': </li>';
        echo '<li class="ui-li ui-li-static ui-body-c">' . $livre . ' GB</li>';
        if ($row['totalsize'] > 0) {
            $percent = round(100 * $row['freesize'] / $row['totalsize']);
        }
        echo '<li class="ui-li ui-li-divider ui-btn ui-bar-b ui-btn-up-undefined" data-role="list-divider" role="heading"> ' . $LANG['computers'][1] . ': </li>';
        echo '<li class="ui-li ui-li-static ui-body-c">' . Html::displayProgressBar('100', $percent, array('simple' => true, 'forcepadding' => false)) . '</li>';
        echo '<li class="ui-li ui-li-divider ui-btn ui-bar-b ui-btn-up-undefined" data-role="list-divider" role="heading"></li>';
        echo '<li class="ui-li ui-li-static ui-body-c"></li>';
    }
    echo '</ul>';
}
// conexoes computador
if ($_REQUEST['glpi_tab'] == "Computer_Item\$1" && $_REQUEST['itemtype'] == "Computer") {
    global $DB;
    $sql_type = "SELECT DISTINCT itemtype\nFROM `glpi_computers_items`\nWHERE `computers_id` = " . $_REQUEST['id'] . "";
    $result_type = $DB->query($sql_type);
    while ($row_type = $DB->fetch_assoc($result_type)) {
        $itemtype = $row_type['itemtype'];
        $tabletype = "glpi_" . strtolower($row_type['itemtype']) . "s";
        $sql_item = "SELECT `glpi_computers_items`.`id` as assoc_id,\n                      `glpi_computers_items`.`computers_id` as assoc_computers_id,\n                      `glpi_computers_items`.`itemtype` as assoc_itemtype,\n                      `glpi_computers_items`.`items_id` as assoc_items_id,\n                      `glpi_computers_items`.`is_dynamic` as assoc_is_dynamic,\n                      " . $tabletype . ".*\n                      FROM `glpi_computers_items`\n                      LEFT JOIN `" . $tabletype . "`\n                        ON (`" . $tabletype . "`.`id`\n                              = `glpi_computers_items`.`items_id`)\n                      WHERE `computers_id` = '" . $_REQUEST['id'] . "'\n                            AND `itemtype` = '" . $itemtype . "'\n                            AND `glpi_computers_items`.`is_deleted` = '0'";
        $result_item = $DB->query($sql_item);