Example #1
0
    $smarty->cache_dir = TMP_CACHE_LOCATION;
    $smarty->template_dir = cms_join_path(CMS_INSTALL_BASE, 'templates');
    $smarty->caching = false;
    $smarty->force_compile = true;
    $smarty->debugging = false;
    $smarty->assign('languages', $installer->dropdown_lang());
    $smarty->display('installer_start.tpl');
    $smarty->display('pagestart.tpl');
    $smarty->display('installer_end.tpl');
    exit;
} else {
    if (!isset($_SESSION['test'])) {
        installerShowErrorPage('Session not working, you have problem with some modules and functionality! Ask your provider, exiting!', 'Session_not_working');
    }
}
// First checks ok
require_once cms_join_path(CMS_BASE, 'include.php');
$smarty = cmsms()->GetSmarty();
$smarty->caching = false;
$smarty->force_compile = true;
if (isset($_POST['default_cms_lang'])) {
    $frontendlang = $_POST['default_cms_lang'];
}
require_once cms_join_path(CMS_INSTALL_BASE, 'lang.php');
$smarty->register_function('lang_install', 'smarty_lang');
$smarty->assign('default_cms_lang', $frontendlang);
$smarty->assign('languages', $installer->dropdown_lang());
$help_lang = installerHelpLanguage($frontendlang, 'en_US');
$help_lang = empty($help_lang) ? '' : '/' . $help_lang;
$smarty->assign('cms_install_help_url', CMS_INSTALL_HELP_URL . $help_lang);
$installer->run($process);
Example #2
0
$smarty->register_function('si_lang', 'systeminfo_lang');
$smarty->caching = false;
$smarty->force_compile = true;
$db = $gCms->GetDb();
//smartyfier
$smarty->assign('themename', $themeObject->themeName);
$smarty->assign('showheader', $themeObject->ShowHeader('systeminfo'));
$smarty->assign('backurl', $themeObject->BackUrl());
$smarty->assign('systeminfo_cleanreport', 'systeminfo.php' . $urlext . '&cleanreport=1');
$help_lang = get_preference($userid, 'default_cms_language');
if (empty($help_lang)) {
    if (!empty($_COOKIE['cms_language'])) {
        $help_lang = installerHelpLanguage($_COOKIE['cms_language'], 'en_US');
    }
} else {
    $help_lang = installerHelpLanguage($help_lang, 'en_US');
}
$help_lang = empty($help_lang) ? '' : '/' . $help_lang;
$smarty->assign('cms_install_help_url', 'http://wiki.cmsmadesimple.org/index.php/User_Handbook/Installation/Install_Process' . $help_lang);
/* CMS Install Information */
$smarty->assign('cms_version', $GLOBALS['CMS_VERSION']);
$query = "SELECT * FROM " . cms_db_prefix() . "modules WHERE active=1";
$modules = $db->GetArray($query);
$smarty->assign('installed_modules', $modules);
clearstatcache();
$tmp = array(0 => array(), 1 => array());
$tmp[0]['php_memory_limit'] = testConfig('php_memory_limit', 'php_memory_limit');
$tmp[0]['process_whole_template'] = testConfig('process_whole_template', 'process_whole_template');
$tmp[1]['debug'] = testConfig('debug', 'debug');
$tmp[0]['output_compression'] = testConfig('output_compression', 'output_compression');
$tmp[0]['max_upload_size'] = testConfig('max_upload_size', 'max_upload_size');