X-Git-Url: http://git.pjr.cc/?p=configmanager.git;a=blobdiff_plain;f=lib%2Fwww.php;fp=lib%2Fwww.php;h=de4b337e2fc442b7f9ffb713f040be3a2cd44647;hp=0000000000000000000000000000000000000000;hb=336d9ee4a2c84e3029a7f40b4ac759d592733c78;hpb=dd52ff631f77ae7d5bf4193119d2412ab8dfddf7 diff --git a/lib/www.php b/lib/www.php new file mode 100644 index 0000000..de4b337 --- /dev/null +++ b/lib/www.php @@ -0,0 +1,133 @@ + + +Network Config Manager + + + + + +

Network Config Manager

+ + +
Copyright 2003-2011, Paul J Robinson
+ + + $name
"; + } +} + +function www_body() +{ + global $FUNCTIONS; + + $called = false; + if(isset($_REQUEST["action"])) { + $req = $_REQUEST["action"]; + if(isset($FUNCTIONS["$req"])) { + $func = $FUNCTIONS["$req"]; + if(function_exists($func)) { + $func(); + return true; + } + } + } + + $db = db_getDB(); + + // here we do the normal body, whatever that + // we'll list the hosts, the size of the current config and + // the last time it was updated, plus the number of versions + +} + +function www_hostTypesDropDown() +{ + global $HOST_TYPE; + + foreach($HOST_TYPE as $tloop => $types) { + $typename = $types["name"]; + $typever = $tloop; + echo ""; + } +} + +function www_addhost() +{ + ?> +
+ + + + +
Name
Hostname/IP Address
Host Type
+ +
+ "; + $func(); + echo ""; + } else echo "would call $func for $htype but it doesnt exist\n"; + } +} + +function www_addHostStageThree() +{ + global $HOST_TYPE; + if(isset($_REQUEST["hosttype"])) { + $htype = $_REQUEST["htype"]; + $func = $HOST_TYPE["$htype"]["postfunction"]; + if(function_exists($func)) { + $func(); + } else echo "would call $func for $htype but it doesnt exist\n"; + } + +} +?> \ No newline at end of file