<?php
require("session.php");
?>
<?php
if (isset($_GET['domain']))
{
$domain = $_GET['domain'];
}
else
{
$domain = "";
}
if($_POST['action'] == "yes")
{
$faccount = $_POST['faccount'];
$domain = $_POST['domain'];
$newemail = $_POST['newemail'];
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>");
$result=MYSQL_QUERY("insert into $tabelle values('$faccount', '$domain', '$newemail', 'yes', 'noaccess', NULL, NULL, NULL, NULL)");
echo"<html>
<head>
<title></title>
<link rel=stylesheet type=\"text/css\" href=\"global.css\">
</head>
<body>
<p>Your forward-account has been saved successfully.<p><p><a href=\"main.php?domain=$domain\" target=\"main\"><img src=\"images/home.gif\" border=\"0\"></a></p>
</body>
</html>";
}
else
{
?>
<!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>
<form name="create_forward" action="<?php echo $PHP_SELF; ?>" method="POST">
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<input type="hidden" name="action" value="yes">
<input type="hidden" name="domain" value="<?php echo $domain; ?>">
<th class="tab">Create forward-account</th>
</tr>
<tr>
<td class="tab1">This eMail-adress
<input type="text" size="30" name="faccount" value="">@<?php echo $domain; ?>
<br>will be forwarded to
<input type="text" size="30" name="newemail" value="">
</td>
</tr>
<tr align=center>
<td>
<input type="image" src="images/create.gif" name="submit" value="create">
</td>
</tr>
</table>
</form>
</body>
</html>
<?php
}
?>