summaryrefslogtreecommitdiffstats
path: root/ldap-site-mngmt/webinterface/ip/ip_deleg.php
blob: dafdaff66fb7e8ed6a8923ca3479bd6301ec99f9 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php

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

# 1. Seitentitel - wird in der Titelleiste des Browser angezeigt. 
$titel = "IP Address Management";
# 2. Nummer des zugehörigen Hauptmenus (Registerkarte) beginnend bei 0, siehe Dokumentation.doc.
$mainnr = 2;
$mnr = 3; 
# 3. Dateiname und evtl. Pfad des Templates für die Webseite
$webseite = "ip_deleg.dwt";

include("../class.FastTemplate.php");

include("ip_header.inc.php");

#############################################################################

# Menuleiste erstellen
createMainMenu($rollen, $mainnr);
createIPMenu($rollen, $mnr);

include("ip_blocks.inc.php");


#############################################################################

$template->assign(array("CHILDOU" => "Noch keine untergeordnete AU angelegt",
					         "RANGE1" => "",
            		      "RANGE2" => "",
            		      "CHILDDN" => ""));
		
$childau_array = get_childau($auDN,array("dn","ou","maxipblock"));
# print_r ($childau_array);

$template->define_dynamic("Delegs", "Webseite");
$template->define_dynamic("AUs", "Webseite");

foreach ($childau_array as $childau){
	
	$template->clear_parse("DELEGS_LIST");
	if ( count($childau['maxipblock']) > 1 ){
		foreach ($childau['maxipblock'] as $j){
			$exp = explode('_',$j);
			$template->assign(array("CHILDOU" => $childau['ou'],
					                  "RANGE1" => $exp[0],
            		               "RANGE2" => $exp[1],
            		               "CHILDDN" => $childau['dn'],
            		            	"AUDN" => $auDN));
     		$template->parse("DELEGS_LIST", ".Delegs");
     		$template->clear_dynamic("Delegs");
   	}
  		$template->assign(array("CHILDOU" => $childau['ou'],
					               "RANGE1" => "",
            		            "RANGE2" => "",
            		            "CHILDDN" => $childau['dn'],
            		          	"AUDN" => $auDN));
		$template->parse("DELEGS_LIST", ".Delegs");
		$template->clear_dynamic("Delegs");
		$template->assign(array("OU" => $childau['ou']));
		$template->parse("AUS_LIST", ".AUs");
   	
   }elseif ( count($childau['maxipblock']) == 1 ){
   	
   	$exp = explode('_',$childau['maxipblock']);
		$template->assign(array("CHILDOU" => $childau['ou'],
					                  "RANGE1" => $exp[0],
            		               "RANGE2" => $exp[1],
            		               "CHILDDN" => $childau['dn'],
            		            	"AUDN" => $auDN));
		$template->parse("DELEGS_LIST", ".Delegs");
		$template->clear_dynamic("Delegs");
		$template->assign(array("CHILDOU" => $childau['ou'],
					               "RANGE1" => "",
            		            "RANGE2" => "",
            		            "CHILDDN" => $childau['dn'],
            		          	"AUDN" => $auDN));
		$template->parse("DELEGS_LIST", ".Delegs");
		$template->clear_dynamic("Delegs");
		$template->assign(array("OU" => $childau['ou']));
		$template->parse("AUS_LIST", ".AUs");
  		
	}else{
			$template->assign(array("CHILDOU" => $childau['ou'],
					                  "RANGE1" => "",
            		               "RANGE2" => "",
            		               "CHILDDN" => $childau['dn'],
            		            	"AUDN" => $auDN));
			$template->parse("DELEGS_LIST", ".Delegs");
			$template->clear_dynamic("Delegs");
			$template->assign(array("OU" => $childau['ou']));
			$template->parse("AUS_LIST", ".AUs");
	}
	
}


#####################################################################################

include("ip_footer.inc.php");

?>