4d84a934
曹明
初始代码提交
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
</div>
</div>
</div>
<script>
function subscribe(){
$.post("{url 'utility/subscribe'}", function(){
setTimeout(subscribe, 5000);
});
}
function sync() {
$.post("{url 'utility/sync'}", function(){
setTimeout(sync, 60000);
});
}
$(function(){
subscribe();
sync();
});
{if $_W['uid']}
function checknotice() {
$.post("{php echo url('utility/notice')}", {}, function(data){
var data = $.parseJSON(data);
$('#notice-container').html(data.notices);
$('#notice-total').html(data.total);
if(data.total > 0) {
$('#notice-total').css('background', '#ff9900');
} else {
$('#notice-total').css('background', '');
}
setTimeout(checknotice, 60000);
});
}
checknotice();
{/if}
{if defined('IN_MODULE')}
$.getJSON("{url 'utility/checkupgrade/module' array('m' => IN_MODULE)}", function(result) {
if (result.message.errno == -10) {
$('body').prepend('<div id="upgrade-tips-module" class="upgrade-tips"><a href="http://wpa.b.qq.com/cgi/wpa.php?ln=1&key=XzkzODAwMzEzOV8xNzEwOTZfNDAwMDgyODUwMl8yXw" target="_blank">' + result.message.message + '</a></div>');
if ($('#upgrade-tips').size()) {
$('#upgrade-tips-module').css('top', '25px');
}
}
});
{/if}
</script>
{template 'public/footer-base'}
|