<form name="form1" method="post" action="index.php?page=installstandard">

<h2>Install - Standard Installation</h2>

<?PHP if (empty($error)) { ?>

<div class="editbox" style="width: 100%; font-size: 14px;">

You must create a MySQL database using your web hosting control panel before you can run this type of installation. If your server supports the Easy Installation method,
we suggest you try that instead!

</div>

<?PHP } ?>

<?PHP if (!empty($error)) { ?>

<div class="editbox" style="width: 100%; font-size: 14px; color: red;"><?php echo $error; ?></div>

<?PHP } ?>

<?php
if ($success != 1) {
	$ourFileName = "../db/mysql.php"; 
	$ourFileHandle = fopen($ourFileName, 'w'); 
	fclose($ourFileHandle);
        $filename = '../db';
        if (!is_writable($filename)) {
?>

<h3 style="margin-top: 15px;">Hold On...</h3>
<div class="primebox" style="width: 100%;"> The directory <b>/webifycore/db</b> is not writable. It will need to be made writable in order to continue this installation. <br>

<br>

CHMOD the /db/ directory to 775 (or 777). <br>

<br>

Go do that, come back, refresh this page and if this error goes away, you are good to go.</div>
<?PHP } ?>
<?PHP if (is_writable($filename)) { ?>

<?PHP
if (!empty($_GET[qun]))
        $_POST[FTPUSER] = $_GET[qun];

if (!empty($_GET[qpw]))
        $_POST[FTPPASS] = $_GET[qpw];

if (!empty($_GET[aun]))
        $_POST[ADMINUSER] = $_GET[aun];

if (!empty($_GET[apw]))
        $_POST[ADMINPASS] = $_GET[apw];

?>

<table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size: 12px;">

<tr> 

<td style="padding-right:10px;" width="50%"> 

<h3 style="margin-top: 15px;">Database Username</h3>

Please enter your database username. 

<input type="text" name="FTPUSER" class="primebox" style="width: 100%;" value="<?php echo $_POST[FTPUSER]; ?>">

</td>

<td style="padding-left:10px;" width="50%"> 

<h3 style="margin-top: 15px;">Database Password</h3>

Please enter your database password. 

<input type="text" name="FTPPASS" class="primebox" style="width: 100%;" value="<?php echo $_POST[FTPPASS]; ?>">

</td>

</tr>

<tr> 

<td style="padding-right:10px;" width="50%"> 

<h3 style="margin-top: 15px;">Database Host</h3> 

This is usually localhost, mysql or an IP number. Try localhost first. 

<?php if (empty($_POST[HOST])) $_POST[HOST] = localhost; ?>

<input type="text" name="HOST" class="primebox" style="width: 100%;" value="<?php echo $_POST[HOST]; ?>">

</td>

<td style="padding-left:10px;" width="50%"> 

<h3 style="margin-top: 15px;">Database Name</h3>

Please enter your database name. 

<input type="text" name="DBNAME" class="primebox" style="width: 100%;" value="<?php echo $_POST[DBNAME]; ?>">

</td>

</tr>

<tr> 

<td style="padding-right:10px;" width="50%"> 

<h3 style="margin-top: 15px;">Administrator Username</h3>

You can choose any username that you would like. Min 4 characters. 

<input type="text" name="ADMINUSER" class="primebox" style="width: 100%;" value="<?php echo $_POST[ADMINUSER]; ?>">

</td>

<td style="padding-left:10px;" width="50%"> 

<h3 style="margin-top: 15px;">Administrator Password</h3>

You can choose any password that you would like. 

<input type="text" name="ADMINPASS" class="primebox" style="width: 100%;" value="<?php echo $_POST[ADMINPASS]; ?>">

</td>

</tr>

</table>
<div align="center"> 

<input class="sparklybutton" type="submit" name="Install" value="Install" style="margin-top: 15px;"></div>

<?PHP }} ?>

</form>
