Esempio n. 1
0
 static function showSummary()
 {
     echo "<div class='center'><table class='tab_cadre' cellpadding='5' width='50%'>";
     echo "<tr><th>" . __('Summary') . "</th></tr>";
     if (countElementsInTable('glpi_plugin_archires_views', "`entities_id`='" . $_SESSION["glpiactive_entity"] . "'") > 0) {
         echo "<tr class='tab_bg_1'><td>";
         echo "<a href='view.php'>" . PluginArchiresView::getTypeName(2) . "</a>";
         echo "</td></tr>";
         echo "<tr class='tab_bg_1'><td>";
         echo "<a href='locationquery.php'>" . sprintf(__('%1$s - %2$s'), self::getTypeName(1), PluginArchiresLocationQuery::getTypeName(1)) . "</a>";
         echo "</td></tr>";
         echo "<tr class='tab_bg_1'><td>";
         echo "<a href='networkequipmentquery.php'>" . sprintf(__('%1$s - %2$s'), self::getTypeName(1), PluginArchiresNetworkEquipmentQuery::getTypeName(1)) . "</a>";
         echo "</td></tr>";
         $plugin = new Plugin();
         if ($plugin->isActivated("appliances")) {
             echo "<tr class='tab_bg_1'><td>";
             echo "<a href='appliancequery.php'>" . sprintf(__('%1$s - %2$s'), self::getTypeName(1), PluginAppliancesAppliance::getTypeName(1)) . "</a>";
             echo "</td></tr>";
         }
     } else {
         echo "<tr class='tab_bg_1'><td>";
         echo "<a href='view.form.php?new=1'>" . __('Add view', 'archires') . "</a>";
         echo "</td></tr>";
     }
     echo "</table></div>";
 }
Esempio n. 2
0
 https://forge.indepnet.net/projects/archires
 -------------------------------------------------------------------------

 LICENSE

 This file is part of archires.

 Archires 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.

 Archires 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 Archires. If not, see <http://www.gnu.org/licenses/>.
 --------------------------------------------------------------------------
*/
include "../../../inc/includes.php";
Html::header(PluginArchiresView::getTypeName(), '', "plugins", "archires", "view");
$PluginArchiresView = new PluginArchiresView();
if ($PluginArchiresView->canView() || Session::haveRight("config", "w")) {
    Search::show("PluginArchiresView");
} else {
    Html::displayRightError();
}
Html::footer();
Esempio n. 3
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>" . __('State') . "</td><td>";
     State::dropdown(array('name' => "states_id", 'value' => $this->fields["states_id"]));
     echo "</td></tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . __('Location') . "</td><td>";
     $this->dropdownLocation($this, $ID);
     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>" . __('Childs', 'archires') . "</td>";
     echo "<td>";
     Dropdown::showYesNo("child", $this->fields["child"]);
     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>";
     $this->showFormButtons($options);
     $this->addDivForTabs();
     return true;
 }