<?php
    include_once("../../mainfile.php");
    include_once(XOOPS_ROOT_PATH.'/modules/newbb_plus/config.php');
    include_once(XOOPS_ROOT_PATH.'/modules/newbb_plus/class/class.attachment.php');


        $attach_id = intval($attach_id);
        $attach = Attachment::getByID($attach_id);
        if (!$attach) die(_MD_NO_SUCH_FILE);
        $attach->download();
?>
