Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Search
PHP Netpoint::dropdownNetpoint Examples
Programming Language:
PHP
Class/Type:
Netpoint
Method/Function:
dropdownNetpoint
Examples at hotexamples.com:
3
PHP Netpoint::dropdownNetpoint - 3 examples found
. These are the top rated real world PHP examples of
Netpoint::dropdownNetpoint
from package glpi extracted from open source projects. You can rate examples to help us improve the quality of examples.
Frequently Used Methods
Show
Hide
dropdownNetpoint(3)
getFromDB(3)
getFormURL(2)
add(1)
canCreate(1)
getHTMLTableCellsForItem(1)
getHTMLTableHeader(1)
getTypeName(1)
Frequently Used Methods
dropdownNetpoint (3)
getFromDB (3)
getFormURL (2)
add (1)
canCreate (1)
getHTMLTableCellsForItem (1)
getHTMLTableHeader (1)
getTypeName (1)
Related
myFilesystem
oublog_import_getbloginfo
BuildCache
Jam_Field_Timestamp
get_correct_section
radio_select
check_modules_access
RootManagerInterface
gdlr_content_filter
tie_get_video_embed
Related in langs
TypeLink (C#)
IIOWriter (C#)
ssl_close_notify (C++)
setAxisScale (C++)
ClientConn (Go)
New (Go)
TokenMatcherFactory (Java)
TypedBytesInput (Java)
Alerte (Python)
imgbase (Python)
dropdownNetpoint()
static
public
method
Print out an HTML "
" for a dropdown with preselected value static public dropdownNetpoint ( $myname, $value, $locations_id, $display_comment = 1, $entity_restrict, $devtype = '' ) : nothing $myname the name of the HTML select $value the preselected value we want (default 0) $locations_id default location ID for search (default -1) $display_comment display the comment near the dropdown (default 1) $entity_restrict Restrict to a defined entity(default -1) $devtype (default '') return nothing (display the select box) Netpoint Class Documentation Example #1 0 Show file File: networkportinstantiation.class.php Project: stweil/glpi /** * Display the Netpoint field. Used by Ethernet, and Migration * * @param $netport NetworkPort object :the port that owns this instantiation * (usefull, for instance to get network port attributs * @param $options array of options given to NetworkPort::showForm * @param $recursiveItems list of the items on which this port is attached **/ function showNetpointField(NetworkPort $netport, $options = array(), $recursiveItems) { echo "<td>" . __('Network outlet') . "</td>\n"; echo "<td>"; if (count($recursiveItems) > 0) { $lastItem = $recursiveItems[count($recursiveItems) - 1]; Netpoint::dropdownNetpoint("netpoints_id", $this->fields["netpoints_id"], $lastItem->fields['locations_id'], 1, $lastItem->getEntityID(), $netport->fields["itemtype"]); } else { _e('item not linked to an object'); } echo "</td>"; } Example #2 0 Show file File: report.networking.php Project: paisdelconocimiento/glpi-smartcities 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>"; Html::closeForm(); } Html::footer(); Example #3 0 Show file File: networkport.class.php Project: ryukansent/Thesis-SideB function showForm($ID, $options = array()) { global $CFG_GLPI, $LANG; if (!isset($options['several'])) { $options['several'] = false; } if (!haveRight("networking", "r")) { return false; } if ($ID > 0) { $this->check($ID, 'r'); } else { $input = array('itemtype' => $options["itemtype"], 'items_id' => $options["items_id"]); // Create item $this->check(-1, 'w', $input); } $type = $this->fields['itemtype']; $link = NOT_AVAILABLE; if (class_exists($this->fields['itemtype'])) { $item = new $this->fields['itemtype'](); $type = $item->getTypeName(); if ($item->getFromDB($this->fields["items_id"])) { $link = $item->getLink(); } else { return false; } } else { // item is mandatory (for entity) return false; } // Ajout des infos deja remplies if (isset($_POST) && !empty($_POST)) { foreach ($netport->fields as $key => $val) { if ($key != 'id' && isset($_POST[$key])) { $netport->fields[$key] = $_POST[$key]; } } } $this->showTabs($ID); $options['entities_id'] = $item->getField('entities_id'); $this->showFormHeader($options); $show_computer_mac = false; if ((!empty($this->fields['itemtype']) || !$options['several']) && $this->fields['itemtype'] == 'Computer') { $show_computer_mac = true; } echo "<tr class='tab_bg_1'><td>{$type} :</td>\n<td>"; if (!($ID > 0)) { echo "<input type='hidden' name='items_id' value='" . $this->fields["items_id"] . "'>\n"; echo "<input type='hidden' name='itemtype' value='" . $this->fields["itemtype"] . "'>\n"; } echo $link . "</td>\n"; $colspan = 9; if ($show_computer_mac) { $colspan += 2; } if (!$options['several']) { $colspan++; } echo "<td rowspan='{$colspan}'>" . $LANG['common'][25] . " :</td>"; echo "<td rowspan='{$colspan}' class='middle'>"; echo "<textarea cols='45' rows='11' name='comment' >" . $this->fields["comment"] . "</textarea>"; echo "</td></tr>\n"; if (!$options['several']) { echo "<tr class='tab_bg_1'><td>" . $LANG['networking'][21] . " :</td>\n"; echo "<td>"; autocompletionTextField($this, "logical_number", array('size' => 5)); echo "</td></tr>\n"; } else { echo "<tr class='tab_bg_1'><td>" . $LANG['networking'][21] . " :</td>\n"; echo "<td>"; echo "<input type='hidden' name='several' value='yes'>"; echo "<input type='hidden' name='logical_number' value=''>\n"; echo $LANG['networking'][47] . " : "; Dropdown::showInteger('from_logical_number', 0, 0, 100); echo " " . $LANG['networking'][48] . " : "; Dropdown::showInteger('to_logical_number', 0, 0, 100); echo "</td></tr>\n"; } echo "<tr class='tab_bg_1'><td>" . $LANG['common'][16] . " :</td>\n"; echo "<td>"; autocompletionTextField($this, "name"); echo "</td></tr>\n"; echo "<tr class='tab_bg_1'><td>" . $LANG['common'][65] . " :</td>\n<td>"; Dropdown::show('NetworkInterface', array('value' => $this->fields["networkinterfaces_id"])); echo "</td></tr>\n"; echo "<tr class='tab_bg_1'><td>" . $LANG['networking'][14] . " :</td>\n<td>"; autocompletionTextField($this, "ip"); echo "</td></tr>\n"; // Show device MAC adresses if ($show_computer_mac) { $comp = new Computer(); $comp->getFromDB($this->fields['items_id']); $macs = Computer_Device::getMacAddr($comp); if (count($macs) > 0) { echo "<tr class='tab_bg_1'><td>" . $LANG['networking'][15] . " :</td>\n<td>"; echo "<select name='pre_mac'>\n"; echo "<option value=''>" . DROPDOWN_EMPTY_VALUE . "</option>\n"; foreach ($macs as $key => $val) { echo "<option value='" . $val . "' >{$val}</option>\n"; } echo "</select></td></tr>\n"; echo "<tr class='tab_bg_2'>"; echo "<td colspan='2' class='center'>" . $LANG['networking'][57]; echo "</td></tr>\n"; } } echo "<tr class='tab_bg_1'><td>" . $LANG['networking'][15] . " :</td>\n<td>"; autocompletionTextField($this, "mac"); echo "</td></tr>\n"; echo "<tr class='tab_bg_1'><td>" . $LANG['networking'][60] . " :</td>\n<td>"; autocompletionTextField($this, "netmask"); echo "</td></tr>\n"; echo "<tr class='tab_bg_1'><td>" . $LANG['networking'][59] . " :</td>\n<td>"; autocompletionTextField($this, "gateway"); echo "</td></tr>\n"; echo "<tr class='tab_bg_1'><td>" . $LANG['networking'][61] . " :</td>\n<td>"; autocompletionTextField($this, "subnet"); echo "</td></tr>\n"; if (!$options['several']) { echo "<tr class='tab_bg_1'><td>" . $LANG['networking'][51] . " :</td>\n"; echo "<td>"; Netpoint::dropdownNetpoint("netpoints_id", $this->fields["netpoints_id"], $item->fields['locations_id'], 1, $item->getEntityID(), $this->fields["itemtype"]); echo "</td></tr>\n"; } $this->showFormButtons($options); $this->addDivForTabs(); } Top Functions | Top Classes | Documentation | Privacy Policy | Advertise with us PHP | C# (CSharp) | Java | Golang | C++ (Cpp) | Python | JavaScript | TypeScript EN | RU | DE | FR | ES | PT | IT | JP | ZH | KO
x