普通下载读秒等待方式(图)
演示地址:http://disk.lply.net/file/192/DdKIlMZy/
修改文件 system/default/pd_viewfile.tpl.php
查找代码:<a href="<?=$file['a_downfile']?>"><img src="<?=$tpl_dir?>/images/down.gif" border="0" align="absbottom" /> <?=$lang['download_this_file']?></a>
修改为:<span id="down_link"></span>
<script type="text/javascript">
var secs = 60; '此处为等待时间,单位秒
var wait = secs * 1000;
var data_loading = "<img src=\"<?=$tpl_dir?>/images/ajax_loading.gif\" align=\"absmiddle\" border=\"0\" />普通下载链接需要等待";
g('down_link').innerHTML = data_loading + " (" + secs + ")";
for(i = 1; i <= secs; i++) {
window.setTimeout("update_sec(" + i + ")", i * 1000);
}
window.setTimeout("down_file_link()", wait);
function update_sec(num, value) {
if(num == (wait/1000)) {
g('down_link').innerHTML = data_loading;
} else {
printnr = (wait / 1000) - num;
g('down_link').innerHTML = data_loading + " (" + printnr + ")";
}
}
function down_file_link() {
g('down_link').innerHTML = "<a href=\"<?=$file['a_downfile']?>\"><img src=\"<?=$tpl_dir?>/images/down.gif\" border=\"0\" align=\"absbottom\" /> <?=$lang['download_this_file']?></a>";
}
</script>不会修改的可以直接下载文件替换
good!配合廣告使用一流!thx!! 可是还能通过修改URL绕过读秒等待啊
:Q :Q 貴站的風格不錯!:loveliness:
页:
[1]