r1117 + done draft for updateVLANMembership()
authorDenis Ovsienko <infrastation@yandex.ru>
Mon, 3 Sep 2007 21:25:54 +0000 (21:25 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 3 Sep 2007 21:25:54 +0000 (21:25 +0000)
inc/ophandlers.php

index 410def3cae6521892ee79cd4018ecce11b17f97f..55721321d37463dd3f271179ee5d7a3c99371bec 100644 (file)
@@ -819,4 +819,23 @@ function useupPort ()
                return "${root}?page=${pageno}&tab=${tabno}&object_id=${object_id}&error=" . urlencode ("Error removing reservation!");
 }
 
+function updateVLANMembership ()
+{
+       global $root, $pageno, $tabno;
+       assertUIntArg ('object_id');
+
+// Fetch current assignment.
+
+       $error_count = $success_count = 0;
+// Find appropriate values in submitted data and submit new values
+// for execution in case of difference found.
+
+// Generate a message depending on error counter and redirect.
+       return
+               "${root}?page=${pageno}&tab=${tabno}&" .
+               ($error_count == 0 ? 'message' : 'error') .
+               "=" . urlencode ("${error_count} failures and ${success_count} successfull changes.");
+
+}
+
 ?>