|
 
- Ìû×Ó
- 85
- »ý·Ö
- 215
- ÍþÍû
- 0
- ½ð±Ò
- 98 ¸ö
- ÌåÁ¦
- 89
- ×¢²áʱ¼ä
- 2003-6-22
|

10-24ÐÞÕý×îºóÏÂÔØÊ±¼ä, ¸½¼þÏÂÔØÃûµ¥for dz6.0£¬¸ÐлϰÃ÷£¬mingyanµÄÖ¸µã£¡
Ãû³Æ: ¸½¼þÏÂÔØÃûµ¥ for DZ6.0
ÑÝʾ: HTTP://WWW.PDACLAN.COM
Êý¾Ý¿â: ²»ÐÞ¸Ädz±¾ÉíµÄÊý¾Ý¿â£¬Ìí¼ÓÒ»¸öÐÂ±í¡£
°²×°ÄѶÈ: ·Ç³£ÈÝÒ×
¹¦ÄÜ: Ôö¼ÓÒ»¸öÏÂÔØ¹ý¸½¼þµÄ»áÔ±Ãûµ¥ÁÐ±í£¬Í¨¹ýÃûµ¥¿ÉÒԱȽÏ׼ȷÁ˽⸽¼þµÄʵ¼ÊÏÂÔØÁ¿£¬²¢¿ÉÒÔµÃÖª¸÷»áÔ±µÄÊ×´ÎÏÂÔØÊ±¼ä£¬Ó¦¸ÃÓв¿·ÖÅóÓÑÐèÒª¡£°æÖ÷ºÍ¸½¼þÖ÷ÈË¿ÉÒÔ¿´µ½ÏÂÔØÃûµ¥£¬²¢¿ÉÒÔ¸ù¾Ý¸½¼þµÄ¸üÐÂÇé¿ö¶ÔÔçÆÚÏÂÔØµÄ»áÔ±Ö±½ÓÅúÁ¿·¢Ë͵ĶÌÐÅ֪ͨ£¬ÈûáÔ±Äܼ°Ê±ÏÂÔØµ½Ð¸½¼þ¡£
10ÔÂ24ÈÕÐÞÕý×îºóÏÂÔØÊ±¼äÏÔʾÎÊÌâ, ÇëÖØÐÂÐÞ¸Ämisc.php¼´¿É!
10ÔÂ17Ôö¼Ó×îºóÏÂÔØÊ±¼ä£¬Ö®Ç°ÒѰ²×°µÄÅóÓѰ´Àº×ÖÐÞ¸Ä. ÏÂÒ»¸ö¹¦ÄÜÉèÏëÊǰѹâÏÂÔØ²»»Ø¸´µÄÈ˵ÄÃû×ÖÔÚÏÂÔØÁбíÀïÓúìÉ«Çø·Ö¡£¡£²»ÖªµÀÓбØÒª²»¡£¡£
10ÔÂ17ÐÞÕý²»ÄÜÕýÈ·ÏÔʾÏÂÈËÊýͳ¼ÆµÄÎÊÌâ¡£¡£
ÔÚmisc.phpÕÒµ½- $numquery = $db->query("select count(*) as rncts from {$tablepre}attachdownloadlog WHERE aid='$aid'");
- $data = @mysql_fetch_array($numquery);
- $times = $data[rncts];
¸´ÖÆ´úÂë ½«$times¸ÄΪ$downloads
10ÔÂ15ÈÕ¸ù¾ÝmingyanÀÏ´óµÄÖ¸µã½øÐÐÁËÐÞÕý£¬ÔöÇ¿ÁËÏÞÖÆ£¬±ÜÃâÆÕͨ»áÔ±Ö±½Óͨ¹ýurl·ÃÎÊÏÂÔØÃûµ¥¡£ÇëÏÂÔØ 07-10-15_dowloadlog.rar ¡£
10ÔÂ12ÈÕ¸½¼þÒѾ¸üжÌÐÅ֪ͨÒÑÏÂÔØÕߣ¬ÌáÐÑËûÃÇÏÂÔØ¸½¼þÒѾ¸üУ¬¿ÉÒÔÑ¡Ôñ²¿·Ö»áÔ±À´·¢ËÍ£¬Ð»Ð»piyr11 µÄ½¨Ò飡
10ÔÂ11ÈÕ¸½¼þÒѾ¸üУ¬ÒòΪ´ÖÐĸø´ó¼ÒÔì³ÉµÄ²»±ã·Ç³£±§Ç¸£¡ ȫбàдÁ˲å¼þµÄÊý¾Ý¿â°²×°¹¤¾ß£¬ÒѾ²âÊÔÁË¡£
´Ë²å¼þÊDZ¾ÈË´¦Å®×÷Æ·£¬ºÜÊÇ´Ö²Ú£¬´ó¼Ò¶à¶àÖ¸Õý£¡Ð»Ð»
Ð޸ķ½·¨£º
======================================
1.ÔËÐÐdownload_log_sql_install.php»òÕßÖ±½Ó²Ù×÷Êý¾Ý¿âÔö¼Óϱí (17ÈÕǰÏÂÔØµÄÅóÓÑÐèÒª°´À¶É«×ÖÐÞ¸Ä)
======================================
- DROP TABLE IF EXISTS `cdb_attachdownloadlog`;
- CREATE TABLE IF NOT EXISTS `cdb_attachdownloadlog` (
- `uid` mediumint(8) unsigned NOT NULL default '0',
- `aid` mediumint(8) unsigned NOT NULL default '0',
- `authorid` mediumint(8) unsigned NOT NULL default '0',
- `times` mediumint(8) unsigned NOT NULL default '0',
- `dateline` int(10) unsigned NOT NULL default '0',
- `lastdateline` int(10) unsigned NOT NULL default '0',
- PRIMARY KEY (`aid`,`uid`),
- KEY `uid` (`uid`),
- KEY `authorid` (`authorid`)
- );
¸´ÖÆ´úÂë
======================================
2. ÐÞ¸Ädiscuzcode.htm
======================================
ÕÒµ½- global $attachrefcheck, $extcredits, $creditstrans, $ftp, $thumbstatus;
¸´ÖÆ´úÂë ¹²ÓÐÁ½´¦£¬¶¼ÐèÒªÐÞ¸Ä
ÔÚ·ÖºÅÇ°Ãæ¼ÓÉÏ¡°, $groupid, $adminid, $discuz_uid¡±£¬ÈçÏ£º- global $attachrefcheck, $extcredits, $creditstrans, $ftp, $thumbstatus, $groupid, $groupid, $discuz_uid;
¸´ÖÆ´úÂë ÕÒµ½- <!--{else}-->
- <dt>
- $attach[attachicon]
- <a href="attachment.php?aid=$attach[aid]" target="_blank">$attach[filename]</a>
- <em>($attach[attachsize])</em>
- </dt>
- <dd>
- <p>
- $attach[dateline], {lang downloads}: $attach[downloads]
- <!--{if $attach['readperm']}-->, {lang readperm}: <strong>$attach[readperm]</strong><!--{/if}-->
- <!--{if $attach['price']}-->
- , {lang price}: <strong>{$extcredits[$creditstrans][title]} $attach[price] {$extcredits[$creditstrans][unit]}</strong> [<a href="misc.php?action=viewattachpayments&aid=$attach[aid]" target="_blank">{lang pay_view}</a>]
- <!--{if !$attach['payed']}-->
- [<a href="misc.php?action=attachpay&aid=$attach[aid]" target="_blank">{lang attachment_buy}</a>]
- <!--{/if}-->
- <!--{/if}-->
¸´ÖÆ´úÂë ºóÃæÔö¼Ó- <!--{if in_array($groupid, array('19','20','21' && $adminid)) || $discuz_uid == $attach['uid']}-->
- [<a href="misc.php?action=viewattachdownloadlog&aid=$attach[aid]" target="_blank">ÏÂÔØÃûµ¥</a>]
- <!--{/if}-->
¸´ÖÆ´úÂë ÔÙÕÒµ½- $attach[attachicon] <span style="white-space: nowrap" id="attach_$attach[aid]" onmouseover="showMenu(this.id)"><a href="attachment.php?aid=$attach[aid]" target="_blank"><strong>$attach[filename]</strong></a> ($attach[attachsize])</span>
- <div class="t_attach" id="attach_$attach[aid]_menu" style="position: absolute; display: none">$attach[attachicon] <a href="attachment.php?aid=$attach[aid]" target="_blank"><strong>$attach[filename]</strong></a> ($attach[attachsize])
- <!--{if $attach['description']}-->$attach[description]
- <!--{/if}-->
- {lang downloads}: $attach[downloads]
¸´ÖÆ´úÂë ºóÃæÔö¼Ó- <!--{if in_array($groupid, array('19','20','21' && $adminid)) || $discuz_uid == $attach['uid']}-->
- [<a href="misc.php?action=viewattachdownloadlog&aid=$attach[aid]" target="_blank">ÏÂÔØÃûµ¥</a>]
- <!--{/if}-->
¸´ÖÆ´úÂë ÕâÀï¶Ô groupid ½øÐÐÅжϵģ¬ 19£¬20£¬21ÊÇÎÒÉèÖõÄÌØÊâ×飬ÕâЩ×éµÄ³ÉÔ±¶¼¿ÉÒÔ¿´µ½ÏÂÔØÃûµ¥Õâ¸öÁ¬½Ó£¬ »¹Óи½¼þÖ÷ÈËÒ²ÄÜ¿´µ½£¬ÆÕͨ»áÔ±ÊÇ¿´²»µ½ÓÐÕâ¸öÁ¬½ÓÁË¡£ ´ó¼Ò¿ÉÒÔ¸ù¾Ýʵ¼ÊÐèÒªÐÞ¸Ä. 10ÔÂ15ÈÕÐÞ¸Ä, лл mingyan ¹ÜÀíÔ±Ö¸µã! ÕæÈÙÐÒ£¡
=======================================
3.ÐÞ¸Ämisc.php(17ÈÕǰÏÂÔØµÄÅóÓÑÐèÒª°´À¶É«×ÖÐÞ¸Ä)
=======================================
ÕÒµ½£º
- include template('attachpay_view');
¸´ÖÆ´úÂë
ºóÃæÔö¼Ó- //img downloadlog begin
- } elseif($action == 'viewattachdownloadlog') {
- $loglist = array();
- $query = $db->query("SELECT a.*, m.username FROM {$tablepre}attachdownloadlog a
- LEFT JOIN {$tablepre}members m USING (uid)
- WHERE aid='$aid' ORDER BY dateline");
- while($log = $db->fetch_array($query)) {
- $log['dateline'] = gmdate("$dateformat $timeformat", $log['dateline'] + $timeoffset * 3600);
- $log['lastdateline'] = gmdate("$dateformat $timeformat", $log['lastdateline'] + $timeoffset * 3600);
- $loglist[] = $log;
- }
- $numquery = $db->query("select count(*) as rncts from {$tablepre}attachdownloadlog WHERE aid='$aid'");
- $data = @mysql_fetch_array($numquery);
- $times = $data[rncts];
- include template('attachdownloads_log');
- //img downloadlog end
¸´ÖÆ´úÂë
============================================
4.ÐÞ¸Äattchment.php(17ÈÕǰÏÂÔØµÄÅóÓÑÐèÒª°´À¶É«×ÖÐÞ¸Ä)
============================================
ÕÒµ½£º-
- $db->query("UPDATE {$tablepre}attachments SET downloads=downloads+'1' WHERE aid='$aid'", 'UNBUFFERED');
¸´ÖÆ´úÂë
ºóÃæÔö¼Ó- //img downloadlog begin
- $query2 = $db->query("SELECT * FROM {$tablepre}attachdownloadlog WHERE uid='$discuz_uid' AND aid='$aid'");
- $row = $db->num_rows($query2);
- if($row) {
- $db->query("UPDATE {$tablepre}attachdownloadlog SET times=times+'1', lastdateline='$timestamp' WHERE uid='$discuz_uid' AND aid='$aid'", 'UNBUFFERED');
- }else{
- $db->query("INSERT INTO {$tablepre}attachdownloadlog (uid, aid, authorid, times, dateline, lastdateline)
- VALUES ('$discuz_uid', '$aid', '$attach[uid]', '1', '$timestamp', '$timestamp')");
- }
- //img downloadlog end
¸´ÖÆ´úÂë
============================================
5.½«attachdownloads_log.htm·ÅÈëtemplates/defaut£¬°²×°Íê³É£¡£¨17ÈÕÒÔǰ°²×°µÄÒ²Òª¸²¸Ç£©
============================================
[ ±¾Ìû×îºóÓÉ img ÓÚ 2007-10-29 23:23 ±à¼ ] |
-
-
10-17 dowloadlog.rar (17.03 KB)
10-17¸üУ¡
-
4
ÆÀ·Ö´ÎÊý
-
|