global $smarty;
global $users; //contains the users for manager role
- $sr = ldap_search($LDAP_CON,$dn,'(objectClass=inetOrgPerson)');
- if(!ldap_count_entries($LDAP_CON,$sr)){
+ $sr = @ldap_search($LDAP_CON,$dn,'(objectClass=inetOrgPerson)');
+ tpl_ldaperror();
+ if(!@ldap_count_entries($LDAP_CON,$sr)){
return false;
}
$result = ldap_get_binentries($LDAP_CON, $sr);
$result2 = array();
// public addressbook
- $sr = ldap_list($LDAP_CON,$conf['publicbook'],
- $filter,$types);
+ $sr = @ldap_list($LDAP_CON,$conf['publicbook'],
+ $filter,$types);
+ tpl_ldaperror();
$result1 = ldap_get_binentries($LDAP_CON, $sr);
ldap_free_result($sr);
$sr = @ldap_list($LDAP_CON,$conf['privatebook'].
','.$_SESSION['ldapab']['binddn'],
$filter,$types);
+ tpl_ldaperror();
$result2 = ldap_get_binentries($LDAP_CON, $sr);
}
if(!empty($message)){
$__LDAPERROR__ .= "($message)";
}
- $__LDAPERROR__ .= '\n';
}
$smarty->assign("LDAPERRORS",$__LDAPERROR__);
}
a.cloud_5 {font-size: 180%; }
a.cloud_6 {font-size: 200%; }
+
+div.ldaperror {
+ border: 1px solid #c33;
+ background: #fcc url(../pix/ldaperror.png) 10px 10px no-repeat;
+ width: 50%;
+ position: absolute;
+ z-index: 555;
+ top: 20%;
+ left: 25%;
+ padding: 0.5em 0.5em 1em 80px;
+ height: auto !important;
+ height: 60px;
+ min-height: 60px;
+ opacity: 0.9;
+ cursor: pointer;
+}
+
<script src="scripts/gui.js" type="text/javascript"></script>
<script type="text/javascript">
- {if $LDAPERRORS != ''}
- window.alert('{$lang.err_ldap}:\n\n{$LDAPERRORS|escape:quotes}');
- {/if}
{if $entry.dn}
DN = '{$entry.dn|escape:javascript}';
{/if}
<body>
<div id="ldapab">
+ {if $LDAPERRORS != ''}
+ <div class="ldaperror" onclick="this.style.display = 'none'">
+ <h3>{$lang.err_ldap}</h3>
+ <p>{$LDAPERRORS|escape}</p>
+ </div>
+ {/if}
+
<div id="titlerow">
<div class="logo">
background: url(../pix/tag_blue.png) left center no-repeat;
padding-left: 18px;
}
+