コード例 #1
0
ファイル: DiscuzModel.php プロジェクト: lilhorse/cocoa
function parseattach($aid)
{
    $threadModel = new ThreadModel();
    $attach = $threadModel->attach($aid);
    if ($attach["isimage"] == 1) {
        $return = "<img src='/attachments/{$attach['attachment']}'/>";
    } else {
        $return = "<p>附件:<a href='/attachments/{$attach['attachment']}'>{$attach['filename']}</a></p>";
    }
    return $return;
}