|
演示地址: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>
复制代码 不会修改的可以直接下载文件替换
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|