<?PHP
include "var.php";
include "install_connect.php";
include "whm_functions.php";

$xinput_style="style=\"BORDER-STYLE: solid;BORDER-COLOR: #999999; BACKGROUND-COLOR: #ffffff; BORDER-WIDTH: 1px; FONT-FAMILY: Verdana; FONT-SIZE: 8pt\"";

if(phpversion() <= "4.0.6") { $_POST=$HTTP_POST_VARS; }
if ($_POST['submit'])
	{
	if (trim($_POST['license'])=="") { $e69=true; }
	else
		{
			mysql_query("update config set license='".addslashes(trim($license))."'");
			header("Location: install4.php"); 
			exit;
		}
	}

$b=3;
include "install_header.php";

echo("
	<form action='".$PHP_SELF."' method='POST'>
	<table width='100%' cellpadding='2' cellspacing='0' border='0'>
		<tr>
			<td colspan='2'><img src='install[1].gif'>&nbsp;<font color='#0F82B8'><b>Step 3:</b></font> <b>Register WHM AutoPilot</b></td>
		</tr>
		<tr>
			<td colspan='2' align='left' valign='middle'>&nbsp;</td>
		</tr>
	");
if (isset($e69))
	{
	echo("
		<tr>
			<td colspan='2'><img src='install[26].gif'><font color='#C60C08'>You must enter a valid license number to continue.</font></td>
		</tr>
		");
	}
if (isset($e2))
	{
	echo("
		<tr>
			<td colspan='2'><img src='install[26].gif'><font color='#C60C08'>This license is suspended.</font></td>
		</tr>
		");
	}
if (isset($e3))
	{
	echo("
		<tr>
			<td colspan='2'><img src='install[26].gif'><font color='#C60C08'>This license is expired.</font></td>
		</tr>
		");
	}
if (isset($e69)||isset($e2)||isset($e3))
	{
	echo("
		<tr>
			<td colspan='2' align='left' valign='middle'>&nbsp;</td>
		</tr>
		");
	}
echo("
		<tr>
			<td width='25%' align='left' valign='top'>Enter License #:</td>
			<td width='75%' align='left' valign='middle'><textarea name='license' rows='3' cols='59' ".$xinput_style.">".((isset($license))?"".$license."":"TNO-RULEZ-PHP-IN-2K4")."</textarea></td>
		</tr>
		<tr>
			<td colspan='2' align='left' valign='middle'>&nbsp;</td>
		</tr>
		<tr>
			<td width='25%' align='left' valign='middle'></td>
			<td width='75%' align='left' valign='middle'><input type='hidden' name='submit' value='5'><input type='image' src='install[29].gif' onmouseover='this.src=\"install[30].gif\"' onmouseout='this.src=\"install[29].gif\"' alt='Click to Continue'></td>
		</tr>
	</table>
	</form>
	");

include "install_footer.php";
mysql_close($dblink);
?>