本文整理汇总了PHP中is_base64_encoded函数的典型用法代码示例。如果您正苦于以下问题:PHP is_base64_encoded函数的具体用法?PHP is_base64_encoded怎么用?PHP is_base64_encoded使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_base64_encoded函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: find_member
function find_member()
{
$tofind = $_GET["find-member"];
if ($_SESSION["uid"] == -100) {
$ou = $_GET["ou"];
} else {
$ou = $_SESSION["ou"];
}
$ldap = new clladp();
if (is_base64_encoded($ou)) {
$ou = base64_decode($ou);
}
if ($tofind == null) {
$tofind = '*';
} else {
$tofind = "*{$tofind}*";
}
$tofind = str_replace('***', '*', $tofind);
writelogs("FIND {$tofind} IN OU \"{$ou}\"", __FUNCTION__, __FILE__, __LINE__);
$filter = "(&(objectClass=userAccount)(|(cn={$tofind})(mail={$tofind})(displayName={$tofind})(uid={$tofind}) (givenname={$tofind}) ))";
$attrs = array("displayName", "uid", "mail", "givenname", "telephoneNumber", "title", "sn", "mozillaSecondEmail", "employeeNumber");
$dn = "ou={$ou},dc=organizations,{$ldap->suffix}";
$hash = $ldap->Ldap_search($dn, $filter, $attrs, 20);
$users = new user();
$number = $hash["count"];
for ($i = 0; $i < $number; $i++) {
$user = $hash[$i];
$html = $html . formatUser($user);
}
return $html;
}
示例2: js
function js(){
$page=CurrentPageName();
$tpl=new templates();
$title=$tpl->_ENGINE_parse_body("{remote_users_databases}");
if(is_base64_encoded($_GET["ou"])){$ou=base64_decode($_GET["ou"]);}else{$ou=$_GET["ou"];}
$hostname=$_GET["hostname"];
$add=$tpl->_ENGINE_parse_body("{add}");
$howto=$tpl->_ENGINE_parse_body("{howto}");
$html="
function remote_users_databases_load(){
YahooWin4('736','$page?popup=yes&ou={$_GET["ou"]}&hostname=$hostname','$ou/$hostname::$title');
}
function FormDatabase(md){
var title='';
if(md==''){title='$add';}
YahooWin5('650','$page?form-database='+md+'&ou={$_GET["ou"]}&hostname=$hostname','$ou/$hostname::'+title);
}
function ADExtHowto(){
var title='';
YahooWin6('650','$page?howto=yes&ou={$_GET["ou"]}&hostname=$hostname','$ou/$hostname::$howto');
}
remote_users_databases_load();
";
echo $html;
}
示例3: js
function js(){
$page=CurrentPageName();
$tpl=new templates();
if(is_base64_encoded($_GET["ou"])){$_GET["ou"]=base64_decode($_GET["ou"]);}
$title="{ip_rotator}::{$_GET["hostname"]}/{$_GET["ou"]}";
$title=$tpl->_ENGINE_parse_body($title);
$_GET["ou"]=urlencode($_GET["ou"]);
echo "YahooWin3(660,'$page?tabs=yes&hostname={$_GET["hostname"]}&ou={$_GET["ou"]}','$title');";
}
示例4: find_member
function find_member()
{
if ($_POST["qtype"] == "find-member") {
$tofind = $_POST["query"];
}
if ($_SESSION["uid"] == -100) {
$ou = $_GET["ou"];
} else {
$ou = $_SESSION["ou"];
}
$sock = new sockets();
if (is_base64_encoded($ou)) {
$ou = base64_decode($ou);
}
if ($tofind == null) {
$tofind = '*';
} else {
$tofind = "*{$tofind}*";
}
$tofind = str_replace('***', '*', $tofind);
$tofind = str_replace('**', '*', $tofind);
$tofind = str_replace('**', '*', $tofind);
$EnableManageUsersTroughActiveDirectory = $sock->GET_INFO("EnableManageUsersTroughActiveDirectory");
if (!is_numeric($EnableManageUsersTroughActiveDirectory)) {
$EnableManageUsersTroughActiveDirectory = 0;
}
writelogs("FIND {$tofind} IN OU \"{$ou}\"", __FUNCTION__, __FILE__, __LINE__);
$ldap = new clladp();
if (!$ldap->IsOUUnderActiveDirectory($ou)) {
if ($EnableManageUsersTroughActiveDirectory == 1) {
$cc = new ldapAD();
$hash = $cc->find_users($ou, $tofind);
} else {
$ldap = new clladp();
$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");
$dn = "ou={$ou},dc=organizations,{$ldap->suffix}";
$hash = $ldap->Ldap_search($dn, $filter, $attrs, 20);
}
} else {
include_once dirname(__FILE__) . "/ressources/class.external.ad.inc";
$p = new external_ad_search();
$hash = $p->find_users($ou, $tofind);
$ldap->EnableManageUsersTroughActiveDirectory = true;
}
$users = new user();
$number = $hash["count"];
$data = array();
$data['page'] = 0;
$data['total'] = $number;
$data['rows'] = array();
for ($i = 0; $i < $number; $i++) {
$user = $hash[$i];
$data['rows'][] = formatUser($user, $ldap->EnableManageUsersTroughActiveDirectory);
}
echo json_encode($data);
}
示例5: domain_selected
function domain_selected()
{
$t = $_GET["t"];
$ldap = new clladp();
if (is_base64_encoded($_GET["ou"])) {
$_GET["ou"] = base64_decode($_GET["ou"]);
}
$hash_domains = $ldap->hash_get_domains_ou($_GET["ou"]);
$domains = Field_array_Hash($hash_domains, "internet_domain-{$t}", $_GET["ch-domain"], null, null, 0, "font-size:28px;padding:3px");
echo $domains;
}
示例6: build_queues
function build_queues($ou)
{
if (is_base64_encoded($ou)) {
$ou = base64_decode($ou);
}
event(__FUNCTION__, __LINE__, "Checking {$ou} organization");
$sql = "SELECT ID FROM emailing_campain_linker WHERE ou='{$ou}' AND queue_builder_pourc=0 ORDER BY ID DESC";
$q = new mysql();
$results = $q->QUERY_SQL($sql, "artica_backup");
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
event(__FUNCTION__, __LINE__, "Checking campaign N.{$ligne["ID"]}");
$ID = $ligne["ID"];
construct_queue($ID, $ou);
}
}
示例7: SrvMilterServ
function SrvMilterServ()
{
$sock = new sockets();
if (is_base64_encoded($_GET["ou"])) {
$_GET["ou"] = base64_decode($_GET["ou"]);
}
$datas = unserialize(base64_decode($sock->getFrameWork("postfix.php?mgreylist-srv=yes&hostname={$_GET["hostname"]}&ou={$_GET["ou"]}&what={$_GET["type"]}")));
krsort($datas);
while (list($num, $ligne) = each($datas)) {
$ligne = trim($ligne);
if ($ligne == null) {
continue;
}
$html = $html . "<div><code style='font-size:13px'>{$ligne}</code></div>";
}
$html = $html . "<script>MiltergreylistMilterStatus();YahooWin5Hide();</script>";
echo $html;
}
示例8: MIGRATION_DELETE_TASK
function MIGRATION_DELETE_TASK()
{
$ou = $_GET["ou"];
if (is_base64_encoded($ou)) {
$ou = base64_decode($ou);
}
if (!is_numeric($_GET["DELETE_TASK"])) {
echo "Not numeric!";
return;
}
$sql = "DELETE FROM mbx_migr WHERE ID='{$_GET["DELETE_TASK"]}' AND ou='{$ou}'";
$q = new mysql();
if ($GLOBALS["VERBOSE"]) {
echo "<br><strong>{$sql}</strong>\n";
}
$q->QUERY_SQL($sql, "artica_backup");
if (!$q->ok) {
echo $q->mysql_error;
}
$sql = "DELETE FROM mbx_migr_users WHERE \tmbx_migr_id='{$_GET["DELETE_TASK"]}' AND ou='{$ou}'";
if ($GLOBALS["VERBOSE"]) {
echo "<br><strong>{$sql}</strong>\n";
}
$q->QUERY_SQL($sql, "artica_backup");
}
示例9: users_list
function users_list()
{
$tpl = new templates();
$MyPage = CurrentPageName();
$ldap = new clladp();
if ($ldap->IsKerbAuth()) {
users_list_active_directory();
return;
}
$database = "artica_backup";
$search = '%';
$table = "squid_ssl";
$page = 1;
$FORCE_FILTER = "AND `type`='ssl-bump-wl'";
$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);
}
$users = new user();
$number = $hash["count"];
if (!is_numeric($number)) {
$number = 0;
}
$data = array();
$data['page'] = 1;
$data['total'] = $number;
$data['rows'] = array();
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] = " ";
}
if ($userARR["mail"][0] == null) {
$userARR["mail"][0] = " ";
}
$img = imgsimple("contact-24.png", null, $js);
$href = "<a href=\"javascript:blur();\" OnClick=\"javascript:{$js}\" style='text-decoration:underline'>";
$dele = imgsimple("delete-24.png", null, "Loadjs('domains.delete.user.php?uid={$uid}&flexRT={$t}');");
$data['rows'][] = array('id' => $uid, 'cell' => array($img, "<span style='font-size:14px;color:{$color}'>{$href}{$userARR["sn"][0]} {$userARR["givenname"][0]}</a><div><i>{$userARR["title"][0]}</i></span>", "<span style='font-size:14px;color:{$color}'>{$userARR["telephonenumber"][0]}</span>", "<span style='font-size:14px;color:{$color}'>{$href}{$userARR["mail"][0]}</a></span>", $dele));
}
echo json_encode($data);
}
示例10: organization_users_find_member
function organization_users_find_member()
{
$t = time();
$html = "\n\t<div id='{$t}'></div>\n\t<script>\n\t\tLoadAjax('{$t}','domains.manage.org.findusers.php?ou={$ou}');\n\t</script>\n\t";
echo $html;
return;
$keycached = "{$_GET["finduser"]}{$_GET["ou"]}";
if (GET_CACHED(__FILE__, __FUNCTION__, $keycached)) {
return true;
}
$sock = new sockets();
$tofind = $_GET["finduser"];
$tpl = new templates();
$page = CurrentPageName();
$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"]);
}
writelogs("Find users {$tofind} in {$ou} (encoded={$_GET["ou"]}) EnableManageUsersTroughActiveDirectory:{$EnableManageUsersTroughActiveDirectory}", __FUNCTION__, __FILE__, __LINE__);
if ($_SESSION["uid"] != -100) {
$ou = $_SESSION["ou"];
}
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 ($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);
}
$users = new user();
$number = $hash["count"];
if (!is_numeric($number)) {
$number = 0;
}
$bg = "#FFFFFF";
writelogs("Find users {$tofind} in ou {$ou} DN:\"{$dn}\" (encoded={$_GET["ou"]}) {$number} items", __FUNCTION__, __FILE__, __LINE__);
$html = "\n\t\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t<div style='width:100%;height:560px;overflow:auto'>\t\n\t\t<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:100%'>\n\t\t<thead class='thead'>\n\t\t\t<tr>\n\t\t\t\t<th colspan=4>{$tofind}</th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody class='tbody'>\n\t\t\t\t\n\t";
$add_user_disabled = Paragraphe('folder-useradd-64-grey.png', '{create_user}', '{create_user_text}');
$add_user = Paragraphe('folder-useradd-64.png', '{create_user}', '{create_user_text}', "javascript:Loadjs('domains.add.user.php?ou={$ou}')", null, 210, null, 0, true);
$groups = Paragraphe('folder-group-64.png', '{manage_groups}', '{manage_groups_text}', "javascript:Loadjs('domains.edit.group.php?ou={$ou_encoded}&js=yes')", null, 210, 100, 0, true);
$delete_all_users = Paragraphe('member-64-delete.png', '{delete_all_users}', '{delete_all_users_text}', "javascript:DeleteAllusers()", null, 210, 100, 0, true);
if ($EnableManageUsersTroughActiveDirectory == 1) {
$delete_all_users = Paragraphe('member-64-delete-grey.png', '{delete_all_users}', '{delete_all_users_text}', "", null, 210, 100, 0, true);
}
$usermenus = new usersMenus();
if ($usermenus->ARTICA_META_ENABLED) {
if ($sock->GET_INFO("AllowArticaMetaAddUsers") != 1) {
$add_user = $add_user_disabled;
}
}
if ($EnableManageUsersTroughActiveDirectory == 1) {
$add_user = $add_user_disabled;
}
$delete_all_users_warn = $tpl->javascript_parse_text("{delete_all_users_warn}");
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 ($classtr == "oddRow") {
$classtr = null;
} else {
$classtr = "oddRow";
}
$img = imgtootltip("contact-48.png", "{apply}", $js);
if ($userARR["telephonenumber"][0] == null) {
$userARR["telephonenumber"][0] = " ";
}
if ($userARR["mail"][0] == null) {
$userARR["mail"][0] = " ";
}
$html = $html . "<tr class={$classtr}>\n\t\t\t\t\t\t<td width=1% style='font-size:12px'>{$img}</td>\n\t\t\t\t\t\t<td width=50% style='font-size:12px'>{$userARR["sn"][0]} {$userARR["givenname"][0]}<div><i>{$userARR["title"][0]}</i></div></td>\n\t\t\t\t\t\t<td width=1% style='font-size:12px'>{$userARR["telephonenumber"][0]}</td>\n\t\t\t\t\t\t<td width=50% style='font-size:12px' nowrap>{$userARR["mail"][0]}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\n\t\t";
//.........这里部分代码省略.........
示例11: remote_domain_form
function remote_domain_form()
{
$_GET["index"] = base64_decode($_GET["index"]);
$ou = $_GET["ou"];
if (is_base64_encoded($ou)) {
$ou = base64_decode($ou);
}
$ldap = new clladp();
$HashDomains = $ldap->Hash_relay_domains($_GET["ou"]);
$tools = new DomainsTools();
$arr = $tools->transport_maps_explode($HashDomains[$_GET["index"]]);
$page = CurrentPageName();
$autoalias = new AutoAliases($_GET["ou"]);
$users = new usersMenus();
$users->LoadModulesEnabled();
$num = $_GET["index"];
if (strlen($autoalias->DomainsArray[$num]) > 0) {
$alias = "yes";
}
$button_as_settings = Paragraphe('64-buldo.png', '{Anti-spam}', '{antispam_text}', "javascript:Loadjs('domains.amavis.php?domain={$num}');");
if (!$users->AMAVIS_INSTALLED) {
$button_as_settings = null;
}
if ($users->EnableAmavisDaemon != 1) {
$button_as_settings = null;
}
if (!$users->AllowChangeAntiSpamSettings) {
$button_as_settings = null;
}
if ($_GET["index"] != "new domain") {
$dn = "cn=@{$num},cn=relay_recipient_maps,ou={$_GET["ou"]},dc=organizations,{$ldap->suffix}";
$trusted_smtp_domain = 0;
if ($ldap->ExistsDN($dn)) {
$trusted_smtp_domain = 1;
}
$edit_button = "<hr>" . button("{apply}", "EditRelayDomain('{$num}')", "30px");
$trusted = Paragraphe_switch_img("{trusted_smtp_domain}", "{trusted_smtp_domain_text}", "trusted_smtp_domain", $trusted_smtp_domain, "{enable_disable}", 810);
$roundrobin = Paragraphe('64-computer-alias.png', '{roundrobin}', '{roundrobin_text}', "javascript:Loadjs('{$page}?round-robin=yes&ou={$_GET["ou"]}&domain={$num}');");
$form = "\n\t<div style='width:98%' class=form>\n\t<div style='font-size:30px'>{organization}:{$ou}</div>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td><strong style='font-size:18px;color:black'>{domain_name}:</strong></td>\n\t\t\t<td align='right'><strong style='font-size:18px;color:black'>{$_GET["index"]}</strong></td>\n\t\t</tr>\n\t\t<tr>\t\t\t\t\t\t\t\n\t\t\t<td nowrap><strong style='font-size:18px;color:black'>{target_computer_name}: </strong></td>\n\t\t\t<td align='right'>" . Field_text("{$num}_IP", $arr[1], 'width:99%;padding:10px;font-size:18px') . "</td>\n\t\t</tr>\n\t\t\t<td align='right' colspan=2><strong style='font-size:18px;color:black'>{port}: " . Field_text("{$num}_PORT", $arr[2], 'width:110px;padding:3px;font-size:18px') . " " . Field_yesno_checkbox_img("{$num}_MX", $arr[3], '{mx_look}') . " " . Field_yesno_checkbox_img("{$num}_autoaliases", $alias, '<b>{autoaliases}</b><br>{autoaliases_text}') . "\n\t\t\t</td>\n\t\t</tr>\n\t\t\n\t\t<tr>\n\t\t\t<td align='right' colspan=2>{$edit_button}</td>\n\t\t</tr>\n\t</table>\n\t</div>";
} else {
$button_as_settings = null;
$form = "\n\t<div style='width:98%' class=form>\n\t\t\t<div style='font-size:30px'>{organization}:{$ou}</div>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td class=legend><strong style='font-size:18px;color:black'>{domain_name}:</strong></td>\n\t\t\t<td align='right'>" . Field_text('AddNewRelayDomainName', null, 'width:98%;padding:10px;font-size:18px') . "</td>\n\t\t</tr>\n\t\t<tr>\t\t\t\t\t\n\t\t\t<td nowrap class=legend><strong style='font-size:18px;color:black'>{target_computer_name}: </strong></td>\n\t\t\t<td align='right'>" . Field_text('AddNewRelayDomainIP', null, 'width:98%;padding:10px;font-size:18px') . "</td>\n\t\t</tr>\n\t\t\t<td align='right' colspan=2><strong style='font-size:18px;color:black'>{port}: " . Field_text('AddNewRelayDomainPort', '25', 'width:120px;padding:3px;font-size:18px') . " " . Field_yesno_checkbox_img('MX', 'no', '{mx_look}') . "\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><div style='float:right'>" . Paragraphe_switch_img("{trusted_smtp_domain}", "{trusted_smtp_domain_text}", "trusted_smtp_domain", 1, "{enable_disable}", 810) . "</div></td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td align='right' colspan=2>\n\t\t\t<hr>" . button("{add}", "AddRelayDomain()", "22px") . "</td>\n\t\t</tr>\n\t</table></div>";
}
$html = "\n\n<table style='width:100%'>\n<tr>\n\t<td valign='top'>{$form}</td>\n\t<td valign='top' style='padding-left:5px'>{$button_as_settings}{$roundrobin}{$trusted}</td>\n</tr>\n<tr>\n\t<td colspan=2 align='right'>{$edit_button}</td>\n</tr>\n</table>\n\n";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
}
示例12: registerURL
//.........这里部分代码省略.........
$s3ql = compact('user_id', 'db');
$s3ql['insert'] = 'item';
$s3ql['where']['collection_id'] = $GLOBALS['deployment_project']['collection_id'];
$s3ql['where']['item_id'] = $Did;
$s3ql['where']['notes'] = $name == '' ? urlencode('Deployment ' . $Did) : $name;
$s3ql['format'] = 'php';
$done = unserialize(S3QLaction($s3ql));
$msg = $done[0];
if ($msg['error_code'] == '0' || $msg['error_code'] == '4') {
$s3ql = compact('user_id', 'db');
$s3ql['insert'] = 'user';
$s3ql['where']['item_id'] = $msg['item_id'];
$s3ql['where']['user_id'] = $remoteUser;
$s3ql['where']['permission_level'] = '222';
$done = S3QLaction($s3ql);
$item_id = $msg['item_id'];
$msg = html2cell($done);
$msg = $msg[2];
#find the collectiont rules
$s3ql = compact('user_id', 'db');
$s3ql['from'] = 'rules';
$s3ql['where']['subject_id'] = $GLOBALS['deployment_project']['collection_id'];
$rules = S3QLaction($s3ql);
if (!empty($rules)) {
$s3ql = compact('user_id', 'db');
$s3ql['insert'] = 'statement';
$s3ql['where']['item_id'] = $item_id;
foreach ($rules as $key => $rule_info) {
if (in_array($rule_info['object'], array_keys($_GET))) {
$s3ql['where']['rule_id'] = $rule_info['rule_id'];
if ($rule_info['object'] == 'keywords') {
$keywords = explode(',', $_GET['keywords']);
foreach ($keywords as $word) {
if (is_base64_encoded($word)) {
$word = base64_decode($word);
}
$s3ql['where']['value'] = $word;
$done = S3QLaction($s3ql);
}
} elseif ($rule_info['object'] == 'url') {
$s3ql['where']['value'] = $url;
$done = S3QLaction($s3ql);
} elseif ($rule_info['object'] == 'description') {
$v = $_GET[$rule_info['object']];
if (is_base64_encoded($v)) {
$v = base64_decode($v);
}
$s3ql['where']['value'] = $v;
$done = S3QLaction($s3ql);
} elseif ($rule_info['object'] == 'name') {
$s3ql['where']['value'] = $name;
$done = S3QLaction($s3ql);
} else {
$v = $_GET[$rule_info['object']];
$s3ql['where']['value'] = $v;
$done = S3QLaction($s3ql);
}
}
}
}
}
}
}
#After registering url, return Did
if ($Did != '') {
return array(True, array('deployment_id' => $Did, 'name' => $name));
示例13: USER_ALIASES_MAILING_LIST
function USER_ALIASES_MAILING_LIST($userid)
{
$page = CurrentPageName();
$u = new user($userid);
$priv = new usersMenus();
$page = CurrentPageName();
$tpl = new templates();
$t = time();
$add_new_alias = $tpl->javascript_parse_text("{add_new_recipient}");
$email = $tpl->_ENGINE_parse_body("{email}");
$telephonenumber = $tpl->_ENGINE_parse_body("{phone}");
$delete_this_member_ask = $tpl->javascript_parse_text("{delete_this_member_ask}");
$member = $tpl->_ENGINE_parse_body("{member}");
$website_ssl_wl_help = $tpl->javascript_parse_text("{website_ssl_wl_help}");
$parameters = $tpl->javascript_parse_text("{parameters}");
$send_a_test_mail = $tpl->javascript_parse_text("{send_a_test_mail}");
$explain = $tpl->_ENGINE_parse_body("<div style='font-size:13px' class=explain>{aliases_mailing_text}: «<b>{$u->mail}»</b></div>");
//$q=new mysql_squid_builder();
//$q->QUERY_SQL("ALTER TABLE `usersisp` ADD UNIQUE (`email`)");
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"]);
}
$add_user_disabled = Paragraphe('folder-useradd-64-grey.png', '{create_user}', '{create_user_text}');
$add_user = Paragraphe('folder-useradd-64.png', '{create_user}', '{create_user_text}', "javascript:Loadjs('domains.add.user.php?ou={$ou}')", null, 210, null, 0, true);
$groups = Paragraphe('folder-group-64.png', '{manage_groups}', '{manage_groups_text}', "javascript:Loadjs('domains.edit.group.php?ou={$ou_encoded}&js=yes')", null, 210, 100, 0, true);
$delete_all_users = Paragraphe('member-64-delete.png', '{delete_all_users}', '{delete_all_users_text}', "javascript:DeleteAllusers()", null, 210, 100, 0, true);
$add_new_alias_js = "{name: '<b>{$add_new_alias}</b>', bclass: 'Add', onpress : NewAliasEmail},";
if ($priv->AllowAddUsers == false) {
$add_new_alias_js = null;
}
$buttons = "\n\tbuttons : [\n\t{$add_new_alias_js}\n\t{name: '<b>{$send_a_test_mail}</b>', bclass: 'eMail', onpress : SendTestMail},{$bt_enable}\n\t],";
$html = "\n \t\n \t<input type='hidden' id='ou' value='{$u->ou}'>\n{$explain}\n \t" . $tpl->_ENGINE_parse_body("<table style='width:99%' class=form>\n \t<tr>\n \t\t<td class=legend>{MailingListAddressGroup}:</td>\n \t\t<td align='left'>" . Field_checkbox("MailingListAddressGroup", 1, $u->MailingListAddressGroup, "Loadjs('{$page}?MailingListAddressGroupSwitch=yes&uid={$userid}&ou={$u->ou}')", "{MailingListAddressGroup_text}") . "</td>\n \t</tr>\n \t</table>") . "\n<table class='flexRT{$t}' style='display: none' id='flexRT{$t}' style='width:100%'></table>\n\n\t\n<script>\nrow_id='';\n\$(document).ready(function(){\n\$('#flexRT{$t}').flexigrid({\n\turl: '{$page}?aliases-mailing-list=yes&ou={$_GET["ou"]}&t={$t}&uid={$userid}',\n\tdataType: 'json',\n\tcolModel : [\n\t\t{display: '{$email}', name : 'email', width : 480, sortable : false, align: 'left'},\n\t\t{display: ' ', name : 'aaa', width : 31, sortable : false, align: 'center'},\t\n\t\t{display: ' ', name : 'del', width : 31, sortable : false, align: 'center'},\n\t\t],\n\t{$buttons}\n\tsearchitems : [\n\t\t{display: '{$member}', name : 'search'},\n\t\t],\n\tsortname: 'uid',\n\tsortorder: 'desc',\n\tusepager: true,\n\ttitle: '',\n\tuseRp: true,\n\trp: 50,\n\tshowTableToggleBtn: false,\n\twidth: 600,\n\theight: 300,\n\tsingleSelect: true,\n\trpOptions: [10, 20, 30, 50,100,200]\n\t\n\t}); \n});\n\n\tvar x_sslBumbAddwl=function(obj){\n \tvar tempvalue=obj.responseText;\n \tif(tempvalue.length>3){alert(tempvalue);}\n \t//\$('#flexRT{$t}').flexReload();\n \t}\t\n \n function SendTestMail(){\n \t\tLoadjs('postfix.sendtest.mail.php?rcpt={$u->mail}');\n\t\t}\n\n\tfunction NewAliasEmail(){\n\t\tLoadjs('{$page}?USER_ALIASES_MAILING_LIST_ADD_JS=yes&uid={$userid}&ou={$u->ou}&flexRT={$t}')\n\t}\n\t\n\t\n\t\n</script>\n\n";
return $html;
}
示例14: GROUP_SETTINGS_PAGE_CONTENT
function GROUP_SETTINGS_PAGE_CONTENT()
{
$ldap = new clladp();
$page = CurrentPageName();
$num = $_GET["LoadGroupSettings"];
$groupID = $num;
writelogs("Loading group {$num}", __FUNCTION__, __FILE__, __LINE__);
if (is_base64_encoded($_GET["ou"])) {
$_GET["ou"] = base64_decode($_GET["ou"]);
}
$ou_conn = $_GET["ou"];
if (!$ldap->EnableManageUsersTroughActiveDirectory) {
if (!is_numeric($num)) {
return null;
}
}
if (trim($num) == null) {
$num = 0;
}
if ($num == 0) {
if (isset($_GET["byGroupName"])) {
$num = $ldap->GroupIDFromName($_GET["ou"], $_GET["byGroupName"]);
writelogs("Numeric identifier=0, try to get numeric identifier by {$_GET["ou"]}/{$_GET["byGroupName"]}={$num}", __FUNCTION__, __FILE__, __LINE__);
if ($num == 0) {
return;
}
}
}
$group = new groups($num);
if (trim($_GET["ou"]) != null) {
if ($group->ou != $_GET["ou"]) {
$tpl = new templates();
$error = "<center style='border:2px solid red;padding:10px;margin:10px'><span style='font-size:13px;font-weight:bold;color:red'>Group: {$num}/{$_GET["ou"]}<br> {error_group_not_in_your_organization}</span></center>";
//echo $tpl->_ENGINE_parse_body($error);
writelogs("ERROR: group {$num} from organization \"{$group->ou}\" is different from requested organization \"{$_GET["ou"]}\"", __FUNCTION__, __FILE__);
return null;
}
}
$text_disbaled = "{ERROR_NO_PRIVILEGES_OR_PLUGIN_DISABLED}";
$user = new usersMenus();
$user->LoadModulesEnabled();
$sock = new sockets();
$SambaEnabled = $sock->GET_INFO("SambaEnabled");
if (!is_numeric($SambaEnabled)) {
$SambaEnabled = 1;
}
if ($SambaEnabled == 0) {
$user->SAMBA_INSTALLED = false;
}
$SAMBA_GROUP = Paragraphe('64-group-samba-grey.png', '{MK_SAMBA_GROUP}', $text_disbaled, '');
$mailing_list = Paragraphe('64-mailinglist-grey.png', "{mailing_list}", "{$text_disbaled}");
//$hash=$ldap->GroupDatas($num);
$members = count($group->members);
if ($user->POSTFIX_INSTALLED == true) {
$mailing_list_count = $group->CountMailingListes();
$js = "javascript:Loadjs('domains.edit.group.php?LoadMailingList-js={$_GET['ou']}')";
$mailing_list = Paragraphe('64-mailinglist.png', "({$mailing_list_count}) {mailing_list}", "{mailing_list_text}", "{$js}");
}
if ($user->DANSGUARDIAN_INSTALLED == true) {
$DANSGUARDIAN = Paragraphe('icon-chevallier-564.png', '{dansguardian_rules}', '{dansguardian_rules_text}', "javascript:DansGuardianRules({$num})");
//
}
$automount = Paragraphe('folder-64-automount.png', '{shared_folders}', '{shared_folders_text}', "javascript:Loadjs('SharedFolders.groups.php?gpid={$num}')");
if ($user->cyrus_imapd_installed) {
$sieve_auto = Paragraphe('64-learning.png', '{sieve_auto_script}', '{sieve_auto_script_text}', "javascript:Loadjs('{$page}?sieve-js={$num}')");
}
if ($user->SAMBA_INSTALLED) {
$COMPUTERS = Paragraphe('computers-64.png', '{computers}', '{computers_text}', "javascript:LoadComputerGroup({$num})");
$SAMBA_GROUP = Paragraphe('64-group-samba.png', '{MK_SAMBA_GROUP}', '{MK_SAMBA_GROUP_text}', "javascript:Change_group_settings({$num})");
$LOGON_SCRIPT = Paragraphe('script-64.png', '{LOGON_SCRIPT}', '{LOGON_SCRIPT_TEXT}', "javascript:Loadjs('domains.edit.group.login.script.php?gpid={$num}')");
}
if ($DANSGUARDIAN == null) {
$DANSGUARDIAN = Paragraphe('icon-chevallier-564-grey.png', '{dansguardian_rules}', $text_disbaled, '');
}
if ($automount == null) {
$automount = Paragraphe('folder-64-automount-grey.png', '{shared_folders}', $text_disbaled, '');
}
if ($COMPUTERS == null) {
$COMPUTERS = Paragraphe('computers-64-grey.png', '{computers}', $text_disbaled, '');
}
if (!$user->cyrus_imapd_installed) {
if ($user->SAMBA_INSTALLED) {
$sieve_auto = $LOGON_SCRIPT;
$LOGON_SCRIPT = null;
}
}
$RENAME_GROUP = Paragraphe('group_rename-64.png', '{GROUP_RENAME}', '{GROUP_RENAME_TEXT}', "javascript:Loadjs('domains.edit.group.rename.php?group-id={$num}&ou={$_GET["ou"]}')");
$OPTIONS_DEFAULT_PASSWORD = Paragraphe('64-key.png', '{group_default_password}', '{group_default_password_text}', "javascript:YahooWin('400','{$page}?default_password=yes&gpid={$num}')");
$PRIVILEGES = Paragraphe('members-priv-64.png', '{privileges}', '{privileges_text}', "javascript:GroupPrivileges({$num})");
$ou_encoded = base64_encode($_GET["ou"]);
$delete_group = imgtootltip("32-cancel.png", "{delete}::{$group->groupName}", "Loadjs('domains.delete.group.php?gpid={$num}')");
$quotaDisk = Paragraphe("rename-disk-64.png", '{disk_user_quota}', '{disk_group_quota_text}', "javascript:Loadjs('domains.edit.user.quota.php?uid=@{$group->group_id}&ou={$group->ou}&userid=@{$group->group_id}')", null, 210, 'font-size:12px;font-weight:bold');
$quotaDisk_disabled = Paragraphe("rename-disk-64-grey.png", '{disk_user_quota}', '{disk_group_quota_text}');
if (!$user->QUOTA_INSTALLED) {
$quotaDisk = $quotaDisk_disabled;
}
if ($user->EnableManageUsersTroughActiveDirectory) {
$SAMBA_GROUP = Paragraphe('64-group-samba-64.png', '{MK_SAMBA_GROUP}', '{MK_SAMBA_GROUP_text}');
$mailing_list = Paragraphe('64-mailinglist-grey.png', "({$mailing_list_count}) {mailing_list}", "{mailing_list_text}");
$automount = Paragraphe('folder-64-automount-grey.png', '{shared_folders}', '{shared_folders_text}');
//.........这里部分代码省略.........
示例15: find_member
function find_member(){
$tofind=$_GET["find-member"];
if($_SESSION["uid"]==-100){$ou=$_GET["ou"];}else{$ou=$_SESSION["ou"];}
$ldap=new clladp();
if(is_base64_encoded($ou)){$ou=base64_decode($ou);}
if($tofind==null){$tofind='*';}else{$tofind="*$tofind*";}
$tofind=str_replace('***','*',$tofind);
writelogs("FIND $tofind IN OU \"$ou\"",__FUNCTION__,__FILE__,__LINE__);
$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");
$dn="ou=$ou,dc=organizations,$ldap->suffix";
if($ldap->EnableManageUsersTroughActiveDirectory){
$cc=new ldapAD();
$filter="(&(objectClass=user)(|(cn=$tofind)(mail=$tofind)(displayName=$tofind)(sAMAccountName=$tofind) (givenname=$tofind) ))";
$dn="ou=$ou,$cc->suffix";
if(trim($ou)=="Domain Controllers"){$dn="CN=Users,$cc->suffix";}
}
$hash=$ldap->Ldap_search($dn,$filter,$attrs,20);
$users=new user();
$number=$hash["count"];
for($i=0;$i<$number;$i++){
$user=$hash[$i];
$html=$html .formatUser($user,$ldap->EnableManageUsersTroughActiveDirectory);
}
return $html;
}