summaryrefslogtreecommitdiffstats
path: root/ldap-site-mngmt/webinterface/common/ip_blocks.inc.php
diff options
context:
space:
mode:
authorTarik Gasmi2007-09-27 16:40:23 +0200
committerTarik Gasmi2007-09-27 16:40:23 +0200
commitecc473303fbee5f5466d2477157b5fd682357003 (patch)
tree2776e2d1d44543e60e15fba30d98d630a551c59c /ldap-site-mngmt/webinterface/common/ip_blocks.inc.php
parentAdded text to PXE image "please select" and "use arrow keys". Dirks idea. (diff)
downloadcore-ecc473303fbee5f5466d2477157b5fd682357003.tar.gz
core-ecc473303fbee5f5466d2477157b5fd682357003.tar.xz
core-ecc473303fbee5f5466d2477157b5fd682357003.zip
Reorganized LSM Webinterface
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1353 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'ldap-site-mngmt/webinterface/common/ip_blocks.inc.php')
-rw-r--r--ldap-site-mngmt/webinterface/common/ip_blocks.inc.php70
1 files changed, 70 insertions, 0 deletions
diff --git a/ldap-site-mngmt/webinterface/common/ip_blocks.inc.php b/ldap-site-mngmt/webinterface/common/ip_blocks.inc.php
new file mode 100644
index 00000000..b1343d3b
--- /dev/null
+++ b/ldap-site-mngmt/webinterface/common/ip_blocks.inc.php
@@ -0,0 +1,70 @@
+<?php
+
+# Max und Free IP Blocks
+$mipb_array = get_maxipblocks_au($auDN);
+$fipb_array = get_freeipblocks_au($auDN);
+#print_r(count($mipb_array)); echo "<br>";
+#print_r(count($fipb_array)); echo "<br>";
+$ipblocks = "";
+
+# print_r($mipb_array);
+if ($mipb_array[0] != "" ){
+ if (count($mipb_array) > 1 ){
+ $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'>
+ <tr><td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>
+ <b>Zugewiesene IP Bereiche:</b></td></tr>";
+ foreach ($mipb_array as $mipb){
+ $exp = explode('_',$mipb);
+ $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0]&nbsp;</td>
+ <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td>
+ <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1]&nbsp;</td></td></tr>";
+ }
+ }
+ elseif (count($mipb_array) == 1){
+ $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'>
+ <tr><td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>
+ <b>Zugewiesener IP Bereich:</b></td></tr>";
+ $exp = explode('_',$mipb_array[0]);
+ $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0]&nbsp;</td>
+ <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td>
+ <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1]&nbsp;</td></tr>";
+ }
+ elseif( $fipb_array[0] == "" ){
+ $ipblocks .= "<table border='0' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'>
+ <tr><td><b>Keine IP Adressen mehr verf&uuml;gbar</b></td></tr>";
+ }
+ if (count($fipb_array) > 1 ){
+ $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'>
+ <tr valign='bottom' height='40'>
+ <td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>
+ <b>Davon noch frei verf&uuml;gbar:</b></td></tr>";
+ foreach ($fipb_array as $fipb){
+ $exp = explode('_',$fipb);
+ $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0]&nbsp;</td>
+ <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td>
+ <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1]&nbsp;</td></tr>";
+ }
+ }
+ elseif (count($fipb_array) == 1){
+ $ipblocks .= "<table border='1' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'>
+ <tr valign='bottom' height='40'>
+ <td colspan='3' style='border-color: black; border-style: solid; border-width: 0 0 3 0;'>
+ <b>Davon noch frei verf&uuml;gbar:</b></td></tr>";
+ $exp = explode('_',$fipb_array[0]);
+ $ipblocks .= "<tr><td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[0]&nbsp;</td>
+ <td style='border-color: black; border-style: solid; border-width: 0 0 1 0;'> - </td>
+ <td width='45%' style='border-color: black; border-style: solid; border-width: 0 0 1 0;'>$exp[1]&nbsp;</td></tr>";
+ }
+
+}
+
+if( $mipb_array[0] == "" ){
+ $ipblocks .= "<table border='0' cellpadding='2' cellspacing='0' width='100%' style='border-width: 0 0 0 0;'>
+ <tr valign='bottom' height='40'>
+ <td><b>Ihnen wurden keine IP Adressen zugewiesen</b></td></tr>";
+}
+$ipblocks .= "</table>";
+
+$template->assign(array("IPBLOCKS" => $ipblocks));
+
+?> \ No newline at end of file