#!/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);
$hostingplan = find_hosting_plan ($domainname);
@ftp_users = find_valid_ftp_users($domainname);
$num_ftp_users = @ftp_users;

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

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

# display tabs
require $tabdisplay;

# only display website options if the website is on this server
$web_site_ip_address = find_web_server($domainname);

print_header ("Manage your current website set-up");

if ( $web_site_ip_address == 0 ) 
{
	# web record couldn't be found
	quit_with_errors("Your website details cannot be retrieved at this time.");
} elsif ( is_ip_address_local($web_site_ip_address) eq "no" ) {
	print "
	Sorry, but it seems that your website is not being hosted on an IE Internet server. Because of this, none of the
	website options are available to you.
	";
	print_support_contact_information();
} elsif ( is_ip_address_local($web_site_ip_address) eq "windows" ) {
	print "
	Sorry, but your website is being hosted on a windows server. Because of this many of the features 
	available to most IE Internet customers are unavailable to you through your control panel. Some of
	these features may, however, still be available to you.
	";
	print_support_contact_information();
} elsif ( is_ip_address_local($web_site_ip_address) eq "plesk" ) {
    print "
    Your website is now hosted on our new server architecture.
   	There are no features that can be controlled at the moment.<br />
	To upload or change your website, use FTP client as usual.<br />
	New features for your website will be available soon.
    ";
    print_support_contact_information();
} else {
	# require the front for this tab
	require $tab_front[$tab_section-1];
}

show_meaning_of_icons();
require $footer;
