debug.html.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * The debug view file of chat module of XXB.
  4. *
  5. * @copyright Copyright 2009-2020 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZOSL (https://zpl.pub/page/zoslv1.html)
  7. * @author Gang Liu <liugang@cnezsoft.com>
  8. * @package chat
  9. * @version $Id$
  10. * @link https://xuanim.com
  11. */
  12. ?>
  13. <?php
  14. if($source == 'x_php')
  15. {
  16. helper::cd(dirname(dirname(dirname(__FILE__))) . '/view/');
  17. include 'xdebug.html.php';
  18. helper::cd();
  19. return;
  20. }
  21. ?>
  22. <?php include $app->getModuleRoot() . 'common/view/header.lite.html.php';?>
  23. <?php if($this->app->user->admin != 'super'):?>
  24. <div class='container' id='debugContainer'>
  25. <div class='notice text-center' style='font-size:24px;'>
  26. <?php $_SERVER['SCRIPT_NAME'] = '/index.php';?>
  27. <?php $link = $this->loadModel('user')->isLogon() ? $this->createLink('user', 'logout') : $this->createLink('user', 'login');?>
  28. <?php printf($lang->im->debugTips, html::a($link, $lang->login));?>
  29. </div>
  30. </div>
  31. <?php else:?>
  32. <script>
  33. if(!window.v) window.v = {};
  34. window.v.showLog = <?php echo $config->xuanxuan->debug;?>;
  35. </script>
  36. <div class='panel'>
  37. <div class='panel-heading'><?php echo $lang->im->serverInfo;?></div>
  38. <table class='table table-form'>
  39. <tbody>
  40. <tr>
  41. <th class='w-80px'><?php echo $lang->im->version;?></th>
  42. <td><?php echo $config->xuanxuan->version;?></td>
  43. </tr>
  44. <tr>
  45. <th><?php echo $lang->im->key;?></th>
  46. <td class='code'><?php echo $config->xuanxuan->key;?></td>
  47. </tr>
  48. <tr>
  49. <th><?php echo $lang->im->url;?></th>
  50. <td><?php echo $domain . $this->config->webRoot . 'x.php';?></td>
  51. </tr>
  52. </body>
  53. </table>
  54. </div>
  55. <?php if(!empty($config->xuanxuan->debug)):?>
  56. <div class='panel'>
  57. <div class='panel-heading'><?php echo $lang->im->log;?></div>
  58. <div id='log' class='panel-body code'></div>
  59. </div>
  60. <?php endif;?>
  61. <?php if(!helper::isAjaxRequest()):?>
  62. <div class='text-center'>
  63. <?php commonModel::printLink('setting', 'xuanxuan', '', $lang->goback, '', "class='btn btn-primary'");?></td>
  64. </div>
  65. <?php endif;?>
  66. <?php endif;?>
  67. <?php if($config->debug) js::import($jsRoot . 'jquery/form/min.js');?>
  68. <?php if(isset($pageJS)) js::execute($pageJS);?>
  69. </body>
  70. </html>