footer.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. </div>
  2. </div>
  3. </div>
  4. <script>
  5. function subscribe(){
  6. $.post("{url 'utility/subscribe'}", function(){
  7. setTimeout(subscribe, 5000);
  8. });
  9. }
  10. function sync() {
  11. $.post("{url 'utility/sync'}", function(){
  12. setTimeout(sync, 60000);
  13. });
  14. }
  15. $(function(){
  16. subscribe();
  17. sync();
  18. });
  19. {if $_W['uid']}
  20. function checknotice() {
  21. $.post("{php echo url('utility/notice')}", {}, function(data){
  22. var data = $.parseJSON(data);
  23. $('#notice-container').html(data.notices);
  24. $('#notice-total').html(data.total);
  25. if(data.total > 0) {
  26. $('#notice-total').css('background', '#ff9900');
  27. } else {
  28. $('#notice-total').css('background', '');
  29. }
  30. setTimeout(checknotice, 60000);
  31. });
  32. }
  33. checknotice();
  34. {/if}
  35. {if defined('IN_MODULE')}
  36. $.getJSON("{url 'utility/checkupgrade/module' array('m' => IN_MODULE)}", function(result) {
  37. if (result.message.errno == -10) {
  38. $('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>');
  39. if ($('#upgrade-tips').size()) {
  40. $('#upgrade-tips-module').css('top', '25px');
  41. }
  42. }
  43. });
  44. {/if}
  45. </script>
  46. {template 'public/footer-base'}