Commit d71e2725 authored by Franco Fichtner's avatar Franco Fichtner

settings: tweaking the tweaks

* Do not patronise the user about advanced settings.  The user should
  know what she's doing.  ;)

* Hide the tabs page by moving it from .php to .inc -- web server acces
  to this file extensions is forbidden.  Tabs do not have authentication
  and that's bad if left untreated...
parent 1e194c54
......@@ -293,8 +293,7 @@ include("head.inc");
if ($savemsg) print_info_box($savemsg);
?>
<section class="col-xs-12">
<? include('system_advanced_tabs.php'); ?>
<? include('system_advanced_tabs.inc'); ?>
<div class="content-box tab-content">
<form action="system_advanced_admin.php" method="post" name="iform" id="iform">
......
......@@ -250,9 +250,7 @@ include("head.inc");
if ($savemsg) print_info_box($savemsg);
?>
<section class="col-xs-12">
<? include('system_advanced_tabs.php'); ?>
<? include('system_advanced_tabs.inc'); ?>
<div class="content-box tab-content">
<form action="system_advanced_firewall.php" method="post" name="iform" id="iform">
......
......@@ -263,7 +263,7 @@ include("head.inc");
if ($savemsg) print_info_box($savemsg);
?>
<section class="col-xs-12">
<? include('system_advanced_tabs.php'); ?>
<? include('system_advanced_tabs.inc'); ?>
<div class="content-box tab-content">
<form action="system_advanced_misc.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area" class="table table-striped">
......
......@@ -172,7 +172,7 @@ include("head.inc");
if ($savemsg) print_info_box($savemsg);
?>
<section class="col-xs-12">
<? include('system_advanced_tabs.php'); ?>
<? include('system_advanced_tabs.inc'); ?>
<div class="content-box tab-content">
<form action="system_advanced_network.php" method="post" name="iform" id="iform">
......
......@@ -169,8 +169,7 @@ include("head.inc");
</form>
<section class="col-xs-12">
<? include('system_advanced_tabs.php'); ?>
<? include('system_advanced_tabs.inc'); ?>
<div class="content-box tab-content">
<form action="system_advanced_notifications.php" method="post" name="iform">
......
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2005-2007 Scott Ullrich
......@@ -133,7 +134,7 @@ include("head.inc");
</form>
<section class="col-xs-12">
<? include('system_advanced_tabs.php'); ?>
<? include('system_advanced_tabs.inc'); ?>
<div class="table-responsive content-box tab-content" style="overflow: auto;">
<?php if ($act != "edit" ): ?>
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area" class="table table-striped">
......
<?php
$active_tab = isset($active_tab) ? $active_tab : $_SERVER['PHP_SELF'];
$tab_array = array();
$tab_array[] = array(gettext("General"), $active_tab == "/system_general.php", "system_general.php");
$tab_array[] = array(gettext("Admin Access"), $active_tab == "/system_advanced_admin.php", "system_advanced_admin.php");
$tab_array[] = array(gettext("Firewall / NAT"), $active_tab == "/system_advanced_firewall.php", "system_advanced_firewall.php");
$tab_array[] = array(gettext("Networking"), $active_tab == "/system_advanced_network.php", "system_advanced_network.php");
$tab_array[] = array(gettext("Miscellaneous"), $active_tab == "/system_advanced_misc.php", "system_advanced_misc.php");
$tab_array[] = array(gettext("System Tunables"), $active_tab == "/system_advanced_sysctl.php", "system_advanced_sysctl.php");
$tab_array[] = array(gettext("Notifications"), $active_tab == "/system_advanced_notifications.php", "system_advanced_notifications.php");
display_top_tabs($tab_array);
<div class="alert alert-info alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<strong><?=gettext("NOTE:"); ?></strong>&nbsp;<?=gettext("The options on this page are intended for use by advanced users only."); ?>
</div>
<?php
$active_tab = isset($active_tab) ? $active_tab : $_SERVER['PHP_SELF'];
$tab_array = array();
$tab_array[] = array(gettext("General"), $active_tab == "/system_general.php", "system_general.php");
$tab_array[] = array(gettext("Admin Access"), $active_tab == "/system_advanced_admin.php", "system_advanced_admin.php");
$tab_array[] = array(gettext("Firewall / NAT"), $active_tab == "/system_advanced_firewall.php", "system_advanced_firewall.php");
$tab_array[] = array(gettext("Networking"), $active_tab == "/system_advanced_network.php", "system_advanced_network.php");
$tab_array[] = array(gettext("Miscellaneous"), $active_tab == "/system_advanced_misc.php", "system_advanced_misc.php");
$tab_array[] = array(gettext("System Tunables"), $active_tab == "/system_advanced_sysctl.php", "system_advanced_sysctl.php");
$tab_array[] = array(gettext("Notifications"), $active_tab == "/system_advanced_notifications.php", "system_advanced_notifications.php");
display_top_tabs($tab_array);
?>
......@@ -287,8 +287,7 @@ include("head.inc");
if ($savemsg) print_info_box($savemsg);
?>
<section class="col-xs-12">
<? include('system_advanced_tabs.php'); ?>
<? include('system_advanced_tabs.inc'); ?>
<div class="content-box tab-content">
<form action="system_general.php" method="post">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment