<?php
error_reporting(0);
$page=$_POST['page'];
if(!$page)
$page=1;
$dhost = $_POST["txtHostName"];
	$dname = $_POST["txtDatabaseName"];
	$duser = $_POST["txtDatabaseUserName"];
	$dpass = $_POST["txtDatabasePassword"];

if(($dhost!="") || ($dname!="") || ($duser!="") || ($dpass!=""))
{
$con = mysql_connect($dhost,$duser,$dpass);
	if(!mysql_select_db($dname,$con))
	{
$derror = "yes";
$page=1;
}
}
?>
<script language="javascript">
function validate()
{
if(document.form1.txtHostName.value=="")
{
alert("Host Name should not be empty");
document.form1.txtHostName.focus();
return false;
}
if(document.form1.txtDatabaseName.value=="")
{
alert("Database Name should not be empty");
document.form1.txtDatabaseName.focus();
return false;
}
if(document.form1.txtDatabaseUserName.value=="")
{
alert("Database Username should not be empty");
document.form1.txtDatabaseUserName.focus();
return false;
}
if(document.form1.txtDatabasePassword.value=="")
{
alert("Database Password should not be empty");
document.form1.txtDatabasePassword.focus();
return false;
}
document.form1.page.value=3;
return true;
}
function validate1()
{
if(document.form2.txtDomainName.value=="")
{
alert("Domain Name should not be empty");
document.form2.txtDomainName.focus();
return false;
}
if(document.form2.txtAdminEmail.value=="")
{
alert("Admin Mail should not be empty");
document.form2.txtAdminEmail.focus();
return false;
}

if(document.form2.txtUserName.value=="")
{
alert("Admin Username should not be empty");
document.form2.txtUserName.focus();
return false;
}

if(document.form2.txtPassword.value=="")
{
alert("Admin Password should not be empty");
document.form2.txtPassword.focus();
return false;
}
if(document.form2.txtConfirmPassword.value=="")
{
alert("Confirm password should not be empty");
document.form2.txtConfirmPassword.focus();
return false;
}
if(document.form2.txtPassword.value!=document.form2.txtConfirmPassword.value)
{
alert("Invalid Confirm Password");
return false;
}
document.form2.page.value=4;
return true;
}
</script>

<head>
<link rel="stylesheet" type="text/css" href="css.css">
<title>Exact Swoopo Clone Wizard</title>
</head>
<body bgcolor="#ffffff" style="margin-top:25px">
<center>
<table width="700px" border="0" style="background-repeat:no-repeat" cellpadding="0" cellspacing="0">
  <tr>
    <td width="1" rowspan="3"> <img src="spacer1.gif" width="1px" height="500px"></td>
    <td width="1"><img src="spacer1.gif" width="1px" height="65px"></td>
    <td style="padding-left:35px"><img src=logo.jpg></td>
  </tr>
  <tr>
    <td width="1"><img src="spacer1.gif" / width="1px" height="380px"></td>
    <td valign="top"><table width="100%" border="0">
      <tr>
        		&nbsp;


<?php
if(is_writable("../include/"))
		{
$Cinclude = "yes";
}
if(is_writable("../language/"))
		{
$Clang = "yes";
}
if(is_writable("../banners/"))
		{
$Cstimg = "yes";
}

if(is_writable("../uploads/"))
		{
$Cimg = "yes";
}

if(is_writable("../sitelogo/"))
		{
$Clogo = "yes";
}



if(is_writable("../include/databaseinfo.php"))
		{
$Cvar = "yes";
}

if(is_writable("../language/German.php"))
		{
$Cl1 = "yes";
}

if(is_writable("../language/Dutch.php"))
		{
$Cl2 = "yes";
}

if(is_writable("../language/English.php"))
		{
$Cl3 = "yes";
}

if(is_writable("../language/Spanish.php"))
		{
$Cl4 = "yes";
}

if(is_writable("../language/French.php"))
{
$Cl5 = "yes";
}
if(($Cinclude == "yes") && ($Clang == "yes") && ($Clogo == "yes") && ($Cimg == "yes") && ($Cvar == "yes") && ($Cl1 == "yes") && ($Cl2 == "yes") && ($Cl3 == "yes") && ($Cl4 == "yes") && ($Cl5 == "yes")){
$attr = "ok";
}
else
{
$attr = "no";
}
?>
<?php
if($page==1)
{
$status=$_POST['status'];
?>
<td width="74%" valign="top" align="center" height="259">
<?
if($attr == "ok")
{
?>




<table cellpadding="0" cellspacing="0" >
	<tr>
<tr class="tdhead"><td width="1%" height="30" valign="top"><img src=h_left.gif></td>
<td width="98%" height="30" valign="middle">Step2: Database Configuration</td>
<td width="1%" height="30" valign="top"><img src=h_right.gif></td></tr>
</tr>
	</table>

<table width="90%" border="0" cellpadding="0" cellspacing="0" height="259" class="ft">

          <tr>
<TD vAlign=top width="141" height="247">
                  <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 
                  cellPadding=0 border=0 height="229" width="161">
                    <TBODY>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="green.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step1:</b> Check Folder/File 
                    Attributes</TD></TR>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="green.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step2:</b> Database Details</TD></TR>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="greytic.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step3:</b> Admin Information</TD></TR>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="greytic.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step4:</b> Complete 
                    Installation</TD></TR>
                    <TR>
                      <TD width="151" height="17" colspan="2"></TD></TR>
                    <TR>
                      <TD height="29">
                      &nbsp;</TD>
                      <TD width="75" height="29">
                      <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#8BA6A1" width="150%" height="1">
                        <tr>
                          <td width="100%" height="1"><b>
                          <span style="font-size: 7.5pt">Progress: 50%</span></b><span style="font-size: 7.5pt">
                          </span><span style="font-size: 4pt">
                          <br></span>
                          <span style="font-size: 1pt">&nbsp;</span><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="1">
                            <tr>
                              <td width="25%" bgcolor="#2DB7E2" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                              <td width="25%" bgcolor="#2DB7E2" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                              <td width="25%" bgcolor="#FFFFFF" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                              <td width="25%" bgcolor="#FFFFFF" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                            </tr>
                          </table>
                          </td>
                        </tr>
                      </table>
                      </TD></TR></TBODY></TABLE></TD>
                <TD vAlign=center width=4 height="247">
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1" height="216">
                    <tr>
                      <td valign="top" align="center" bgcolor="#cccccc" style="padding-left:0px; padding-right:0px;"><img src = "spacer2.gif"></td>
                    </tr>
                  </table>
                </TD>
            <td width="447" valign="middle">
<table border=0 style="border-collapse: collapse"  cellpadding=5 cellspacing=0 width=400 class=box>

<? if($derror=="yes"){ ?>
<Tr><td colspan="3" align="left"> 	
<font color="#ff0000"><B>Database Error:</b>&nbsp;Connection Denied!</font>
</td></Tr>
<Tr><td colspan="3" align="left"> 	
&nbsp;
</td></Tr>
<? } ?>

<form name=form1 method=post action="index.php" onsubmit="return validate()">
	<tr>
		<td><B>Database Hostname:</b></td>
		<td><input name=txtHostName size="20" value="<? echo "$dhost" ?>"></td>
	</tr>
	<tr>
		<td><B>Database Name:</b></td>
		<td><input name=txtDatabaseName size="20" value="<? echo "$dname" ?>"></td>
	</tr>

	<tr>
		<td><B>Database Username:</b></td>
		<td ><input name=txtDatabaseUserName size="20" value="<? echo "$duser" ?>"></td>
	</tr>
	<tr>
		<td><B>Database Password:</b></td>
		<td><input type=password name=txtDatabasePassword size="20"></td><input type="hidden" name="page" value="0" id="page">
	</tr>
<tr>
		<td>&nbsp;</td>
		<td></td>
	</tr>
<Tr><td colspan="3" align="right"> 	
<input type=submit  id="btnSubmit" value="Next">
</td></Tr>
</form></table></td></tr></table></td>
<?
}
?>
<?
if($attr == "no")
{
?>

<table width="90%" cellpadding="0" cellspacing="0" >
	<tr>
<tr class="tdhead"><td width="1%" height="30" valign="top"><img src=h_left.gif></td>
<td width="98%" height="30" valign="middle">Step1: Check File/ Folder Attributes</td>
<td width="1%" height="30" valign="top"><img src=h_right.gif></td></tr>
</tr>
	</table>
<table width="90%" border="0" cellpadding="0" cellspacing="0" height="259" class="ft">
           <tr>
<TD vAlign=top width="141" height="247">
                  <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 
                  cellPadding=0 border=0 height="229" width="161">
                    <TBODY>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="green.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step1:</b> Check Folder/File 
                    Attributes</TD></TR>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="greytic.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step2:</b> Database Details</TD></TR>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="greytic.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step3:</b> Admin Information</TD></TR>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="greytic.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step4:</b> Complete 
                    Installation</TD></TR>
                    <TR>
                      <TD width="151" height="17" colspan="2"></TD></TR>
                    <TR>
                      <TD height="29">
                      &nbsp;</TD>
                      <TD width="75" height="29">
                      <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#8BA6A1" width="150%" height="1">
                        <tr>
                          <td width="100%" height="1"><b>
                          <span style="font-size: 7.5pt">Progress: 25%</span></b><span style="font-size: 7.5pt">
                          </span><span style="font-size: 4pt">
                          <br></span>
                          <span style="font-size: 1pt">&nbsp;</span><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="1">
                            <tr>
                              <td width="25%" bgcolor="#2DB7E2" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                              <td width="25%" bgcolor="#FFFFFF" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                              <td width="25%" bgcolor="#FFFFFF" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                              <td width="25%" bgcolor="#FFFFFF" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                            </tr>
                          </table>
                          </td>
                        </tr>
                      </table>
                      </TD></TR></TBODY></TABLE></TD>
                <TD vAlign=center width=4 height="247">
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1" height="216">
                    <tr>
<td valign="top" align="center" bgcolor="#cccccc" style="padding-left:0px; padding-right:0px;"><img src = "spacer2.gif"></td>
                    </tr>
                  </table>
                </TD>


            <td width="447" valign="middle">
<table border=0 style="border-collapse: collapse"  cellpadding=5 cellspacing=0 width=400 class=box>

	<tr>
		<td><B>Folder:</B> Include</td>
<?
if($Cinclude=="yes"){ ?>
		<td><font color="#2DB7E2">Writable</font></td>
<? } ?>
<?
if($Cinclude!="yes"){ ?>
		<td><font color="#FF0000">Unwritable</font></td>
<? } ?>

	</tr>

	<tr>
		<td><B>Folder:</B> Uploads</td>
<?
if($Cimg=="yes"){ ?>
		<td><font color="#2DB7E2">Writable</font></td>
<? } ?>
<?
if($Cimg!="yes") { ?>
		<td><font color="#FF0000">Unwritable</font></td>
<? } ?>

	</tr>

<tr>
		<td><B>Folder:</B> Banners</td>
<?
if($Cstimg=="yes"){ ?>
		<td><font color="#2DB7E2">Writable</font></td>
<? } ?>
<?
if($Cstimg!="yes"){ ?>
		<td><font color="#FF0000">Unwritable</font></td>
<? } ?>

	</tr>
<tr>
		<td><B>Folder:</B> Sitelogo</td>
<?
if($Clogo=="yes"){ ?>
		<td><font color="#2DB7E2">Writable</font></td>
<? } ?>
<?
if($Clogo!="yes"){ ?>
		<td><font color="#FF0000">Unwritable</font></td>
<? } ?>

	</tr>
	<tr>
		<td><B>Folder:</B> Language</td>
<?
if($Clang=="yes"){ ?>
		<td><font color="#2DB7E2">Writable</font></td>
<? } ?>
<?
if($Clang!="yes"){ ?>
		<td><font color="#FF0000">Unwritable</font></td>
<? } ?>

	</tr>


	<tr>
		<td><B>File:</B> Include/databaseinfo.php</td>
<?
if($Cvar=="yes"){ ?>
		<td><font color="#2DB7E2">Writable</font></td>
<? } ?>
<?
if($Cvar!="yes"){ ?>
		<td><font color="#FF0000">Unwritable</font></td>
<? } ?>

	</tr>


	<tr>
		<td><B>File:</B> language/German.php</td>
<?
if($Cl1=="yes"){ ?>
		<td><font color="#2DB7E2">Writable</font></td>
<? } ?>
<?
if($Cl1!="yes") { ?>
		<td><font color="#FF0000">Unwritable</font></td>
<? } ?>

	</tr>


	<tr>
		<td><B>File:</B> language/Dutch.php</td>
<?
if($Cl2=="yes"){ ?>
		<td><font color="#2DB7E2">Writable</font></td>
<? } ?>
<?
if($Cl2!="yes")  { ?>
		<td><font color="#FF0000">Unwritable</font></td>
<? } ?>

	</tr>



	<tr>
		<td><B>File:</B> language/English.php</td>
<?
if($Cl3=="yes"){ ?>
		<td><font color="#2DB7E2">Writable</font></td>
<? } ?>
<?
if($Cl3!="yes")  { ?>
		<td><font color="#FF0000">Unwritable</font></td>
<? } ?>

	</tr>



	<tr>
		<td><B>File:</B> language/Spanish.php</td>
<?
if($Cl4=="yes"){ ?>
		<td><font color="#2DB7E2">Writable</font></td>
<? } ?>
<?
if($Cl4!="yes") { ?>
		<td><font color="#FF0000">Unwritable</font></td>
<? } ?>

	</tr>



	<tr>
		<td><B>File:</B> language/French.php</td>
<?
if($Cl5=="yes"){ ?>
		<td><font color="#2DB7E2">Writable</font></td>
<? } ?>
<?
if($Cl5!="yes")  { ?>
		<td><font color="#FF0000">Unwritable</font></td>
<? } ?>

	</tr>
<Tr><td colspan="3" align="right"> 	<input type=submit  id="btnSubmit" value="Refresh" onclick="javascript:window.location.reload( false );">
</td></Tr>
</table></td></tr></table></td>
<?
}
?>

<?		
}
else if($page==3)
{

?>
<td width="74%" valign="top" align="center" height="259">

<input type="hidden" name="hdomain" value="<?=$dval;?>" />
<table cellpadding="0" cellspacing="0" >
	<tr>
<tr class="tdhead"><td width="1%" height="30" valign="top"><img src=h_left.gif></td>
<td width="98%" height="30" valign="middle">Step3: Admin Configuration</td>
<td width="1%" height="30" valign="top"><img src=h_right.gif></td></tr>
</tr>
	</table>



<table width="90%" border="0" cellpadding="0" cellspacing="0" height="259" class="ft">
<tr>
         
<TD vAlign=top width="141" height="247">
                  <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 
                  cellPadding=0 border=0 height="229" width="161">
                    <TBODY>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="green.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step1:</b> Check Folder/File 
                    Attributes</TD></TR>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="green.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step2:</b> Database Details</TD></TR>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="green.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step3:</b> Admin Information</TD></TR>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="greytic.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step4:</b> Complete 
                    Installation</TD></TR>
                    <TR>
                      <TD width="151" height="17" colspan="2"></TD></TR>
                    <TR>
                      <TD height="29">
                      &nbsp;</TD>
                      <TD width="75" height="29">
                      <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#8BA6A1" width="150%" height="1">
                        <tr>
                          <td width="100%" height="1"><b>
                          <span style="font-size: 7.5pt">Progress: 75%</span></b><span style="font-size: 7.5pt">
                          </span><span style="font-size: 4pt">
                          <br></span>
                          <span style="font-size: 1pt">&nbsp;</span><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="1">
                            <tr>
                              <td width="25%" bgcolor="#2DB7E2" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                              <td width="25%" bgcolor="#2DB7E2" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                              <td width="25%" bgcolor="#2DB7E2" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                              <td width="25%" bgcolor="#FFFFFF" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                            </tr>
                          </table>
                          </td>
                        </tr>
                      </table>
                      </TD></TR></TBODY></TABLE></TD>
                <TD vAlign=center width=4 height="247">
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1" height="216">
                    <tr>
                      <td valign="top" align="center" bgcolor="#cccccc" style="padding-left:0px; padding-right:0px;"><img src = "spacer2.gif"></td>
                    </tr>
                  </table>
                </TD>

            <td width="447" valign="middle">
<table border=0 style="border-collapse: collapse"  cellpadding=5 cellspacing=0 width=400 class=box>
<form name=form2 method=post action="index.php" onSubmit="return validate1();">
<tr>
		<td><B>Domain Name:</B></td>
		<td><input name=txtDomainName size="20" value="http://<?=$_SERVER['SERVER_NAME'];?>"></td>
	</tr>
	<tr>
		<td><B>Admin Email Address:</B></td>
		<td><input name=txtAdminEmail size="20"></td>
	</tr>
	<tr>
		<td><B>Admin Username:</B></td>
		<td><input name=txtUserName size="20"></td>
	</tr>
	<tr>
		<td><B>Admin Password:</B></td>
		<td><input type=password name=txtPassword size="20"></td>
	</tr>
	<tr>
		<td><B>Confirm Password:</B></td>
		<td><input type=password name=txtConfirmPassword size="20"><input type="hidden" name="page" value="0" id="page">
		<input type="hidden" name="txtHostName" value="<?=$_POST['txtHostName'];?>" />
		<input type="hidden" name="txtDatabaseName" value="<?=$_POST['txtDatabaseName'];?>" />
		<input type="hidden" name="txtDatabaseUserName" value="<?=$_POST['txtDatabaseUserName'];?>" />
		<input type="hidden" name="txtDatabasePassword" value="<?=$_POST['txtDatabasePassword'];?>" />
		
		</td>
	</tr><tr>
		<td>&nbsp;</td>
		<td></td>
	</tr>
<Tr><td colspan="3" align="right"> <input type=submit  id="btnSubmit" value="Finish">
</td></Tr>
	</form></table></td></tr></table></td>


<?
}
else if($page==4)
{



$dhost = $_POST["txtHostName"];
	$dname = $_POST["txtDatabaseName"];
	$duser = $_POST["txtDatabaseUserName"];
	$dpass = $_POST["txtDatabasePassword"];
	$domainname = $_POST["txtDomainName"];
	$adminemail = $_POST["txtAdminEmail"];
	$adminuser = $_POST["txtUserName"];
    $password = $_POST["txtPassword"];
	$con = mysql_connect($dhost,$duser,$dpass);
	if(mysql_select_db($dname,$con))
	{



include 'argvs.php';
include 'install.php';

  

  
		$idate=date("Y-m-d");
		$mailfrom=$adminemail;
		$mailsubject="ITechBids Installation";
		$message="<table><tr><td>ITechBids Installation Details	</td></tr>";
		$message.="<tr><td>Script Purchased for domain : $dname</td></tr>";
		$message.="<tr><td>Script Installed domain name : $domainname</td></tr>";
		$message.="<td><tD>Installation Date : $idate</tD></tr></table>";
		$lemail="admin@itechscripts.com";			
		$headers  = "MIME-Version: 1.0\r\n";
		$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
		$headers .= "From: ". $mailfrom."\r\n";		
	    $mail=mail($lemail,$mailsubject,$message,$headers);
		/*Installation notification mail code ending*/

  


//echo "<br>Database tables created... A new file databaseinfo.php has been created, plz don't delete that file and you can delete the installation files";
	

		$msg="";  
		//echo "<br>Database tables created... A new file databaseinfo.php has been created, plz don't delete that file and you can delete the installation files";
		if(is_writable("../include/databaseinfo.php"))
		{
		$f=fopen("../include/databaseinfo.php","w");
	fwrite($f,"<?php \n");
	fwrite($f,"//***************** Database Details ********************// \n");
	fwrite($f,"$"."sitename='".$domainname."';\n");
	fwrite($f,"$"."dbhost='".$dhost."';\n");
	fwrite($f,"$"."dbname='".$dname."';\n");
	fwrite($f,"$"."dbuser='".$duser."';\n");
	fwrite($f,"$"."dbpass='".$dpass."';\n");
	fwrite($f,"$"."adminmail='".$adminemail."';\n");
	fwrite($f,"?>");
	fclose($f);
		}
		else
		$first=1;
		
		
		$msg="";
		if($first==1)
		{
		$msg.="<br><br><font color=red>There is some error in creating the following files. <br> Assign write permission to the following files and try install again.</font><ol type=1> ";
		if($first==1)
		$msg.="<li>include/databaseinfo.php</li>";
		$msg.="</ol>";
		}
		else
		$msg.='<BR><b>Congratulations!<BR></b><BR> 
            <b>Exact Swoopo Clone</b> is now installed on your server.<Br><BR>Please login to 
            the admin area and update the password. Your current admin login is 
            as follows.<BR><BR><B>Adminname:&nbsp;</b>';
        $msg.= $adminuser; 
        $msg.='<BR><B>Password:&nbsp;</b>';
        $msg.= $password;
        $msg.='<BR><BR>
            Add the cron files <b>(cron.php, cron_close.php, cron_bot.php)</b> to the cron tab of your server. This file is required
to perform all the operations automatically.<BR><BR>To prevent accidental deletion of the site 
            content, please make sure to delete the <b>"install"</b> folder.';

		echo '<td width="74%" valign="top" align="center" height="259">


<table cellpadding="0" cellspacing="0" >
	<tr>
<tr class="tdhead"><td width="1%" height="30" valign="top"><img src=h_left.gif></td>
<td width="98%" height="30" valign="middle">';

	if($first==1)
						echo 'Error In Insallation';
			else
					echo 'Step4: Installation Completed';



echo '</td>
<td width="1%" height="30" valign="top"><img src=h_right.gif></td></tr>
</tr>
	</table>
<table width="90%" border="0" cellpadding="0" cellspacing="0" height="259" class="ft">
          <tr>
            <TD vAlign=top width="141" height="247">
                  <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 
                  cellPadding=0 border=0 height="229" width="161">
                    <TBODY>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="green.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step1:</b> Check Folder/File 
                    Attributes</TD></TR>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="green.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step2:</b> Database Details</TD></TR>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="green.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step3:</b> Admin Information</TD></TR>
                    <TR>
                      <TD  align="right"><b>
                      <img border="0" src="green.gif" ></b></TD>
                      <TD width="118" height="22" align="left"><b>Step4:</b> Complete 
                    Installation</TD></TR>
                    <TR>
                      <TD width="151" height="17" colspan="2"></TD></TR>
                    <TR>
                      <TD height="29">
                      &nbsp;</TD>
                      <TD width="75" height="29">
                      <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#8BA6A1" width="150%" height="1">
                        <tr>
                          <td width="100%" height="1"><b>
                          <span style="font-size: 7.5pt">Progress: 100%</span></b><span style="font-size: 7.5pt">
                          </span><span style="font-size: 4pt">
                          <br></span>
                          <span style="font-size: 1pt">&nbsp;</span><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="1">
                            <tr>
                              <td width="25%" bgcolor="#2DB7E2" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                              <td width="25%" bgcolor="#2DB7E2" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                              <td width="25%" bgcolor="#2DB7E2" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                              <td width="25%" bgcolor="#2DB7E2" height="1">
                              <span style="font-size: 3pt">&nbsp;</span></td>
                            </tr>
                          </table>
                          </td>
                        </tr>
                      </table>
                      </TD></TR></TBODY></TABLE></TD>
                <TD vAlign=center width=4 height="247">
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1" height="216">
                    <tr>
                      <td valign="top" align="center" bgcolor="#cccccc" style="padding-left:0px; padding-right:0px;"><img src = "spacer2.gif"></td>
                    </tr>
                  </table>
                </TD>
            <td width="447" valign="top"><table width="400" align="top"><tr>
            <td colspan="3" valign="top">';
			echo $msg;
			
			echo '</td></tr></table></td></tr></table></td>';
}
	else {
?><?
//header("Location:error.php";);
?><?	
}
}
?>

      </tr>
      </table></td>
  </tr>
  <tr>
    <td width="1"><img src="spacer1.gif" / width="1px" height="55px"></td>
    <td><div align="center">&copy;&nbsp;CopyRight 2008. ITechScripts.com</div></td>
  </tr>
</table>
</center>
</body>
</html>