<?php /* * Check if the backups directory is writable *====================================================== */ if (is_dir(WPS_PLUGIN_BACKUPS_DIR) && is_writable(WPS_PLUGIN_BACKUPS_DIR)) { ?> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (isset($_POST['wsd_db_backup'])) { if (function_exists('wp_nonce_field')) { check_admin_referer('wpss-backup-database-nonce'); } if ('' != ($fname = WsdUtil::backupDatabase())) { echo '<p class="acx-info-box">'; echo '<span>', __('Database successfully backed up!'), '</span>'; echo '<br/><span>', __('Download backup file'), ': </span>'; echo '<a href="', WPS_PLUGIN_URL . 'res/backups/', $fname, '" style="color:#000">', $fname, '</a>'; echo '</p>'; } else { echo '<p class="acx-info-box">'; echo __('The database could not be backed up!'); echo '<br/>', __("A possible error might be that you didn't set up writing permissions for the backups directory!"); echo '</p>'; } } } ?> <div class="acx-section-box">