mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add Interface at bill create screen
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<h4>Bill Information</h4>
|
||||
<div class="form-group">
|
||||
<label for="bill_name" class="col-sm-4 control-label">Description</label>
|
||||
<div class="col-sm-8">
|
||||
|
||||
@@ -150,16 +150,7 @@
|
||||
<?php
|
||||
$devices = dbFetchRows('SELECT * FROM `devices` ORDER BY hostname');
|
||||
foreach ($devices as $device) {
|
||||
unset($done);
|
||||
foreach ($access_list as $ac) {
|
||||
if ($ac == $device['device_id']) {
|
||||
$done = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$done) {
|
||||
echo " <option value='".$device['device_id']."'>".$device['hostname']."</option>\n";
|
||||
}
|
||||
echo "<option value='${device['device_id']}'>${device['hostname']}</option>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -75,8 +75,8 @@ if ($_POST['addbill'] == 'yes') {
|
||||
|
||||
$bill_id = dbInsert($insert, 'bills');
|
||||
|
||||
if (is_numeric($bill_id) && is_numeric($_POST['port'])) {
|
||||
dbInsert(array('bill_id' => $bill_id, 'port_id' => $_POST['port']), 'bill_ports');
|
||||
if (is_numeric($bill_id) && is_numeric($_POST['port_id'])) {
|
||||
dbInsert(array('bill_id' => $bill_id, 'port_id' => $_POST['port_id']), 'bill_ports');
|
||||
}
|
||||
|
||||
header('Location: /' . generate_url(array('page' => 'bill', 'bill_id' => $bill_id, 'view' => 'edit')));
|
||||
|
||||
Reference in New Issue
Block a user