function popup() { //if(GET_CACHED(__FILE__,__FUNCTION__,__FUNCTION__)){return;} $sock = new sockets(); $EnableManageUsersTroughActiveDirectory = $sock->GET_INFO("EnableManageUsersTroughActiveDirectory"); if (!is_numeric($EnableManageUsersTroughActiveDirectory)) { $EnableManageUsersTroughActiveDirectory = 0; } $users = new usersMenus(); if ($EnableManageUsersTroughActiveDirectory == 1) { $ldap = new ldapAD(); $usersnumber = $ldap->COUNT_DE_USERS(); } else { $ldap = new clladp(); $usersnumber = $ldap->COUNT_DE_USERS(); $ldap->ldap_close(); } if ($users->AsArticaAdministrator) { $parameters = "<div style='float:left'>" . Paragraphe("parameters2-64.png", "{organizations_parameters}", "\n\t\t{organizations_parameters_text}", "javascript:Loadjs('domains.organizations.parameters.php')", null, 220, 100) . "</div>"; } $tpl = new templates(); $Totalusers = $tpl->_ENGINE_parse_body("<i>{this_server_store}: <strong>{$usersnumber}</strong> {users}</i>"); $page = CurrentPageName(); $html = "\n\t<div>\n\t\t<div style='font-size:18px'>{my_organizations}</div>\n\t\t<input type='hidden' name='add_new_organisation_text' id='add_new_organisation_text' value='{add_new_organisation_text}'>\n\t\t<table style='width:100%'>\n\t\t<tbody>\n\t\t<tr>\n\t\t<td valign='top' width=1%>{$parameters}</td>\n\t\t<td valign='top' width=99%>\n\t\t\t<div class=explain>\n\t\t\t\t{about_organization}\n\t\t\t\t<div style='font-size:14px;text-align:right;padding-top:5px;padding-right:40px'><span id='countdeusers'>{$Totalusers}</span></div>\n\t\t\t</div>\n\t\t\t\t<table style='width:100%' class=form>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=legend>{organization}:</td>\n\t\t\t\t\t\t<td>" . Field_text("organization-find", $_COOKIE["FINDMYOU"], "font-size:16px", null, null, null, false, "SearchOrgsCheck(event)") . "</td>\n\t\t\t\t\t\t<td width=1%>" . button("{search}", "SearchOrgs()") . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t</td>\n\t\t</tr>\n\t\t</tbody>\n\t\t</table>\n\t\t<center>\n\n\t\t</center>\n\t\t<div id='orgs' style='width:100%;height:450px;overflow:auto;margin-top:10px'></div>\n\t</div>\n\t\n\t<script>\n\t\tfunction SearchOrgs(){\n\t\t\tvar se=escape(document.getElementById('organization-find').value);\n\t\t\tSet_Cookie('FINDMYOU', document.getElementById('organization-find').value, '3600', '/', '', '');\n\t\t\tLoadAjax('orgs','{$page}?ShowOrganizations=yes&search='+se);\n\t\t\t}\n\t\t\t\n\t\tfunction SearchOrgsCheck(e){\n\t\t\tif(checkEnter(e)){SearchOrgs();}\n\t\t}\n\t\tSearchOrgs();\n\t</script>\n"; $tpl = new templates(); $html = $tpl->_ENGINE_parse_body($html); SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html); echo $html; }
function popup() { $users = new usersMenus(); $userClasse = new usersMenus(); $page = CurrentPageName(); $tpl = new templates(); $sock = new sockets(); $ERROR_NO_PRIVS = $tpl->javascript_parse_text("{ERROR_NO_PRIVS}"); $t = time(); $ldap = new clladp(); if ($ldap->IsKerbAuth()) { popup_activedirectory(); return; } if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) { return; } $ZarafaField = "{display: ' ', name : 'Zarafa', width :31, sortable : false, align: 'center'},"; $online_help = $tpl->_ENGINE_parse_body("{online_help}"); $EnableWebProxyStatsAppliance = $sock->GET_INFO("EnableWebProxyStatsAppliance"); if (!is_numeric($EnableWebProxyStatsAppliance)) { $EnableWebProxyStatsAppliance = 0; } if ($EnableWebProxyStatsAppliance == 1) { $userClasse->WEBSTATS_APPLIANCE = true; } if ($userClasse->WEBSTATS_APPLIANCE) { $userClasse->SQUID_INSTALLED = true; } if ($users->ZARAFA_INSTALLED) { $ZarafaEnableServer = $sock->GET_INFO("ZarafaEnableServer"); if (!is_numeric($ZarafaEnableServer)) { $ZarafaEnableServer = 1; } if ($ZarafaEnableServer == 1) { if ($users->AsMailBoxAdministrator) { $ZarafaField = "{display: '<span style=font-size:20px>Zarafa</span>', name : 'Zarafa', width :98, sortable : false, align: 'center'},"; $ZarafaUri = "&zarafaF=1"; $help = "{name: '{$online_help}', bclass: 'Help', onpress : Zhelp{$t}},"; } } } $EnableManageUsersTroughActiveDirectory = $sock->GET_INFO("EnableManageUsersTroughActiveDirectory"); if (!is_numeric($EnableManageUsersTroughActiveDirectory)) { $EnableManageUsersTroughActiveDirectory = 0; } $users = new usersMenus(); if ($EnableManageUsersTroughActiveDirectory == 1) { $ldap = new ldapAD(); $usersnumber = $ldap->COUNT_DE_USERS(); } else { $ldap = new clladp(); $usersnumber = $ldap->COUNT_DE_USERS(); $ldap->ldap_close(); } $Totalusers = $tpl->_ENGINE_parse_body("{my_organizations}::<i>{this_server_store}: <strong>{$usersnumber}</strong> {users}</i>"); $organizations_parameters = $tpl->_ENGINE_parse_body("{organizations_parameters}"); $add_new_organisation = $tpl->_ENGINE_parse_body("{add_new_organisation}"); $organizations = $tpl->_ENGINE_parse_body("{organizations}"); $users = $tpl->_ENGINE_parse_body("{users}"); $groupsF = $tpl->_ENGINE_parse_body("{groupsF}"); $domains = $tpl->_ENGINE_parse_body("{domains}"); $actions = $tpl->_ENGINE_parse_body("{actions}"); $add_new_organisation_text = $tpl->javascript_parse_text("{add_new_organisation_text}"); $update = $tpl->_ENGINE_parse_body("{update2}"); if ($users->AsArticaAdministrator) { $parametersBT = "{name: '<strong style=font-size:18px>{$organizations_parameters}</strong>', bclass: 'Reconf', onpress : organizations_parameters},"; } if (butadm() != null) { $jsadd = "TreeAddNewOrganisation{$t}"; } else { $jsadd = "nothingtodo"; } $bb = "<input type='hidden' name='add_new_organisation_text' id='add_new_organisation_text' value='" . $tpl->javascript_parse_text("{add_new_organisation_text}") . "'>"; if (isset($_GET["ajaxmenu"])) { $bc = "&ajaxmenu=yes"; } $bt_add_new = "{name: '<strong style=font-size:18px>{$add_new_organisation}</strong>', bclass: 'add', onpress : {$jsadd}},"; $ldap = new clladp(); if ($ldap->IsKerbAuth()) { $bt_add_new = null; $Totalusers = $tpl->_ENGINE_parse_body("{my_organizations}"); } else { $TEXT_TO_CSV = $tpl->_ENGINE_parse_body("{TEXT_TO_CSV}"); $CsvToLdap = "{name: '<strong style=font-size:18px>{$TEXT_TO_CSV}</strong>', bclass: 'Copy', onpress : TEXT_TO_CSV},"; } $buttons = "\n\tbuttons : [\n\t{$bt_add_new}{$parametersBT}{$CsvToLdap}\n\t\t],"; $html = "\n\t{$bb}\n\t<input type='hidden' name='MAIN_PAGE_ORGANIZATION_LIST' id='MAIN_PAGE_ORGANIZATION_LIST' value='{$t}'>\n\t<table class='table-{$t}' style='display: none' id='table-{$t}' style='width:100%;margin:-10px'></table>\n<script>\nOUIDMEM='';\n\$(document).ready(function(){\n\$('#table-{$t}').flexigrid({\n\turl: '{$page}?ShowOrganizations=yes&t={$t}{$ZarafaUri}{$bc}',\n\tdataType: 'json',\n\tcolModel : [\n\t\t\n\t\t{display: '<span style=font-size:20px>{$organizations}</span>', name : 'ou', width :237, sortable : false, align: 'left'},\n\t\t{$ZarafaField}\n\t\t{display: '<span style=font-size:20px>{$users}</span>', name : 'users', width :153, sortable : false, align: 'center'},\n\t\t{display: '<span style=font-size:20px> </span>', name : 'nonex1', width : 50, sortable : false, align: 'center'},\n\t\t{display: '<span style=font-size:20px>{$groupsF}</span>', name : 'groups', width : 153, sortable : false, align: 'center'},\n\t\t{display: '<span style=font-size:20px> </span>', name : 'nonex2', width : 50, sortable : false, align: 'center'},\n\t\t{display: '<span style=font-size:20px>{$domains}</span>', name : 'domains', width : 153, sortable : false, align: 'center'},\n\t\t{display: '<span style=font-size:20px> </span>', name : 'nonex3', width : 50, sortable : false, align: 'center'},\t\t\n\t\t{display: '<span style=font-size:20px> </span>', name : 'nonex4', width : 50, sortable : false, align: 'center'},\n\t\t{display: '<span style=font-size:20px> </span>', name : 'nonex5', width : 50, sortable : false, align: 'center'},\n\t\t\n\t\t{display: ' ', name : 'none1', width : 31, sortable : false, align: 'left'},\n\t],\n\t{$buttons}\n\n\tsearchitems : [\n\t\t{display: '{$organizations}', name : 'ou'},\n\t\t],\n\tsortname: 'ou',\n\tsortorder: 'desc',\n\tusepager: true,\n\ttitle: '<span style=font-size:30px>{$Totalusers}</span>',\n\tuseRp: false,\n\trp: 50,\n\tshowTableToggleBtn: false,\n\twidth: '99%',\n\theight: 320,\n\tsingleSelect: true\n\t\n\t}); \n});\n\nfunction Zhelp{$t}(){\n\ts_PopUpFull('http://www.mail-appliance.org/index.php?cID=202','1024','900');\n}\n\nfunction ActiveDirectorySquid{$t}(){\n\tLoadjs('squid.adker.php',true);\n}\n\nfunction TEXT_TO_CSV(){\n\tLoadjs('csvToLdap.php',true);\n}\n\n\tvar x_TreeAddNewOrganisation{$t}= function (obj) {\n\t\tvar response=obj.responseText;\n\t\tif(response){alert(response);}\n\t\t\$('#table-{$t}').flexReload();\n\t}\n\t\n\tfunction TreeAddNewOrganisation{$t}(){\n\t\tvar texte='{$add_new_organisation_text}'\n\t\tvar org=prompt(texte,'');\n\t\tif(org){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('TreeAddNewOrganisation',org);\n\t\t\tXHR.sendAndLoad('domains.php', 'GET',x_TreeAddNewOrganisation{$t});\n\t\t\t}\n\t}\n\n\t\tfunction organizations_parameters(){\n\t\t\tLoadjs('domains.organizations.parameters.php');\n\t\t\t\n\t\t}\n\t\t\n\t\tfunction ActiveDirectoryUpdate{$t}(){\n\t\t\tLoadjs('domains.activedirectory.update.php?flexigrid=table-{$t}');\n\t\t}\n\t\t\n\t\tfunction nothingtodo(){\n\t\t\talert('{$ERROR_NO_PRIVS}');\n\t\t}\n\n</script>\n" . $tpl->_ENGINE_parse_body("<div class=explain>{about_organization}</div>"); $tpl = new templates(); $html = $tpl->_ENGINE_parse_body($html); SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html); echo $html; }