本文整理汇总了PHP中hmailGetAdminLevel函数的典型用法代码示例。如果您正苦于以下问题:PHP hmailGetAdminLevel函数的具体用法?PHP hmailGetAdminLevel怎么用?PHP hmailGetAdminLevel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了hmailGetAdminLevel函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hmailHackingAttemp
<?php
if (!defined('IN_WEBADMIN')) {
exit;
}
if (hmailGetAdminLevel() != ADMIN_SERVER) {
hmailHackingAttemp();
}
// Only server can change these settings.
$domainid = hmailGetVar("domainid", 0);
$action = hmailGetVar("action", "");
?>
<h1><?php
EchoTranslation("Alias");
?>
</h1>
<form action="index.php" method="post" onSubmit="return formCheck(this);">
<?php
PrintHidden("page", "background_domain_name_save");
PrintHidden("action", $action);
PrintHidden("domainid", $domainid);
?>
<div class="tabber">
<div class="tabbertab">
<h2><?php
示例2: hmailHackingAttemp
<?php
if (!defined('IN_WEBADMIN')) {
exit;
}
if (hmailGetAdminLevel() != 2) {
hmailHackingAttemp();
}
// Domain admin but not for this domain.
$routeid = hmailGetVar("routeid", 0);
$action = hmailGetVar("action", "");
$obRoutes = $obSettings->Routes();
$routetargetsmtpport = 25;
$routenumberoftries = 4;
$routemminutesbetweentry = 60;
$routedomainname = "";
$routetargetsmtphost = "";
$TreatRecipientAsLocalDomain = 0;
$TreatSenderAsLocalDomain = 0;
$ConnectionSecurity = 0;
$routerequiresauth = 0;
$routeauthusername = "";
$AllAddresses = true;
if ($action == "edit") {
$obRoute = $obRoutes->ItemByDBID($routeid);
$routedomainname = $obRoute->DomainName;
$routetargetsmtphost = $obRoute->TargetSMTPHost;
$routetargetsmtpport = $obRoute->TargetSMTPPort;
$TreatRecipientAsLocalDomain = $obRoute->TreatRecipientAsLocalDomain;
$TreatSenderAsLocalDomain = $obRoute->TreatSenderAsLocalDomain;
$routenumberoftries = $obRoute->NumberOfTries;
示例3: EchoTranslation
exit;
}
?>
<h1><?php
EchoTranslation("Accounts");
?>
</h1>
<?php
$domainid = hmailGetVar("domainid", null);
if (hmailGetAdminLevel() == 0) {
hmailHackingAttemp();
}
// Users are not allowed to show this page.
if (hmailGetAdminLevel() == 1 && $domainid != hmailGetDomainID()) {
hmailHackingAttemp();
}
// Domain admin but not for this domain.
echo '<table border="0" width="100%" cellpadding="5">';
$bgcolor = "#EEEEEE";
$obDomain = $obBaseApp->Domains->ItemByDBID($domainid);
$obAccounts = $obDomain->Accounts();
$Count = $obAccounts->Count();
$str_delete = $obLanguage->String("Remove");
$currentaccountid = hmailGetAccountID();
$str_accountaddress = $obLanguage->String("Address");
$str_maxsizemb = $obLanguage->String("Maximum size (MB)");
echo "<tr bgcolor=\"#CCCCCC\">";
echo "<td width=\"60%\">{$str_accountaddress}</td>";
echo "<td width=\"20%\">{$str_maxsizemb}</td>";
示例4: GetStringForDomain
function GetStringForDomain($obDomain, $parentid)
{
global $dtree, $dtitem, $domain_root;
$current_domainid = hmailGetVar("domainid", 0);
$current_accountid = hmailGetVar("accountid", 0);
$domainname = $obDomain->Name;
$domainname = PreprocessOutput($domainname);
$domainname = str_replace("'", "\\'", $domainname);
$dtree .= "d.add({$domain_root},{$parentid},'" . $domainname . "','index.php?page=domain&action=edit&domainid=" . $obDomain->ID . "','','','" . "images/server.png','" . "images/server.png');\r\n";
if ($current_domainid != $obDomain->ID && hmailGetAdminLevel() == ADMIN_SERVER) {
// If the user is logged on as a system administrator, only show accounts
// for the currently selected domain.
return;
}
$obAccounts = $obDomain->Accounts();
$AccountsCount = $obAccounts->Count();
$accounts_root = $dtitem++;
$dtree .= "d.add({$accounts_root},{$domain_root},'" . GetStringForJavaScript("Accounts") . " ({$AccountsCount})','index.php?page=accounts&domainid=" . $obDomain->ID . "','','','" . "images/folder.png','" . "images/folder.png');\r\n";
for ($j = 0; $j < $AccountsCount; $j++) {
$obAccount = $obAccounts->Item($j);
$accountaddress = $obAccount->Address;
$accountaddress = PreprocessOutput($accountaddress);
$accountaddress = str_replace("'", "\\'", $accountaddress);
$accountid = $obAccount->ID;
$di = $dtitem++;
$url = htmlentities("index.php?page=account&action=edit&accountid=" . $accountid . "&domainid=" . $obDomain->ID);
$dtree .= "d.add({$di},{$accounts_root},'" . $accountaddress . "','{$url}','','','" . "images/user.png','" . "images/user.png');\r\n";
// Only show sub-nodes for the currently selected account.
if ($current_accountid == $accountid) {
$dtree .= "d.add(" . $dtitem++ . ",{$di},'" . GetStringForJavaScript("External accounts") . "','index.php?page=account_externalaccounts&accountid=" . $accountid . "&domainid=" . $obDomain->ID . "');\r\n";
}
}
$obAliases = $obDomain->Aliases();
$AliasesCount = $obAliases->Count();
$aliases_root = $dtitem++;
$dtree .= "d.add({$aliases_root},{$domain_root},'" . GetStringForJavaScript("Aliases") . " ({$AliasesCount})','index.php?page=aliases&domainid=" . $obDomain->ID . "','','','" . "images/folder.png','" . "images/folder.png');\r\n";
for ($j = 0; $j < $AliasesCount; $j++) {
$obAlias = $obAliases->Item($j);
$aliasname = $obAlias->Name;
$aliasname = PreprocessOutput($aliasname);
$aliasname = str_replace("'", "\\'", $aliasname);
$di = $dtitem++;
$dtree .= "d.add({$di},{$aliases_root},'" . $aliasname . "','index.php?page=alias&action=edit&aliasid=" . $obAlias->ID . "&domainid=" . $obDomain->ID . "','','','" . "images/arrow_switch.png','" . "images/arrow_switch.png');\r\n";
}
$obDistributionLists = $obDomain->DistributionLists();
$DListCount = $obDistributionLists->Count();
$dlist_root = $dtitem++;
$dtree .= "d.add({$dlist_root},{$domain_root},'" . GetStringForJavaScript("Distribution lists") . " ({$DListCount})','index.php?page=distributionlists&domainid=" . $obDomain->ID . "','','','" . "images/folder.png','" . "images/folder.png');\r\n";
for ($j = 0; $j < $DListCount; $j++) {
$obDistributionList = $obDistributionLists->Item($j);
$di = $dtitem++;
$address = PreprocessOutput($obDistributionList->Address);
$address = str_replace("'", "\\'", $address);
$dtree .= "d.add({$di},{$dlist_root},'" . $address . "','index.php?page=distributionlist&action=edit&distributionlistid=" . $obDistributionList->ID . "&domainid=" . $obDomain->ID . "','','','" . "images/arrow_out.png','" . "images/arrow_out.png');\r\n";
$dtree .= "d.add(" . $dtitem++ . ",{$di},'" . GetStringForJavaScript("Members") . " (" . $obDistributionList->Recipients->Count() . ")','index.php?page=distributionlist_recipients&distributionlistid=" . $obDistributionList->ID . "&domainid=" . $obDomain->ID . "');\r\n";
}
}
示例5: GetHasRuleAccess
function GetHasRuleAccess($domainid, $accountid)
{
global $hmail_config;
if (hmailGetAdminLevel() == ADMIN_SERVER) {
// server admin always have access.
return true;
} else {
if (hmailGetAdminLevel() == ADMIN_DOMAIN) {
// Domain admin has access if domain access is enabled.
if ($hmail_config['rule_editing_level'] == ADMIN_DOMAIN && hmailGetDomainID() == $domainid && $accountid != 0) {
return true;
}
// Domain admin has access if user-level is permitted and the account
// is under the domain admins control.
if ($hmail_config['rule_editing_level'] == ADMIN_USER && hmailGetDomainID() == $domainid) {
return true;
}
} else {
if (hmailGetAdminLevel() == ADMIN_USER) {
// user has access if enabled and the rule is connected to his account.
if ($hmail_config['rule_editing_level'] == ADMIN_USER && hmailGetDomainID() == $domainid && hmailGetAccountID() == $accountid) {
return true;
}
}
}
}
return false;
}
示例6:
$obDomain->PlusAddressingEnabled = $domainplusaddressingenabled == "1";
$obDomain->PlusAddressingCharacter = $domainplusaddressingcharacter;
$obDomain->AntiSpamEnableGreylisting = $domainantispamenablegreylisting == "1";
$obDomain->SignatureEnabled = $SignatureEnabled == "1";
$obDomain->SignaturePlainText = $SignaturePlainText;
$obDomain->SignatureHTML = $SignatureHTML;
$obDomain->SignatureMethod = $SignatureMethod;
$obDomain->AddSignaturesToLocalMail = $AddSignaturesToLocalMail;
$obDomain->AddSignaturesToReplies = $AddSignaturesToReplies;
$obDomain->DKIMSignEnabled = $DKIMSignEnabled;
$obDomain->DKIMPrivateKeyFile = $DKIMPrivateKeyFile;
$obDomain->DKIMSelector = $DKIMSelector;
$obDomain->DKIMHeaderCanonicalizationMethod = $DKIMHeaderCanonicalizationMethod;
$obDomain->DKIMBodyCanonicalizationMethod = $DKIMBodyCanonicalizationMethod;
$obDomain->DKIMSigningAlgorithm = $DKIMSigningAlgorithm;
if (hmailGetAdminLevel() == 2) {
// Save other properties
$obDomain->Active = $domainactive;
$obDomain->Name = $domainname;
$obDomain->MaxSize = $domainmaxsize;
$obDomain->MaxMessageSize = $domainmaxmessagesize;
$obDomain->MaxAccountSize = $MaxAccountSize;
$obDomain->MaxNumberOfAccounts = $MaxNumberOfAccounts;
$obDomain->MaxNumberOfAliases = $MaxNumberOfAliases;
$obDomain->MaxNumberOfDistributionLists = $MaxNumberOfDistributionLists;
$obDomain->MaxNumberOfAccountsEnabled = $MaxNumberOfAccountsEnabled;
$obDomain->MaxNumberOfAliasesEnabled = $MaxNumberOfAliasesEnabled;
$obDomain->MaxNumberOfDistributionListsEnabled = $MaxNumberOfDistributionListsEnabled;
}
$obDomain->Save();
$domainid = $obDomain->ID;
示例7: EchoTranslation
if ($domainactive == 1) {
echo $obLanguage->String("Yes");
} else {
echo $obLanguage->String("No");
}
}
?>
</td>
</tr>
</table>
</div>
<?php
if (isset($obDomain) && hmailGetAdminLevel() == ADMIN_SERVER) {
$str_delete = $obLanguage->String("Remove");
?>
<div class="tabbertab">
<h2><?php
EchoTranslation("Names");
?>
</h2>
<table width="100%">
<tr>
<td width="70%">
<?php
EchoTranslation("Name");
?>
</td>