Exemplo n.º 1
0
$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>";
echo "<td width=\"20%\"></td>";
echo "</tr>";
$obAccounts = $obDomain->Accounts;
for ($i = 0; $i < $Count; $i++) {
    $obAccount = $obAccounts->Item($i);
    $accountaddress = $obAccount->Address;
    $accountid = $obAccount->ID;
    $accountmaxsize = $obAccount->MaxSize();
    $accountaddress = PreprocessOutput($accountaddress);
    $accountaddress_escaped = GetStringForJavaScript($accountaddress);
    echo "<tr bgcolor=\"{$bgcolor}\">";
    echo "<td width=\"60%\"><a href=\"?page=account&action=edit&domainid={$domainid}&accountid={$accountid}\">{$accountaddress}</a></td>";
    echo "<td width=\"20%\">{$accountmaxsize}</td>";
    echo "<td width=\"20%\">";
    if ($currentaccountid != $accountid) {
        echo "<a href=\"javascript:ConfirmDelete('{$accountaddress_escaped}', '?page=background_account_save&action=delete&domainid={$domainid}&accountid={$accountid}')\">{$str_delete}</a>";
    } else {
        "</td>";
    }
    echo "</tr>";
    if ($bgcolor == "#EEEEEE") {
        $bgcolor = "#DDDDDD";
    } else {
        $bgcolor = "#EEEEEE";
    }
Exemplo n.º 2
0
$DomainCount = $obBaseApp->Domains->Count();
$str_delete = $obLanguage->String("Remove");
$str_name = $obLanguage->String("Domain name");
$str_maxsizemb = $obLanguage->String("Maximum size (MB)");
echo "<tr bgcolor=\"#CCCCCC\">";
echo "<td width=\"60%\">{$str_name}</td>";
echo "<td width=\"20%\">{$str_maxsizemb}</td>";
echo "<td width=\"20%\"></td>";
echo "</tr>";
for ($i = 1; $i <= $DomainCount; $i++) {
    $obDomain = $obBaseApp->Domains->Item($i - 1);
    $domainname = $obDomain->Name;
    $domainid = $obDomain->ID;
    $domainmaxsize = $obDomain->MaxSize;
    $domainname = PreprocessOutput($domainname);
    $domainname_escaped = GetStringForJavaScript($domainname);
    echo "<tr bgcolor=\"{$bgcolor}\">";
    echo "<td width=\"60%\"><a href=\"?page=domain&action=edit&domainid={$domainid}\">{$domainname}</a></td>";
    echo "<td width=\"20%\">{$domainmaxsize}</td>";
    echo "<td width=\"20%\"><a href=\"javascript:ConfirmDelete('{$domainname_escaped}', '?page=background_domain_save&action=delete&domainid={$domainid}')\">{$str_delete}</a></td>";
    echo "</tr>";
    if ($bgcolor == "#EEEEEE") {
        $bgcolor = "#DDDDDD";
    } else {
        $bgcolor = "#EEEEEE";
    }
}
?>
<tr>
   <td>
      <br>
Exemplo n.º 3
0
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";
    }
}
Exemplo n.º 4
0
?>
</h1>
<table border="0" width="100%" cellpadding="5">
<?php 
$bgcolor = "#EEEEEE";
$obDomain = $obBaseApp->Domains->ItemByDBID($domainid);
$obAliases = $obDomain->Aliases();
$Count = $obAliases->Count();
$str_delete = $obLanguage->String("Remove");
$obAliases = $obDomain->Aliases;
for ($i = 0; $i < $Count; $i++) {
    $obAlias = $obAliases->Item($i);
    $aliasname = $obAlias->Name;
    $aliasid = $obAlias->ID;
    $aliasname = PreprocessOutput($aliasname);
    $aliasname_escaped = GetStringForJavaScript($aliasname);
    echo "<tr bgcolor=\"{$bgcolor}\">";
    echo "<td width=\"80%\"><a href=\"?page=alias&action=edit&domainid={$domainid}&aliasid={$aliasid}\">{$aliasname}</a></td>";
    echo "<td><a href=\"javascript:ConfirmDelete('{$aliasname_escaped}', '?page=background_alias_save&action=delete&domainid={$domainid}&aliasid={$aliasid}')\">{$str_delete}</a></td>";
    echo "</tr>";
    if ($bgcolor == "#EEEEEE") {
        $bgcolor = "#DDDDDD";
    } else {
        $bgcolor = "#EEEEEE";
    }
}
?>
<tr>
   <td>
      <br>
      <a href="?page=alias&action=add&domainid=<?php 
Exemplo n.º 5
0
function GetConfirmDelete()
{
    global $obLanguage;
    return GetStringForJavaScript($obLanguage->String("Are you sure you want to delete %s?"));
}
?>
</h1>
<table border="0" width="100%" cellpadding="5">
<?php 
$bgcolor = "#EEEEEE";
$obDomain = $obBaseApp->Domains->ItemByDBID($domainid);
$obLists = $obDomain->DistributionLists();
$Count = $obLists->Count();
$str_delete = $obLanguage->String("Remove");
$obDistributionLists = $obDomain->DistributionLists;
for ($i = 0; $i < $Count; $i++) {
    $obList = $obDistributionLists->Item($i);
    $listaddress = $obList->Address;
    $listid = $obList->ID;
    $listaddress = PreprocessOutput($listaddress);
    $listaddress_escaped = GetStringForJavaScript($listaddress);
    echo "<tr bgcolor=\"{$bgcolor}\">";
    echo "<td><a href=\"?page=distributionlist&action=edit&domainid={$domainid}&distributionlistid={$listid}&\">{$listaddress}</a></td>";
    echo "<td width=\"20%\"><a href=\"javascript:ConfirmDelete('{$listaddress_escaped}', '?page=background_distributionlist_save&action=delete&domainid={$domainid}&distributionlistid={$listid}')\">{$str_delete}</a></td>";
    echo "</tr>";
    if ($bgcolor == "#EEEEEE") {
        $bgcolor = "#DDDDDD";
    } else {
        $bgcolor = "#EEEEEE";
    }
}
?>

<tr>
   <td>
      <br>