function page() { $page = CurrentPageName(); $tpl = new templates(); $sock = new sockets(); $ldap = new clladp(); $t = time(); $Green = "#005447"; $ForceDefaultGreenColor = $sock->GET_INFO("ForceDefaultGreenColor"); if ($ForceDefaultGreenColor != null) { $Green = $ForceDefaultGreenColor; } $skinf = dirname(__FILE__) . "/ressources/templates/{$_COOKIE["artica-template"]}/top-bar-color.conf"; if (is_file($skinf)) { $Green = @file_get_contents($skinf); } $IsKerbAuth = $ldap->IsKerbAuth(); $default_search = "*"; if (isset($_SESSION["SEARCH_GROUPS_MEMORY"])) { $default_search = $_SESSION["SEARCH_GROUPS_MEMORY"]; } $field_search = Field_autocomplete("search-users-{$t}", "shadow:" . $tpl->_ENGINE_parse_body("{search_groups}"), "font-size:28px;width:99%", "{$page}", "SearchEnter{$t}(event)", "Search{$t}"); $add_icon = "\n\t<div style='float:right;margin-top:3px;margin-right:5px;'>\n\t<table>\n\t<tr><td style='vertical-align:middle;font-size:18px;color:white;'>\n\t« <a href=\"javascript:blur();\"\n\tOnClick=\"javascript:GotoMembersSearch();\"\n\tstyle='font-size:18px;text-decoration:underline;color:white'>{search_members}</a> »</td>"; $ldap = new clladp(); if ($IsKerbAuth == 0) { $add_icon = $add_icon . "<td style='vertical-align:middle'>" . imgtootltip("add-42-white.png", "{new_group}", "Loadjs('domains.edit.group.php?popup-add-group=yes&CallBackFunction=Search{$t}')") . "</td>"; } $html = "\n\t<div style='width:100%;padding:5px;'>{$field_search}</div>\n\t<div style='height:50px;background-color:{$Green};color:white;padding-left:15px;\n\tfont-size:38px;\n\t -webkit-border-radius: 5px 5px 0 0;\n -moz-border-radius: 5px 5px 0 0;\n border-radius: 5px 5px 0 0;vertical-align:middle\n\t'>\n\t\t{$add_icon}</td></table></div>\n\t\t{groups2} <span id='title-{$t}'></span>\n\t</div>\n\t<div id='search-{$t}' style='width:99.8%;margin-top:2px;border:1px solid #CCCCCC;-webkit-border-radius: 5px 5px 0 0;\n -moz-border-radius: 5px 5px 0 0;\n border-radius: 5px 5px 0 0;'></div>\n \n \n \n <script>\n \tfunction SearchEnter{$t}(e){\n \t\tif(!checkEnter(e)){return;}\n \t\tSearch{$t}();\n \t}\n \t\n \tfunction Search{$t}(query){\n \t\tif(!query){\n \t\t\tquery=document.getElementById('search-users-{$t}').value\n \t\t}\n \t\t\n \t\tLoadAjaxSilent('search-{$t}','{$page}?search='+encodeURIComponent(query)+'&t={$t}');\n \t\n \t}\n \t\n \tSearch{$t}('{$default_search}');\n \t\n </script> \n \n\t"; echo $tpl->_ENGINE_parse_body($html); }
function page() { $page = CurrentPageName(); $tpl = new templates(); $t = time(); $Green = "#005447"; $skinf = dirname(__FILE__) . "/ressources/templates/{$_COOKIE["artica-template"]}/top-bar-color.conf"; if (is_file($skinf)) { $Green = @file_get_contents($skinf); } $default_search = "*"; if (isset($_SESSION["SEARCH_MEMBER_MEMORY"])) { $default_search = $_SESSION["SEARCH_MEMBER_MEMORY"]; } $field_search = Field_autocomplete("search-users-{$t}", "shadow:" . $tpl->_ENGINE_parse_body("{search_members}"), "font-size:28px;width:99%", "{$page}", "SearchEnter{$t}(event)", "Search{$t}"); $ldap = new clladp(); $add_icon = "<div style='float:right;margin-top:3px;margin-right:5px;'>" . imgtootltip("add-42-white.png", "{new_member}", "Loadjs('create-user.php?CallBackFunction=Search{$t}')") . "</div>"; $IsKerbAuth = $ldap->IsKerbAuth(); if ($IsKerbAuth) { $add_icon = null; } $html = "\n\t<div style='width:100%;padding:5px;'>{$field_search}</div>\n\t<div style='height:50px;background-color:{$Green};color:white;padding-left:15px;\n\tfont-size:38px;\n\t -webkit-border-radius: 5px 5px 0 0;\n -moz-border-radius: 5px 5px 0 0;\n border-radius: 5px 5px 0 0;vertical-align:middle\n\t'>\n\t\t{$add_icon}\n\t\t{members} <span id='title-{$t}'></span>\n\t</div>\n\t<div id='search-{$t}' style='width:99.8%;margin-top:2px;border:1px solid #CCCCCC;-webkit-border-radius: 5px 5px 0 0;\n -moz-border-radius: 5px 5px 0 0;\n border-radius: 5px 5px 0 0;'></div>\n \n \n \n <script>\n \tfunction SearchEnter{$t}(e){\n \t\tif(!checkEnter(e)){return;}\n \t\tSearch{$t}();\n \t}\n \t\n \tfunction Search{$t}(query){\n \t\tif(!query){\n \t\t\tquery=document.getElementById('search-users-{$t}').value\n \t\t}\n \t\t\n \t\tLoadAjaxSilent('search-{$t}','{$page}?search='+encodeURIComponent(query)+'&t={$t}');\n \t\n \t}\n \t\n \tSearch{$t}('{$default_search}');\n \t\n </script> \n \n\t"; echo $tpl->_ENGINE_parse_body($html); }