#!/usr/bin/perl

print "Content-Type: Text/HTML\n\n";

use CGI ':standard';
use Vpanel 1.00;
require $header;
require $accountinfo;

$domainname = find_domain ($mainuser);
$mail_routing = find_mail_routing($domainname);

# Define the tab which appears to the front
$tab_section = $tabnum_mailwall;

# Output the content associated with this tab
print "<body class=section-$tab_section>";

# display tabs
require $tabdisplay;

print_header("Change of SMTP forwarding IP address for $domainname");

if ( !( $mail_routing =~ /.*[0-9]/ ) ) 
{
        quit_with_errors("An error occured with sourcing your SMTP forwarding details.");
} 

print qq!

	Please input the new IP address of your mail server in the box provided and click on the submit button:<BR><BR>
	<table width=60% border=0 class=text>
	<tr><td width=35%>Current mail server IP address:</td><td>$mail_routing</td></tr>
	<form action=/$script_bin/$confirm_reset_smtp_forwarding method=post class=text>
	<tr><td width=35%>New mail server IP address:</td><td><input type=text name=newip class=text></td></tr>
	<input type=hidden name=oldip value=$mail_routing>
	</table>
!;

print_end_of_form();

require $footer;
