Exemplo n.º 1
0
 public function getAttach($pos)
 {
     @bbs_file_output_attachment($this->getFileName(), $pos);
 }
Exemplo n.º 2
0
    html_error_quit("错误的参数");
}
$articles = array();
if (bbs_get_records_from_num($dir, $num, $articles)) {
    $file = $articles[0]["FILENAME"];
} else {
    html_error_quit("错误的参数");
}
$filename = bbs_setmailfile($currentuser["userid"], $file);
if (!file_exists($filename)) {
    html_error_quit("信件不存在...");
}
@($attachpos = $_GET["ap"]);
//pointer to the size after ATTACHMENT PAD
if ($attachpos != 0) {
    bbs_file_output_attachment($filename, $attachpos);
    exit;
}
mailbox_header("信件阅读");
?>
<div class="large">
<div class="article">
<script type="text/javascript"><!--
<?php 
$s = bbs2_readfile($filename);
if (is_string($s)) {
    echo 'att=new attWriter(-1);' . $s;
}
?>
//-->
</script>
Exemplo n.º 3
0
Arquivo: att.php Projeto: bianle/www2
    go_die();
}
$articles = array();
if ($dir_perm == 1) {
    //sorted
    $articles = array();
    $num = bbs_get_records_from_id($board, $id, $ftype, $articles);
    if ($num <= 0) {
        go_die();
    }
    $article = $articles[1];
} else {
    if ($num <= 0 || $num > $total) {
        go_die();
    }
    if (($articles = bbs_getarticles($board, $num, 1, $ftype)) === false) {
        go_die();
    }
    if ($id != $articles[0]["ID"]) {
        go_die();
    }
    $article = $articles[0];
}
$filename = bbs_get_board_filename($board, $article["FILENAME"]);
if ($isnormalboard && $ftype != $dir_modes["DELETED"]) {
    if (cache_header("public", @filemtime($filename), 3600)) {
        return;
    }
}
bbs_file_output_attachment($filename, $ap);