summaryrefslogtreecommitdiffstats
path: root/ldap-site-mngmt/webinterface/au/child_au.php
blob: 665f1da2f1e7b66c0739230e4aab0088bd74eccc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php

include('../standard_header.inc.php');

# Filename of Template
$webseite = "child_au.dwt";

include('au_header.inc.php');

###############################################################################
# Menus

$mnr = 2;
$sbmnr = -1;

#$sbmnr = $_GET['sbmnr'];

createMainMenu($rollen, $mainnr);
createAUMenu($rollen, $mnr, $auDN, $sbmnr);

###############################################################################
# MainPage Data

$childauDN = $_GET['dn'];

$childau = get_au_data($childauDN,array("dn","cn","ou","associateddomain","description","maxipblock"));
#print_r($childau);

$domprefix = str_replace('.uni-freiburg.de','',$childau[0]['associateddomain']);
#print_r($domprefix);

$template->assign(array("CHILDOU" => $childau[0]['ou'],
								"CHILDCN" => $childau[0]['cn'],
								"CHILDDN" => $childauDN,
								"CHILDDOMAIN" => $domprefix,
								"CHILDDESC" => $childau[0]['description'],
					         "RANGE1" => "",
            		      "RANGE2" => "",
								"AUDN" => $auDN,
								"SBMNR" => $sbmnr));

# MaxIPBlocks
$mipb = $childau[0]['maxipblock'];

# IP Delegs
$template->define_dynamic("Delegs", "Webseite");
#print_r($mipb);
if (count($mipb) > 1){
	foreach ($mipb as $block){
		$exp = explode('_',$block);
		$template->assign(array("RANGE1" => $exp[0],
         		               "RANGE2" => $exp[1]));
  		$template->parse("DELEGS_LIST", ".Delegs");
	}
	$template->clear_dynamic("Delegs");
}elseif(count($mipb) == 1){
	$exp = explode('_',$mipb);
	$template->assign(array("RANGE1" => $exp[0],
      		               "RANGE2" => $exp[1]));
  	$template->parse("DELEGS_LIST", ".Delegs");
  	$template->clear_dynamic("Delegs");
}
$template->assign(array("RANGE1" => "",
         		         "RANGE2" => ""));
$template->parse("DELEGS_LIST", ".Delegs");
#$template->clear_dynamic("Delegs");


###############################################################################
# Footer

include("au_footer.inc.php");

?>