Colored/marked account overview

Use this forum if you want to suggest a new feature to hMailServer. Before posting, please search the forum to confirm that it has not already been suggested.
Post Reply
New user
New user
Posts: 3
Joined: 2012-06-28 20:02

Colored/marked account overview

Post by kuerbis42 » 2021-02-02 17:52

Hi to all.
According to a lot of accounts, without fullnames in the beginning (eg., it would be nice, that the names are shown in the account-overview.
I managed this for me within phpWebAdmin like this:
Preview attached: Image

therefor I changed the source of hm_accounts.php from line 32 to (now) 62 :
I marked new/changed lines with: /*****/

Code: Select all

$str_accountaddress  = $obLanguage->String("Address");
$str_accountactive   = "<font color='green'>" . $obLanguage->String("active")  . "</font>";  /*****/
$str_accountinactive = "<font color='red'>" . $obLanguage->String("inactive") . "</font>";    /*****/

$str_maxsizemb       = $obLanguage->String("Maximum size (MB)");

echo "<tr bgcolor=\"#CCCCCC\">";
echo "<td width=\"60%\" colspan=\"2\">$str_accountaddress ($str_accountactive / $str_accountinactive)</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;
    $accountfullname = $obAccount->PersonFirstName . " " . $obAccount->PersonLastName ;            /*****/
    ($obAccount->Active) ? $strikeout_on="<font color='green'>":$strikeout_on="<font color='red'>";  /*****/
    ($obAccount->Active) ? $strikeout_off="</font>":$strikeout_off="</font>";                               /*****/
   $accountmaxsize      = $obAccount->MaxSize();

   $accountaddress = PreprocessOutput($accountaddress);
   $accountaddress_escaped = GetStringForJavaScript($accountaddress);

	echo "<tr bgcolor=\"$bgcolor\">";
	echo "<td width=\"30%\">";

	echo "<a href=\"?page=account&action=edit&domainid=$domainid&accountid=$accountid\">";
	echo "$strikeout_on$accountaddress$strikeout_off</a></td><td width=\"30%\">$accountfullname</td>"; /*****/
	echo "<td width=\"20%\">$accountmaxsize</td>";

	echo "<td width=\"20%\">";
It would be nice to have something similar in the main hMailserver-Software.

Greets, Kuerbis42

Post Reply