This commit has been accessed 573 times via Git panel.
commit 64481283e15034ea703963dc64ae98434129eee7
tree 45140d800efe640d611f4b1610bf3cec8d2ad0d8
parent 6dd52cfd7a40375b0b3b465b7c701ad283b9e608
author Engels Antonio <engels@majcms.org> 1335198301 +0800
committer Engels Antonio <engels@majcms.org> 1335198301 +0800
Add per-user quota frontend
diff --git a/core.php b/core.php
index 0bc18fd..c7da54b 100644
--- a/core.php
+++ b/core.php
@@ -380,4 +380,34 @@ function kartero_sort_folders($host,$array) {
}
}
+function kartero_dovecot_quota($quota) {
+
+ $quota = strip_tags($quota);
+ $quota = strtoupper($quota);
+ $quota = preg_replace("/[^0-9.KMGT]/","",$quota);
+
+ $prefix = "";
+
+ if (strpos($quota,"K")) {
+ $prefix = "K";
+ }
+
+ if (strpos($quota,"M")) {
+ $prefix = "M";
+ }
+
+ if (strpos($quota,"G")) {
+ $prefix = "G";
+ }
+
+ if (strpos($quota,"T")) {
+ $prefix = "T";
+ }
+
+ $quota = preg_replace("/[^0-9.]/","",$quota);
+ $quota = round($quota,0);
+
+ return $quota . $prefix;
+}
+
?>
diff --git a/folders.php b/folders.php
index c456a2f..528b6c7 100644
--- a/folders.php
+++ b/folders.php
@@ -8,7 +8,7 @@ if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset
$quota = imap_get_quotaroot($mbox,$folder);
-if (is_array($quota)) {
+if (is_array($quota) and ($quota[limit] > 0)) {
$quota_usage = HumanReadableFileSize($quota[usage] * 1024);
$quota_limit = HumanReadableFileSize($quota[limit] * 1024);
@@ -115,10 +115,10 @@ echo "</table></div>";
echo "<div style=\"height: 4px;\"></div>";
-if (is_array($quota)) {
+if (is_array($quota) and ($quota[limit] > 0)) {
echo "<div class=\"folders\">";
echo "<table style=\"-moz-box-shadow: inset 0 0 3px #dedede; -khtml-box-shadow: inset 0 0 3px #dedede; -webkit-box-shadow: inset 0 0 3px #dedede; box-shadow: inset 0 0 3px #dedede;\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\" width=\"100%\"><tr bgcolor=\"#ffffff\"><td><div class=\"bar\" style=\"width: {$quota_bar_width}px;\"></td></tr></table>";
- echo "<font style=\"font-size: 0.75em;\">$quota_usage of $quota_limit ($quota_pct%)</font>";
+ echo "<font style=\"font-size: 0.75em;\"><nobr>$quota_usage of $quota_limit ($quota_pct%)</nobr></font>";
echo "</div>";
echo "<div style=\"height: 4px;\"></div>";
}
diff --git a/index.php b/index.php
index fa14ec8..c7286f8 100644
--- a/index.php
+++ b/index.php
@@ -89,7 +89,7 @@ if (!$db_query) {
$db_query = mysql_query("use $db_name");
$db_query = mysql_query("create table admins (id varchar(16) not null, pw varchar(64) not null, primary key (id), unique key (id))");
$db_query = mysql_query("create table domains (id varchar(128) not null, pw varchar(64) not null, max int(6) default '0', mode int(1) default '1', primary key (id), unique key (id), key id_2 (id))");
- $db_query = mysql_query("create table users (id varchar(255) not null, pw varchar(64) not null, maildir varchar(255) not null, name varchar(128), domain varchar(128), mode int(1) default '1', host varchar(255), primary key (id), unique key(id), key id_2 (id))");
+ $db_query = mysql_query("create table users (id varchar(255) not null, pw varchar(64) not null, maildir varchar(255) not null, name varchar(128), domain varchar(128), mode int(1) default '1', quota varchar(16), primary key (id), unique key(id), key id_2 (id))");
$db_query = mysql_query("create table aliases (id varchar(255) not null, alias varchar(255) not null, domain varchar(128), mode int(1) default '1', primary key (id), unique key (id), key id_2 (id))");
$db_query = mysql_query("insert into admins values('$db_user','$pw_crypt')");
}
@@ -359,10 +359,14 @@ if (isset($_SESSION['logged_uid'])) {
$pm_maildir = "{$_SESSION['logged_uid']}/$pm_init/$pm_id";
- $pm_host = trim($_POST['pm_host']);
- $pm_host = strtolower($pm_host);
-
- $pm_query = mysql_query("insert into users values('$pm_addr','$pm_pw','$pm_maildir/','$pm_name','{$_SESSION['logged_uid']}','1','$pm_host')");
+ $pm_quota = kartero_dovecot_quota($_POST['pm_quota']);
+
+ if ($pm_quota == "") {
+ $pm_query = mysql_query("insert into users values('$pm_addr','$pm_pw','$pm_maildir/','$pm_name','{$_SESSION['logged_uid']}','1',NULL)");
+ }
+ else {
+ $pm_query = mysql_query("insert into users values('$pm_addr','$pm_pw','$pm_maildir/','$pm_name','{$_SESSION['logged_uid']}','1','$pm_quota')");
+ }
if (!$pm_query) {
nak(strtolower(mysql_error()));
@@ -439,24 +443,28 @@ if (isset($_SESSION['logged_uid'])) {
}
}
- if (isset($_POST['pm_host'])) {
+ if (isset($_POST['pm_quota'])) {
- $pm_host = trim($_POST['pm_host']);
- $pm_host = strtolower($pm_host);
+ $pm_quota = kartero_dovecot_quota($_POST['pm_quota']);
- $pm_query = mysql_query("select host from users where id='$pm_mod'");
+ $pm_query = mysql_query("select quota from users where id='$pm_mod'");
- $host_get = mysql_fetch_row($pm_query);
+ $quota_get = mysql_fetch_row($pm_query);
- if ($host_get[0] != $pm_host) {
+ if ($quota_get[0] != $pm_quota) {
- $pm_query = mysql_query("update users set host='$pm_host' where id='$pm_mod'");
+ if ($pm_quota == "") {
+ $pm_query = mysql_query("update users set quota=NULL where id='$pm_mod'");
+ }
+ else {
+ $pm_query = mysql_query("update users set quota='$pm_quota' where id='$pm_mod'");
+ }
if (!$pm_query) {
nak(strtolower(mysql_error()));
}
else {
- ack("$pm_mod delivery host updated");
+ ack("$pm_mod quota updated");
}
}
}
@@ -1294,9 +1302,9 @@ if (isset($_SESSION['logged_uid'])) {
if ($_SESSION['logged_lvl'] == "postmaster") {
echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\">";
- echo "<tr bgcolor=\"#eeeeee\"><td colspan=\"4\" align=\"center\">status</td><td align=\"center\">username</td><td align=\"center\">complete name</td><td align=\"center\">password</td><td align=\"center\">host</td><td align=\"center\" colspan=\"2\">action</td></tr>";
+ echo "<tr bgcolor=\"#eeeeee\"><td colspan=\"4\" align=\"center\">status</td><td align=\"center\">username</td><td align=\"center\">complete name</td><td align=\"center\">password</td><td align=\"center\">quota</td><td align=\"center\" colspan=\"2\">action</td></tr>";
echo "<form method=\"post\">";
- echo "<tr bgcolor=\"#ffffff\"><td align=\"center\">new</td><td align=\"center\">cur</td><td align=\"center\">aka</td><td align=\"center\">rcv</td><td><input class=\"input\" type=\"text\" name=\"pm_id\" autocomplete=\"off\" maxlength=\"255\"></td><td><input class=\"input\" type=\"text\" name=\"pm_name\" autocomplete=\"off\" maxlength=\"128\"></td><td><input class=\"input\" type=\"text\" name=\"pm_pw\" autocomplete=\"off\" maxlength=\"64\"></td><td><input class=\"input\" type=\"text\" name=\"pm_host\" autocomplete=\"off\" maxlength=\"255\"></td><td colspan=\"2\"><input class=\"button\" type=\"submit\" value=\"add\"></td></tr>";
+ echo "<tr bgcolor=\"#ffffff\"><td align=\"center\">new</td><td align=\"center\">cur</td><td align=\"center\">aka</td><td align=\"center\">rcv</td><td><input class=\"input\" type=\"text\" name=\"pm_id\" autocomplete=\"off\" maxlength=\"255\"></td><td><input class=\"input\" type=\"text\" name=\"pm_name\" autocomplete=\"off\" maxlength=\"128\"></td><td><input class=\"input\" type=\"text\" name=\"pm_pw\" autocomplete=\"off\" maxlength=\"64\"></td><td width=\"64\"><input class=\"input\" type=\"text\" name=\"pm_quota\" autocomplete=\"off\" maxlength=\"16\" style=\"text-align: right;\"></td><td colspan=\"2\"><input class=\"button\" type=\"submit\" value=\"add\"></td></tr>";
echo "</form>";
$pm_get = mysql_query("select * from users where domain='{$_SESSION['logged_uid']}' order by id");
@@ -1322,7 +1330,7 @@ if (isset($_SESSION['logged_uid'])) {
$pm_aka = mysql_query("select * from aliases where alias='{$pm_row[0]}'");
$pm_aka = mysql_num_rows($pm_aka);
- echo "<tr bgcolor=\"$pm_bg\"><td align=\"right\">$msg_new</td><td align=\"right\">$msg_cur</td><td align=\"right\">$pm_aka</td><form method=\"post\"><input type=\"hidden\" name=\"pm_set\" value=\"{$pm_row[0]}\"><input type=\"hidden\" name=\"pm_do\" value=\"$pm_do\"><td align=\"center\" valign=\"middle\" width=\"10\"><input type=\"image\" src=\"images/{$pm_do}.png\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"pm_mod\" value=\"{$pm_row[0]}\"><td>{$pm_row[0]}</td><td><input class=\"input\" type=\"text\" name=\"pm_name\" maxlength=\"128\" autocomplete=\"off\" value=\"{$pm_row[3]}\"></td><td><input class=\"input\" type=\"text\" name=\"pm_pass\" maxlength=\"64\" autocomplete=\"off\"></td><td><input class=\"input\" type=\"text\" name=\"pm_host\" maxlength=\"255\" autocomplete=\"off\" value=\"{$pm_row[6]}\"></td><td><input class=\"button\" type=\"submit\" value=\"mod\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"pm_del\" value=\"{$pm_row[0]}\"><td><input class=\"button\" type=\"submit\" value=\"del\" onclick=\"if (confirm('Do you really want to delete {$pm_row[0]} plus all messages and aliases associated with this account?')) {return true;} else {return false;}\"></td></form></tr>";
+ echo "<tr bgcolor=\"$pm_bg\"><td align=\"right\">$msg_new</td><td align=\"right\">$msg_cur</td><td align=\"right\">$pm_aka</td><form method=\"post\"><input type=\"hidden\" name=\"pm_set\" value=\"{$pm_row[0]}\"><input type=\"hidden\" name=\"pm_do\" value=\"$pm_do\"><td align=\"center\" valign=\"middle\" width=\"10\"><input type=\"image\" src=\"images/{$pm_do}.png\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"pm_mod\" value=\"{$pm_row[0]}\"><td>{$pm_row[0]}</td><td><input class=\"input\" type=\"text\" name=\"pm_name\" maxlength=\"128\" autocomplete=\"off\" value=\"{$pm_row[3]}\"></td><td><input class=\"input\" type=\"text\" name=\"pm_pass\" maxlength=\"64\" autocomplete=\"off\"></td><td><input class=\"input\" type=\"text\" name=\"pm_quota\" maxlength=\"16\" autocomplete=\"off\" value=\"{$pm_row[6]}\" style=\"text-align: right;\"></td><td><input class=\"button\" type=\"submit\" value=\"mod\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"pm_del\" value=\"{$pm_row[0]}\"><td><input class=\"button\" type=\"submit\" value=\"del\" onclick=\"if (confirm('Do you really want to delete {$pm_row[0]} plus all messages and aliases associated with this account?')) {return true;} else {return false;}\"></td></form></tr>";
}
echo "</table>";
tree 45140d800efe640d611f4b1610bf3cec8d2ad0d8
parent 6dd52cfd7a40375b0b3b465b7c701ad283b9e608
author Engels Antonio <engels@majcms.org> 1335198301 +0800
committer Engels Antonio <engels@majcms.org> 1335198301 +0800
Add per-user quota frontend
diff --git a/core.php b/core.php
index 0bc18fd..c7da54b 100644
--- a/core.php
+++ b/core.php
@@ -380,4 +380,34 @@ function kartero_sort_folders($host,$array) {
}
}
+function kartero_dovecot_quota($quota) {
+
+ $quota = strip_tags($quota);
+ $quota = strtoupper($quota);
+ $quota = preg_replace("/[^0-9.KMGT]/","",$quota);
+
+ $prefix = "";
+
+ if (strpos($quota,"K")) {
+ $prefix = "K";
+ }
+
+ if (strpos($quota,"M")) {
+ $prefix = "M";
+ }
+
+ if (strpos($quota,"G")) {
+ $prefix = "G";
+ }
+
+ if (strpos($quota,"T")) {
+ $prefix = "T";
+ }
+
+ $quota = preg_replace("/[^0-9.]/","",$quota);
+ $quota = round($quota,0);
+
+ return $quota . $prefix;
+}
+
?>
diff --git a/folders.php b/folders.php
index c456a2f..528b6c7 100644
--- a/folders.php
+++ b/folders.php
@@ -8,7 +8,7 @@ if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset
$quota = imap_get_quotaroot($mbox,$folder);
-if (is_array($quota)) {
+if (is_array($quota) and ($quota[limit] > 0)) {
$quota_usage = HumanReadableFileSize($quota[usage] * 1024);
$quota_limit = HumanReadableFileSize($quota[limit] * 1024);
@@ -115,10 +115,10 @@ echo "</table></div>";
echo "<div style=\"height: 4px;\"></div>";
-if (is_array($quota)) {
+if (is_array($quota) and ($quota[limit] > 0)) {
echo "<div class=\"folders\">";
echo "<table style=\"-moz-box-shadow: inset 0 0 3px #dedede; -khtml-box-shadow: inset 0 0 3px #dedede; -webkit-box-shadow: inset 0 0 3px #dedede; box-shadow: inset 0 0 3px #dedede;\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\" width=\"100%\"><tr bgcolor=\"#ffffff\"><td><div class=\"bar\" style=\"width: {$quota_bar_width}px;\"></td></tr></table>";
- echo "<font style=\"font-size: 0.75em;\">$quota_usage of $quota_limit ($quota_pct%)</font>";
+ echo "<font style=\"font-size: 0.75em;\"><nobr>$quota_usage of $quota_limit ($quota_pct%)</nobr></font>";
echo "</div>";
echo "<div style=\"height: 4px;\"></div>";
}
diff --git a/index.php b/index.php
index fa14ec8..c7286f8 100644
--- a/index.php
+++ b/index.php
@@ -89,7 +89,7 @@ if (!$db_query) {
$db_query = mysql_query("use $db_name");
$db_query = mysql_query("create table admins (id varchar(16) not null, pw varchar(64) not null, primary key (id), unique key (id))");
$db_query = mysql_query("create table domains (id varchar(128) not null, pw varchar(64) not null, max int(6) default '0', mode int(1) default '1', primary key (id), unique key (id), key id_2 (id))");
- $db_query = mysql_query("create table users (id varchar(255) not null, pw varchar(64) not null, maildir varchar(255) not null, name varchar(128), domain varchar(128), mode int(1) default '1', host varchar(255), primary key (id), unique key(id), key id_2 (id))");
+ $db_query = mysql_query("create table users (id varchar(255) not null, pw varchar(64) not null, maildir varchar(255) not null, name varchar(128), domain varchar(128), mode int(1) default '1', quota varchar(16), primary key (id), unique key(id), key id_2 (id))");
$db_query = mysql_query("create table aliases (id varchar(255) not null, alias varchar(255) not null, domain varchar(128), mode int(1) default '1', primary key (id), unique key (id), key id_2 (id))");
$db_query = mysql_query("insert into admins values('$db_user','$pw_crypt')");
}
@@ -359,10 +359,14 @@ if (isset($_SESSION['logged_uid'])) {
$pm_maildir = "{$_SESSION['logged_uid']}/$pm_init/$pm_id";
- $pm_host = trim($_POST['pm_host']);
- $pm_host = strtolower($pm_host);
-
- $pm_query = mysql_query("insert into users values('$pm_addr','$pm_pw','$pm_maildir/','$pm_name','{$_SESSION['logged_uid']}','1','$pm_host')");
+ $pm_quota = kartero_dovecot_quota($_POST['pm_quota']);
+
+ if ($pm_quota == "") {
+ $pm_query = mysql_query("insert into users values('$pm_addr','$pm_pw','$pm_maildir/','$pm_name','{$_SESSION['logged_uid']}','1',NULL)");
+ }
+ else {
+ $pm_query = mysql_query("insert into users values('$pm_addr','$pm_pw','$pm_maildir/','$pm_name','{$_SESSION['logged_uid']}','1','$pm_quota')");
+ }
if (!$pm_query) {
nak(strtolower(mysql_error()));
@@ -439,24 +443,28 @@ if (isset($_SESSION['logged_uid'])) {
}
}
- if (isset($_POST['pm_host'])) {
+ if (isset($_POST['pm_quota'])) {
- $pm_host = trim($_POST['pm_host']);
- $pm_host = strtolower($pm_host);
+ $pm_quota = kartero_dovecot_quota($_POST['pm_quota']);
- $pm_query = mysql_query("select host from users where id='$pm_mod'");
+ $pm_query = mysql_query("select quota from users where id='$pm_mod'");
- $host_get = mysql_fetch_row($pm_query);
+ $quota_get = mysql_fetch_row($pm_query);
- if ($host_get[0] != $pm_host) {
+ if ($quota_get[0] != $pm_quota) {
- $pm_query = mysql_query("update users set host='$pm_host' where id='$pm_mod'");
+ if ($pm_quota == "") {
+ $pm_query = mysql_query("update users set quota=NULL where id='$pm_mod'");
+ }
+ else {
+ $pm_query = mysql_query("update users set quota='$pm_quota' where id='$pm_mod'");
+ }
if (!$pm_query) {
nak(strtolower(mysql_error()));
}
else {
- ack("$pm_mod delivery host updated");
+ ack("$pm_mod quota updated");
}
}
}
@@ -1294,9 +1302,9 @@ if (isset($_SESSION['logged_uid'])) {
if ($_SESSION['logged_lvl'] == "postmaster") {
echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\">";
- echo "<tr bgcolor=\"#eeeeee\"><td colspan=\"4\" align=\"center\">status</td><td align=\"center\">username</td><td align=\"center\">complete name</td><td align=\"center\">password</td><td align=\"center\">host</td><td align=\"center\" colspan=\"2\">action</td></tr>";
+ echo "<tr bgcolor=\"#eeeeee\"><td colspan=\"4\" align=\"center\">status</td><td align=\"center\">username</td><td align=\"center\">complete name</td><td align=\"center\">password</td><td align=\"center\">quota</td><td align=\"center\" colspan=\"2\">action</td></tr>";
echo "<form method=\"post\">";
- echo "<tr bgcolor=\"#ffffff\"><td align=\"center\">new</td><td align=\"center\">cur</td><td align=\"center\">aka</td><td align=\"center\">rcv</td><td><input class=\"input\" type=\"text\" name=\"pm_id\" autocomplete=\"off\" maxlength=\"255\"></td><td><input class=\"input\" type=\"text\" name=\"pm_name\" autocomplete=\"off\" maxlength=\"128\"></td><td><input class=\"input\" type=\"text\" name=\"pm_pw\" autocomplete=\"off\" maxlength=\"64\"></td><td><input class=\"input\" type=\"text\" name=\"pm_host\" autocomplete=\"off\" maxlength=\"255\"></td><td colspan=\"2\"><input class=\"button\" type=\"submit\" value=\"add\"></td></tr>";
+ echo "<tr bgcolor=\"#ffffff\"><td align=\"center\">new</td><td align=\"center\">cur</td><td align=\"center\">aka</td><td align=\"center\">rcv</td><td><input class=\"input\" type=\"text\" name=\"pm_id\" autocomplete=\"off\" maxlength=\"255\"></td><td><input class=\"input\" type=\"text\" name=\"pm_name\" autocomplete=\"off\" maxlength=\"128\"></td><td><input class=\"input\" type=\"text\" name=\"pm_pw\" autocomplete=\"off\" maxlength=\"64\"></td><td width=\"64\"><input class=\"input\" type=\"text\" name=\"pm_quota\" autocomplete=\"off\" maxlength=\"16\" style=\"text-align: right;\"></td><td colspan=\"2\"><input class=\"button\" type=\"submit\" value=\"add\"></td></tr>";
echo "</form>";
$pm_get = mysql_query("select * from users where domain='{$_SESSION['logged_uid']}' order by id");
@@ -1322,7 +1330,7 @@ if (isset($_SESSION['logged_uid'])) {
$pm_aka = mysql_query("select * from aliases where alias='{$pm_row[0]}'");
$pm_aka = mysql_num_rows($pm_aka);
- echo "<tr bgcolor=\"$pm_bg\"><td align=\"right\">$msg_new</td><td align=\"right\">$msg_cur</td><td align=\"right\">$pm_aka</td><form method=\"post\"><input type=\"hidden\" name=\"pm_set\" value=\"{$pm_row[0]}\"><input type=\"hidden\" name=\"pm_do\" value=\"$pm_do\"><td align=\"center\" valign=\"middle\" width=\"10\"><input type=\"image\" src=\"images/{$pm_do}.png\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"pm_mod\" value=\"{$pm_row[0]}\"><td>{$pm_row[0]}</td><td><input class=\"input\" type=\"text\" name=\"pm_name\" maxlength=\"128\" autocomplete=\"off\" value=\"{$pm_row[3]}\"></td><td><input class=\"input\" type=\"text\" name=\"pm_pass\" maxlength=\"64\" autocomplete=\"off\"></td><td><input class=\"input\" type=\"text\" name=\"pm_host\" maxlength=\"255\" autocomplete=\"off\" value=\"{$pm_row[6]}\"></td><td><input class=\"button\" type=\"submit\" value=\"mod\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"pm_del\" value=\"{$pm_row[0]}\"><td><input class=\"button\" type=\"submit\" value=\"del\" onclick=\"if (confirm('Do you really want to delete {$pm_row[0]} plus all messages and aliases associated with this account?')) {return true;} else {return false;}\"></td></form></tr>";
+ echo "<tr bgcolor=\"$pm_bg\"><td align=\"right\">$msg_new</td><td align=\"right\">$msg_cur</td><td align=\"right\">$pm_aka</td><form method=\"post\"><input type=\"hidden\" name=\"pm_set\" value=\"{$pm_row[0]}\"><input type=\"hidden\" name=\"pm_do\" value=\"$pm_do\"><td align=\"center\" valign=\"middle\" width=\"10\"><input type=\"image\" src=\"images/{$pm_do}.png\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"pm_mod\" value=\"{$pm_row[0]}\"><td>{$pm_row[0]}</td><td><input class=\"input\" type=\"text\" name=\"pm_name\" maxlength=\"128\" autocomplete=\"off\" value=\"{$pm_row[3]}\"></td><td><input class=\"input\" type=\"text\" name=\"pm_pass\" maxlength=\"64\" autocomplete=\"off\"></td><td><input class=\"input\" type=\"text\" name=\"pm_quota\" maxlength=\"16\" autocomplete=\"off\" value=\"{$pm_row[6]}\" style=\"text-align: right;\"></td><td><input class=\"button\" type=\"submit\" value=\"mod\"></td></form><form method=\"post\"><input type=\"hidden\" name=\"pm_del\" value=\"{$pm_row[0]}\"><td><input class=\"button\" type=\"submit\" value=\"del\" onclick=\"if (confirm('Do you really want to delete {$pm_row[0]} plus all messages and aliases associated with this account?')) {return true;} else {return false;}\"></td></form></tr>";
}
echo "</table>";