Discuz5.000フォーラムプログラムにjsコードを追加して、会員にクリックして添付ファイルをダウンロードする前に自動的にポップアップメッセージウィンドウを表示させます。
atachment.phpファイルを修正したいです。 ルートディレクトリの下で にあります = $ispaid = FALSE;下に追加 if (!emppty($checktwo) { 一番後ろの席ですか前に追加 } else { echo "alert('はあなたの提示する内容を書きます') "" echo "query("SELECT" a.* t.fid、 p.authorid FROM {$table pre}atachments a, {$table pre}threads t,t, {$テーブルプレ}posts p WHERE a.aid=''aid' AND t.tid=a.tid AND p.pid=a.pid AND t.displayorder='0' AND p.invisible='0'); $atch = $db->fetch_array($query) */ periodscheck('atachbanceriods); $atachexists = $ispaid = FALSE; if (!emppty($checktwo) { if(empty($aid) { $query = $db->query("SELECT" * FROM {$table pre}atachments WHERE aid=''aid'); if($atach) = $db->fetch_array($query) { $query = $db->query("SELECT" tid、 fid、 price スペシャル FROM {$table pre}threads WHERE tid='$atach[tid]' AND displayorder='0'';; $thread = $db->fetch_array($query) if($thread['fid]) { $query = $db->query("SELECT" authorid FROM {$テーブルプレ}posts WHERE pid='$atach[pid]' AND invisible='0'"); if($db->num_ローソン($query) { $atech['authorid'] = $db->レスリング($query) 0) $atachexists = TRUE } } } } if($allowgetattach) && ($atech['readperm'] && $atech['readperm'] > $readaccess) && $adminid <= 0 && !($discuzuid && $discuzuid == $atech['authorid']) { showmessage('atachment')forum_nopermission NULL 'NOPERM;; } if(thread['special'] && $thread[price] > 0 && (!$discuzuid || ($discuzuid && $discuzuid != $atech['authorid'] && $adminid <=0) { $query = $db->query("SELECT" uid FROM {$テーブルプレe paymentlogs WHERE uid='discuz_uid AND tid='$atach[tid]';; if($db-)>レスリング($query) 0) { $ispaid = TRUE } else { showmessage('atachment')payto 'viewthread.php?tid='.atch['tid]] } } $filename = $atachdir.'/'.atach['atachment]] if(is_)readable($filename) && $atachexists) { $query = $db->query("SELECT" f.viewperm、 f.getattachperm、 f.getattachcrediits、 a.allowgetattach FROM {$テーブルプレe forumfields f LEFT JOIN {$tablepre}access a. オン a.uid='$discuz_uid AND a.fid=f.fid WHERE f.fid=''thread[fid]';; $forum = $db->fetch_array($query) if(ispaid) { if(forum['allowgetattach]) { if(forum['getattachperm'] && !$allowgetattach) { showmessage('group_)nopermission NULL 'NOPERM;; } elseif($forum['getattachperm]] && !forumperm($forum['getattachperm]) || ($forum['viewperm'] && !forumperm($forum['viewperm]) { showmessage('atachment')forum_nopermission NULL 'NOPERM;; } } } if(!($イメージ = preg_match(/^image\/.+/) $atech['filetype]) { checklowerlimit($credit spolicy['getattach]] -1) } if(empty($noupadate) { if($delayview count) == 2 || $delayviewcount == 3) { $logfile = './forumdata/cache/cache_atechview.log' if(substr($timestamp) -1) == '0') { require_オンス DISCUZ_ROOT.'/include/misc.func.php'; udateview('atachments') 'aid'は、 'downloads $logfile; } if(@fp) = fopen(DISCUZ_ROOT.$logfile 'a') { fwrite($fp) "$aid"); fclose($fp) } elseif($adminid) == 1) { showmessage('view_)ロゴinvalid;; } } else { $db->query("UPDATE" {$table pre}atachments SET downloads=downloads+'1' WHERE aid=''aid'' 'UNBUFFERED); } } if(isimage) { $forum['getattachcrediits'] = $forum['getattachcrediits'] ? unserialize($forum['getattachcredies]]) : array(); $getattachcrediits = $forum['getattachcrediits'] ? $forum['getattachcrediits'] : $credit spolicy['getattach]; udatecrediits($discuz_)uid、 $getattachcredies、 -1) } $filesize = filesize($filename) OBend_clean(); header('Cache-control: max-age=31536000') header('Expires: '.gmdate('D d M Y H:i:s' $timestamp + 31536000).' GMT;; ヘader('Content-Enccoding: none; $atech['filename'] = (strower($charset) == 'utf-8 && streexists($u)SERVER['HTTP_USER_AGENT] 'MSIE) ? urlencode($atch['filename]) : $atech['filename]; if($isimage) && !empty($noupdate) { ヘader('Contentent-Dispation: オンライン; filename='.atach['filename]] } else { ヘader('Contentent-Dispation: atachment; filename='.atach['filename]] } header(''Content-Type: '.$atch['filetype]] @$fp。 = fopen($filename) 'rb;; @flock($fp) 2) $atechment = @fread($fp) $filesize); @fclose($fp) echo $atachment; } else { showmessage('atachment')nonexistence); } } else { echo "alert('$PHP_SELF') "; echo "