<?php // (Shirai161): ブログをエクスポートする機能の追加 (2009/07/25)-

    require('../../../config.php');

    $uniqid     = optional_param('uniqid', '', PARAM_RAW);

    if (!fs_function_enable('FS_ENABLE_BLOGEXPORT')) {
        error('Blog Export function is not enabled!');
    }

    require_login();

    if (!$uniqid) error('Uniqid is empty');

    $temppath = "{$CFG->dataroot}/temp/{$uniqid}.zip";
    if (!fs_file_exists($temppath)) error('There is no zip file :'.$temppath);

    require_once($CFG->libdir.'/filelib.php');
    send_temp_file($temppath, 'blogdata.zip');  // die in this function.

?>
