You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
4.8 KiB

преди 3 години
  1. <div id="think_page_trace" style="position: fixed;bottom:0;right:0;font-size:14px;width:100%;z-index: 999999;color: #000;text-align:left;font-family:'微软雅黑';">
  2. <div id="think_page_trace_tab" style="display: none;background:white;margin:0;height: 250px;">
  3. <div id="think_page_trace_tab_tit" style="height:30px;padding: 6px 12px 0;border-bottom:1px solid #ececec;border-top:1px solid #ececec;font-size:16px">
  4. <?php foreach($trace as $key => $value){ ?>
  5. <span style="color:#000;padding-right:12px;height:30px;line-height: 30px;display:inline-block;margin-right:3px;cursor: pointer;font-weight:700"><?php echo $key ?></span>
  6. <?php } ?>
  7. </div>
  8. <div id="think_page_trace_tab_cont" style="overflow:auto;height:212px;padding: 0; line-height: 24px">
  9. <?php foreach($trace as $info) { ?>
  10. <div style="display:none;">
  11. <ol style="padding: 0; margin:0">
  12. <?php
  13. if(is_array($info)){
  14. foreach ($info as $k=>$val){
  15. echo '<li style="border-bottom:1px solid #EEE;font-size:14px;padding:0 12px">' . (is_numeric($k) ? '' : $k.' : ') . htmlentities($val,ENT_COMPAT,'utf-8') .'</li>';
  16. }
  17. }
  18. ?>
  19. </ol>
  20. </div>
  21. <?php } ?>
  22. </div>
  23. </div>
  24. <div id="think_page_trace_close" style="display:none;text-align:right;height:15px;position:absolute;top:10px;right:12px;cursor: pointer;"><img style="vertical-align:top;" src="data:image/gif;base64,R0lGODlhDwAPAJEAAAAAAAMDA////wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczp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ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAAAAAAALAAAAAAPAA8AAAIdjI6JZqotoJPR1fnsgRR3C2jZl3Ai9aWZZooV+RQAOw==" /></div>
  25. </div>
  26. <div id="think_page_trace_open" style="height:30px;float:right;text-align: right;overflow:hidden;position:fixed;bottom:0;right:0;color:#000;line-height:30px;cursor:pointer;"><div style="background:#232323;color:#FFF;padding:0 6px;float:right;line-height:30px;font-size:14px"><?php echo G('beginTime','viewEndTime').'s ';?></div><img width="30" style="" title="ShowPageTrace" src="data:image/png;base64,<?php echo \Think\App::logo() ?>"></div>
  27. <script type="text/javascript">
  28. (function(){
  29. var tab_tit = document.getElementById('think_page_trace_tab_tit').getElementsByTagName('span');
  30. var tab_cont = document.getElementById('think_page_trace_tab_cont').getElementsByTagName('div');
  31. var open = document.getElementById('think_page_trace_open');
  32. var close = document.getElementById('think_page_trace_close').childNodes[0];
  33. var trace = document.getElementById('think_page_trace_tab');
  34. var cookie = document.cookie.match(/thinkphp_show_page_trace=(\d\|\d)/);
  35. var history = (cookie && typeof cookie[1] != 'undefined' && cookie[1].split('|')) || [0,0];
  36. open.onclick = function(){
  37. trace.style.display = 'block';
  38. this.style.display = 'none';
  39. close.parentNode.style.display = 'block';
  40. history[0] = 1;
  41. document.cookie = 'thinkphp_show_page_trace='+history.join('|')
  42. }
  43. close.onclick = function(){
  44. trace.style.display = 'none';
  45. this.parentNode.style.display = 'none';
  46. open.style.display = 'block';
  47. history[0] = 0;
  48. document.cookie = 'thinkphp_show_page_trace='+history.join('|')
  49. }
  50. for(var i = 0; i < tab_tit.length; i++){
  51. tab_tit[i].onclick = (function(i){
  52. return function(){
  53. for(var j = 0; j < tab_cont.length; j++){
  54. tab_cont[j].style.display = 'none';
  55. tab_tit[j].style.color = '#999';
  56. }
  57. tab_cont[i].style.display = 'block';
  58. tab_tit[i].style.color = '#000';
  59. history[1] = i;
  60. document.cookie = 'thinkphp_show_page_trace='+history.join('|')
  61. }
  62. })(i)
  63. }
  64. parseInt(history[0]) && open.click();
  65. (tab_tit[history[1]] || tab_tit[0]).click();
  66. })();
  67. </script>