<?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"> • Welcome</h2>
  <p class="install_txt install_line">Welcome to TanyaCMS Installer, TanyaCMS is provide professional question and answer community software</p>
  <h2 class="install_row"> • Environmental Inspection</h2>
  <p class="install_txt">In order to ensure a smooth installation, your server needs to meet the following system requirements of the operating environment</p>
  <?php if ($this->error_messages) { ?>
  <div class="default_error">
  	<h3>Network limit</h3>
  	<p>
  		<?php foreach ($this->error_messages AS $error_message) { ?>
  		<?php echo $error_message; ?><br />
  		<?php } ?>
  	</p>
  </div>
  <?php } ?>
  <form action="" method="post" id="installer">
  <input type="hidden" name="step" value="2" />
  <ul class="install_ul">
    <li>
      <label class="label">PHP version</label>
      <span class="txt_color"><?php echo PHP_VERSION; ?></span> &nbsp; &nbsp; <?php if (!$this->system_require['php']) { ?><span style="color: red; font-weight: bold;">× TanyaCMS requires a minimum <?php echo ENVIRONMENT_PHP_VERSION; ?> Version of PHP to run properly, we recommend using PHP 5.3</span><?php } else { ?><span style="color: green;">√</span><?php } ?>
    </li>
    <li>
      <label class="label">Database module</label>
      <span class="txt_color"><?php echo $this->system_require['db']; ?></span> &nbsp; &nbsp; <?php if (!$this->system_require['db']) { ?><span style="color: red; font-weight: bold;">× TanyaCMS Support MySQLi and PDO_MYSQL two kinds of database module, your server does not support two kinds of</span><?php } else { ?><span style="color: green;">√</span><?php } ?>
    </li>
    <li>
      <label class="label">Session support</label> &nbsp; &nbsp; <?php if (!$this->system_require['session']) { ?><span style="color: red; font-weight: bold;">×</span><?php } else { ?><span style="color: green;">√</span><?php } ?>
    </li>
    <li>
      <label class="label">Cookie support</label> &nbsp; &nbsp; <?php if (!$this->system_require['cookie']) { ?><span style="color: red; font-weight: bold;">×</span><?php } else { ?><span style="color: green;">√</span><?php } ?>
    </li>
    <li>
      <label class="label">Graphic process</label> <span class="txt_color"><?php echo $this->system_require['image_lib']; ?></span> &nbsp; &nbsp; <?php if (!$this->system_require['image_lib']) { ?><span style="color: red; font-weight: bold;">× TanyaCMS need at least GD Graphic process to run properly</span><?php } else { ?><span style="color: green;">√ <?php if ($this->system_require['image_lib'] == 'GD') { ?>(Installing ImageMagick better performance)<?php } ?></span><?php } ?>
    </li>
    <li>
      <label class="label">Charset convert</label> &nbsp; &nbsp; <?php if (!$this->system_require['convert_encoding']) { ?><span style="color: red; font-weight: bold;">× TanyaCMS need at least a MB or ICONV Charset convert processing libraries to run properly</span><?php } else { ?><span style="color: green;">√</span><?php } ?>
    </li>
    <li>
      <label class="label">Upload size limit</label> <span class="txt_color"><?php echo get_cfg_var('upload_max_filesize'); ?> (Recommended value here > 8M)</span>
    </li>
    <li>
      <label class="label">Path permissions</label> <span class="txt_color"><?php echo ASK_PATH; ?></span> &nbsp; &nbsp; <?php if (!$this->system_require['config_writable_core']) { ?><span style="color: red; font-weight: bold;">×</span><?php } else { ?><span style="color: green;">√</span><?php } ?>
    </li>
    <li>
      <label class="label">Path permissions</label> <span class="txt_color"><?php echo ASK_PATH; ?>config/</span> &nbsp; &nbsp; <?php if (!$this->system_require['config_writable_config']) { ?><span style="color: red; font-weight: bold;">×</span><?php } else { ?><span style="color: green;">√</span><?php } ?>
    </li>
	<li>
      <label class="label">Installation directory</label> <span class="txt_color"><?php if ($this->base_dir) { ?><?php echo $this->base_dir; ?><?php } else { ?>/<?php } ?></span>
    </li>
    
    <li class="install_n" id="install_control"><a href="#" class="btn-blue"<?php if (sizeof($this->system_require) != 8) { ?> onclick="alert('Sorry, your server need to comply to the system to install.'); return false;"<?php } else { ?> onclick="document.getElementById('installer').submit(); document.getElementById('install_control').style.display = 'none'; return false;"<?php } ?>>Next step</a></li>
  </ul>
  </form>
</div>

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