- เครดิต
- 5095
- เพื่อน
- ทักทาย
- บล็อก
- อัลบั้ม
- โพสต์
- กระทู้
- แชร์
- สำคัญ
- สิทธิ์อ่าน
- 200
- จำนวนผู้ติดตาม
- จำนวนผู้กำลังติดตาม
- เพศ
- ไม่บอก
|
acaz
โพสต์ 2008-2-5 13:13:56
เปิดไฟลล์ index.php
ค้นหา- $rsshead = $rssstatus ? ('<link rel="alternate" type="application/rss+xml" title="'.$bbname.'" href="'.$boardurl.'rss.php?auth='.$rssauth."" />\n") : '';
คัดลอกไปที่คลิปบอร์ด ใส่โค๊ดนี้ด้านบน- //----????????
- $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
- //??
- $hack_cut_str = 150; //????
- $hack_cut_strauthor = 9;
- $new_post_threadlist = array();
- $nthread = array();
- $query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, 10");
- while($nthread = $db->fetch_array($query)) {
- $nthread['forumname'] = ereg_replace('<[^>]*>','',$nthread['name']);
- $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
- $nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
- $nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
- $nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
- if($nthread['highlight']) {
- $string = sprintf('%02d', $nthread['highlight']);
- $stylestr = sprintf('%03b', $string[0]);
- $nthread['highlight'] = 'style="';
- $nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
- $nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
- $nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
- $nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
- $nthread['highlight'] .= '"';
- } else {
- $nthread['highlight'] = '';
- }
- $new_post_threadlist[] = $nthread;
- }
- //???
- $hack_cut_str = 150; //????
- $hack_cut_strauthor = 9;
- $new_reply_threadlist = array();
- $rthread = array();
- $query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.lastpost DESC LIMIT 0, 10");
- while($rthread = $db->fetch_array($query)) {
- $rthread['forumname'] = ereg_replace('<[^>]*>','',$rthread['name']);
- $rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
- $rthread['view_lastposter'] = cutstr($rthread['lastposter'],$hack_cut_strauthor);
- $rthread['date']= gmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
- $rthread['lastreplytime']= gmdate("$dateformat $timeformat", $rthread[lastpost] + ($timeoffset * 3600));
- if($rthread['highlight']) {
- $string = sprintf('%02d', $rthread['highlight']);
- $stylestr = sprintf('%03b', $string[0]);
- $rthread['highlight'] = 'style="';
- $rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
- $rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
- $rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
- $rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
- $rthread['highlight'] .= '"';
- } else {
- $rthread['highlight'] = '';
- }
- $new_reply_threadlist[] = $rthread;
- }
- //??
- $hack_cut_str = 150; //????
- $hack_cut_strauthor = 9;
- $new_hot_threadlist = array();
- $mthread = array();
- $ctime=$timestamp-3600*24*7;//??7??????
- $query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND t.dateline>$ctime AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.replies DESC LIMIT 0, 10");
- while($mthread = $db->fetch_array($query)) {
- $mthread['forumname'] = ereg_replace('<[^>]*>','',$mthread['name']);
- $mthread['view_subject'] = cutstr($mthread['subject'],$hack_cut_str);
- $mthread['view_lastposter'] = cutstr($mthread['lastposter'],$hack_cut_strauthor);
- $mthread['date']= gmdate("$dateformat $timeformat", $mthread['dateline'] + $timeoffset * 3600);
- $mthread['lastreplytime']= gmdate("$dateformat $timeformat", $mthread[lastpost] + ($timeoffset * 3600));
- if($mthread['highlight']) {
- $string = sprintf('%02d', $mthread['highlight']);
- $stylestr = sprintf('%03b', $string[0]);
- $mthread['highlight'] = 'style="';
- $mthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
- $mthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
- $mthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
- $mthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
- $mthread['highlight'] .= '"';
- } else {
- $mthread['highlight'] = '';
- }
- $new_hot_threadlist[] = $mthread;
- }
- //??????
- $tomonth=date(n);
- $todate=date(j);
- $toyear=date(Y);
- $time=mktime(0,0,0,$tomonth,$todate,$toyear);
- $query=$db->query("select count(pid) as num,authorid,author from $tablepre"."posts where dateline>=$time group by authorid order by num desc limit 0,10");
- while($result=$db->fetch_array($query)){
- $poststar.="<div style="overflow: hidden;height: 20px;width: 100%;"><a href=space.php?uid=".$result[authorid].">".cutstr($result[author],8)."</a><font color=red>[".$result[num]."]</font></div>";
- }
- //----????????
คัดลอกไปที่คลิปบอร์ด บันทึก
เปิดไฟลล์ toplist.htm
เอาโค๊ดนี้ไปวาง- <style type="text/css">
- <!--
- .usershow a:link { color:#3758B3; text-decoration: none; }
- .usershow a:visited { color:#3758B3; text-decoration: none; }
- .usershow a:hover { color:#3758B3; text-decoration: underline; }
- .button_bg1 { width: 84px; height: 22px; border-top: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; border-bottom: 0px solid #CCCCCC; margin-top: 3px; cursor: hand; float: left; }
- .button_bg2 { width: 84px; height: 22px; border-top: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; border-bottom: 0px solid #CCCCCC; margin-top: 3px; background: url(toplist/images/toplist_button.gif) repeat-x; cursor: hand; float: left; }
- -->
- </style>
- <!-- <div align="center" id="loading" style="width:{TABLEWIDTH};height:30px; background:url(toplist/images/loading.gif) no-repeat center;border:2px solid {BORDERCOLOR};margin-bottom:8px;"></div> -->
- <div align="center" id="loading"></div>
- <div id="toplistshow" style="display:none;width:{TABLEWIDTH};height:215px;border:1px solid {BORDERCOLOR};margin-bottom:8px;">
- <div align="center" style="width:28%;height:215px;background:url(toplist/images/line_r.gif) repeat-y right;float:left;">
- <div align="center" style="width:100%;height:30px;background:url(toplist/images/toplist_head.gif) repeat-x;">
- <div style="height:30px;width:1px;border-right:1px solid #CCCCCC;float:right;"></div>
- <div style="padding-top:6px;"><b>รูปจากกระดาน</b></div>
- </div>
- <div style="margin:1px auto 5px auto;"><script language="JavaScript" src="toplist/focuspic.php"></script></div>
- </div>
- <div align="center" style="width:30%;background:url(toplist/images/line_r.gif) repeat-y right;float:left;">
- <div align="center" style="width:100%;height:26px;background:url(toplist/images/toplist_head.gif) repeat-x;border-bottom:1px solid #CCCCCC;">
- <div style="height:26px;width:1px;border-right:1px solid #CCCCCC;float:right;"></div>
- <div style="width:256px;">
- <div id="show_1_button" class="button_bg2" style="display:block;border-left:1px solid #CCCCCC;cursor:hand;" onmouseover="changebg('show_1','show_2','show_3')">
- <img src="toplist/images/forum_new.gif" style="margin:3px 0px 0px 3px;float:left;" /><b style="margin:2px 8px 0px 3px;float:left;">หัวข้อใหม่</b>
- </div>
- <div id="show_2_button" class="button_bg1" style="display:block;cursor:hand;" onmouseover="changebg('show_2','show_1','show_3')">
- <img src="toplist/images/forum_re.gif" style="margin:3px 0px 0px 3px;float:left;" /><b style="margin:2px 8px 0px 3px;float:left;">ตอบล่าสุด</b>
- </div>
- <div id="show_3_button" class="button_bg1" style="display:block;cursor:hand;" onmouseover="changebg('show_3','show_1','show_2')">
- <img src="toplist/images/forum_hot.gif" style="margin:3px 0px 0px 3px;float:left;" /><b style="margin:2px 8px 0px 3px;float:left;">ดูสูงสุด</b>
- </div>
- </div>
- </div>
- <div align="left" style="width:100%;height:184px;line-height:18px;background:url(toplist/images/rank.gif) no-repeat top 5px;margin-top:4px;">
- <div id="show_1" style="margin:1px auto auto 30px;">
- <!-- กระทู้ใหม่ -->
- <!--{loop $new_post_threadlist $nthread}-->
- <!--{if $nthread[replies]}-->
- <div style="overflow: hidden;height: 18px;width: 100%;"><a href="viewthread.php?tid=$nthread[tid]" $nthread['highlight'] title='กระทู้ล่าสุดจากกระดาน {LF}: $nthread[forumname]{LF}หัวข้อ: $nthread[subject] {LF}โพสโดย: $nthread[author]{LF}โพสเมื่อ: $nthread[date]{LF}ดูแล้ว: $nthread[views] คน {LF}ตอบแล้ว: $nthread[replies] คน{LF}ตอบล่าสุดเมื่อ: $nthread[lastreplytime]{LF}{lang lastpost}: $nthread[lastposter]'>$nthread[view_subject]</a></div>
- <!--{else}-->
- <div style="overflow: hidden;height: 18px;width: 100%;"><a href="viewthread.php?tid=$nthread[tid]" $nthread['highlight'] title='กระทู้ล่าสุดจากกระดาน {LF}: $nthread[forumname]{LF}หัวข้อ: $nthread[subject] {LF}โพสโดย: $nthread[author]{LF}โพสเมื่อ: $nthread[date]{LF}ดูแล้ว: $nthread[views] คน {LF}ตอบแล้ว: $nthread[replies] คน{LF}ตอบล่าสุดเมื่อ: ยังไม่มีการตอบ'>$nthread[view_subject]</a></div>
- <!--{/if}-->
- <!--{/loop}-->
- <!-- กระทู้ใหม่ -->
- </div>
- <div id="show_2" style="display:none;margin:1px auto auto 30px;">
- <!-- ตอบล่าสุด -->
- <!--{loop $new_reply_threadlist $rthread}-->
- <div style="overflow: hidden;height: 18px;width: 100%;"><a href="viewthread.php?tid=$rthread[tid]" $rthread['highlight'] title='ตอบล่าสุดจากกระดาน {LF}: $rthread[forumname]{LF}หัวข้อ: $rthread[subject]{LF}โพสโดย: $rthread[author]{LF}โพสเมื่อ: $rthread[date]{LF}ดูแล้ว: $rthread[views] คน{LF}ตอบแล้ว: $rthread[replies] คน{LF}ตอบล่าสุดเมื่อ: $rthread[lastreplytime]{LF}{lang lastpost}: $rthread[lastposter]'>$rthread[view_subject]</a></div>
- <!--{/loop}-->
- <!-- ตอบล่าสุด -->
- </div>
- <div id="show_3" style="display:none;margin:1px auto auto 30px;">
- <!-- ดูสูงสุด -->
- <!--{loop $new_hot_threadlist $mthread}-->
- <div style="overflow: hidden;height: 18px;width: 100%;"><a href="viewthread.php?tid=$mthread[tid]" $mthread['highlight'] title='กระทู้เด่นมาจากกระดาน {LF}: $mthread[forumname]{LF}หัวข้อ: $mthread[subject]{LF}โพสโดย: $mthread[author]{LF}โพสเมื่อ: $mthread[date]{LF}ดูแล้ว: $mthread[views] คน{LF}ตอบแล้ว: $mthread[replies] คน{LF}ตอบล่าสุดเมื่อ: $mthread[lastreplytime]{LF}{lang lastpost}: $mthread[lastposter]'>$mthread[view_subject]</a></div>
- <!--{/loop}-->
- <!-- ดูสูงสุด -->
- </div>
- </div>
- </div>
- <div align="center" style="height:215px;">
- <div style="width:100%;height:24px;background:url(toplist/images/toplist_head.gif) repeat-x;">
- <div style="height:30px;width:1px; solid #CCCCCC;float:right;"></div>
- <div style="padding-top:6px;"><b>ผู้สนับสนุน</div>
- </div>
- <div>
- <!-- Ads -->
- <script type="text/javascript">
- var varText = ""
- function addInfo(title,photourl,link){
- if(varText!=""){
- varText+="|||";
- }
- varText+=title+"|_|"+photourl+"|_|"+link;
- }
- linkarr = new Array();
- picarr = new Array();
- textarr = new Array();
- linkarr[1] = "http://www.cazdesign.com/forums/forum-21-1.html";
- picarr[1] = "http://www.cazdesign.com/forums/toplist/toplist_1.jpg";
- textarr[1] = "?1?PICPOST?1?";
- linkarr[2] = "http://www.gsmadvance.com";
- picarr[2] = "http://www.cazdesign.com/forums/toplist/toplist_2.jpg";
- textarr[2] = "?2?G S M ?2?";
- linkarr[3] = "http://www.gsmadvance.com";
- picarr[3] = "http://www.cazdesign.com/forums/toplist/toplist_3.jpg";
- textarr[3] = "?3?G S M ?3?";
- linkarr[4] = "http://www.toyota.co.th/red/th/index.asp";
- picarr[4] = "http://www.cazdesign.com/forums/toplist/toplist_4.jpg";
- textarr[4] = "?4?TOYOTA?4?";
- linkarr[5] = "http://www.hutch.co.th/ecard/index_th.jsp";
- picarr[5] = "http://www.cazdesign.com/forums/toplist/toplist_5.jpg";
- textarr[5] = "?5?HUTCH ?5?";
- addInfo(textarr[1],picarr[1],linkarr[1]);
- addInfo(textarr[2],picarr[2],linkarr[2]);
- addInfo(textarr[3],picarr[3],linkarr[3]);
- addInfo(textarr[4],picarr[4],linkarr[4]);
- addInfo(textarr[5],picarr[5],linkarr[5]);
- document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="395" height="185" id="01" align="middle">')
- document.write('<param name="allowScriptAccess" value="sameDomain" />')
- document.write('<param name="movie" value="http://www.cazdesign.com/forums/toplist/flash.swf?info='+varText+'" />')
- document.write('<param name="quality" value="high" />')
- document.write('<param name="bgcolor" value="#ffffff" /><param name="wmode" value="transparent" />')
- document.write('<embed src="{IMGDIR}/toplist/flash.swf" quality="high" bgcolor="#ffffff" width="410" height="200" name="01" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />')
- document.write('</object>')
- </script>
- <!-- Ads -->
- </div>
- </div>
- </div>
- <script type="text/javascript" language="javascript">
- document.getElementById('loading').style.display = 'none';
- document.getElementById('toplistshow').style.display = '';
- function changebg(obj1id,obj2id,obj3id){
- var obj1 = document.getElementById(obj1id + '_button');
- var obj2 = document.getElementById(obj2id + '_button');
- var obj3 = document.getElementById(obj3id + '_button');
- var obj4 = document.getElementById(obj1id);
- var obj5 = document.getElementById(obj2id);
- var obj6 = document.getElementById(obj3id);
- obj1.className = 'button_bg2';
- obj2.className = 'button_bg1';
- obj3.className = 'button_bg1';
- obj4.style.display = '';
- obj5.style.display = 'none';
- obj6.style.display = 'none';
- }
- </script>
คัดลอกไปที่คลิปบอร์ด ลองดู |
|