$language = 'english'; } else { echo 'no language file (install2.php).'; exit; } //$tables = array(); $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, $cm, $adminname, $adminpass, $adminmail, $language, $group); $content = $dbm->report(); $content .= $cm->report(); include_once "./class/mainfilemanager.php"; $mm = new mainfile_manager("../mainfile.php"); foreach ($group as $key => $val) { $mm->setRewrite($key, intval($val)); } $result = $mm->doRewrite(); $content .= $mm->report(); $b_next = array('finish', _INSTALL_L117); $title = _INSTALL_L116; setcookie('xoops_session', '', time() - 3600); include 'install_tpl.php'; break; case 'finish': $title = _INSTALL_L32; $content = "<table width='60%' align='center'><tr><td align='left'>\n"; include './language/' . $language . '/finish.php'; $content .= "</td></tr></table>\n"; include 'install_tpl.php'; break;
* @copyright Copyright 2005-2007 XOOPS Cube Project <https://github.com/xoopscube/legacy> * @license https://github.com/xoopscube/legacy/blob/master/docs/GPL_V2.txt GNU GENERAL PUBLIC LICENSE Version 2 * */ include_once "../mainfile.php"; $error = false; $g_webmasters = isset($g_webmasters) ? intval($g_webmasters) : 0; $g_users = isset($g_users) ? intval($g_users) : 0; $g_anonymous = isset($g_anonymous) ? intval($g_anonymous) : 0; if (empty($g_webmasters) || empty($g_users) || empty($g_anonymous)) { $error = true; } else { include_once "./class/mainfilemanager.php"; $title = _INSTALL_L88; $mm = new mainfile_manager("../mainfile.php"); $mm->setRewrite('XOOPS_GROUP_ADMIN', $g_webmasters); $mm->setRewrite('XOOPS_GROUP_USERS', $g_users); $mm->setRewrite('XOOPS_GROUP_ANONYMOUS', $g_anonymous); $ret = $mm->doRewrite(); if (!$ret) { $content = _INSTALL_L60; include './install_tpl.php'; exit; } } if (false != $error) { $b_back = array(); $content = _INSTALL_L162; include './install_tpl.php'; break; }
* * @package Legacy * @version $Id: install_dbsave.inc.php,v 1.3 2008/09/25 15:12:22 kilica Exp $ * @copyright Copyright 2005-2007 XOOPS Cube Project <https://github.com/xoopscube/legacy> * @license https://github.com/xoopscube/legacy/blob/master/docs/GPL_V2.txt GNU GENERAL PUBLIC LICENSE Version 2 * */ include_once './class/mainfilemanager.php'; $mm = new mainfile_manager('../mainfile.php'); $ret = $mm->copyDistFile(); if (!$ret) { $wizard->setContent(_INSTALL_L60); $wizard->error(); exit; } $mm->setRewrite('XOOPS_ROOT_PATH', $myts->stripSlashesGPC($_POST['root_path'])); $mm->setRewrite('XOOPS_TRUST_PATH', $myts->stripSlashesGPC($_POST['trust_path'])); $mm->setRewrite('XOOPS_URL', $myts->stripSlashesGPC($_POST['xoops_url'])); $mm->setRewrite('XOOPS_DB_TYPE', $myts->stripSlashesGPC($_POST['database'])); $mm->setRewrite('XOOPS_DB_PREFIX', $myts->stripSlashesGPC($_POST['prefix'])); $mm->setRewrite('XOOPS_SALT', $myts->stripSlashesGPC($_POST['salt'])); $mm->setRewrite('XOOPS_DB_HOST', $myts->stripSlashesGPC($_POST['dbhost'])); $mm->setRewrite('XOOPS_DB_USER', $myts->stripSlashesGPC($_POST['dbuname'])); $mm->setRewrite('XOOPS_DB_PASS', $myts->stripSlashesGPC($_POST['dbpass'])); $mm->setRewrite('XOOPS_DB_NAME', $myts->stripSlashesGPC($_POST['dbname'])); $mm->setRewrite('XOOPS_DB_PCONNECT', intval($_POST['db_pconnect'])); $mm->setRewrite('XOOPS_GROUP_ADMIN', 1); $mm->setRewrite('XOOPS_GROUP_USERS', 2); $mm->setRewrite('XOOPS_GROUP_ANONYMOUS', 3); // Check if XOOPS_CHECK_PATH should be initially set or not $xoopsPathTrans = isset($_SERVER['PATH_TRANSLATED']) ? $_SERVER['PATH_TRANSLATED'] : $_SERVER['SCRIPT_FILENAME'];
$content = $sm->confirmForm(); $b_next = array('dbsave', _INSTALL_L92); $b_back = array('', _INSTALL_L93); include 'install_tpl.php'; break; case "dbsave": include_once "./class/mainfilemanager.php"; $title = _INSTALL_L88; $mm = new mainfile_manager(); $ret = $mm->copyDistFile(); if (!$ret) { $content = _INSTALL_L60; include 'install_tpl.php'; exit; } $mm->setRewrite('dbType', $myts->stripSlashesGPC($_POST['dbType'])); $mm->setRewrite('dbHost', $myts->stripSlashesGPC($_POST['dbHost'])); $mm->setRewrite('dbPort', $myts->stripSlashesGPC($_POST['dbPort'])); $mm->setRewrite('dbUser', $myts->stripSlashesGPC($_POST['dbUser'])); $mm->setRewrite('dbPassword', $myts->stripSlashesGPC($_POST['dbPassword'])); $mm->setRewrite('dbName', $myts->stripSlashesGPC($_POST['dbName'])); $mm->setRewrite('dcl_root', $myts->stripSlashesGPC($_POST['dcl_root'])); $mm->setRewrite('dcl_www_root', $myts->stripSlashesGPC($_POST['dcl_www_root'])); $mm->setRewrite('cookieMethod', $myts->stripSlashesGPC($_POST['cookieMethod'])); $mm->setRewrite('redirMethod', $myts->stripSlashesGPC($_POST['redirMethod'])); $ret = $mm->doRewrite(); if (!$ret) { $content = _INSTALL_L60; include 'install_tpl.php'; exit; }