<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="author" content="" />
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<style type="text/css">
body {
font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: normal;
margin: 0px;
padding: 0px;
background-color: #f8f8f8;
color: #4F4F4F;
}
h1 {
font-family: Times New Roman, serif;
font-size: 26px;
font-weight: normal;
color: #4F4F4F;
}
h2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #333333;
}
p {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: normal;
line-height: 18px;
color: #333333;
}
a {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: normal;
text-decoration: none;
color: #4F4F4F;
}
a:visited {
text-decoration: none;
color: #4F4F4F;
}
</style>
</head>
<body>
<br>
<table width="70%" text align="center" border="0">
<tr><td>
<center><h3>:: php Enter ::</h3>
<br>
<br>
<?php
$host = $_POST['host'];
$name = $_POST['name'];
$pass = $_POST['pass'];
$user = $_POST['user'];
if (empty($host)) { echo 'Empty field Host'; die;}
if (empty($name)) { echo 'Empty field DB Name'; die;}
if (empty($pass)) { echo 'Empty field Password'; echo ' <font color="red">Security Error</font>';}
if (empty($user)) { echo 'Empty field User'; die;}
$hosts = '$dbhost';
$users = '$dbusername';
$password = '$dbpassword';
$names = '$dbname';
$link = '$link';
$dbhost = '$dbhost';
$db = '$db';
$dbname = '$dbname';
$dbusername = '$dbusername';
$dbpassword = '$dbpassword';
$myFile = "../admin/config.php";
$fh = fopen($myFile, 'w') or die("can't open file- check CHMOD");
$stringData =
"<?php
$hosts = '$host';
$users = '$user';
$password = '$pass';
$names = '$name';
$link=mysql_connect($dbhost, $dbusername, $dbpassword);
if(!$link) :
die('Could not connect: ' . mysql_error());
endif;
$db=mysql_select_db($dbname, $link);
if(!$db) :
die ('Can\'t connect to database : ' . mysql_error());
endif;
?>";
fwrite($fh, $stringData);
fclose($fh);
?>
<?php
include ('../admin/config.php');
if(!$db) {
echo "Can\'t connect to database : ' . mysql_error())";
}else{
echo "<center><h3><font color=\"#56B068\">Config O.K.</font></h3>";
}
?>
<a href = "install2.php"><font color="#56B068"><h3>Step 2 >>>>></h3></font></a>
</center></font>
</td></tr>
</table>
<table width="100%" height="362px" text align="center" border="0">
<tr>
<td align="center" valign="bottom">
<center>
<a href="http://phpenter.net"><font size=1 font color="#4F4F4F">powered by phpenter.net</font></a>
</td>
</tr>
</table>
</center>
</HTML>
</HTML>