Exemplo n.º 1
0
    exit;
}
if (isset($_GET["routes-icons"])) {
    routes_icons();
    exit;
}
if (isset($_GET["routes-popup-add"])) {
    routes_popup_add();
    exit;
}
if (isset($_GET["routes-listes"])) {
    routes_listes();
    exit;
}
if (isset($_GET["del-route"])) {
    routes_del();
    exit;
}
popup();
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $add_new_route_text = $tpl->_ENGINE_parse_body("{add_new_route_text}");
    $html = "<p class=text-error>{routes_goto_miniadm}</p>";
    echo $tpl->_ENGINE_parse_body($html);
}
function routes_listes()
{
    $tpl = new templates();
    $html = "<p class=text-error>{routes_goto_miniadm}</p>";
Exemplo n.º 2
0
    exit;
}
if ($argv[1] == "--bridges") {
    bridges_build();
    exit;
}
if ($argv[1] == "--parse-tests") {
    ifconfig_parse($argv[2]);
    exit;
}
if ($argv[1] == "--routes") {
    routes();
    exit;
}
if ($argv[1] == "--routes-del") {
    routes_del($argv[2]);
    exit;
}
if ($argv[1] == "--vlans") {
    build();
    exit;
}
if ($argv[1] == "--postfix-instances") {
    postfix_multiples_instances();
    exit;
}
if ($argv[1] == "--ping") {
    ping($argv[2]);
    exit;
}
if ($argv[1] == "--ipv6") {
Exemplo n.º 3
0
include_once(dirname(__FILE__) . '/ressources/class.ldap.inc');
include_once(dirname(__FILE__) . '/ressources/class.templates.inc');
include_once(dirname(__FILE__) . '/framework/class.unix.inc');
include_once(dirname(__FILE__) . '/framework/frame.class.inc');
include_once(dirname(__FILE__) . '/ressources/class.system.network.inc');
include_once(dirname(__FILE__) . '/ressources/class.system.nics.inc');

if(posix_getuid()<>0){die("Cannot be used in web server mode\n\n");}
if(preg_match("#--verbose#",implode(" ",$argv))){$GLOBALS["VERBOSE"]=true;ini_set_verbosed();}
if($argv[1]=="--interfaces"){interfaces_show();die();}
if($argv[1]=="--just-add"){routes();die();}
if($argv[1]=="--ifconfig"){ifconfig_tests();exit;}
if($argv[1]=="--bridges"){bridges_build();exit;}
if($argv[1]=="--parse-tests"){ifconfig_parse($argv[2]);exit;}
if($argv[1]=="--routes"){routes();exit;}
if($argv[1]=="--routes-del"){routes_del($argv[2]);exit;}
if($argv[1]=="--vlans"){build();exit;}
if($argv[1]=="--postfix-instances"){postfix_multiples_instances();exit;}
if($argv[1]=="--ping"){ping($argv[2]);exit;}
if($argv[1]=="--ipv6"){Checkipv6();exit;}




build();

//
//vconfig set_flag eth1.3 1 1
//vconfig set_flag eth1.4 1 1

//http://www.cyberciti.biz/tips/howto-configure-linux-virtual-local-area-network-vlan.html