Fixed some display bugs and improved icons
|
@ -118,7 +118,7 @@ $smarty->assign("alphabet", $alphabet);
|
|||
// total asset count
|
||||
$sth = $dbh->query("SELECT COUNT(*) FROM asset");
|
||||
$assetcount = $sth->fetchColumn();
|
||||
$smarty->assign("assetcount", $sassetcount);
|
||||
$smarty->assign("assetcount", $assetcount);
|
||||
|
||||
// assets for current letter
|
||||
if (isset($_GET['bst'])) {
|
||||
|
|
After Width: | Height: | Size: 841 B |
After Width: | Height: | Size: 792 B |
After Width: | Height: | Size: 849 B |
After Width: | Height: | Size: 744 B |
Before Width: | Height: | Size: 665 B After Width: | Height: | Size: 665 B |
After Width: | Height: | Size: 822 B |
After Width: | Height: | Size: 770 B |
After Width: | Height: | Size: 802 B |
|
@ -7,9 +7,6 @@ Copyright (C) 2011-2023 Thomas Hooge
|
|||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*****************************************************************************/
|
||||
|
||||
session_name('ipreg');
|
||||
session_start();
|
||||
|
||||
if (! include("config.php")) {
|
||||
echo "<!DOCTYPE html><html><head><title>IP Reg</title></head><body>\n";
|
||||
echo "<h1>IP Reg</h1><h2>No configuration</h2>\n";
|
||||
|
@ -19,6 +16,9 @@ if (! include("config.php")) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
session_name($config_app_session);
|
||||
session_start();
|
||||
|
||||
// connect to database
|
||||
$dbh = new PDO("mysql:host=$config_mysql_host;dbname=$config_mysql_dbname;charset=utf8", $config_mysql_username, $config_mysql_password);
|
||||
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
|
18
nat.php
|
@ -23,6 +23,16 @@ switch ($submit = form_get_action()) {
|
|||
case 'edit': $action = ACT_EDIT; break;
|
||||
case 'del': $action = ACT_DELETE; break;
|
||||
|
||||
case 'exec-edit':
|
||||
if ($_POST['action'] == 'natadd') {
|
||||
$action = ACT_ADD;
|
||||
} elseif ($_POST['action'] == 'natdel') {
|
||||
$action = ACT_DELETE;
|
||||
} else {
|
||||
$g_warning->Add('Invalid action: '. $_POST['action']);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'insert':
|
||||
$node_id_ext = sanitize($_POST['node_id_ext']);
|
||||
$node_id_int = sanitize($_POST['node_id_int']);
|
||||
|
@ -39,7 +49,11 @@ switch ($submit = form_get_action()) {
|
|||
case 'delete':
|
||||
$node_id_ext = sanitize($_POST['node_id_ext']);
|
||||
$sth = $dbh->prepare("DELETE FROM nat WHERE nat_id=?");
|
||||
try {
|
||||
$sth->execute([$id]);
|
||||
} catch (PDOException $e) {
|
||||
$g_warning->Add($e->getMessage());
|
||||
}
|
||||
// TODO
|
||||
// header_location("node.php?f=view&id=" . $node_id_ext);
|
||||
$action = ACT_DEFAULT;
|
||||
|
@ -76,7 +90,7 @@ $smarty->display("nat.tpl");
|
|||
elseif ($action == ACT_ADD):
|
||||
// ========== VARIANT: add record =============================================
|
||||
|
||||
$node_id = sanitize($_GET['node_id']);
|
||||
$node_id = sanitize($_REQUEST['node_id']);
|
||||
|
||||
// node_ext
|
||||
$sql = "SELECT node_ip AS node_ip_ext
|
||||
|
@ -151,7 +165,7 @@ $smarty->display("natedit.tpl");
|
|||
elseif ($action == ACT_DELETE):
|
||||
// ========== VARIANT: delete record ==========================================
|
||||
|
||||
$node_id = sanitize($_GET['node_id']);
|
||||
$node_id = sanitize($_REQUEST['node_id']);
|
||||
|
||||
// node_ext
|
||||
$sth = $dbh->prepare("SELECT node_id AS id_ext, node_ip AS ip_ext FROM node WHERE node_id=?");
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onClick="history.go(-1)"><img src="images/rewind.png" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a>
|
||||
<input type="image" name="submit[insert]" src="images/page_save.png" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/>
|
||||
<input type="image" name="submit[insert]" src="images/save.png" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -77,7 +77,7 @@
|
|||
{$lang_assetclass_name}
|
||||
</td>
|
||||
<td class="value">
|
||||
{html_options name=assetclass_id options=$assetclass_options}
|
||||
{html_options name=assetclass_id options=$assetclass_options selected=$assetclass_id}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
{if $suser_add || $suser_admin}
|
||||
<a href="assetclass.php?f=add"><img src="images/add.png" alt="{$lang_assetclass_add}" {if $suser_tooltips}title="{$lang_assetclass_add}" {/if}/></a>
|
||||
<a href="assetclass.php?f=add"><img src="images/brick_add.png" alt="{$lang_assetclass_add}" {if $suser_tooltips}title="{$lang_assetclass_add}" {/if}/></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onClick="history.go(-1)"><img src="images/rewind.png" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a>
|
||||
<input type="image" name="submit[update]" src="images/page_save.png" alt="{$lang_save}" {if $suser_tooltips}title="{$lang_save}" {/if}/>
|
||||
<input type="image" name="submit[update]" src="images/save.png" alt="{$lang_save}" {if $suser_tooltips}title="{$lang_save}" {/if}/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onClick="history.go(-1)"><img src="images/rewind.png" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a>
|
||||
<input type="image" name="submit[insert]" src="images/page_save.png" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/>
|
||||
<input type="image" name="submit[insert]" src="images/save.png" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onClick="history.go(-1)"><img src="images/rewind.png" alt="{$lang_cancel}" {if $suser_tooltips}title="{$lang_cancel}" {/if}/></a>
|
||||
<input type="image" name="submit[update]" src="images/page_save.png" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/>
|
||||
<input type="image" name="submit[update]" src="images/save.png" alt="{$lang_submit}" {if $suser_tooltips}title="{$lang_submit}" {/if}/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
{if $suser_add}
|
||||
<a href="asset.php?f=add&assetclass_id={$assetclass->assetclass_id}"><img src="images/add.png" alt="{$lang_asset_add}" {if $suser_tooltips}title="{$lang_asset_add}" {/if}/></a>
|
||||
<a href="assetclass.php?f=add"><img src="images/brick_add.png" alt="{$lang_asset_add}" {if $suser_tooltips}title="{$lang_assetclass_add}" {/if}/></a>
|
||||
{/if}
|
||||
{if $suser_edit}
|
||||
<a href="assetclass.php?f=edit&id={$assetclass->assetclass_id}"><img src="images/edit.png" alt="{$lang_assetclass_edit}" {if $suser_tooltips}title="{$lang_asset_edit}" {/if}/></a>
|
||||
<a href="assetclass.php?f=edit&id={$assetclass->assetclass_id}"><img src="images/brick_edit.png" alt="{$lang_assetclass_edit}" {if $suser_tooltips}title="{$lang_assetclass_edit}" {/if}/></a>
|
||||
{/if}
|
||||
{if $suser_delete}
|
||||
<a href="assetclass.php?f=del&id={$assetclass->assetclass_id}"><img src="images/delete.png" alt="{$lang_assetclass_add}" {if $suser_tooltips}title="{$lang_asset_delete}" {/if}/></a>
|
||||
<a href="assetclass.php?f=del&id={$assetclass->assetclass_id}"><img src="images/brick_delete.png" alt="{$lang_assetclass_add}" {if $suser_tooltips}title="{$lang_assetclass_del}" {/if}/></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -73,7 +73,9 @@
|
|||
{$lang_assets}
|
||||
</td>
|
||||
<td class="header_right">
|
||||
|
||||
{if $suser_add}
|
||||
<a href="asset.php?f=add&assetclass_id={$assetclass->assetclass_id}"><img src="images/add.png" alt="{$lang_asset_add}" {if $suser_tooltips}title="{$lang_asset_add}" {/if}/></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onClick="history.go(-1)"><img src="images/rewind.png" alt="{$lang_cancel}"></a>
|
||||
<input type="image" name="submit[update]" src="images/page_save.png" alt="{$lang_submit}">
|
||||
<input type="image" name="submit[update]" src="images/save.png" alt="{$lang_submit}">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onClick="history.go(-1)"><img src="images/rewind.png" alt="{$lang_cancel}"{if $suser_tooltips} title="{$lang_cancel}"{/if}></a>
|
||||
<input type="image" name="submit[link]" src="images/fastforward" alt="{$lang_submit}"{if $suser_tooltips} title="{$lang_submit}"{/if}>
|
||||
<input type="image" name="submit[link]" src="images/fastforward.png" alt="{$lang_submit}"{if $suser_tooltips} title="{$lang_submit}"{/if}>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<table class="title">
|
||||
<tr>
|
||||
<td class="header">
|
||||
<img class="icon" src="images/nat.png" alt="" />
|
||||
{$lang_nat_rules} ({$nats|@count})
|
||||
</td>
|
||||
<td align="right">
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
{$lang_nat}
|
||||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onClick="history.go(-1)"><img src="image.php?icon=back" alt="{$lang_cancel}"></a>
|
||||
<a href="#" onClick="history.go(-1)"><img src="images/rewind.png" alt="{$lang_cancel}"></a>
|
||||
{if $nat_options}
|
||||
<input type="image" name="submit[delete]" src="image.php?icon=delete" alt="{$lang_submit}">
|
||||
<input type="image" name="submit[delete]" src="images/delete.png" alt="{$lang_submit}">
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onClick="history.go(-1)"><img src="images/rewind.png" alt="{$lang_cancel}"{if $suser_tooltips} title="{$lang_cancel}"{/if}></a>
|
||||
<input type="image" name="submit[next]" src="images/fastforward.png" alt="{$lang_submit}"{if $suser_tooltips} title="{$lang_cancel}"{/if}>
|
||||
<input type="image" name="submit[next]" src="images/fastforward.png" alt="{$lang_submit}"{if $suser_tooltips} title="{$lang_submit}"{/if}>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -32,6 +32,11 @@
|
|||
<a href="user.php">{$lang_users}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">
|
||||
<a href="import.php">Import</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
{if $suser_add || $suser_admin}
|
||||
<a href="vlan.php?f=add"><img src="images/add.png" alt="{$lang_vlan_add}" {if $suser_tooltips}title="{$lang_vlan_add}" {/if}/></a>
|
||||
<a href="vlan.php?f=add"><img src="images/tag_add.png" alt="{$lang_vlan_add}" {if $suser_tooltips}title="{$lang_vlan_add}" {/if}/></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onClick="history.go(-1)"><img src="images/rewind.png" alt="{$lang_cancel}"{if $suser_tooltips} title="{$lang_cancel}"{/if}></a>
|
||||
<input type="image" name="submit[insert]" src="images/page_save.png" alt="{$lang_submit}"{if $suser_tooltips} title="{$lang_submit}"{/if}>
|
||||
<input type="image" name="submit[insert]" src="images/save.png" alt="{$lang_submit}"{if $suser_tooltips} title="{$lang_submit}"{/if}>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
{if $suser_add}
|
||||
<a href="assignvlantosubnet.php?vlan_id={$vlan->id}"><img src="images/add.png" alt="{$lang_assignvlantosubnet}"{if $suser_tooltips} title="{$lang_assignvlantosubnet}"{/if}></a>
|
||||
<a href="assignvlantosubnet.php?vlan_id={$vlan->id}"><img src="images/tag_add.png" alt="{$lang_assignvlantosubnet}"{if $suser_tooltips} title="{$lang_assignvlantosubnet}"{/if}></a>
|
||||
{/if}
|
||||
{if $suser_edit}
|
||||
<a href="vlan.php?f=edit&id={$vlan->id}"><img src="images/edit.png" alt="{$lang_vlan_edit}"{if $suser_tooltips} title="{$lang_vlan_edit}"{/if}></a>
|
||||
<a href="vlan.php?f=edit&id={$vlan->id}"><img src="images/tag_edit.png" alt="{$lang_vlan_edit}"{if $suser_tooltips} title="{$lang_vlan_edit}"{/if}></a>
|
||||
{/if}
|
||||
{if $suser_delete}
|
||||
<a href="vlan.php?f=del&id={$vlan->id}"><img src="images/delete.png" alt="{$lang_vlan_del}"{if $suser_tooltips} title="{$lang_vlan_del}"{/if}></a>
|
||||
<a href="vlan.php?f=del&id={$vlan->id}"><img src="images/tag_delete.png" alt="{$lang_vlan_del}"{if $suser_tooltips} title="{$lang_vlan_del}"{/if}></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -69,7 +69,7 @@
|
|||
</td>
|
||||
<td class="header" align="right">
|
||||
{if $suser_edit}
|
||||
<a href="vlan.php?f=sedit&id={$vlan->id}"><img src="image.php?icon=edit" alt="{$lang_subnetvlan_edit}"></a>
|
||||
<a href="vlan.php?f=sedit&id={$vlan->id}"><img src="images/edit.png" alt="{$lang_subnetvlan_edit}"></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onClick="history.go(-1)"><img src="images/rewind.png" alt="{$lang_cancel}"{if $suser_tooltips} title="{$lang_cancel}"{/if}></a>
|
||||
<input type="image" name="submit[insert]" src="images/page_save.png" alt="{$lang_submit}"{if $suser_tooltips} title="{$lang_submit}"{/if}>
|
||||
<input type="image" name="submit[insert]" src="images/save.png" alt="{$lang_submit}"{if $suser_tooltips} title="{$lang_submit}"{/if}>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</td>
|
||||
<td align="right">
|
||||
<a href="#" onClick="history.go(-1)"><img src="images/rewind.png" alt="{$lang_cancel}"{if $suser_tooltips} title="{$lang_cancel}"{/if}></a>
|
||||
<input type="image" name="submit[update]" src="images/page_save.png" alt="{$lang_save}"{if $suser_tooltips} title="{$lang_submit}"{/if}>
|
||||
<input type="image" name="submit[update]" src="images/save.png" alt="{$lang_save}"{if $suser_tooltips} title="{$lang_submit}"{/if}>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|