Location: PHPKode > projects > PHPmyEXIM > email_overview.php
<?php
require("session.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title></title>
	<link rel=stylesheet type="text/css" href="global.css">
</head>
<body> 
<?php
if (isset($_GET['domain']))
{
	$domain = $_GET['domain'];
}
else
{
	$domain = "";
}

require("config.php");
$tabelle = "mail_users";

/* Connection to the Database */ 
MYSQL_CONNECT($server, $user, $passw) or die ( "<H3>unable to connect to database server</H3>");
MYSQL_SELECT_DB($datenbank) or die ( "<H3>database does not exist</H3>");

$result1=MYSQL_QUERY("select mbox_name, domain_name from $tabelle where domain_name = '$domain' and alias ='' and mbox_name NOT like '@'");
$result=MYSQL_QUERY("select mbox_name, domain_name from $tabelle where domain_name = '$domain' and alias ='' and mbox_name NOT like '@'");
$row = mysql_fetch_row($result);
echo"
<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" align=\"center\">
<tr>
	<th colspan=\"2\">eMail-account overview</th>
</tr>
";

if($row[0] != "")
{
	while($row1 = mysql_fetch_row($result1))
	{
	echo"
	<tr>
		<td class=\"tab1\"><i>$row1[0]@$row1[1]</i>	";
	
	//Alias SQL-String
	$result4=MYSQL_QUERY("select mbox_name from $tabelle where domain_name = '$domain' and alias ='$row1[0]@$row1[1]' and mbox_name NOT like '@'");
	$result3=MYSQL_QUERY("select mbox_name from $tabelle where domain_name = '$domain' and alias ='$row1[0]@$row1[1]' and mbox_name NOT like '@'");
	$row3 =  mysql_fetch_row($result3);
		if($row3[0] != '')
		{
		$aliasCount = 0;
             echo "&nbsp;&nbsp;<u>Alias</u>:&nbsp;";
             while($row4 = mysql_fetch_row($result4))
			 {
                 if ($aliasCount > 0)
				 {
                     echo ", ";
                 } 
                 echo " <i>$row4[0]</i>";
                 $aliasCount++;
				 
             }
		}
		else
		{}
	echo"</td><td align=right><a href=\"email_edit.php?domain=$domain&user=$row1[0]\" target=\"main\"><img src=\"images/edit.gif\" border=\"0\"></a>
	<a href=\"email_delete.php?domain=$domain&user=$row1[0]\" target=\"main\"><img src=\"images/delete.gif\" border=\"0\"></a></td></tr>";
	}	
}else
{
echo"
<tr>
	<td class=\"tab\">No eMail-Account available</td><td class=\"tab\">&nbsp;</td>
</tr>
";
}

echo"
<tr align=center>
<td colspan=\"2\"><a href=\"email_create.php?domain=$domain\" target=\"main\"><img src=\"images/create_email.gif\" border=\"0\"></a></td>
</tr></table>";

?>
</body>
</html>
Return current item: PHPmyEXIM