include_once 'ressources/class.system.network.inc';
include_once 'ressources/class.tcpip.inc';
$users = new usersMenus();
if (!$users->AsSystemAdministrator) {
    die("alert('no access');");
}
if (isset($_GET["route-add-js"])) {
    route_add_js();
    exit;
}
if (isset($_GET["route-add-popup"])) {
    route_add_popup();
    exit;
}
if (isset($_GET["search"])) {
    routes_list();
    exit;
}
if (isset($_POST["ROUTE_SHOULD_BE"])) {
    ROUTE_SHOULD_BE();
    exit;
}
if (isset($_POST["ROUTE_FROM"])) {
    routes_add();
    exit;
}
if (isset($_POST["DELETE_ROUTE_FROM"])) {
    routes_delete();
    exit;
}
routes();
Example #2
0
function routes_settings()
{
    $list = routes_list(1);
    $html = "\n\t<div class=explain>{routes_explain}</div>\n\t<table style='width:99%' class=form>\n\t <tr>\n\t \t<td class=legend>{from_ip_address}:</td>\n\t \t<td>" . Field_text('ROUTE_FROM', null, 'width:110px;font-size:16px;padding:3px', null, 'RouteShouldbe()', null, false, 'RouteShouldbe()') . "</td>\n\t </tr>\n\t<tr>\n\t \t<td class=legend>{netmask}:</td>\n\t \t<td>" . Field_text('ROUTE_MASK', null, 'width:110px;font-size:16px;padding:3px') . "</td>\n\t </tr>\t\n\t<tr>\n\t<td colspan=2 class='legend' style='padding-right:50px'><span id='shouldbe'></span></td>\n\t<tr>\n\t\t<td colspan=2 align='right' ><hr>" . button("{add}", "OpenVpnAddRoute()") . "</td>\n\t</tr>\n\t</table>\n\t<br>\n\t<div style='width:100%;height:150px;overflow:auto' id='routeslist'>{$list}</div>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Example #3
0
function routes_settings()
{
    $list = routes_list(1);
    $html = "<H1>{additional_routes}</H1>\n\t<p class=caption>{routes_explain}</p>\n\t<table style='width:100%' class=table_form>\n\t <tr>\n\t \t<td class=legend>{from_ip_address}:</td>\n\t \t<td>" . Field_text('ROUTE_FROM', null, 'width:210px', null, 'RouteShouldbe()', null, false, 'RouteShouldbe()') . "</td>\n\t </tr>\n\t<tr>\n\t \t<td class=legend>{netmask}:</td>\n\t \t<td>" . Field_text('ROUTE_MASK', null, 'width:210px') . "</td>\n\t </tr>\t\n\t<tr>\n\t<td colspan=2 class='legend' style='padding-right:50px'><span id='shouldbe'></span></td>\n\t<tr>\n\t\t<td colspan=2 align='right' ><input type='button' Onclick=\"javascript:OpenVpnAddRoute();\" value='{add}&nbsp;&raquo;'></td>\n\t</tr>\n\t</table><br>\n\t" . RoundedLightWhite("<div style='width:100%;height:150px;overflow:auto' id='routeslist'>{$list}</div>");
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}