当前位置: 首页>>代码示例>>PHP>>正文


PHP clladp::IsKerbAuth方法代码示例

本文整理汇总了PHP中clladp::IsKerbAuth方法的典型用法代码示例。如果您正苦于以下问题:PHP clladp::IsKerbAuth方法的具体用法?PHP clladp::IsKerbAuth怎么用?PHP clladp::IsKerbAuth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在clladp的用法示例。


在下文中一共展示了clladp::IsKerbAuth方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: start_parse

function start_parse()
{
    if ($GLOBALS["VERBOSE"]) {
        "echo Loading...\n";
    }
    $unix = new unix();
    if ($GLOBALS["VERBOSE"]) {
        "echo Loading done...\n";
    }
    $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    $timefile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".time";
    $pid = @file_get_contents($pidfile);
    if (!$GLOBALS["FORCE"]) {
        if ($pid < 100) {
            $pid = null;
        }
        $unix = new unix();
        if ($unix->process_exists($pid, basename(__FILE__))) {
            if ($GLOBALS["VERBOSE"]) {
                echo "Already executed pid {$pid}\n";
            }
            return;
        }
        $timeexec = $unix->file_time_min($timefile);
        if ($timeexec < 10) {
            return;
        }
        $mypid = getmypid();
        @file_put_contents($pidfile, $mypid);
    }
    @unlink($timefile);
    @file_put_contents($timefile, time());
    $ldap = new clladp();
    if (!$ldap->IsKerbAuth()) {
        return;
    }
    $q = new mysql_squid_builder();
    $sql = "SELECT ID,GroupName FROM webfilters_sqgroups WHERE `enabled`=1 AND `GroupType`='proxy_auth_statad'";
    $results = $q->QUERY_SQL($sql);
    $REFRESH = false;
    $Count = mysql_num_rows($results);
    $UPDATED = array();
    while ($ligne = mysql_fetch_assoc($results)) {
        if (parse_object($ligne["ID"], $ligne["GroupName"])) {
            $UPDATED[] = $ligne["GroupName"];
            $REFRESH = true;
        }
    }
    if ($REFRESH) {
        squid_admin_mysql(1, "Reloading proxy service after updating " . count($UPDATED) . " Active Directory group(s)", @implode("\n", $UPDATED), __FILE__, __LINE__);
        $squid = $unix->LOCATE_SQUID_BIN();
        system("/etc/init.d/squid reload --force --script=exec.squid.static.ad.groups.php/" . __LINE__);
        $sock = new sockets();
        $EnableTransparent27 = intval($sock->GET_INFO("EnableTransparent27"));
        if ($EnableTransparent27 == 1) {
            system("/etc/init.d/squid-nat reload --script=" . basename(__FILE__));
        }
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:59,代码来源:exec.squid.static.ad.groups.php

示例2: section_tab

function section_tab()
{
    $boot = new boostrap_form();
    $users = new usersMenus();
    $callback = urlencode($_GET["CallBack"]);
    if (!$users->AsAnAdministratorGeneric) {
        senderror("no privs");
    }
    $page = CurrentPageName();
    $tpl = new templates();
    $array["{members} LDAP"] = "{$page}?section-search-ldap=yes&CallBack={$callback}";
    $ldap = new clladp();
    if ($ldap->IsKerbAuth()) {
        $array["{members} Active Directory"] = "{$page}?section-search-ad=yes&CallBack={$callback}";
    }
    echo $boot->build_tab($array);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:17,代码来源:miniadm.members.browse.php

示例3: tabs

function tabs()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $t = time();
    $boot = new boostrap_form();
    $mini = new miniadm();
    $users = new usersMenus();
    $ldap = new clladp();
    $tpl = new templates();
    if (isset($_GET["title"])) {
        $title = $tpl->_ENGINE_parse_body("<H3>{users_and_groups}</H3><p>{users_and_groups_system_explain}</p>");
    }
    if ($ldap->IsKerbAuth()) {
        $array["{activedirectory_members}"] = "miniadm.members.browse.php?section-search-ad=yes";
    }
    $array["{radius_members}"] = "miniadm.system.members.radius.php";
    if ($mini->IFItsProxy()) {
        $array["{hostpot_members}"] = "miniadmin.hotspot.php?tabs=yes&title=yes";
    }
    echo $title . $boot->build_tab($array);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:22,代码来源:miniadmin.system.members.php

示例4: popup

function popup()
{
    $t = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $familysite = $_GET["familysite"];
    $q = new mysql_squid_builder();
    $sock = new sockets();
    $ldap = new clladp();
    if ($ldap->IsKerbAuth()) {
        $whitelist_auth = "\t<center style='width:98%' class=form>\n\t\t<center>" . button("{do_not_authenticate_this_website}", "WhiteNTLMThis{$t}()", 30) . "</center>\n\t\t\t<center style='font-size:16px;margin-top:15px;margin-bottom:20px'>{do_not_authenticate_this_website_explain}\n\t\t\t<br>&laquo;&nbsp;<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('squid.urlrewriteaccessdeny.php?add-ntlm-js=yes')\"\n\t\t\t\t\tstyle='text-decoration:underline'>{authentication_whitelist}</a>&nbsp;&raquo;\n\t\t\t\n\t\t\t</center>\n\t\t</center>\n\t\t<p>&nbsp;</p>";
    }
    $EnableRangeOffset = intval($sock->GET_INFO("EnableRangeOffset"));
    if ($EnableRangeOffset == 1) {
        $rangeoffset = "\t<center style='width:98%' class=form>\n\t\t\t<center>" . button("{enforce_partial_content}", "RangeOffsetLimit{$t}()", 30) . "</center>\n\t\t\t\t<center style='font-size:16px;margin-top:15px;margin-bottom:20px'>{enforce_partial_content_explain}\n\t\t\t\t<br>&laquo;&nbsp;<a href=\"javascript:blur();\" \n\t\t\t\t\tOnClick=\"javascript:Loadjs('squid.urlrewriteaccessdeny.php?add-rangeoffsetlimit-js=yes')\"\n\t\t\t\t\tstyle='text-decoration:underline'>{partial_content_list}</a>&nbsp;&raquo;\n\t\t\t\n\t\t\t\t</center>\n\t\t\t</center>\n\t\t\t<p>&nbsp;</p>";
    }
    if ($sock->EnableUfdbGuard()) {
        $results = $q->QUERY_SQL("SELECT * FROM personal_categories");
        while ($ligne = mysql_fetch_assoc($results)) {
            $PERSO[$ligne["category"]] = true;
        }
        $results = $q->QUERY_SQL("SELECT category FROM webfilter_blks WHERE modeblk=1");
        $WHITECATS[null] = "{select}";
        while ($ligne = mysql_fetch_assoc($results)) {
            if (!isset($PERSO[$ligne["category"]])) {
                continue;
            }
            $WHITECATS[$ligne["category"]] = $ligne["category"];
        }
        $whitelist_ufdb = "\t<center style='width:98%' class=form>\n\t\t\t<center>" . button("{whitelist_this_website}", "WhiteThis{$t}()", 30) . "</center>\n\t\t\t\t<center style='font-size:16px;margin-top:15px;margin-bottom:20px'>{whitelist_this_website_explain}\n\t\t\t\t<br>&laquo;&nbsp;<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('squid.urlrewriteaccessdeny.php?add-www-js=yes')\"\n\t\t\t\t\t\tstyle='text-decoration:underline'>{global_whitelists}</a>&nbsp;&raquo;\t\t\n\t\t\t\t\t\t\n\t\t\t\t</center>\n\t\t\t</center>\n\t\t\t<p>&nbsp;</p>";
        $blacklist_ufdb = "\t<center style='width:98%' class=form>\n\t\t<center>" . button("{blacklist_this_website}", "BlackUFDBThis{$t}()", 30) . "</center>\n\t\t\t<center style='font-size:16px;margin-top:15px;margin-bottom:20px'>{blacklist_this_website_explain}\n\t\t\t<br>&laquo;&nbsp;<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('squid.urlrewriteaccessdeny.php?add-black-js=yes')\"\n\t\t\t\t\tstyle='text-decoration:underline'>{global_blacklist}</a>&nbsp;&raquo;\n\t\t\t\n\t\t\t</center>\n\t\t</center>\n\t\t<p>&nbsp;</p>";
        $white_category = "\t<p>&nbsp;</p>\n\t<div style='width:98%' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='font-size:22px' class=legend>{save_into_a_whitelisted_category}:</td>\n\t\t<td>" . Field_array_Hash($WHITECATS, "category-{$t}", null, "style:font-size:22px") . "</td>\n\t</tr>\n\t<tr>\n\t<td colspan=2 align='right'><hr>" . button("{add}", "CatzThis{$t}()", 30) . "</td>\n\t</tr>\n\t</table>";
    }
    $html = "<div style='font-size:35px;margin-bottom:20px'>&laquo;&nbsp;{$familysite}&nbsp;&raquo;</div>\n\t{$whitelist_auth}\n\t{$whitelist_ufdb}\n\t{$rangeoffset}\n\t\t<center style='width:98%' class=form>\t\n\t\t<center>" . button("{do_not_cache}", "NocacheThis{$t}()", 30) . "</center>\n\t\t\t<center style='font-size:16px;margin-top:15px;margin-bottom:20px'>{do_not_cache_this_web_site_explain}\n\t\t\t<br>&laquo;&nbsp;<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('squid.urlrewriteaccessdeny.php?add-nocache-js=yes')\"\n\t\t\t\t\tstyle='text-decoration:underline'>{global_deny_cache_list}</a>&nbsp;&raquo;\t\t\n\t\t\t\t\t\n\t\t\t</center>\n\t\t</center>\t\n\t{$blacklist_ufdb}\t\t\t\n\t\t\t<p>&nbsp;</p>\t\t\n\t\t\t\t\n\t\t\t{$white_category}\n\t</div>\n<script>\n\nvar CallBack{$t}= function (obj) {\n\tvar res=obj.responseText;\n\tif(res.length>3){alert(res);return;}\n\tvar category=document.getElementById('category-{$t}').value;\n\tYahooWinBrowseHide();\n\tLoadjs('ufdbguard.compile.category.php?category='+category);\n}\t\nvar CallBackNocacheThis{$t}= function (obj) {\n\tvar res=obj.responseText;\n\tif(res.length>3){alert(res);return;}\n\tYahooWinBrowseHide();\n\tLoadjs('squid.global.wl.center.progress.php');\n}\nfunction CatzThis{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('add-to-cat', '{$familysite}');\n\tXHR.appendData('category', document.getElementById('category-{$t}').value);\t      \n\tXHR.sendAndLoad('{$page}', 'POST',CallBack{$t});  \t\t\t\n}\n\nfunction NocacheThis{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('nocache_single', '{$familysite}');    \n\tXHR.sendAndLoad('squid.urlrewriteaccessdeny.php', 'POST',CallBackNocacheThis{$t}); \n\n}\n\nfunction RangeOffsetLimit{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('rangeoffsetlimit_single', '{$familysite}');    \n\tXHR.sendAndLoad('squid.urlrewriteaccessdeny.php', 'POST',CallBackNocacheThis{$t}); \n}\n\nfunction WhiteNTLMThis{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('nonntlm_single', '{$familysite}');    \n\tXHR.sendAndLoad('squid.urlrewriteaccessdeny.php', 'POST',CallBackNocacheThis{$t}); \n\n}\n\nvar CallBack2{$t}= function (obj) {\n\tvar res=obj.responseText;\n\tif(res.length>3){alert(res);return;}\n\tvar category=document.getElementById('category-{$t}').value;\n\tYahooWinBrowseHide();\n\tLoadjs('squid.compile.whiteblack.progress.php');\n}\n\t\n// \nfunction WhiteThis{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('whitelist-single', '{$familysite}');\t\t\n\tXHR.sendAndLoad('squid.urlrewriteaccessdeny.php', 'POST',CallBack2{$t}); \n\n\t}\nfunction BlackUFDBThis{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('blacklist-single', '{$familysite}');\t\t\n\tXHR.sendAndLoad('squid.urlrewriteaccessdeny.php', 'POST',CallBack2{$t}); \n\n\t}\t\n\n</script>\t\t\t\n\t\t\t\n\t\t\t\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:36,代码来源:squid.access.webfilter.tasks.php

示例5: COUNT_DE_USERS

function COUNT_DE_USERS()
{
    $sock = new sockets();
    $ldap = new clladp();
    $_GET["dn"] = urldecode($_GET["dn"]);
    if ($ldap->IsKerbAuth()) {
        $ad = new external_ad_search();
        echo $ad->CountDeUSerOu($_GET["count-de-users"], $_GET["dn"]);
    }
    $EnableManageUsersTroughActiveDirectory = $sock->GET_INFO("EnableManageUsersTroughActiveDirectory");
    if (!is_numeric($EnableManageUsersTroughActiveDirectory)) {
        $EnableManageUsersTroughActiveDirectory = 0;
    }
    if ($EnableManageUsersTroughActiveDirectory == 1) {
        $ldap = new ldapAD();
        echo $ldap->CountDeUSerOu($_GET["count-de-users"], $_GET["dn"]);
        return;
    }
    $ldap = new clladp();
    echo $ldap->CountDeUSerOu($_GET["count-de-users"]);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:21,代码来源:domains.manage.org.index.php

示例6: finduser_list

function finduser_list()
{
    $keycached = "{$_GET["finduser"]}";
    header("Pragma: no-cache");
    header("Expires: 0");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-cache, must-revalidate");
    $GLOBALS["OUTPUT_DEBUG"] = false;
    $stringtofind = trim($_GET["finduser"]);
    if ($_POST["query"] != null) {
        $stringtofind = $_POST["query"];
    }
    if (!isset($_POST["rp"])) {
        $_POST["rp"] = 15;
    }
    $users = new usersMenus();
    $sock = new sockets();
    $EnableManageUsersTroughActiveDirectory = $sock->GET_INFO("EnableManageUsersTroughActiveDirectory");
    if (!is_numeric($EnableManageUsersTroughActiveDirectory)) {
        $EnableManageUsersTroughActiveDirectory = 0;
    }
    if (preg_match("#debug:(.+)#", $stringtofind, $re)) {
        $GLOBALS["OUTPUT_DEBUG"] = true;
        $stringtofind = trim($re[1]);
    }
    if ($GLOBALS["OUTPUT_DEBUG"]) {
        echo "Want to search {$stringtofind}<br>";
    }
    $tpl = new templates();
    $usermenu = new usersMenus();
    $ldap = new clladp();
    if (!$ldap->IsKerbAuth()) {
        if ($usermenu->AsAnAdministratorGeneric == true) {
            if ($GLOBALS["OUTPUT_DEBUG"]) {
                echo "It is an administrator search in the entire tree<br>";
            }
            $hash_full = $ldap->UserSearch(null, $stringtofind, $_POST["rp"]);
        } else {
            $us = $ldap->UserDatas($_SESSION["uid"]);
            if ($GLOBALS["OUTPUT_DEBUG"]) {
                echo "It is an user search in the {$us["ou"]} tree<br>";
            }
            $hash_full = $ldap->UserSearch($us["ou"], $stringtofind, $_POST["rp"]);
        }
        $hash1 = $hash_full[0];
        $hash2 = $hash_full[1];
        if ($GLOBALS["OUTPUT_DEBUG"]) {
            echo "Search results " . count($hash1) . " users and " . count($hash2) . " contacts<br>";
        }
    } else {
        include_once dirname(__FILE__) . "/ressources/class.external.ad.inc";
        $ad = new external_ad_search();
        $hash_full = $ad->UserSearch(null, $stringtofind, $_POST["rp"]);
        $hash1 = $hash_full[0];
        $hash2 = $hash_full[1];
        if ($GLOBALS["OUTPUT_DEBUG"]) {
            echo "Search results " . count($hash1) . " users and " . count($hash2) . " contacts<br>";
        }
    }
    $hash = array();
    $count = 0;
    $data = array();
    $data['page'] = 1;
    $data['total'] = 0;
    $data['rows'] = array();
    if (is_array($hash1)) {
        if ($GLOBALS["OUTPUT_DEBUG"]) {
            echo "<strong>Search results ->HASH1</strong><br>\n";
        }
        while (list($num, $ligne) = each($hash1)) {
            if (isset($ligne["samaccountname"][0])) {
                $ligne["uid"][0] = $ligne["samaccountname"][0];
            }
            if ($ligne["uid"][0] == null) {
                if (preg_match("#^CN=(.+?),#i", $ligne["dn"], $re)) {
                    $ligne["uid"][0] = $re[1];
                    $hash[$count]["displayname"][0] = $re[1];
                }
            }
            if ($EnableManageUsersTroughActiveDirectory == 0) {
                if ($ligne["uid"][0] == null && $ligne["employeenumber"][0] == null) {
                    continue;
                }
            }
            if (strpos($ligne["dn"], "dc=pureftpd,dc=organizations") > 0) {
                continue;
            }
            $hash[$count]["displayname"][0] = trim($ligne["displayname"][0]);
            $hash[$count]["givenname"][0] = $ligne["givenname"][0];
            if ($EnableManageUsersTroughActiveDirectory == 1) {
                $hash[$count]["uid"][0] = $ligne["samaccountname"][0];
            } else {
                $hash[$count]["uid"][0] = $ligne["uid"][0];
            }
            if (substr($hash[$count]["uid"][0], strlen($hash[$count]["uid"][0]) - 1, 1) == '$') {
                continue;
            }
            $hash[$count]["employeenumber"][0] = $ligne["employeenumber"][0];
            $hash[$count]["title"][0] = $ligne["title"][0];
            $hash[$count]["uri"][0] = $ligne["uri"][0];
//.........这里部分代码省略.........
开发者ID:articatech,项目名称:artica,代码行数:101,代码来源:system.groups.search.php

示例7: quicklinks_members

function quicklinks_members()
{
    $users = new usersMenus();
    $tpl = new templates();
    $ldap = new clladp();
    if ($ldap->IsKerbAuth() == 0) {
        $tr[] = paragrapheWin("user-add-white-64.png", "{new_member}", "Loadjs('create-user.php')");
    }
    $search = $tpl->_ENGINE_parse_body("{search}");
    $tr[] = paragrapheWin("users-search-white-64.png", "{members}: {$search}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','domains.manage.users.index.php?finduser-tab=yes');");
    if ($users->AsSystemAdministrator) {
        $tr[] = paragrapheWin("postmasters-white-64.png", "{administrators}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','freeradius.users.php?t=0&tab=yes');");
    }
    if ($users->AsAnAdministratorGeneric) {
        $tr[] = paragrapheWin("64-computer2-white.png", "{my_computers}", "LoadAjax('BodyContent','computer-browse.php?tabs=yes',false)");
    }
    if ($users->SQUID_INSTALLED) {
        if ($users->SAMBA_INSTALLED) {
            if ($users->AsSystemAdministrator) {
                $tr[] = paragrapheWin("windows-white-64.png", "Active Directory", "AnimateDiv('BodyContent');LoadAjax('BodyContent','squid.adker.php?tabs=yes');");
            }
        }
        if ($users->AsWebStatisticsAdministrator) {
            $tr[] = paragrapheWin("user-stats-64.png", "{web_statistics}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','squid.users-profiling.php');");
        }
        if ($users->AsSquidAdministrator) {
            $tr[] = paragrapheWin("users-search-white-64.png", "{identd_server}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','squid.identd.php');");
            $tr[] = paragrapheWin("users-search-white-64.png", "{proxy_members_aliases}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','squid.macToUid.php');");
        }
    }
    echo $tpl->_ENGINE_parse_body(CompileTr5_win($tr, true));
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:32,代码来源:quicklinks.php

示例8: auth_verif

function auth_verif()
{
    $tpl = new templates();
    $ldap = new clladp();
    if ($ldap->IsKerbAuth()) {
        $external_ad_search = new external_ad_search();
        if (!$external_ad_search->CheckUserAuth($_POST["username-logon"], $_POST["username-password"])) {
            echo $tpl->_ENGINE_parse_body("<center><H2 style='color:red'>{unknown_user}</H2></center>");
            return null;
        }
        $users = new usersMenus();
        $privs = new privileges($_POST["username-logon"]);
        $privileges_array = $privs->privs;
        $_SESSION["InterfaceType"] = "{ARTICA_MINIADM}";
        setcookie("mem-logon-user", $_POST["username-logon"], time() + 172800);
        $_SESSION["privileges_array"] = $privs->privs;
        $_SESSION["uid"] = $_POST["username-logon"];
        $_SESSION["passwd"] = $_POST["username-logon"];
        $_SESSION["privileges"]["ArticaGroupPrivileges"] = $privs->content;
        BuildSession($_POST["username-logon"]);
        echo "<script>YahooWinHide();LoadAjax('BodyContent','miniadm.index.php');</script>\n\t\t";
        return;
    }
    $u = new user($_POST["username-logon"]);
    $userPassword = $u->password;
    if (trim($u->uidNumber) == null) {
        writelogs('Unable to get user infos abort', __FUNCTION__, __FILE__);
        echo $tpl->_ENGINE_parse_body("<center><H2 style='color:red'>{unknown_user}</H2></center>");
        return null;
    }
    if (trim($_POST["username-password"]) == trim($userPassword)) {
        $ldap = new clladp();
        $users = new usersMenus();
        $privs = new privileges($u->uid);
        $privileges_array = $privs->privs;
        $_SESSION["InterfaceType"] = "{ARTICA_MINIADM}";
        setcookie("mem-logon-user", $_POST["username-logon"], time() + 172800);
        $_SESSION["privileges_array"] = $privs->privs;
        $_SESSION["privs"] = $privileges_array;
        $_SESSION["OU_LANG"] = $privileges_array["ForceLanguageUsers"];
        $_SESSION["uid"] = $_POST["username-logon"];
        $_SESSION["passwd"] = $_POST["username-logon"];
        $_SESSION["privileges"]["ArticaGroupPrivileges"] = $privs->content;
        $_SESSION["groupid"] = $ldap->UserGetGroups($_POST["artica_username"], 1);
        $_SESSION["DotClearUserEnabled"] = $u->DotClearUserEnabled;
        $_SESSION["MailboxActive"] = $u->MailboxActive;
        $_SESSION["ou"] = $u->ou;
        $_SESSION["UsersInterfaceDatas"] = trim($u->UsersInterfaceDatas);
        $lang = new articaLang();
        writelogs("[{$_POST["username-logon"]}]: Default organization language={$_SESSION["OU_LANG"]}", __FUNCTION__, __FILE__);
        if (trim($_SESSION["OU_LANG"]) != null) {
            $_SESSION["detected_lang"] = $_SESSION["OU_LANG"];
            setcookie("artica-language", $_SESSION["OU_LANG"], time() + 172800);
        } else {
            setcookie("artica-language", $_POST["lang"], time() + 172800);
            $_SESSION["detected_lang"] = $lang->get_languages();
        }
        echo "<script>\n\t\t\tYahooWinHide();\n\t\t\tLoadAjax('BodyContent','miniadm.index.php');\n\t\t</script>\n\t\t";
        return;
    } else {
        echo $tpl->_ENGINE_parse_body("<center><H2 style='color:red'>{bdu}</H2></center>");
    }
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:63,代码来源:miniadm.php

示例9: query_group

function query_group()
{
    if ($_GET["OnlyUsers"] == "yes") {
        $_GET["OnlyUsers"] = 1;
    }
    $users = new user();
    $query = $_POST["query"];
    $nogetent = false;
    $OnlyUsers = $_GET["OnlyUsers"];
    $OnlyGroups = $_GET["OnlyGroups"];
    $OnlyGUID = $_GET["OnlyGUID"];
    $OnlyName = $_GET["OnlyName"];
    $OnlyCheckAD = $_GET["OnlyCheckAD"];
    $UseDN = $_GET["UseDN"];
    $Zarafa = $_GET["Zarafa"];
    if (!is_numeric($_POST["rp"])) {
        $_POST["rp"] = 250;
    }
    $ObjectZarafa = false;
    if (!is_numeric($OnlyGUID)) {
        $OnlyGUID = 0;
    }
    if (!is_numeric($OnlyUsers)) {
        $OnlyUsers = 0;
    }
    if (!is_numeric($OnlyName)) {
        $OnlyName = 0;
    }
    if (!is_numeric($OnlyCheckAD)) {
        $OnlyCheckAD = 0;
    }
    if ($Zarafa == 1) {
        $nogetent = true;
        $ObjectZarafa = true;
    }
    if ($GLOBALS["VERBOSE"]) {
        echo __FUNCTION__ . ":" . __LINE__ . " OnlyUsers={$OnlyUsers},OnlyGroups={$OnlyGroups}<br>\n";
    }
    $OnlyUsers = 0;
    $OnlyGroups = 1;
    $ObjectZarafa = false;
    $Zarafa = $_GET["Zarafa"];
    if ($Zarafa == 1) {
        $nogetent = true;
        $ObjectZarafa = true;
    }
    $hash = array();
    if (!isset($_GET["prepend"])) {
        $_GET["prepend"] = 0;
    } else {
        if ($_GET["prepend"] == 'yes') {
            $_GET["prepend"] = 1;
        }
        if ($_GET["prepend"] == 'no') {
            $_GET["prepend"] = 0;
        }
    }
    $WORKGROUP = null;
    $sock = new sockets();
    $ldap = new clladp();
    if ($query == null) {
        $query = "*";
    }
    if ($ldap->IsKerbAuth()) {
        $adKerb = new external_ad_search();
        if ($GLOBALS["VERBOSE"]) {
            echo "<strong>searchGroup({$query},array(),{$_POST["rp"]})</strong><br>\n";
        }
        $hash = $adKerb->searchGroup($query, array(), $_POST["rp"]);
        if ($adKerb->IsError) {
            json_error_show($adKerb->error, 1);
        }
    } else {
        if ($GLOBALS["VERBOSE"]) {
            echo "<strong>IsKerbAuth = false</strong><br>\n";
        }
        if ($OnlyGroups == 1) {
            if ($GLOBALS["VERBOSE"]) {
                echo "<strong>find_ldap_items_groups({$query},...)</strong><br>\n";
            }
            $hash = $users->find_ldap_items_groups($query, $_GET["organization"], $nogetent, $ObjectZarafa, $_POST["rp"], $OnlyGUID, $OnlyUsers, $OnlyCheckAD);
        } else {
            if ($GLOBALS["VERBOSE"]) {
                echo "<strong>find_ldap_items({$query},{$_GET["organization"]},{$nogetent},{$ObjectZarafa},{$_POST["rp"]},{$OnlyGUID},{$OnlyUsers},{$OnlyCheckAD})<br>\n";
            }
            $hash = $users->find_ldap_items($query, $_GET["organization"], $nogetent, $ObjectZarafa, $_POST["rp"], $OnlyGUID, $OnlyUsers, $OnlyCheckAD);
        }
    }
    $query = $_POST["query"];
    if ($query == null) {
        $query = "*";
    }
    $data = array();
    $data['page'] = 1;
    $data['total'] = count($hash);
    $data['rows'] = array();
    $c = 0;
    while (list($num, $ligne) = each($hash)) {
        if ($GLOBALS["VERBOSE"]) {
            echo "<code>&raquo;{$num}&laquo; = {$ligne}</code><br>\n";
//.........这里部分代码省略.........
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:101,代码来源:MembersBrowse.php

示例10: main_admin_tabs

function main_admin_tabs()
{
    if (!$GLOBALS["AS_ROOT"]) {
        if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
            return null;
        }
    }
    $ldap = new clladp();
    $users = new usersMenus();
    $sys = new syslogs();
    $artica = new artica_general();
    $tpl = new templates();
    $page = CurrentPageName();
    $sock = new sockets();
    if ($GLOBALS["VERBOSE"]) {
        echo "<li>" . __FUNCTION__ . " line:" . __LINE__ . "</li>";
    }
    $OnlyWebstats = OnlyWebstats($users);
    $page = CurrentPageName();
    $array["t:frontend"] = "{status}";
    $DisableMessaging = intval($sock->GET_INFO("DisableMessaging"));
    if ($DisableMessaging == 1) {
        $users->POSTFIX_INSTALLED = false;
    }
    $SquidPerformance = intval($sock->GET_INFO("SquidPerformance"));
    $SQUIDEnable = trim($sock->GET_INFO("SQUIDEnable"));
    if (!is_numeric($SQUIDEnable)) {
        $SQUIDEnable = 1;
    }
    if ($SQUIDEnable == 0) {
        $users->SQUID_INSTALLED = false;
    }
    // 2 = Not statistics,
    if ($SquidPerformance < 3) {
        if (!$ldap->IsKerbAuth()) {
            $array["t:orgs"] = "{organizations}";
        }
    }
    $StatsApplianceReceivers = intval($sock->GET_INFO("StatsApplianceReceivers"));
    if ($StatsApplianceReceivers > 0) {
        $array["t:STAS_APP"] = "{$StatsApplianceReceivers} Proxy(s)";
    }
    if ($users->SAMBA_APPLIANCE) {
        $array["t:smbshares"] = '{shared_folders}';
    }
    if ($users->VPS_OPENVZ) {
        $array["t:openvz"] = 'OpenVZ';
    }
    if ($artica->EnableMonitorix == 1) {
        $array["t:monitorix"] = '{monitorix}';
    }
    if ($users->POSTFIX_INSTALLED) {
        if ($users->AsPostfixAdministrator) {
            $EnableArticaSMTPStatistics = $sock->GET_INFO("EnableArticaSMTPStatistics");
            if (!is_numeric($EnableArticaSMTPStatistics)) {
                $EnableArticaSMTPStatistics = 1;
            }
            $EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance");
            if (!is_numeric($EnablePostfixMultiInstance)) {
                $EnablePostfixMultiInstance = 0;
            }
            if ($EnableArticaSMTPStatistics == 1) {
                $array["t:realtime-smtp"] = "{realtime_monitor}";
                $array["t:emails_received"] = "{emails_received}";
                $array["t:connections"] = "{connections}";
                if (_milter_greylist_enabled() == 1) {
                    $array["t:miltergreylist"] = "{greylisting}";
                }
            }
            if ($EnablePostfixMultiInstance == 1) {
                $array["t:multiple_instances"] = "{multiple_instances}";
            }
        }
    }
    if ($users->KASPERSKY_SMTP_APPLIANCE) {
        $array["t:kaspersky"] = "Kaspersky";
    } else {
        if ($users->AsSystemAdministrator) {
            $array["t:system"] = "{webinterface}";
        }
    }
    if (count($array) < 8) {
        if ($users->SQUID_INSTALLED) {
            $array["t:starting-guide-squid"] = "{starting_guide}";
        }
    }
    $build_artica_tabs_size = 0;
    $count = count($array);
    //if($count<7){$array["add-tab"]="{add}&nbsp;&raquo;";}
    $t = time();
    if (isset($_GET["tab-font-size"])) {
        if ($_GET["tab-font-size"] == "14px") {
            $_GET["tab-font-size"] = "12px";
        }
        $style = "style=font-size:{$_GET["tab-font-size"]}";
    }
    if (isset($_GET["tab-width"])) {
        $width = $_GET["tab-width"];
    }
    if (isset($_GET["newfrontend"])) {
//.........这里部分代码省略.........
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:101,代码来源:admin.index.php

示例11: ImportTasks

function ImportTasks()
{
    $sock = new sockets();
    $ldap = new clladp();
    $users = new usersMenus();
    $EnableKerbAuth = 1;
    if (!$ldap->IsKerbAuth()) {
        $EnableKerbAuth = 0;
    }
    if (!is_numeric($EnableKerbAuth)) {
        $EnableKerbAuth = 0;
    }
    if ($GLOBALS["VERBOSE"]) {
        echo "EnableKerbAuth={$EnableKerbAuth}\n";
    }
    if ($EnableKerbAuth == 0) {
        return;
    }
    $unix = new unix();
    $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    $pid = @file_get_contents($pidfile);
    if ($unix->process_exists($pid, __FILE__)) {
        ufdbguard_admin_events("Warning: Task Already running pid {$pid}", __FUNCTION__, __FILE__, __LINE__);
        return;
    }
    if (!CheckTables()) {
        ufdbguard_admin_events("Failed, Mysql is not ready", __FUNCTION__, __FILE__, __LINE__, "activedirectory");
        return;
    }
    $q = new mysql();
    $q->check_storage_table(true);
    $unix = new unix();
    $nohup = $unix->find_program("nohup");
    $wbinfo = $unix->find_program("wbinfo");
    $GLOBALS["xxxCOUNT"] = 0;
    exec("{$wbinfo} -g 2>&1", $results);
    while (list($num, $line) = each($results)) {
        if (preg_match("#Error looking#", $line)) {
            ufdbguard_admin_events("Failed to lookup users, aborting task", __FUNCTION__, __FILE__, __LINE__, "activedirectory");
            return;
        }
        if (trim($line) == null) {
            continue;
        }
        if ($GLOBALS["VERBOSE"]) {
            echo "Checking group {$line}\n";
        }
        CheckGroup($line);
    }
    if ($users->SQUID_INSTALLED or $users->APP_UFDBGUARD_INSTALLED) {
        ufdbguard_admin_events("Importing {$GLOBALS["xxxCOUNT"]} users done", __FUNCTION__, __FILE__, __LINE__, "activedirectory");
        if ($GLOBALS["xxxCOUNT"] > 0) {
            $php5 = $unix->LOCATE_PHP5_BIN();
            shell_exec("{$nohup} {$php5} " . dirname(__FILE__) . "/exec.squidguard.php --build schedule-id={$GLOBALS["SCHEDULE_ID"]} >/dev/null 2>&1 &");
        }
        $AdSchBuildProxy = $sock->GET_INFO("AdSchBuildProxy");
        $AdSchBuildUfdb = $sock->GET_INFO("AdSchBuildUfdb");
        $AdSchRestartSquid = $sock->GET_INFO("AdSchRestartSquid");
        if (!is_numeric($AdSchBuildProxy)) {
            $AdSchBuildProxy = 0;
        }
        if (!is_numeric($AdSchBuildUfdb)) {
            $AdSchBuildUfdb = 0;
        }
        if (!is_numeric($AdSchRestartSquid)) {
            $AdSchRestartSquid = 0;
        }
        if ($AdSchBuildProxy == 1) {
            shell_exec("{$php5} " . dirname(__FILE__) . "/exec.squid.build --build --force schedule-id={$GLOBALS["SCHEDULE_ID"]} >/dev/null 2>&1");
        }
        if ($AdSchBuildUfdb == 1) {
            shell_exec("{$php5} " . dirname(__FILE__) . "/exec.squidguard.php --build --force schedule-id={$GLOBALS["SCHEDULE_ID"]} >/dev/null 2>&1");
        }
        if ($AdSchRestartSquid == 1) {
            shell_exec("{$php5} " . dirname(__FILE__) . "/exec.squidguard.php  --reload-squid schedule-id={$GLOBALS["SCHEDULE_ID"]} >/dev/null 2>&1");
        }
    }
    shell_exec("{$nohup} {$php5} " . __FILE__ . " --computers schedule-id={$GLOBALS["SCHEDULE_ID"]} >/dev/null 2>&1 &");
}
开发者ID:articatech,项目名称:artica,代码行数:79,代码来源:exec.adusers.php

示例12: checklogon

function checklogon($Aspost = false)
{
    include_once dirname(__FILE__) . "/ressources/class.user.inc";
    include "ressources/settings.inc";
    $username = $_POST["username"];
    $_POST["password"] = url_decode_special_tool($_POST["password"]);
    $password = trim($_POST["password"]);
    $users = new usersMenus();
    if ($users->WEBSTATS_APPLIANCE) {
        $users->SQUID_INSTALLED = true;
    }
    //echo $username."\n$password\n";
    if ($password == null) {
        if ($Aspost) {
            MainPage("Bad password");
            return;
        }
        echo "Bad password";
        return;
    }
    if (trim(strtolower($username)) == trim(strtolower($_GLOBAL["ldap_admin"]))) {
        $passwordMD = md5(trim($_GLOBAL["ldap_password"]));
        if ($password == $passwordMD) {
            $_SESSION["uid"] = '-100';
            $_SESSION["groupid"] = '-100';
            $_SESSION["passwd"] = $_GLOBAL["ldap_password"];
            $_SESSION["CORP"] = $users->CORP_LICENSE;
            $_SESSION["privileges"]["ArticaGroupPrivileges"] = '
			[AllowAddGroup]="yes"
			[AllowAddUsers]="yes"
			[AllowChangeKav]="yes"
			[AllowChangeKas]="yes"
			[AllowChangeUserPassword]="yes"
			[AllowEditAliases]="yes"
			[AllowEditAsWbl]="yes"
			[AsSystemAdministrator]="yes"
			[AsPostfixAdministrator]="yes"
			[AsArticaAdministrator]="yes"';
            $_SESSION["InterfaceType"] = "{APP_ARTICA_ADM}";
            $_SESSION["AsWebStatisticsAdministrator"] = true;
            if ($Aspost) {
                header("location:miniadm.index.php");
                return;
            }
            return;
        }
    }
    if ($users->SQUID_INSTALLED) {
        $q = new mysql_squid_builder();
        $passwordMD = md5($password);
        $sql = "SELECT webfilters_sqitems.gpid AS maingpid\n\t\t\tFROM webfilters_sqacllinks, webfilters_sqgroups, webfilters_sqitems, webfilters_sqacls\n\t\t\tWHERE webfilters_sqacllinks.gpid = webfilters_sqgroups.ID\n\t\t\tAND webfilters_sqacllinks.aclid = webfilters_sqacls.ID\n\t\t\tAND webfilters_sqgroups.ID = webfilters_sqitems.gpid\n\t\t\tAND webfilters_sqacls.enabled =1\n\t\t\tAND webfilters_sqgroups.enabled =1\n\t\t\tAND webfilters_sqitems.enabled =1\n\t\t\tAND webfilters_sqgroups.GroupType = 'dynamic_acls'\n\t\t\tAND webfilters_sqitems.pattern = '{$username}:{$passwordMD}'";
        $results = $q->QUERY_SQL($sql);
        if (!$q->mysql_error) {
            echo $q->mysql_error;
        }
        $CountDerules = mysql_num_rows($results);
        writelogs("{$username}::webfilters_sqitems:: {$CountDerules} rules", __FUNCTION__, __FILE__, __LINE__);
        if ($CountDerules > 0) {
            writelogs("{$username}::webfilters_sqitems:: Building rules....", __FUNCTION__, __FILE__, __LINE__);
            while ($ligne = mysql_fetch_assoc($results)) {
                $_SESSION["SQUID_DYNAMIC_ACLS_VIRTUALS"][$ligne["maingpid"]] = true;
            }
            $_SESSION["InterfaceType"] = "{ARTICA_MINIADM}";
            $_SESSION["VirtAclUser"] = true;
            $_SESSION["ou"] = "Proxy Service";
            $_SESSION["CORP"] = $users->CORP_LICENSE;
            setcookie("mem-logon-user", $_POST["username-logon"], time() + 172800);
            $_SESSION["privileges_array"] = $privs->privs;
            $_SESSION["uid"] = $username;
            $_SESSION["privileges"]["ArticaGroupPrivileges"] = array();
            BuildSession($username);
            if ($Aspost) {
                header("location:miniadm.index.php");
                return;
            }
            return;
        }
    }
    writelogs("{$username}:: Continue, processing....", __FUNCTION__, __FILE__, __LINE__);
    $ldap = new clladp();
    $IsKerbAuth = $ldap->IsKerbAuth();
    writelogs("{$username}:: Is AD -> {$IsKerbAuth}", __FUNCTION__, __FILE__, __LINE__);
    if ($ldap->IsKerbAuth()) {
        $external_ad_search = new external_ad_search();
        if ($external_ad_search->CheckUserAuth($username, $password)) {
            $users = new usersMenus();
            $privs = new privileges($_POST["username-logon"]);
            $privileges_array = $privs->privs;
            $_SESSION["InterfaceType"] = "{ARTICA_MINIADM}";
            $_SESSION["VirtAclUser"] = false;
            setcookie("mem-logon-user", $_POST["username-logon"], time() + 172800);
            $_SESSION["privileges_array"] = $privs->privs;
            $_SESSION["uid"] = $_POST["username-logon"];
            $_SESSION["passwd"] = $_POST["username-logon"];
            $_SESSION["privileges"]["ArticaGroupPrivileges"] = $privs->content;
            BuildSession($username);
            if ($Aspost) {
                header("location:miniadm.index.php");
                return;
            }
//.........这里部分代码省略.........
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:101,代码来源:miniadm.logon.php

示例13: status_users

function status_users()
{
    $ldap = new clladp();
    $sock = new sockets();
    if ($ldap->IsKerbAuth()) {
        include_once dirname(__FILE__) . "/ressources/class.external.ad.inc";
        $ad = new external_ad_search();
        $users = $ad->NumUsers();
        return "<tr>\n\t<td width=1%><span id='AdSquidStatusLeft35'><img src='img/member-24.png'></span></td>\n\t<td class=legend nowrap style='font-size:12px'>{members}:</td>\n\t<td><div style='font-size:12px' nowrap>\n\t<a href=\"javascript:blur();\"\n\tOnClick=\"javascript:Loadjs('squid.adker.php',true);\"\n\tstyle='font-size:12px;font-weight:bold;text-decoration:underline'>{$users}</a></td>\n\t</tr>";
    }
    $EnableMacAddressFilter = $sock->GET_INFO("EnableMacAddressFilter");
    if (!is_numeric($EnableMacAddressFilter)) {
        $EnableMacAddressFilter = 1;
    }
    $q = new mysql_squid_builder();
    if ($EnableMacAddressFilter == 1) {
        $sql = "SELECT MAC FROM UserAutDB GROUP BY MAC";
        $results = $q->QUERY_SQL($sql);
        $users = mysql_num_rows($results);
        $js = "Loadjs('squid.UserAutDB.php?filterby=MAC',true);";
    } else {
        $sql = "SELECT ipaddr FROM UserAutDB GROUP BY ipaddr";
        $results = $q->QUERY_SQL($sql);
        $users = mysql_num_rows($results);
        $js = "Loadjs('squid.UserAutDB.php?filterby=ipaddr',true);";
    }
    return "<tr>\n\t<td width=1%><span id='AdSquidStatusLeft35'><img src='img/member-24.png'></span></td>\n\t<td class=legend nowrap style='font-size:12px'>{members}:</td>\n\t<td><div style='font-size:12px' nowrap>\n\t<a href=\"javascript:blur();\"\n\tOnClick=\"javascript:{$js}\"\n\tstyle='font-size:12px;font-weight:bold;text-decoration:underline'>{$users}</a></td>\n\t</tr>";
}
开发者ID:articatech,项目名称:artica,代码行数:28,代码来源:dansguardian2.php

示例14: users_search

function users_search()
{
    $tpl = new templates();
    $MyPage = CurrentPageName();
    $ldap = new clladp();
    if ($ldap->IsKerbAuth()) {
        users_search_directory();
        return;
    }
    $page = 1;
    $t = $_GET["t"];
    $sock = new sockets();
    $EnableManageUsersTroughActiveDirectory = $sock->GET_INFO("EnableManageUsersTroughActiveDirectory");
    if (!is_numeric($EnableManageUsersTroughActiveDirectory)) {
        $EnableManageUsersTroughActiveDirectory = 0;
    }
    if (is_base64_encoded($_GET["ou"])) {
        $ou_encoded = $_GET["ou"];
        $ou = base64_decode($_GET["ou"]);
    } else {
        $ou = $_GET["ou"];
        $ou_encoded = base64_encode($_GET["ou"]);
    }
    if ($_SESSION["uid"] != -100) {
        $ou = $_SESSION["ou"];
    }
    if ($_POST["query"] != null) {
        $tofind = $_POST["query"];
    }
    if ($tofind == null) {
        $tofind = '*';
    } else {
        $tofind = "*{$tofind}*";
    }
    $filter = "(&(objectClass=userAccount)(|(cn={$tofind})(mail={$tofind})(displayName={$tofind})(uid={$tofind}) (givenname={$tofind})))";
    $attrs = array("displayName", "uid", "mail", "givenname", "telephoneNumber", "title", "sn", "mozillaSecondEmail", "employeeNumber", "sAMAccountName");
    if (!$ldap->IsOUUnderActiveDirectory($ou)) {
        if ($EnableManageUsersTroughActiveDirectory == 1) {
            $cc = new ldapAD();
            $hash = $cc->find_users($ou, $tofind);
        } else {
            $ldap = new clladp();
            $dn = "ou={$ou},dc=organizations,{$ldap->suffix}";
            $hash = $ldap->Ldap_search($dn, $filter, $attrs, 150);
        }
    } else {
        $EnableManageUsersTroughActiveDirectory = 1;
        include_once dirname(__FILE__) . "/ressources/class.external.ad.inc";
        $ad = new external_ad_search();
        $hash = $ad->find_users($ou, $tofind);
    }
    $boot = new boostrap_form();
    $users = new user();
    $number = $hash["count"];
    if (!is_numeric($number)) {
        $number = 0;
    }
    $data = array();
    $data['page'] = 1;
    $data['total'] = $number;
    $data['rows'] = array();
    $styleTD = " style='font-size:16px'";
    for ($i = 0; $i < $number; $i++) {
        $userARR = $hash[$i];
        $uid = $userARR["uid"][0];
        if ($EnableManageUsersTroughActiveDirectory == 1) {
            $uid = $userARR["samaccountname"][0];
        }
        if ($uid == "squidinternalauth") {
            continue;
        }
        $js = MEMBER_JS($uid, 1, 1);
        if ($userARR["sn"][0] == null && $userARR["givenname"][0] == null) {
            $userARR["sn"][0] = $uid;
        }
        $sn = texttooltip($userARR["sn"][0], "{display}:{$uid}", $js, null, 0, "font-size:13px");
        $givenname = texttooltip($userARR["givenname"][0], "{display}:{$uid}", $js, null, 0, "font-size:13px");
        $title = texttooltip($userARR["title"][0], "{display}:{$uid}", $js, null, 0, "font-size:13px");
        $mail = texttooltip($userARR["mail"][0], "{display}:{$uid}", $js, null, 0, "font-size:13px");
        $telephonenumber = texttooltip($userARR["telephonenumber"][0], "{display}:{$uid}", $js, null, 0, "font-size:13px");
        if ($userARR["telephonenumber"][0] == null) {
            $userARR["telephonenumber"][0] = "&nbsp;";
        }
        if ($userARR["mail"][0] == null) {
            $userARR["mail"][0] = "&nbsp;";
        }
        $dele = imgsimple("delete-24.png", null, "Loadjs('domains.delete.user.php?uid={$uid}&flexRT={$t}');");
        $link = $boot->trswitch($js);
        $tr[] = "\n\t\t<tr id='{$id}'>\n\t\t<td {$styleTD} width=99% nowrap {$link}><i class='icon-user'></i>&nbsp;{$userARR["sn"][0]} {$userARR["givenname"][0]}<div><i>{$userARR["title"][0]}</i></td>\n\t\t<td {$styleTD} width=99% nowrap {$link}>{$userARR["telephonenumber"][0]}</td>\n\t\t<td {$styleTD} width=99% nowrap {$link}>{$userARR["mail"][0]}</td>\n\t\t<td width=35px align='center' nowrap>{$dele}</td>\n\t\t</tr>";
    }
    echo $tpl->_ENGINE_parse_body("\n\t\n\t\t<table class='table table-bordered table-hover'>\n\t\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th>{member}</th>\n\t\t\t\t\t<th>{phone}</th>\n\t\t\t\t\t<th>{email}</th>\n\t\t\t\t\t<th>&nbsp;</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t <tbody>\n\t\t\t") . @implode("\n", $tr) . " </tbody>\n\t\t\t\t</table>";
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:92,代码来源:miniadmin.members.php

示例15: logon


//.........这里部分代码省略.........
            $_SESSION["MINIADM"] = false;
            setcookie("MINIADM", "No", time() + 1000);
            $_SESSION["InterfaceType"] = "{APP_ARTICA_ADM}";
            setcookie("artica-language", $_POST["lang"], time() + 172800);
            $_SESSION["detected_lang"] = $_POST["lang"];
            $_SESSION["CORP"] = $users->CORP_LICENSE;
            $_SESSION["privileges"]["ArticaGroupPrivileges"] = '
			[AllowAddGroup]="yes"
			[AllowAddUsers]="yes"
			[AllowChangeKav]="yes"
			[AllowChangeKas]="yes"
			[AllowChangeUserPassword]="yes"
			[AllowEditAliases]="yes"
			[AllowEditAsWbl]="yes"
			[AsSystemAdministrator]="yes"
			[AsPostfixAdministrator]="yes"
			[AsArticaAdministrator]="yes"
			[AsArticaMetaAdmin]="yes"
			';
            if ($VIA_API) {
                writelogs("VIA API = TRUE -> BUILD SESSION", _FUNCTION__, __FILE__, __LINE__);
                BuildSession($_SESSION["uid"]);
                echo "TRUE";
                return;
            }
            $tpl = new templates();
            $sock->getFrameWork("squid.php?clean-catz-cache=yes");
            writelogs("OK it is a global admin -> location:admin.index.php", _FUNCTION__, __FILE__, __LINE__);
            echo "location:admin.index.php";
            exit;
        }
    }
    $ldap = new clladp();
    if ($ldap->IsKerbAuth()) {
        $userPassword = $_POST["artica_password"];
        if (isset($_POST["artica_password_crypted"])) {
            $userPassword = $_POST["artica_password_crypted"];
            include_once dirname(__FILE__) . "/ressources/class.cryptform.inc";
            $userPassword = logon_decrypt($userPassword);
        }
        writelogs("*** TEST Active Directory user {$_POST["artica_username"]} ****", __FUNCTION__, __FILE__, __LINE__);
        $external_ad_search = new external_ad_search();
        if ($external_ad_search->CheckUserAuth($_POST["artica_username"], $userPassword)) {
            writelogs("*** TEST Active Directory user {$_POST["artica_username"]} success ****", __FUNCTION__, __FILE__, __LINE__);
            $_SESSION["MINIADM"] = false;
            setcookie("MINIADM", "No", time() + 1000);
            $_SESSION["InterfaceType"] = "{APP_ARTICA_ADM}";
            setcookie("artica-language", $_POST["lang"], time() + 172800);
            $_SESSION["detected_lang"] = $_POST["lang"];
            $_SESSION["CORP"] = $users->CORP_LICENSE;
            $users = new usersMenus();
            $privs = new privileges($_POST["artica_username"]);
            $privileges_array = $privs->privs;
            DumpPrivileges($_POST["artica_username"], $privileges_array);
            $users->_TranslateRights($privileges_array, true);
            setcookie("mem-logon-user", $_POST["artica_username"], time() + 172800);
            $_SESSION["privileges_array"] = $privs->privs;
            $_SESSION["uid"] = $_POST["artica_username"];
            BuildSession($_POST["artica_username"]);
            $sock->getFrameWork("squid.php?clean-catz-cache=yes");
            $_SESSION["MINIADM"] = false;
            setcookie("MINIADM", "No", time() + 1000);
            if ($VIA_API) {
                BuildSession($_SESSION["uid"]);
                echo "TRUE";
                return;
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:67,代码来源:logon.php


注:本文中的clladp::IsKerbAuth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。