diff options
Diffstat (limited to 'ldap-site-mngmt/webinterface/common')
-rw-r--r-- | ldap-site-mngmt/webinterface/common/ip_blocks.inc.php | 70 | ||||
-rw-r--r-- | ldap-site-mngmt/webinterface/common/ipblocks.dwt | 11 |
2 files changed, 81 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] </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] </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] </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] </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ü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ü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] </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] </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ü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] </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] </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 diff --git a/ldap-site-mngmt/webinterface/common/ipblocks.dwt b/ldap-site-mngmt/webinterface/common/ipblocks.dwt new file mode 100644 index 00000000..b77f53b3 --- /dev/null +++ b/ldap-site-mngmt/webinterface/common/ipblocks.dwt @@ -0,0 +1,11 @@ +<table cellpadding='5' cellspacing='0' border='1' width='100%' style='border-width: 0 0 0 0;'> + + <tr align='left'>
+ <td width='8%'></td>
+ <td width='82%' style='border-color: black; border-style: solid; border-width: 1 1 1 1;'>{IPBLOCKS}</td> + <td width='10%'></td> + + </tr> + <tr height='5'></tr>
+ +</table>
\ No newline at end of file |