function wple_admin_page_snapshots()
{
    global $wpdb;
    $snapshots = wple_get_snapshots();
    $snapshots = array_reverse($snapshots);
    $date_format = get_option('date_format') . ' ' . get_option('time_format');
    include WPLE_PATH . '/page-snapshots.php';
}
function wple_remove_snapshot($filename)
{
    $snapshots = wple_get_snapshots();
    $dir = wple_snapshot_dir() . '/';
    $csv = fopen($dir . 'list.csv', 'w');
    if (!$csv) {
        throw new WPLE_Exception(WPLE_MSG_FILE_CREAT_ERROR);
    }
    foreach ($snapshots as $snapshot) {
        if ($snapshot['filename'] == $filename) {
            if (is_file($dir . $snapshot['filename'])) {
                unlink($dir . $snapshot['filename']);
            }
        } else {
            $snapshot['tables'] = implode('|', $snapshot['tables']);
            fputcsv($csv, $snapshot);
        }
    }
    fclose($csv);
}