1foot.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php if(!defined('PHPOK_SET')){die('<h3>Error...</h3>');}?><footer class="foot"><a href="<?php echo $_sys[siteurl];?>">&copy; Powered by <?php echo $_sys[copyright];?></a></footer>
  2. <script src="http://g.tbcdn.cn/kissy/k/1.4.0/seed.js"></script>
  3. <script src="js/mod.jjr.js"></script>
  4. <script src="js/jquery-1.8.2.min.js" type="text/javascript"></script>
  5. <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
  6. <script type="text/javascript">
  7. $(document).ready(function(){
  8. var urlGetQuery=GetQueryString("c");
  9. //alert(urlGetQuery);//tpl/www//images/home.png
  10. if(urlGetQuery !=null && urlGetQuery.toString().length>1){
  11. $("#"+urlGetQuery+" img").attr("src","tpl/www//images/"+urlGetQuery+"1.png");
  12. }
  13. });
  14. var _Conf = {
  15. img: "<?php echo $_sys[siteurl];?><?php echo $_sys[wx_logo];?>",
  16. w: 100,
  17. h: 100,
  18. url: '<?php if($_SESSION["user_id"]){?><?php echo $_sys[siteurl];?><?php echo HOME_PAGE;?>?c=home&ruid=<?php echo $_SESSION["user_id"];?><?php }else{ ?><?php echo $_sys[wx_link];?><?php } ?>',
  19. title: "<?php echo $_sys[wx_title];?>",
  20. desc: "<?php echo $_sys[wx_description];?>",
  21. appid: '<?php if($_SESSION["appid"]){?><?php echo $_SESSION["appid"];?><?php }else{ ?><?php echo $_sys[Appid];?><?php } ?>' };
  22. function _ShareFriend() {
  23. WeixinJSBridge.invoke('sendAppMessage',{
  24. 'appid': _Conf.appid,
  25. 'img_url': _Conf.img,
  26. 'img_width': _Conf.w,
  27. 'img_height': _Conf.h,
  28. 'link': _Conf.url,
  29. 'desc': _Conf.desc,
  30. 'title': _Conf.title
  31. }, function(res){
  32. if(res.err_msg=="send_app_msg:ok"){
  33. var pars = "";
  34. var parsprams = "";
  35. var randomcode = Math.random() * 100000;
  36. parsprams = pars + "&code=" + randomcode + "&f=updategroup";
  37. $.ajax({
  38. url: 'index.php?c=home',
  39. type: "Get",
  40. data: parsprams,
  41. beforeSend: function () { },
  42. success: function (state) {
  43. alert(state);
  44. }
  45. });
  46. }
  47. _report('send_msg', res.err_msg);
  48. })
  49. }
  50. function _ShareTL() {
  51. WeixinJSBridge.invoke('shareTimeline',{
  52. 'img_url': _Conf.img,
  53. 'img_width': _Conf.w,
  54. 'img_height': _Conf.h,
  55. 'link': _Conf.url,
  56. 'desc': _Conf.desc,
  57. 'title': _Conf.title
  58. }, function(res) {
  59. if(res.err_msg=="share_timeline:ok"){
  60. var pars = "";
  61. var parsprams = "";
  62. var randomcode = Math.random() * 100000;
  63. parsprams = pars + "&code=" + randomcode + "&f=updategroup";
  64. $.ajax({
  65. url: 'index.php?c=home',
  66. type: "Get",
  67. data: parsprams,
  68. beforeSend: function () { },
  69. success: function (state) {
  70. alert(state);
  71. }
  72. });
  73. }
  74. _report('timeline', res.err_msg);
  75. });
  76. }
  77. function _ShareWB() {
  78. WeixinJSBridge.invoke('shareWeibo',{
  79. 'content': _Conf.desc,
  80. 'url': _Conf.url,
  81. }, function(res) {
  82. if(res.err_msg=="share_weibo:ok"){
  83. var pars = "";
  84. var parsprams = "";
  85. var randomcode = Math.random() * 100000;
  86. parsprams = pars + "&code=" + randomcode + "&f=updategroup";
  87. $.ajax({
  88. url: 'index.php?c=home',
  89. type: "Get",
  90. data: parsprams,
  91. beforeSend: function () { },
  92. success: function (state) {
  93. alert(state);
  94. }
  95. });
  96. }
  97. _report('weibo', res.err_msg);
  98. });
  99. }
  100. // 当微信内置浏览器初始化后会触发WeixinJSBridgeReady事件。
  101. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
  102. //隐藏下方工具栏,需要显示顶部导航栏,请把hideToolbar换成showToolbar
  103. WeixinJSBridge.call('showToolbar');
  104. //隐藏右上角菜单,需要显示请把hideOptionMenu换成showOptionMenu
  105. WeixinJSBridge.call('showOptionMenu');
  106. // 发送给好友
  107. WeixinJSBridge.on('menu:share:appmessage', function(argv){
  108. _ShareFriend();
  109. });
  110. // 分享到朋友圈
  111. WeixinJSBridge.on('menu:share:timeline', function(argv){
  112. _ShareTL();
  113. });
  114. // 分享到微博
  115. WeixinJSBridge.on('menu:share:weibo', function(argv){
  116. _ShareWB();
  117. });
  118. }, false);
  119. </script>
  120. <div id="fixed">
  121. <ul id="fixed-foot">
  122. <li id="index" class="border-right-none"><a href="<?php echo site_url('index');?>"><img src="tpl/www//images/home.png" width="60px" height="60px" style=" padding-bottom:0px; margin-left:30px;"/></a></li>
  123. <li id="customer" class="border-right-none"><a href="<?php echo site_url('customer');?>"><img src="tpl/www//images/customer.png" width="60px" height="60px" style=" padding-bottom:0px; margin-left:30px;"/></a></li>
  124. <li id="personal" class="border-right-none"><a href="<?php echo site_url('personal');?>"><img src="tpl/www//images/Personal.png" width="60px" height="60px" style=" padding-bottom:0px; margin-left:30px;"/></a></li>
  125. </ul>
  126. </div>
  127. </body>
  128. </html>