123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753 |
- <?php if(!defined('IN_DISCUZ')) exit('Access Denied');
- function tpl_hide_credits_hidden($creditsrequire) {
- global $_G;
- ?><?php
- $return = <<<EOF
- <div class="locked">
- EOF;
- if($_G['uid']) {
- $return .= <<<EOF
- {$_G['username']}
- EOF;
- } else {
- $return .= <<<EOF
- 游客
- EOF;
- }
- $return .= <<<EOF
- ,本帖隐藏的内容需要积分高于 {$creditsrequire} 才可浏览,您当前积分为 {$_G['member']['credits']}</div>
- EOF;
- ?><?php
- return $return;
- }
- function tpl_hide_credits($creditsrequire, $message) {
- ?><?php
- $return = <<<EOF
- <div class="locked">以下内容需要积分高于 {$creditsrequire} 才可浏览</div>
- {$message}<br /><br />
- EOF;
- ?><?php
- return $return;
- }
- function tpl_codedisp($code) {
- $randomid = 'code_'.random(3);
- ?><?php
- $return = <<<EOF
- <div class="blockcode"><div id="{$randomid}"><ol><li>{$code}</ol></div><em onclick="copycode($('{$randomid}'));">复制代码</em></div>
- EOF;
- ?><?php
- return $return;
- }
- function tpl_quote() {
- ?><?php
- $return = <<<EOF
- <div class="quote"><blockquote>\\1</blockquote></div>
- EOF;
- ?><?php
- return $return;
- }
- function tpl_free() {
- ?><?php
- $return = <<<EOF
- <div class="quote"><blockquote>\\1</blockquote></div>
- EOF;
- ?><?php
- return $return;
- }
- function tpl_hide_reply() {
- global $_G;
- ?><?php
- $return = <<<EOF
- <div class="showhide"><h4>本帖隐藏的内容</h4>\\1</div>
- EOF;
- ?><?php
- return $return;
- }
- function tpl_hide_reply_hidden() {
- global $_G;
- ?><?php
- $return = <<<EOF
- <div class="locked">
- EOF;
- if($_G['uid']) {
- $return .= <<<EOF
- {$_G['username']}
- EOF;
- } else {
- $return .= <<<EOF
- 游客
- EOF;
- }
- $return .= <<<EOF
- ,如果您要查看本帖隐藏内容请<a href="forum.php?mod=post&action=reply&fid={$_G['fid']}&tid={$_G['tid']}" onclick="showWindow('reply', this.href)">回复</a></div>
- EOF;
- ?><?php
- return $return;
- }
- function attachlist($attach) {
- global $_G;
- $attach['refcheck'] = (!$attach['remote'] && $_G['setting']['attachrefcheck']) || ($attach['remote'] && ($_G['setting']['ftp']['hideurl'] || ($attach['isimage'] && $_G['setting']['attachimgpost'] && strtolower(substr($_G['setting']['ftp']['attachurl'], 0, 3)) == 'ftp')));
- $aidencode = packaids($attach);
- $widthcode = attachwidth($attach['width']);
- $is_archive = $_G['forum_thread']['is_archived'] ? "&fid=".$_G['fid']."&archiveid=".$_G[forum_thread][archiveid] : '';
- $pluginhook = !empty($_G['setting']['pluginhooks']['viewthread_attach_extra'][$attach[aid]]) ? $_G['setting']['pluginhooks']['viewthread_attach_extra'][$attach[aid]] : '';
- ?><?php
- $return = <<<EOF
- <ignore_js_op>
- <dl class="tattl">
- <dt>
- {$attach['attachicon']}
- </dt>
- <dd>
- <p class="attnm">
- EOF;
- if(!$attach['price'] || $attach['payed']) {
- $return .= <<<EOF
- <a href="forum.php?mod=attachment{$is_archive}&aid={$aidencode}"
- EOF;
- if($_GET['from'] != 'preview') {
- $return .= <<<EOF
- onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"
- EOF;
- }
- $return .= <<<EOF
- id="aid{$attach['aid']}" target="_blank">{$attach['filename']}</a>
- EOF;
- } else {
- $return .= <<<EOF
- <a href="forum.php?mod=misc&action=attachpay&aid={$attach['aid']}&tid={$attach['tid']}" onclick="showWindow('attachpay', this.href)">{$attach['filename']}</a>
- EOF;
- }
- $return .= <<<EOF
- <div class="tip tip_4" id="aid{$attach['aid']}_menu" style="display: none" disautofocus="true">
- <div class="tip_c">
- <p class="y">{$attach['dateline']} 上传</p>
- <p>点击文件名下载附件</p>
- EOF;
- if(!$attach['attachimg'] && $_G['getattachcredits']) {
- $return .= <<<EOF
- 下载积分: {$_G['getattachcredits']}<br />
- EOF;
- }
- $return .= <<<EOF
- </div>
- <div class="tip_horn"></div>
- </div>
- </p>
- <p>{$attach['attachsize']}
- EOF;
- if($attach['readperm']) {
- $return .= <<<EOF
- , 阅读权限: <strong>{$attach['readperm']}</strong>
- EOF;
- }
- $return .= <<<EOF
- , 下载次数: {$attach['downloads']}
- EOF;
- if(!$attach['attachimg'] && $_G['getattachcredits']) {
- $return .= <<<EOF
- , 下载积分: {$_G['getattachcredits']}
- EOF;
- }
- $return .= <<<EOF
- </p>
- <p>
- EOF;
- if($attach['price']) {
- $return .= <<<EOF
- 售价: <strong>{$attach['price']} {$_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['unit']}{$_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['title']}</strong> [<a href="forum.php?mod=misc&action=viewattachpayments&aid={$attach['aid']}" onclick="showWindow('attachpay', this.href)" target="_blank">记录</a>]
- EOF;
- if(!$attach['payed']) {
- $return .= <<<EOF
- [<a href="forum.php?mod=misc&action=attachpay&aid={$attach['aid']}&tid={$attach['tid']}" onclick="showWindow('attachpay', this.href)">购买</a>]
- EOF;
- } }
- $return .= <<<EOF
- </p>
- EOF;
- if($attach['description']) {
- $return .= <<<EOF
- <p class="xg2">{$attach['description']}</p>
- EOF;
- }
- $return .= <<<EOF
- {$pluginhook}
- </dd>
- </dl>
- </ignore_js_op>
- EOF;
- ?><?php
- return $return;
- }
- function imagelist($attach, $firstpost = 0) {
- global $_G;
- $attach['refcheck'] = (!$attach['remote'] && $_G['setting']['attachrefcheck']) || ($attach['remote'] && ($_G['setting']['ftp']['hideurl'] || ($attach['isimage'] && $_G['setting']['attachimgpost'] && strtolower(substr($_G['setting']['ftp']['attachurl'], 0, 3)) == 'ftp')));
- $aidencode = packaids($attach);
- $widthcode = attachwidth($attach['width']);
- $is_archive = $_G['forum_thread']['is_archived'] ? "&fid=".$_G['fid']."&archiveid=".$_G[forum_thread][archiveid] : '';
- $attachthumb = getimgthumbname($attach['attachment']);
- $pluginhook = !empty($_G['setting']['pluginhooks']['viewthread_attach_extra'][$attach[aid]]) ? $_G['setting']['pluginhooks']['viewthread_attach_extra'][$attach[aid]] : '';
- $guestviewthumb = !empty($_G['setting']['guestviewthumb']['flag']) && !$_G['uid'];
- if($guestviewthumb) {
- $guestviewthumbcss = guestviewthumbstyle();
- }
- ?><?php
- $__STATICURL = STATICURL;$return = <<<EOF
- EOF;
- if($attach['attachimg'] && $_G['setting']['showimages'] && (($_G['group']['allowgetimage'] || $_G['uid'] == $attach['uid']) || (($guestviewthumb)))) {
- $return .= <<<EOF
- <ignore_js_op>
- EOF;
- if(!IS_ROBOT) {
- $return .= <<<EOF
- <dl class="tattl attm">
- <dt></dt>
- <dd>
- EOF;
- if(!$guestviewthumb) {
- $return .= <<<EOF
- <p class="mbn">
- <a href="forum.php?mod=attachment{$is_archive}&aid={$aidencode}&nothumb=yes"
- EOF;
- if($_GET['from'] != 'preview') {
- $return .= <<<EOF
- onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" id="aid{$attach['aid']}"
- EOF;
- }
- $return .= <<<EOF
- class="xw1" target="_blank">{$attach['filename']}</a>
- <em class="xg1">({$attach['attachsize']}, 下载次数: {$attach['downloads']})</em>
- </p>
- <div class="tip tip_4" id="aid{$attach['aid']}_menu" style="display: none" disautofocus="true">
- <div>
- <p>
- <a href="forum.php?mod=attachment{$is_archive}&aid={$aidencode}&nothumb=yes" target="_blank">下载附件</a>
- EOF;
- if(helper_access::check_module('album')) {
- $return .= <<<EOF
- <a href="javascript:;" onclick="showWindow(this.id, this.getAttribute('url'), 'get', 0);" id="savephoto_{$attach['aid']}" url="home.php?mod=spacecp&ac=album&op=saveforumphoto&aid={$attach['aid']}&handlekey=savephoto_{$attach['aid']}">保存到相册</a>
- EOF;
- } if($firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])) {
- $return .= <<<EOF
- <a href="forum.php?mod=ajax&action=setthreadcover&aid={$attach['aid']}&fid={$_G['fid']}" onclick="showWindow('setcover{$attach['aid']}', this.href)">设为封面</a>
- EOF;
- }
- $return .= <<<EOF
- </p>
- <p>
- <span class="y">{$attach['dateline']} 上传</span>
- <a href="javascript:;" onclick="imageRotate('aimg_{$attach['aid']}', 1)"><img src="{$__STATICURL}image/common/rleft.gif" class="vm" /></a>
- <a href="javascript:;" onclick="imageRotate('aimg_{$attach['aid']}', 2)"><img src="{$__STATICURL}image/common/rright.gif" class="vm" /></a>
- </p>
- </div>
- <div class="tip_horn"></div>
- </div>
- <p class="mbn">
- EOF;
- if($attach['readperm']) {
- $return .= <<<EOF
- 阅读权限: <strong>{$attach['readperm']}</strong>
- EOF;
- } if($attach['price']) {
- $return .= <<<EOF
- 售价: <strong>{$attach['price']} {$_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['unit']}{$_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['title']}</strong> [<a href="forum.php?mod=misc&action=viewattachpayments&aid={$attach['aid']}" onclick="showWindow('attachpay', this.href)" target="_blank">记录</a>]
- EOF;
- if(!$attach['payed']) {
- $return .= <<<EOF
- [<a href="forum.php?mod=misc&action=attachpay&aid={$attach['aid']}&tid={$attach['tid']}" onclick="showWindow('attachpay', this.href)" target="_blank">购买</a>]
- EOF;
- } }
- $return .= <<<EOF
- </p>
- EOF;
- if($attach['description']) {
- $return .= <<<EOF
- <p class="mbn xg2">{$attach['description']}</p>
- EOF;
- } }
- $return .= <<<EOF
- {$pluginhook}
- EOF;
- if($guestviewthumb) {
- $thumbpath = helper_attach::attachpreurl().'image/'.helper_attach::makethumbpath($attach['aid'], $_G['setting']['guestviewthumb']['width'], $_G['setting']['guestviewthumb']['height']);
- $makefile = 'forum.php?mod=image&aid='.$attach['aid'].'&size='.$_G['setting']['guestviewthumb']['width'].'x'.$_G['setting']['guestviewthumb']['height'].'&key='.dsign($attach['aid'].'|'.$_G['setting']['guestviewthumb']['width'].'|'.$_G['setting']['guestviewthumb']['height']).'&type=1';
- $return .= <<<EOF
- {$guestviewthumbcss}
- <div class="guestviewthumb">
- <img id="aimg_{$attach['aid']}" class="guestviewthumb_cur" aid="{$attach['aid']}" src="{$__STATICURL}image/common/none.gif" onclick="showWindow('login', 'member.php?mod=logging&action=login'+'&referer='+encodeURIComponent(location))" onerror="javascript:if(this.getAttribute('makefile')){this.src=this.getAttribute('makefile'); this.removeAttribute('makefile');}" file="{$thumbpath}" makefile="{$makefile}" alt="{$attach['imgalt']}" title="{$attach['imgalt']}"/>
- <br>
- <a href="member.php?mod=logging&action=login" onclick="showWindow('login', this.href+'&referer='+encodeURIComponent(location));">登录/注册后可看大图</a>
- </div>
- EOF;
- } elseif(!$attach['price'] || $attach['payed']) {
- $return .= <<<EOF
- <div class="mbn savephotop">
- EOF;
- if($_G['setting']['thumbstatus'] && $attach['thumb']) {
- $return .= <<<EOF
- <a href="javascript:;"><img id="aimg_{$attach['aid']}" aid="{$attach['aid']}" src="{$__STATICURL}image/common/none.gif" onclick="zoom(this, this.getAttribute('zoomfile'), 0, 0, '{$_G['setting']['showexif']}')" zoomfile="
- EOF;
- if($attach['refcheck']) {
- $return .= <<<EOF
- forum.php?mod=attachment{$is_archive}&aid={$aidencode}&noupdate=yes¬humb=yes
- EOF;
- } else {
- $return .= <<<EOF
- {$attach['url']}{$attach['attachment']}
- EOF;
- }
- $return .= <<<EOF
- " file="
- EOF;
- if($attach['refcheck']) {
- $return .= <<<EOF
- forum.php?mod=attachment{$is_archive}&aid={$aidencode}
- EOF;
- } else {
- $return .= <<<EOF
- {$attach['url']}{$attachthumb}
- EOF;
- }
- $return .= <<<EOF
- " alt="{$attach['imgalt']}" title="{$attach['imgalt']}" w="{$attach['width']}" /></a>
- EOF;
- } else {
- $return .= <<<EOF
- <img id="aimg_{$attach['aid']}" aid="{$attach['aid']}" src="{$__STATICURL}image/common/none.gif" zoomfile="
- EOF;
- if($attach['refcheck']) {
- $return .= <<<EOF
- forum.php?mod=attachment{$is_archive}&aid={$aidencode}&noupdate=yes¬humb=yes
- EOF;
- } else {
- $return .= <<<EOF
- {$attach['url']}{$attach['attachment']}
- EOF;
- }
- $return .= <<<EOF
- " file="
- EOF;
- if($attach['refcheck']) {
- $return .= <<<EOF
- forum.php?mod=attachment{$is_archive}&aid={$aidencode}&noupdate=yes
- EOF;
- } else {
- $return .= <<<EOF
- {$attach['url']}{$attach['attachment']}
- EOF;
- }
- $return .= <<<EOF
- " {$widthcode} alt="{$attach['imgalt']}" title="{$attach['imgalt']}" w="{$attach['width']}" />
- EOF;
- }
- $return .= <<<EOF
- </div>
- EOF;
- }
- $return .= <<<EOF
- </dd>
- </dl>
- EOF;
- } else {
- $return .= <<<EOF
- <dl class="tattl attm">
- EOF;
- if(!$attach['price'] || $attach['payed']) {
- $return .= <<<EOF
- <dd>
- EOF;
- if($attach['description']) {
- $return .= <<<EOF
- <p>{$attach['description']}</p>
- EOF;
- }
- $return .= <<<EOF
- <img src="
- EOF;
- if($attach['refcheck']) {
- $return .= <<<EOF
- forum.php?mod=attachment{$is_archive}&aid={$aidencode}&noupdate=yes
- EOF;
- } else {
- $return .= <<<EOF
- {$attach['url']}{$attach['attachment']}
- EOF;
- }
- $return .= <<<EOF
- " alt="{$attach['imgalt']}" title="{$attach['imgalt']}" />
- </dd>
- EOF;
- }
- $return .= <<<EOF
- </dl>
- EOF;
- }
- $return .= <<<EOF
- </ignore_js_op>
- EOF;
- }
- $return .= <<<EOF
- EOF;
- ?><?php
- return $return;
- }
- function attachinpost($attach, $post) {
- global $_G;
- $firstpost = $post['first'];
- $attach['refcheck'] = (!$attach['remote'] && $_G['setting']['attachrefcheck']) || ($attach['remote'] && ($_G['setting']['ftp']['hideurl'] || ($attach['isimage'] && $_G['setting']['attachimgpost'] && strtolower(substr($_G['setting']['ftp']['attachurl'], 0, 3)) == 'ftp')));
- $aidencode = packaids($attach);
- $widthcode = attachwidth($attach['width']);
- $is_archive = $_G['forum_thread']['is_archived'] ? '&fid='.$_G['fid'].'&archiveid='.$_G[forum_thread][archiveid] : '';
- $attachthumb = getimgthumbname($attach['attachment']);
- $musiccode = getstatus($post[status], 7) && fileext($attach['attachment']) == 'mp3' ? (browserversion('ie') > 8 || browserversion('safari') ? '<audio controls="controls"><source src="'.$attach['url'].$attach['attachment'].'"></audio>' : parseaudio($attach['url'].$attach['attachment'], 400)) : '';
- $guestviewthumb = !empty($_G['setting']['guestviewthumb']['flag']) && !$_G['uid'];
- if($guestviewthumb) {
- $guestviewthumbcss = guestviewthumbstyle();
- }
- ?><?php
- $__STATICURL = STATICURL;$return = <<<EOF
- <ignore_js_op>
- EOF;
- if($attach['attachimg'] && $_G['setting']['showimages'] && (((!$attach['price'] || $attach['payed']) && ($_G['group']['allowgetimage'] || $_G['uid'] == $attach['uid'])) || (($guestviewthumb)))) { if(!IS_ROBOT) { if($guestviewthumb) {
- $thumbpath = helper_attach::attachpreurl().'image/'.helper_attach::makethumbpath($attach['aid'], $_G['setting']['guestviewthumb']['width'], $_G['setting']['guestviewthumb']['height']);
- $makefile = 'forum.php?mod=image&aid='.$attach['aid'].'&size='.$_G['setting']['guestviewthumb']['width'].'x'.$_G['setting']['guestviewthumb']['height'].'&key='.dsign($attach['aid'].'|'.$_G['setting']['guestviewthumb']['width'].'|'.$_G['setting']['guestviewthumb']['height']).'&type=1';
- $return .= <<<EOF
- {$guestviewthumbcss}
- <div class="guestviewthumb">
- <div style="margin: 0 auto;">
- <img id="aimg_{$attach['aid']}" class="guestviewthumb_cur" aid="{$attach['aid']}" src="{$__STATICURL}image/common/none.gif" onclick="showWindow('login', 'member.php?mod=logging&action=login'+'&referer='+encodeURIComponent(location))" onerror="javascript:if(this.getAttribute('makefile')){this.src=this.getAttribute('makefile'); this.removeAttribute('makefile');}" file="{$thumbpath}" makefile="{$makefile}" inpost="1" alt="{$attach['imgalt']}" title="{$attach['imgalt']}"/>
- <br>
- <a href="member.php?mod=logging&action=login" onclick="showWindow('login', this.href+'&referer='+encodeURIComponent(location));">登录/注册后可看大图</a>
- </div>
- </div>
- EOF;
- } else { if($_G['setting']['thumbstatus'] && $attach['thumb']) {
- $return .= <<<EOF
- <img
- EOF;
- if($attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']) {
- $return .= <<<EOF
- class="attprice"
- EOF;
- }
- $return .= <<<EOF
- style="cursor:pointer" id="aimg_{$attach['aid']}" aid="{$attach['aid']}" src="{$__STATICURL}image/common/none.gif" onclick="zoom(this, this.getAttribute('zoomfile'), 0, 0, '{$_G['setting']['showexif']}')" zoomfile="
- EOF;
- if($attach['refcheck']) {
- $return .= <<<EOF
- forum.php?mod=attachment{$is_archive}&aid={$aidencode}&noupdate=yes¬humb=yes
- EOF;
- } else {
- $return .= <<<EOF
- {$attach['url']}{$attach['attachment']}
- EOF;
- }
- $return .= <<<EOF
- " file="
- EOF;
- if($attach['refcheck']) {
- $return .= <<<EOF
- forum.php?mod=attachment{$is_archive}&aid={$aidencode}
- EOF;
- } else {
- $return .= <<<EOF
- {$attach['url']}{$attachthumb}
- EOF;
- }
- $return .= <<<EOF
- " inpost="1"
- EOF;
- if($_GET['from'] != 'preview') {
- $return .= <<<EOF
- onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"
- EOF;
- }
- $return .= <<<EOF
- />
- EOF;
- } else {
- $return .= <<<EOF
- <img
- EOF;
- if($attach['price'] && $_G['forum_attachmentdown'] && $_G['uid'] != $attach['uid']) {
- $return .= <<<EOF
- class="attprice"
- EOF;
- }
- $return .= <<<EOF
- id="aimg_{$attach['aid']}" aid="{$attach['aid']}" src="{$__STATICURL}image/common/none.gif" zoomfile="
- EOF;
- if($attach['refcheck']) {
- $return .= <<<EOF
- forum.php?mod=attachment{$is_archive}&aid={$aidencode}&noupdate=yes¬humb=yes
- EOF;
- } else {
- $return .= <<<EOF
- {$attach['url']}{$attach['attachment']}
- EOF;
- }
- $return .= <<<EOF
- " file="
- EOF;
- if($attach['refcheck']) {
- $return .= <<<EOF
- forum.php?mod=attachment{$is_archive}&aid={$aidencode}&noupdate=yes
- EOF;
- } else {
- $return .= <<<EOF
- {$attach['url']}{$attach['attachment']}
- EOF;
- }
- $return .= <<<EOF
- " {$widthcode} id="aimg_{$attach['aid']}" inpost="1"
- EOF;
- if($_GET['from'] != 'preview') {
- $return .= <<<EOF
- onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"
- EOF;
- }
- $return .= <<<EOF
- />
- EOF;
- } }
- $return .= <<<EOF
- <div class="tip tip_4 aimg_tip" id="aimg_{$attach['aid']}_menu" style="position: absolute; display: none" disautofocus="true">
- <div class="xs0">
- <p><strong>{$attach['filename']}</strong> <em class="xg1">({$attach['attachsize']}, 下载次数: {$attach['downloads']})</em></p>
- <p>
- <a href="forum.php?mod=attachment{$is_archive}&aid={$aidencode}&nothumb=yes" target="_blank">下载附件</a>
- EOF;
- if(helper_access::check_module('album')) {
- $return .= <<<EOF
- <a href="javascript:;" onclick="showWindow(this.id, this.getAttribute('url'), 'get', 0);" id="savephoto_{$attach['aid']}" url="home.php?mod=spacecp&ac=album&op=saveforumphoto&aid={$attach['aid']}&handlekey=savephoto_{$attach['aid']}">保存到相册</a>
- EOF;
- } if($firstpost && $_G['fid'] && $_G['forum']['picstyle'] && ($_G['forum']['ismoderator'] || $_G['uid'] == $attach['uid'])) {
- $return .= <<<EOF
- <a href="forum.php?mod=ajax&action=setthreadcover&aid={$attach['aid']}&fid={$_G['fid']}" onclick="showWindow('setcover{$attach['aid']}', this.href)">设为封面</a>
- EOF;
- }
- $return .= <<<EOF
- </p>
- EOF;
- if($attach['description']) {
- $return .= <<<EOF
- <p>{$attach['description']}</p>
- EOF;
- }
- $return .= <<<EOF
- <p class="xg1 y">{$attach['dateline']} 上传</p>
- EOF;
- } else { if($attach['description']) {
- $return .= <<<EOF
- <p>{$attach['description']}</p>
- EOF;
- }
- $return .= <<<EOF
- <img src="
- EOF;
- if($attach['refcheck']) {
- $return .= <<<EOF
- forum.php?mod=attachment{$is_archive}&aid={$aidencode}&noupdate=yes
- EOF;
- } else {
- $return .= <<<EOF
- {$attach['url']}{$attach['attachment']}
- EOF;
- }
- $return .= <<<EOF
- " alt="{$attach['imgalt']}" title="{$attach['imgalt']}" />
- EOF;
- } } else { if($musiccode) {
- $return .= <<<EOF
- <div>{$musiccode}</div>
- EOF;
- }
- $return .= <<<EOF
- {$attach['attachicon']}
- <span style="white-space: nowrap" id="attach_{$attach['aid']}"
- EOF;
- if($_GET['from'] != 'preview') {
- $return .= <<<EOF
- onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})"
- EOF;
- }
- $return .= <<<EOF
- >
- EOF;
- if(!$attach['price'] || $attach['payed']) {
- $return .= <<<EOF
- <a href="forum.php?mod=attachment{$is_archive}&aid={$aidencode}" target="_blank">{$attach['filename']}</a>
- EOF;
- } else {
- $return .= <<<EOF
- <a href="forum.php?mod=misc&action=attachpay&aid={$attach['aid']}&tid={$attach['tid']}" onclick="showWindow('attachpay', this.href)">{$attach['filename']}</a>
- EOF;
- }
- $return .= <<<EOF
- <em class="xg1">({$attach['attachsize']}, 下载次数: {$attach['downloads']}
- EOF;
- if($attach['price']) {
- $return .= <<<EOF
- , 售价: {$attach['price']} {$_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['unit']}{$_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['title']}
- EOF;
- }
- $return .= <<<EOF
- )</em>
- </span>
- <div class="tip tip_4" id="attach_{$attach['aid']}_menu" style="position: absolute; display: none" disautofocus="true">
- <div class="tip_c xs0">
- <div class="y">{$attach['dateline']} 上传</div>
- 点击文件名下载附件
- EOF;
- if($attach['description']) {
- $return .= <<<EOF
- <br />{$attach['description']}
- EOF;
- } if($attach['readperm']) {
- $return .= <<<EOF
- <br />阅读权限: {$attach['readperm']}
- EOF;
- } } if(!IS_ROBOT && !$guestviewthumb) { if($attach['price']) {
- $return .= <<<EOF
- <br />售价: {$attach['price']} {$_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['unit']}{$_G['setting']['extcredits'][$_G['setting']['creditstransextra']['1']]['title']} <a href="forum.php?mod=misc&action=viewattachpayments&aid={$attach['aid']}" onclick="showWindow('attachpay', this.href)" target="_blank">[记录]</a>
- EOF;
- if(!$attach['payed']) {
- $return .= <<<EOF
- [<a href="forum.php?mod=misc&action=attachpay&aid={$attach['aid']}&tid={$attach['tid']}" onclick="showWindow('attachpay', this.href)" target="_blank">购买</a>]
- EOF;
- } } if(!$attach['attachimg'] && $_G['getattachcredits']) {
- $return .= <<<EOF
- <br />下载积分: {$_G['getattachcredits']}
- EOF;
- }
- $return .= <<<EOF
- </div>
- <div class="tip_horn"></div>
- </div>
- EOF;
- if($musiccode) {
- $return .= <<<EOF
- <br />
- EOF;
- } }
- $return .= <<<EOF
- </ignore_js_op>
- EOF;
- ?><?php
- return $return;
- }
- ?>
|