コード例 #1
0
// 3. Selection d'affichage pour generer la liste
echo "<form name='form' method='post' action='report.location.list.php'>";
echo "<table class='tab_cadre' width='500'>";
echo "<tr class='tab_bg_1'><td width='120'>" . __('By location') . "</td>";
echo "<td>";
Location::dropdown(array('entity' => $_SESSION["glpiactive_entity"]));
echo "</td><td class='center' width='120'>";
echo "<input type='submit' value=\"" . __s('Display report') . "\" class='submit'>";
echo "</td></tr>";
echo "</table>";
Html::closeForm();
echo "<form name='form2' method='post' action='report.switch.list.php'>";
echo "<table class='tab_cadre' width='500'>";
echo "<tr class='tab_bg_1'><td width='120'>" . __('By hardware') . "</td>";
echo "<td>";
NetworkEquipment::dropdown(array('name' => 'switch'));
echo "</td><td class='center' width='120'>";
echo "<input type='submit' value=\"" . __s('Display report') . "\" class='submit'>";
echo "</td></tr>";
echo "</table>";
Html::closeForm();
if (countElementsInTableForMyEntities("glpi_netpoints") > 0) {
    echo "<form name='form3' method='post' action='report.netpoint.list.php'>";
    echo "<table class='tab_cadre' width='500'>";
    echo "<tr class='tab_bg_1'><td width='120'>" . __('By network outlet') . "</td>";
    echo "<td>";
    Netpoint::dropdownNetpoint("prise", 0, -1, 1, $_SESSION["glpiactive_entity"]);
    echo "</td><td class='center' width='120'>";
    echo "<input type='submit' value=\"" . __s('Display report') . "\" class='submit'>";
    echo "</td></tr>";
    echo "</table>";
コード例 #2
0
 function showForm($ID, $options = array())
 {
     $this->initForm($ID, $options);
     $this->showTabs($options);
     $this->showFormHeader($options);
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . __('Name') . "</td>";
     echo "<td>";
     Html::autocompletionTextField($this, "name");
     echo "</td>";
     echo "<td>" . __('Group') . "</td><td>";
     Group::dropdown(array('name' => "groups_id", 'value' => $this->fields["groups_id"], 'entity' => $this->fields["entities_id"]));
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . _n('Network equipment', 'Network equipments', 1, 'archires') . "</td><td>";
     NetworkEquipment::dropdown(array('name' => "networkequipments_id", 'value' => $this->fields["networkequipments_id"], 'entity' => $this->fields["entities_id"]));
     echo "</td>";
     echo "<td>" . __('VLAN') . "</td><td>";
     Vlan::dropdown(array('name' => "vlans_id", 'value' => $this->fields["vlans_id"]));
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . __('Network') . "</td><td>";
     Network::dropdown(array('name' => "networks_id", 'value' => $this->fields["networks_id"]));
     echo "</td>";
     echo "<td>" . PluginArchiresView::getTypeName(1) . "</td><td>";
     //View
     Dropdown::show('PluginArchiresView', array('name' => "plugin_archires_views_id", 'value' => $this->fields["plugin_archires_views_id"]));
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . __('State') . "</td><td colspan='3'>";
     State::dropdown(array('name' => "states_id", 'value' => $this->fields["states_id"]));
     echo "</td></tr>";
     $this->showFormButtons($options);
     $this->addDivForTabs();
     return true;
 }