29 require_once
'./include/common.inc.php';
30 defined(
'XOOPS_INSTALL') or die('XOOPS Installation wizard die');
37 include_once "../mainfile.php";
38 include_once './class/dbmanager.php';
41 if (!
$dbm->isConnectable()) {
42 $wizard->redirectToPage(
'dbsettings');
45 $res =
$dbm->query(
"SELECT COUNT(*) FROM " .
$dbm->db->prefix(
"users"));
47 $wizard->redirectToPage(
'dbsettings');
51 list ($count) =
$dbm->db->fetchRow(
$res );
55 extract(
$_SESSION[
'siteconfig'], EXTR_SKIP);
57 if (!is_writable(
'../include/license.php')) {
61 if (
$process && is_writable(
'../include/license.php')) {
62 include_once
'./include/makedata.php';
64 $wizard->loadLangFile(
'install2');
76 $sql =
"UPDATE " .
$dbm->db->prefix(
"users") .
" SET `uname` = '" . addslashes($adminname) .
"', `email` = '" . addslashes($adminmail) .
"', `user_regdate` = '" . time() .
"', `pass` = '" . md5($adminpass) .
"', `last_login` = '" . time() .
"' WHERE uid = 1";
79 }
else if ( !is_writable(
'../include/license.php' ) ) {
80 include_once
'./include/makedata.php';
82 $wizard->loadLangFile(
'install2');
89 setcookie(
'xo_install_user',
'', null, null, null);
90 if (!empty(
$_SESSION[
'settings'][
'authorized'] ) && !empty($adminname) && !empty($adminpass)) {
94 include
'./include/install_tpl.php';