rock_index.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <?php
  2. /**
  3. * 桌面首页显示
  4. */
  5. defined('HOST') or die ('not access');
  6. ?>
  7. <script>
  8. var todocontent = '',homeobject={},homenums=<?=json_encode($homearrs)?>;
  9. </script>
  10. <div style="padding:10px">
  11. <?php
  12. if(in_array('kjrko',$homearrs)){
  13. $paths = ''.ROOT_PATH.'/'.P.'/home/desktop/items_kjrko.php';
  14. if(file_exists($paths))include_once($paths);
  15. }
  16. ?>
  17. <div align="left">
  18. <table style="background:none" border="0" width="100%" cellspacing="0" cellpadding="0">
  19. <tr valign="top">
  20. <?php
  21. $bili = 100 / count($homeitems);
  22. echo '<td width="'.$bili.'%">';
  23. if(isset($homeitems[0]))foreach($homeitems[0] as $hi=>$hrs){
  24. $itemnowname = $hrs['name'];
  25. $paths = ''.ROOT_PATH.'/'.P.'/home/desktop/items_'.$hrs['num'].'.php';
  26. if(file_exists($paths))include_once($paths);
  27. }
  28. echo '</td>';
  29. for($i=1;$i<=3;$i++)if(isset($homeitems[$i])){
  30. echo '<td width="'.$bili.'%" style="padding-left:20px;">';
  31. foreach($homeitems[$i] as $hi=>$hrs){
  32. $itemnowname = $hrs['name'];
  33. $paths = ''.ROOT_PATH.'/'.P.'/home/desktop/items_'.$hrs['num'].'.php';
  34. if(file_exists($paths))include_once($paths);
  35. }
  36. echo '</td>';
  37. }
  38. ?>
  39. </tr>
  40. </table>
  41. </div>
  42. <?php
  43. $paths = ''.ROOT_PATH.'/'.P.'/home/desktop/footer.php';
  44. if(file_exists($paths))include_once($paths);
  45. ?>
  46. </div>
  47. <script>
  48. $(document).ready(function(){
  49. var optdt = '',loadci=0, taskarr={}, miao=200,reimtitle='REIM';
  50. var c= {
  51. itot:function(rlx){
  52. clearTimeout(this.tims);
  53. var nums = '',i;
  54. for(i=0;i<homenums.length;i++){
  55. nums+=','+homenums[i]+'';
  56. }
  57. if(!rlx)rlx='';
  58. var url = js.getajaxurl('gettotal','index','home', {atype:rlx,loadci:loadci,optdt:optdt,nums:nums.substr(1)});
  59. $('#refresh_text').html(this.bd2('5Yi35paw57uf6K6h5LitLi4u'));
  60. js.ajaxbool =false;
  61. js.ajax(url,{},function(da){
  62. c.itots(da);
  63. },'get,json');
  64. homeobject.refresh=function(){c.refresh();};
  65. },
  66. init:function(){
  67. this.itot();
  68. var i,nust;
  69. for(i=0;i<homenums.length;i++){
  70. nust = homenums[i];
  71. if(homeobject[''+nust+'_init'])homeobject[''+nust+'_init']();
  72. }
  73. },
  74. refresh:function(){
  75. this.itot();
  76. },
  77. bd2:function(s){
  78. return jm.base64decode(s);
  79. },
  80. shumiao:function(oi){
  81. clearTimeout(this.tims);
  82. if(oi<=0){
  83. this.itot();
  84. }else{
  85. $('#refresh_text').html(this.bd2('ezB956eS5ZCO5Yi35pawJmd0OyZndDs:').replace('{0}', oi));
  86. this.tims = setTimeout(function(){c.shumiao(oi-1)},1000);
  87. }
  88. if(homeobject.showtime)homeobject.showtime();
  89. },
  90. auther:function(a){
  91. if(HOST==this.bd2('MTI3LjAuMC4x') || HOST==this.bd2('bG9jYWxob3N0'))return;
  92. var akey = a.authkey,usedt = a.usedt;
  93. if(!usedt)return '5peg5pWI6K6.6Zeu';
  94. if(usedt>=js.now())return;
  95. if(!akey)return '6K!35YWI562!5o6I57O757uf5Zyo5L2.55So77yMPGEgaHJlZj0iaHR0cDovL3d3dy5yb2Nrb2EuY29tL3ZpZXdfYXV0aGVyLmh0bWwiIHRhcmdldD0iX2JsYW5rIj7luK7liqk8L2E!';
  96. },
  97. itots:function(a){
  98. miao = a.miaoshu;
  99. if(a.tanwidth)js.winiframewidth=a.tanwidth;
  100. this.shumiao(miao);
  101. loadci++;
  102. optdt = a.optdt;
  103. if(loadci==1){
  104. jm.setJmstr(jm.base64decode(a.showkey));
  105. admintoken = a.token;
  106. if(homeobject.showicons)homeobject.showicons(a.menuarr);
  107. var mts = this.auther(a);
  108. if(mts)js.alert(this.bd2(mts));
  109. }
  110. var oi,i,nust;
  111. for(i=0;i<homenums.length;i++){
  112. nust = homenums[i];
  113. if(a[''+nust+'arr']){
  114. if(homeobject['show'+nust+'list'])homeobject['show'+nust+'list'](a[''+nust+'arr']);
  115. if(homeobject['show_'+nust+'_list'])homeobject['show_'+nust+'_list'](a[''+nust+'arr']);
  116. }
  117. }
  118. if(a.reimstotal=='0')a.reimstotal='';
  119. $('#reim_stotal').html(a.reimstotal+'');
  120. try{resizewh();}catch(e){}
  121. if(a.reimstotal!='' && a.notodo!='1'){
  122. notifyobj.show({
  123. icon:'images/todo.png',title:''+reimtitle+'提醒',rand:'reimto',
  124. body:'未读'+reimtitle+'消息('+a.reimstotal+')条',
  125. click:function(){
  126. openreim();
  127. }
  128. });
  129. }
  130. menubadge = a.total;
  131. showmenubadge();
  132. var s=a.msgar[0],s1=a.msgar[1];
  133. if(s!=''){
  134. todocontent = s;
  135. var tx = this.opennewtx(1);
  136. if(tx=='0' && a.notodo!='1'){
  137. $('#tishidivshow').fadeIn();
  138. $('#tishicontent').html(s);
  139. notifyobj.showpopup(s1,{icon:'images/todo.png',rand:'systodo',title:this.bd2('57O757uf5o!Q6YaS'),click:function(b){
  140. opentixiangs();
  141. return true;
  142. }});
  143. }
  144. }
  145. if(a.editpass==0)this.showp();
  146. }
  147. }
  148. c.opennewtx=function(lx){
  149. return '0';
  150. }
  151. c.showp = function(){
  152. loadmenu = clickmenu=function(){
  153. js.msgerror(this.bd2('6K!35YWI5L!u5pS55a!G56CB5ZCO5Zyo5L2.55So'));
  154. }
  155. this.shumiao=function(){};
  156. js.alert(this.bd2('57O757uf5byA5ZCv5by65Yi25L!u5pS55a!G56CB77yM6K!35YWI5L!u5pS55ZCO5Zyo5L2.55So'),this.bd2('5L!u5pS55a!G56CB5o!Q56S6'), function(){
  157. addtabs({num:'grcog',url:'system,geren,cog,stype=pass',hideclose:true,name:c.bd2('5L!u5pS55a!G56CB'),icons:'lock'});
  158. });
  159. }
  160. js.initbtn(c);
  161. c.init();
  162. opentixiangs=function(){
  163. opentixiang();
  164. hideTishi();
  165. return false;
  166. }
  167. hideTishi=function(){
  168. $('#tishidivshow').fadeOut();
  169. return false;
  170. }
  171. openmobile=function(){
  172. js.tanbody('loginmobile','登录手机版', 300,200,{
  173. html:'<div style="height:160px;padding:5px" align="center"><div><img id="logeweerew" src="images/logo.png" width="130" height="130"></div><div>5分钟内直接扫一扫即可登录</div></div>'
  174. });
  175. var surl = js.getajaxurl('getqrcode','index','home'),surls = js.getajaxurl('getqrcores','index','home');
  176. $.get(surls,function(ass){
  177. if(ass!='ok'){
  178. $('#logeweerew').parent().html('<div style="padding:10px 20px;text-align:left">未开启gd库,不能生成二维码,<br>可手机浏览器输入地址:<br>'+ass+'</div>');
  179. }else{
  180. get('logeweerew').src=surl;
  181. }
  182. });
  183. }
  184. homereload=function(rlx){
  185. c.itot(rlx);
  186. }
  187. openreim=function(o1){
  188. $('#reim_stotal').html('');
  189. var str = reimtitle;
  190. if(o1)str=strreplace($(o1).text());
  191. var ops = js.openrun('reim','winfocus');
  192. if(!ops){
  193. js.cliendsend('focus',{},false,function(){
  194. js.confirm('可能没有使用'+str+'的PC客户端,是否打开网页版的?',function(jg){
  195. if(jg=='yes'){
  196. js.open('?d=reim',260,530,'reim');
  197. }
  198. });
  199. return true;
  200. });
  201. }else{
  202. js.open('?d=reim',260,530,'reim');
  203. }
  204. }
  205. notifyobj=new notifyClass({
  206. title:'系统提醒',
  207. sound:'web/res/sound/todo.ogg',
  208. sounderr:'',
  209. soundbo:true,
  210. showbool:true
  211. });
  212. });
  213. </script>