<table class="diags">
	<caption><?php 
echo FILE_PERMISSIONS;
?>
</caption>
    <thead>
    	<tr><th>Path</th><th>Status</th></tr>
    </thead>
	<?php 
$paths = array("uploads/", "cache/", "templates_c/", "mainfile.php");
foreach ($paths as $path) {
    ?>
	<tr>
		<th scope="row"><?php 
    echo $path;
    ?>
</th>
		<td><?php 
    echo xoDiagIfWritable($path);
    ?>
</td>
	</tr>
	<?php 
}
?>
	</table>
	-->
	<?php 
$content = ob_get_contents();
ob_end_clean();
include 'install_tpl.php';
include_once './class/dbmanager.php';
$dbm = new Db_manager();
if (!$dbm->isConnectable()) {
    $wizard->redirectToPage('dbsettings');
    exit;
}
$res = $dbm->query('SELECT COUNT(*) FROM ' . $dbm->db->prefix('users'));
if (!$res) {
    $wizard->redirectToPage('dbsettings');
    exit;
}
list($count) = $dbm->db->fetchRow($res);
$process = $count ? '' : 'insert';
$update = false;
extract($_SESSION['siteconfig'], EXTR_SKIP);
if ($state = xoDiagIfWritable('include/license.php')) {
    if (!is_writable('../include/license.php')) {
    }
}
$hashedAdminPass = password_hash($adminpass, PASSWORD_DEFAULT);
if ($process && is_writable('../include/license.php')) {
    include_once './include/makedata.php';
    //$cm = 'dummy';
    $wizard->loadLangFile('install2');
    $language = $wizard->language;
    $result = $dbm->queryFromFile('./sql/' . XOOPS_DB_TYPE . '.data.sql');
    $result = $dbm->queryFromFile('./language/' . $language . '/' . XOOPS_DB_TYPE . '.lang.data.sql');
    $group = make_groups($dbm);
    $result = make_data($dbm, $adminname, $hashedAdminPass, $adminmail, $language, $group);
    $content = '<div class="x2-note successMsg">' . DATA_INSERTED . '</div><br>' . $dbm->report();
    // Writes License Key