echo '<div id="message" class="updated">' . $text . '</div>'; } ?> <!-- Checking Backup Status --> <div class="wrap"> <h2><?php _e('Backup Database', 'wp-dbmanager'); ?> </h2> <h3><?php _e('Checking Security Status', 'wp-dbmanager'); ?> </h3> <p> <?php if (is_iis()) { if (!is_file($backup_path . '/Web.config')) { echo '<p style="color: red;">' . sprintf(__('Web.config is missing from %s', 'wp-dbmanager'), $backup_path) . '</p>'; } else { echo '<p style="color: green;">' . sprintf(__('Web.config is present in %s', 'wp-dbmanager'), $backup_path) . '</p>'; } } else { if (!is_file($backup_path . '/.htaccess')) { echo '<p style="color: red;">' . sprintf(__('.htaccess is missing from %s', 'wp-dbmanager'), $backup_path) . '</p>'; } else { echo '<p style="color: green;">' . sprintf(__('.htaccess is present in %s', 'wp-dbmanager'), $backup_path) . '</p>'; } } if (!is_file($backup_path . '/index.php')) { echo '<p style="color: red;">' . sprintf(__('index.php is missing from %s', 'wp-dbmanager'), $backup_path) . '</p>'; } else {
$_ = echo_ok(); } echo p($_ . $_lang['creating_database_connection']); // check mysql version if ($conn) { if (strpos(mysql_get_server_info(), '5.0.51') !== false) { $_ = echo_failed($_lang['warning']) . ' <strong>' . $_lang['mysql_5051'] . '</strong>'; echo p($_ . $_lang['checking_mysql_version']); echo p(echo_failed($_lang['mysql_5051_warning'])); } else { $_ = echo_ok() . ' <strong>' . $_lang['mysql_version_is'] . mysql_get_server_info() . ' </strong>'; echo p($_ . $_lang['checking_mysql_version']); } // check for strict mode $mysqlmode = @mysql_query("SELECT @@global.sql_mode"); if (@mysql_num_rows($mysqlmode) > 0 && !is_webmatrix() && !is_iis()) { $modes = mysql_fetch_array($mysqlmode, MYSQL_NUM); //$modes = array("STRICT_TRANS_TABLES"); // for testing foreach ($modes as $mode) { if (stristr($mode, "STRICT_TRANS_TABLES") !== false || stristr($mode, "STRICT_ALL_TABLES") !== false) { echo p($_lang['checking_mysql_strict_mode']); echo p(echo_failed($_lang['warning']) . '<strong> ' . $_lang['strict_mode'] . '</strong>'); echo p(echo_failed($_lang['strict_mode_error'])); } } } } // Version and strict mode check end // andrazk 20070416 - add install flag and disable manager login // assets/cache writable? if (is_writable("../assets/cache")) {
function dbmanager_create_backup_folder() { $plugin_path = plugin_dir_path(__FILE__); $backup_path = WP_CONTENT_DIR . '/backup-db'; $backup_options = get_option('dbmanager_options'); if (!empty($backup_options['path'])) { $backup_path = $backup_options['path']; } // Create Backup Folder if (is_dir($backup_path) && wp_is_writable($backup_path)) { if (wp_mkdir_p($backup_path)) { if (is_iis()) { if (!is_file($backup_path . '/Web.config')) { @copy($plugin_path . 'Web.config.txt', $backup_path . '/Web.config'); } } else { if (!is_file($backup_path . '/.htaccess')) { @copy($plugin_path . 'htaccess.txt', $backup_path . '/.htaccess'); } } if (!is_file($backup_path . '/index.php')) { @copy($plugin_path . 'index.php', $backup_path . '/index.php'); } @chmod($backup_path, 0750); } } }
<h2><?php echo $_lang['install_results']; ?> </h2> <?php ob_start(); include_once "{$installer_path}instprocessor.php"; $content = ob_get_contents(); ob_end_clean(); echo $content; if ($errors == 0) { // check if install folder is removeable if ((is_writable('../install') || is_webmatrix()) && !is_iis()) { ?> <label style="float:left;line-height:18px;"><input type="checkbox" id="rminstaller" checked /><?php echo $_lang['remove_install_folder_auto']; ?> </label> <?php } else { ?> <span style="float:left;color:#505050;line-height:18px;"><?php echo $_lang['remove_install_folder_manual']; ?> </span> <?php } } ?> <p class="buttonlinks"> <a id="closepage" title="<?php