function getCheckParams() { return array('php' => array('name' => 'PHP-Version', 'required' => '5.2.0+', 'installed' => phpversion(), 'passfail' => phpversion() >= '5.2.0' ? true : false), 'zLib' => array('name' => 'Zip-Functions', 'required' => 'Yes', 'installed' => function_exists('zip_open') ? 'Yes' : 'No', 'passfail' => function_exists('zip_open') ? true : false), 'safemode' => array('name' => 'PHP-Safemode', 'required' => 'No', 'installed' => ini_get('safe_mode') != '1' ? 'No' : 'Yes', 'passfail' => ini_get('safe_mode') != '1' ? true : false), 'setupfile' => array('name' => 'Setup-Package', 'required' => 'Yes', 'installed' => file_exists(SETUP_PACKAGE) ? 'Yes' : 'No', 'passfail' => file_exists(SETUP_PACKAGE) ? true : false, 'ignore_asb' => true), 'writable' => array('name' => 'Directory Writable', 'required' => 'Yes', 'installed' => checkWritable() ? 'Yes' : 'No', 'passfail' => checkWritable() ? true : false, 'ignore_asb' => true)); }
if (!function_exists('install')) { require 'functions_check.php'; } if ($protectedPost['SUP_PROF'] != '') { delete_plugin($protectedPost['SUP_PROF']); $tab_options['CACHE'] = 'RESET'; } if (isset($protectedPost['del_check']) and $protectedPost['del_check'] != '') { $delarray = explode(",", $protectedPost['del_check']); foreach ($delarray as $value) { delete_plugin($value); } $tab_options['CACHE'] = 'RESET'; } checkDependencies(); checkWritable(); // Plugins Install menu. printEnTete($l->g(7008)); echo "<table align='center'><th>"; echo open_form("PluginInstall"); $availablePlugins = scan_downloaded_plugins(); if (!empty($availablePlugins)) { echo "<select name='plugin'>"; foreach ($availablePlugins as $key => $value) { $name = explode(".", $value); $info = new SplFileInfo(PLUGINS_DL_DIR . "/" . $value); if ($info->getExtension() == "zip") { echo "<option value={$value} >{$name['0']}</option>"; } } echo "</select>";
} else { die('Access denied.'); } if (file_exists('./conf/info.php')) { die('Already installed.'); } if (!isset($_COOKIE['bwInstallLang'])) { header("Location: ./index.php"); exit; } else { $ln = './install/' . basename($_COOKIE['bwInstallLang']) . '.lang.php'; file_exists($ln) ? include_once $ln : (include_once './install/en.lang.php'); } if ($step == 1) { $rslt2 = class_exists('PDO') ? 1 : 0; $rslt3 = checkWritable() ? 1 : 0; $rslt4 = 1; if ($rslt2 == 0) { $rslt5 = 0; } else { $PDOSupported = PDO::getAvailableDrivers(); $rslt5 = in_array('sqlite', $PDOSupported) || in_array('mysql', $PDOSupported) ? 1 : 0; } $rslt6 = $rslt2 * $rslt3 * $rslt4 * $rslt5; die(json_encode(array('rslt2' => $rslt2, 'rslt3' => $rslt3, 'rslt4' => $rslt4, 'rslt5' => $rslt5, 'rslt6' => $rslt6))); } if ($step == 2) { if (isset($_POST['instd'])) { $instd = dataFilter(array('siteAuthor', 'siteKey', 'dbType', 'dbName', 'dbAddr', 'dbUser', 'dbPass'), $_POST['instd']); $dbConfContent = $instd['dbType'] == 'SQLite' ? "<?php \r\ndefine ('DBTYPE', 'SQLite');\r\ndefine ('DBNAME', '{$instd['dbName']}');" : "<?php \r\ndefine ('DBTYPE', 'MySQL');\r\ndefine ('DBNAME', '{$instd['dbName']}');\r\ndefine ('DBADDR', '{$instd['dbAddr']}');\r\ndefine ('DBUSERNAME', '{$instd['dbUser']}');\r\ndefine ('DBPASSWORD', '{$instd['dbPass']}');"; $writeResult = @file_put_contents('./conf/dbcon.php', $dbConfContent);
$isFile = substr($relpath, -4, 1) == '.'; if (!$isFile) { $writeOctal = getDef('GSCHMODDIR'); } if ($isFile) { $relpath = i18n_r('FILE_NAME') . ": {$relpath}"; } echo "<tr><td class=\"hc_item\">{$relpath}</td><td>"; if ($isFile and !file_exists($path)) { echo '<a name="error"></a><span class="ERRmsg">' . i18n_r('MISSING_FILE') . '</span><td><span class="label label-error" >' . i18n_r('ERROR') . '</span></td>'; $errorCnt++; continue; } $me = check_perms($path); echo '(' . ModeOctal2rwx($me) . ") {$me} "; $writable = checkWritable($path); if ($writable) { echo i18n_r('WRITABLE') . '<td><span class="label label-ok" > ' . i18n_r('OK') . '</span></td>'; } else { echo '<a name="error"></a><span class="ERRmsg">' . i18n_r('NOT_WRITABLE') . '</span><td><span class="label label-error" >' . i18n_r('ERROR') . '</span></td>'; $errorCnt++; } echo '</td></tr>'; } echo '</table>'; /////////////////////////////////////////////// // htaccess existance /////////////////////////////////////////////// if (server_is_apache()) { echo '<h3>' . sprintf(i18n_r('EXISTANCE'), '.htaccess') . '</h3>'; echo '<table class="highlight healthcheck">';