<div class="sections">
  <div class="info">We are now ready to proceed with installation. At this step we will attempt to create all required Fields and populate them with data. Should something go wrong, come back to the Previous step and make sure everything is correct.</div>
</div>
<?php
if($_POST){
	if(!isset($_POST['admin_uname']) || trim($_POST['admin_uname'])=='')
	{
		echo "<p class='error'>Admin Name is Required</p>";
	}
	elseif(!isset($_POST['admin_pswd']) || trim($_POST['admin_pswd'])=='')
	{
		echo "<p class='error'>Admin Password is Required</p>";
	}
	elseif(!isset($_POST['site_name']) || trim($_POST['site_name'])=='')
	{
		echo "<p class='error'>School Name is Required</p>";
	}
	elseif(!isset($_POST['logo']) || trim($_POST['logo'])=='')
	{
		echo "<p class='error'>Logo is Required</p>";
	}
	elseif(!isset($_POST['settingPass']) || trim($_POST['settingPass'])=='')
	{
		echo "<p class='error'>Setting Pass is Required</p>";
	}
	else
	{
		foreach($_POST as $field=>$value)
		{
			$flgUp=$db->update("update settings set `value`='".$value."' where `field`='".$field."'");
		}
		redirect("install.php?step=7");
	}
		
}
?>
<center>
<table>
	<tr>
    	<td>Admin userid</td><td><input type="text" name="admin_uname" value="<?php echo $LinksDetails["admin_uname"] ?>" /></td>
    </tr>
    <tr>
        <td>Admin Password</td><td><input type="text" name="admin_pswd" value="<?php echo $LinksDetails["admin_pswd"] ?>" /></td>
    </tr>
    <tr>
        <td>School Name</td><td><input type="text" name="site_name" value="<?php echo $LinksDetails["site_name"] ?>" /></td>
    </tr>
    <tr>
        <td>School Logo</td><td><input type="text" name="logo" value="<?php echo $LinksDetails["logo"] ?>" /></td>
    </tr>
    <tr>
        <td>Setting Password</td><td><input type="text" name="settingPass" value="<?php echo $LinksDetails["settingPass"];?>" /></td>
    </tr>   
    <tr>
        <td>Account Password</td><td><input type="text" name="account_password" value="<?php echo $LinksDetails["settingPass"];?>" /></td>
    </tr>
    <tr>
        <td>Faculty Password</td><td><input type="text" name="faculty_password" value="<?php echo $LinksDetails["settingPass"];?>" /></td>
</table>


</center>
<input type="hidden" name="systemname" value="<?php echo $system ?>" />
<input type="hidden" name="ip" value="<?php echo $ip; ?>" />