summaryrefslogtreecommitdiffstats
path: root/ldap-site-mngmt/webinterface/standard_header.inc.php
blob: bf975c90168ffee4c183ef667068d79c6e6ff9bf (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
<?php
session_cache_expire(30);
session_start();

include('lib/config.inc.php');
include('lib/ldap.inc.php');
include('lib/ldap2.inc.php');
include('lib/commonlib.inc.php');
include('syntax_check.php');
include('lib/au_management_functions.php');
include('lib/ip_management_functions.php');
include('lib/host_management_functions.php');
include('lib/dhcp_management_functions.php');
include('lib/rbs_management_functions.php');
include("class.FastTemplate.php");


$uid = $_SESSION['uid'];
$userPassword = $_SESSION['userPassword'];
$userDN = $_SESSION['dn'];
$usercn = $_SESSION['cn'];
$auDN = $_SESSION['audn'];
#echo "auDN: "; print_r($auDN); echo "<br>";
$rollen = $_SESSION['rollen'];
#echo "rollen: "; print_r($rollen); echo "<br>"; 


if (!($ds = uniLdapConnect($uid,$userPassword))){
	echo "<html>
			<head>
				<title>Rechner und IP Management</title>
				<link rel='stylesheet' href='../styles.css' type='text/css'>
			</head>
			<body>
			<table border='0' cellpadding='30' cellspacing='0'> 
			<tr><td>	
			Es konnte keine Verbindung zum LDAP Server hergestellt werden!
			</td></tr></table></body>
			</html>
			";
	die;
}

if ($auDN != ""){

   # AU Daten holen
   $attributes = array("ou","associateddomain","maxipblock","freeipblock","cn","description");
   $au_data = get_au_data($auDN,$attributes);
   $assocdom = $au_data[0]['associateddomain'];
   $au_ou = $au_data[0]['ou'];
   $au_cn = $au_data[0]['cn'];
   $au_desc = $au_data[0]['description'];
   $au_mipb = $au_data[0]['maxipblock'];
   $au_fipb = $au_data[0]['freeipblock'];
   
   # AU Domain Daten holen
   $domain_data = get_domain_data($auDN,array("dn"));
   
   $expAuDn = explode(",",$auDN);
   if ($expAuDn[1] == "ou=RIPM"){
   	$domDN = "ou=DNS,".$suffix;
   }
   else{$domDN = $domain_data[0]['dn']; echo "<br>";}
   
   $domprefix = str_replace('.'.$domsuffix,'',$assocdom);
   # print_r($domprefix);

}

?>