<?php TPL::output('install/header.tpl.htm'); ?>

<p class="install_head"><span class="default_logo"></span> </p>
<div class="install_contents">
  <h2 class="install_row"> • Set system</h2>
  <p class="install_txt">Please provide necessary system setting info</p>
  
  <?php if ($this->error_messages) { ?>
  <div class="default_error">
  	<h3>Please continue after editing questions</h3>
  	<p>
  		<?php foreach ($this->error_messages AS $error_message) { ?>
  			<?php echo $error_message; ?><br />
  		<?php } ?>
  		</p>
  </div>
  <?php } else { ?>
  <form action="" method="post" id="installer">
  <input type="hidden" name="step" value="3" />
  <ul class="install_ul">
  	<li style="display:none">
  	  <label class="label">Database driver</label>
  	  <select name="db_driver">
		<?php if ($this->mysqi_support) { ?>
		<option value="MySQLi" selected="selected">MySQLi (Low use on RAM)</option>
		<?php } ?>
		<?php if ($this->pdo_support) { ?>
  	  	<option value="PDO_MYSQL">PDO (Recommend, better performance)</option>
		<?php } ?>
  	  </select>
  	  <span class="txt_color">Please select database driver according to server status</span>
  	</li>
    <li>
      <label class="label">Database main server</label>
      <input type="text" name="db_host" value="localhost" class="default_text"/>
      <span class="txt_color">Normally localhost</span>
    </li>
    <li>
      <label class="label">Database Username</label>
      <input type="text" name="db_username" value="" class="default_text"/>
    </li>
    <li>
      <label class="label">Database password</label>
      <input type="text" name="db_password" class="default_text"/>
    </li>
    <li>
      <label class="label">Database name</label>
      <input type="text" name="db_dbname" class="default_text"/>
    </li>
    <li>
      <label class="label">Data list prefix</label>
      <input type="text" name="db_prefix" value="ask_" class="default_text"/>
      <span class="txt_color">Need edit when installing multiple programs under the same database</span>
    </li>
    <li>
  	  <label class="label">Data list format</label>
  	  <select name="db_engine">
		<option value="MyISAM">MyISAM</option>
		<option value="InnoDB">InnoDB</option>
  	  </select>
  	  <span class="txt_color">Please select database format according to server status</span>
  	</li>
    <li class="install_n" id="install_control"><a href="#" class="btn-blue" onclick="document.getElementById('installer').submit(); document.getElementById('install_control').style.display = 'none'; return false;">Starting to install</a></li>
  </ul>
  </form>
  <?php } ?>
</div>

<?php TPL::output('install/footer.tpl.htm'); ?>