-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin_tools.php
executable file
·61 lines (42 loc) · 1.52 KB
/
admin_tools.php
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
<?php
/**
* @package arcanum
* @version $Id: admin_tools.php 5628 2012-05-04 11:09:00Z avel $
*/
$initLocation = 'admin_tools';
require_once('include/init.php');
include_once('Zend/Ldap/Attribute.php');
include_once('include/Arcanum_Ldap_Attribute_Formatter.php');
$msgs = array();
$arcanumLdap = new Arcanum_Ldap();
$ldap = $arcanumLdap->connect();
/*
if(isset($_POST['apply'])) {
if( ldap_modify($ldap, $dn, $ldapmod) === false ) {
$msgs[] = array('class' => 'error', 'msg' => 'Ενημέρωση Πολιτικής Απέτυχε — ' . ldap_error($ldap));
} else {
$msgs[] = array('class' => 'success', 'msg' => 'Ενημέρωση Πολιτικής Επιτυχής');
}
}
$sr = ldap_search($ldap, $config->ldap->basedn, '(objectclass=pwdpolicy)',
array_merge(array('cn'), array_keys($arcanumLdap->policyAttributes)) );
$policies = ldap_get_entries($ldap, $sr);
if($policies['count'] == 0 ) {
$msgs[] = array('class' => 'error', 'msg' => 'Δεν υπάρχουν ορισμένες πολιτικές κωδικών στον LDAP Server.');
}
*/
// ================= Display =================
$t->assign('msgs', $msgs);
$t->assign('javascripts', $defaultJavascripts);
$t->display('html_header');
$t->display('page_header');
$t->display('navigation_admin');
if(!empty($msgs)) {
$t->display('alert_messages');
}
echo '<div class="row">';
echo '<div class="twelve columns">';
$t->display('admin_tools');
echo '</div></div>';
$t->display('page_footer');
$t->display('html_footer');