function printStep1() { $res = checkStep1(); ?> <noscript><p class="alert alert-warn"><span class="alert-head"><?php echo _t('gen.short.attention'); ?> </span> <?php echo _t('install.javascript_is_better'); ?> </p></noscript> <?php if ($res['php'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.php.ok', PHP_VERSION); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.php.nok', PHP_VERSION, '5.2.1'); ?> </p> <?php } ?> <?php if ($res['minz'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.minz.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.minz.nok', join_path(LIB_PATH, 'Minz')); ?> </p> <?php } ?> <?php if ($res['pdo'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.pdo.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.pdo.nok'); ?> </p> <?php } ?> <?php if ($res['curl'] == 'ok') { ?> <?php $version = curl_version(); ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.curl.ok', $version['version']); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.curl.nok'); ?> </p> <?php } ?> <?php if ($res['pcre'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.pcre.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.pcre.nok'); ?> </p> <?php } ?> <?php if ($res['ctype'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.ctype.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.ctype.nok'); ?> </p> <?php } ?> <?php if ($res['dom'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.dom.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.dom.nok'); ?> </p> <?php } ?> <?php if ($res['data'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.data.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.data.nok', DATA_PATH); ?> </p> <?php } ?> <?php if ($res['cache'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.cache.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.cache.nok', CACHE_PATH); ?> </p> <?php } ?> <?php if ($res['users'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.users.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.users.nok', USERS_PATH); ?> </p> <?php } ?> <?php if ($res['favicons'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.favicons.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.favicons.nok', DATA_PATH . '/favicons'); ?> </p> <?php } ?> <?php if ($res['persona'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.persona.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.persona.nok', DATA_PATH . '/persona'); ?> </p> <?php } ?> <?php if ($res['http_referer'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.http_referer.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.http_referer.nok'); ?> </p> <?php } ?> <?php if ($res['all'] == 'ok') { ?> <a class="btn btn-important next-step" href="?step=2"><?php echo _t('install.action.next_step'); ?> </a> <?php } else { ?> <p class="alert alert-error"><?php echo _t('install.action.fix_errors_before'); ?> </p> <?php } }
function printStep1() { $res = checkStep1(); ?> <noscript><p class="alert alert-warn"><span class="alert-head"><?php echo _t('gen.short.attention'); ?> </span> <?php echo _t('install.javascript_is_better'); ?> </p></noscript> <?php if ($res['php'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.php.ok', PHP_VERSION); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.php.nok', PHP_VERSION, '5.2.1'); ?> </p> <?php } ?> <?php if ($res['minz'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.minz.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.minz.nok', join_path(LIB_PATH, 'Minz')); ?> </p> <?php } ?> <?php if ($res['pdo'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.pdo.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.pdo.nok'); ?> </p> <?php } ?> <?php if ($res['curl'] == 'ok') { ?> <?php $version = curl_version(); ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.curl.ok', $version['version']); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.curl.nok'); ?> </p> <?php } ?> <?php if ($res['pcre'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.pcre.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.pcre.nok'); ?> </p> <?php } ?> <?php if ($res['ctype'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.ctype.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.ctype.nok'); ?> </p> <?php } ?> <?php if ($res['dom'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.dom.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.dom.nok'); ?> </p> <?php } ?> <?php if ($res['data'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.data.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.data.nok', DATA_PATH); ?> </p> <?php } ?> <?php if ($res['cache'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.cache.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.cache.nok', CACHE_PATH); ?> </p> <?php } ?> <?php if ($res['users'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.users.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.users.nok', USERS_PATH); ?> </p> <?php } ?> <?php if ($res['favicons'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.favicons.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.favicons.nok', DATA_PATH . '/favicons'); ?> </p> <?php } ?> <?php if ($res['persona'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.persona.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.persona.nok', DATA_PATH . '/persona'); ?> </p> <?php } ?> <?php if ($res['http_referer'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('gen.short.ok'); ?> </span> <?php echo _t('install.check.http_referer.ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?> </span> <?php echo _t('install.check.http_referer.nok'); ?> </p> <?php } ?> <?php if (freshrss_already_installed() && $res['all'] == 'ok') { ?> <p class="alert alert-warn"><span class="alert-head"><?php echo _t('gen.short.attention'); ?> </span> <?php echo _t('install.check.already_installed'); ?> </p> <form action="index.php?step=1" method="post"> <input type="hidden" name="freshrss-keep-install" value="1" /> <button type="submit" class="btn btn-important next-step" tabindex="1" ><?php echo _t('install.action.keep_install'); ?> </button> <a class="btn btn-attention next-step confirm" data-str-confirm="<?php echo _t('install.js.confirm_reinstall'); ?> " href="?step=2" tabindex="2" ><?php echo _t('install.action.reinstall'); ?> </a> </form> <script> function ask_confirmation(e) { var str_confirmation = this.getAttribute('data-str-confirm'); if (!str_confirmation) { str_confirmation = "<?php echo _t('gen.js.confirm_action'); ?> "; } if (!confirm(str_confirmation)) { e.preventDefault(); } } function init_confirm() { confirms = document.getElementsByClassName('confirm'); for (var i = 0 ; i < confirms.length ; i++) { confirms[i].addEventListener('click', ask_confirmation); } } init_confirm(); </script> <?php } elseif ($res['all'] == 'ok') { ?> <a class="btn btn-important next-step" href="?step=2" tabindex="1" ><?php echo _t('install.action.next_step'); ?> </a> <?php } else { ?> <p class="alert alert-error"><?php echo _t('install.action.fix_errors_before'); ?> </p> <?php } }
function printStep1() { $res = checkStep1(); ?> <noscript><p class="alert alert-warn"><span class="alert-head"><?php echo _t('attention'); ?> </span> <?php echo _t('javascript_is_better'); ?> </p></noscript> <?php if ($res['php'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('ok'); ?> </span> <?php echo _t('php_is_ok', PHP_VERSION); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('damn'); ?> </span> <?php echo _t('php_is_nok', PHP_VERSION, '5.2.1'); ?> </p> <?php } ?> <?php if ($res['minz'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('ok'); ?> </span> <?php echo _t('minz_is_ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('damn'); ?> </span> <?php echo _t('minz_is_nok', LIB_PATH . '/Minz'); ?> </p> <?php } ?> <?php if ($res['pdo-mysql'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('ok'); ?> </span> <?php echo _t('pdomysql_is_ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('damn'); ?> </span> <?php echo _t('pdomysql_is_nok'); ?> </p> <?php } ?> <?php if ($res['curl'] == 'ok') { ?> <?php $version = curl_version(); ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('ok'); ?> </span> <?php echo _t('curl_is_ok', $version['version']); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('damn'); ?> </span> <?php echo _t('curl_is_nok'); ?> </p> <?php } ?> <?php if ($res['pcre'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('ok'); ?> </span> <?php echo _t('pcre_is_ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('damn'); ?> </span> <?php echo _t('pcre_is_nok'); ?> </p> <?php } ?> <?php if ($res['ctype'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('ok'); ?> </span> <?php echo _t('ctype_is_ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('damn'); ?> </span> <?php echo _t('ctype_is_nok'); ?> </p> <?php } ?> <?php if ($res['dom'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('ok'); ?> </span> <?php echo _t('dom_is_ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('damn'); ?> </span> <?php echo _t('dom_is_nok'); ?> </p> <?php } ?> <?php if ($res['data'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('ok'); ?> </span> <?php echo _t('data_is_ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('damn'); ?> </span> <?php echo _t('file_is_nok', DATA_PATH); ?> </p> <?php } ?> <?php if ($res['cache'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('ok'); ?> </span> <?php echo _t('cache_is_ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('damn'); ?> </span> <?php echo _t('file_is_nok', CACHE_PATH); ?> </p> <?php } ?> <?php if ($res['log'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('ok'); ?> </span> <?php echo _t('log_is_ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('damn'); ?> </span> <?php echo _t('file_is_nok', LOG_PATH); ?> </p> <?php } ?> <?php if ($res['favicons'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('ok'); ?> </span> <?php echo _t('favicons_is_ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('damn'); ?> </span> <?php echo _t('file_is_nok', DATA_PATH . '/favicons'); ?> </p> <?php } ?> <?php if ($res['persona'] == 'ok') { ?> <p class="alert alert-success"><span class="alert-head"><?php echo _t('ok'); ?> </span> <?php echo _t('persona_is_ok'); ?> </p> <?php } else { ?> <p class="alert alert-error"><span class="alert-head"><?php echo _t('damn'); ?> </span> <?php echo _t('file_is_nok', DATA_PATH . '/persona'); ?> </p> <?php } ?> <?php if ($res['all'] == 'ok') { ?> <a class="btn btn-important next-step" href="?step=2"><?php echo _t('next_step'); ?> </a> <?php } else { ?> <p class="alert alert-error"><?php echo _t('fix_errors_before'); ?> </p> <?php } }