#!/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);

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

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

# display tabs
require $tabdisplay;

print_header("Installation of a Search Engine for $domainname");

print "Thank you for your request to install a search engine on www.$domainname.";

if ( check_if_search_engine_exists($domainname) eq "yes" )
{
	print "<BR><BR>Unfortunately, it seems that you cannot add a search engine, as you have one already.<BR><BR>";
	print_support_contact_information();
} else {
	print "
	Once installed, your search engine will be available for use at wwww.$domainname/htsearch.<BR><BR>
	Future changes made to your website will be picked up by the search engine at the end of each day.
	";
	show_time_to_change();

	# write to file for processing
	open (SEARCH, ">>$create_search_engine_file") || file_error($create_search_engine_file);
	print SEARCH "$domainname\n";
	close (SEARCH);
}
require $footer;
