* task #8030, bug #2528, add entry of debug modal for xuanxuan setting page.

This commit is contained in:
Catouse
2020-09-28 15:25:22 +08:00
parent 0071e61933
commit ee49c7512c
3 changed files with 92 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
<?php
include '../../control.php';
class myIm extends im
{
/**
* Debug xuanxuan.
*
* @access public
* @return void
*/
public function debug($source = 'x_php')
{
$this->view->title = $this->lang->im->debug;
$this->view->source = $source;
$this->view->xxdStatus = $this->im->getXxdStatus();
$this->view->checkXXBConfig = $this->im->checkXXBConfig();
$this->display();
}
}
+69
View File
@@ -0,0 +1,69 @@
<?php
/**
* The debug view file of chat module of XXB.
*
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZOSL (https://zpl.pub/page/zoslv1.html)
* @author Gang Liu <liugang@cnezsoft.com>
* @package chat
* @version $Id$
* @link https://xuanim.com
*/
?>
<?php
if($source == 'x_php')
{
include 'xdebug.html.php';
return;
}
?>
<?php if($this->app->user->admin != 'super'):?>
<?php include '../../../common/view/header.lite.html.php';?>
<div class='container' id='debugContainer'>
<div class='notice text-center' style='font-size:24px;'>
<?php $_SERVER['SCRIPT_NAME'] = '/index.php';?>
<?php $link = $this->loadModel('user')->isLogon() ? $this->createLink('user', 'logout') : $this->createLink('user', 'login');?>
<?php printf($lang->im->debugTips, html::a($link, $lang->login));?>
</div>
</div>
<?php else:?>
<?php include '../../../common/view/header.modal.html.php';?>
<script>
if(!window.v) window.v = {};
window.v.showLog = <?php echo $config->xuanxuan->debug;?>;
</script>
<div class='panel'>
<div class='panel-heading'><?php echo $lang->im->serverInfo;?></div>
<table class='table table-form'>
<tbody>
<tr>
<th class='w-80px'><?php echo $lang->im->version;?></th>
<td><?php echo $config->xuanxuan->version;?></td>
</tr>
<tr>
<th><?php echo $lang->im->key;?></th>
<td class='code'><?php echo $config->xuanxuan->key;?></td>
</tr>
<tr>
<th><?php echo $lang->im->url;?></th>
<td><?php echo commonModel::getSysURL() . $this->config->webRoot . 'x.php';?></td>
</tr>
</body>
</table>
</div>
<?php if(!empty($config->xuanxuan->debug)):?>
<div class='panel'>
<div class='panel-heading'><?php echo $lang->im->log;?></div>
<div id='log' class='panel-body code'></div>
</div>
<?php endif;?>
<?php if(!helper::isAjaxRequest()):?>
<div class='text-center'>
<?php commonModel::printLink('setting', 'xuanxuan', '', $lang->goback, '', "class='btn btn-primary'");?></td>
</div>
<?php endif;?>
<?php endif;?>
<?php if($config->debug) js::import($jsRoot . 'jquery/form/min.js');?>
<?php if(isset($pageJS)) js::execute($pageJS);?>
</body>
</html>
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../../common/view/header.html.php';?>
<?php $debug = zget($config->xuanxuan, 'debug', 0);?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left"><?php common::printAdminSubMenu('xuanxuan');?></div>
</div>
@@ -42,7 +43,7 @@
</tr>
<tr>
<th><?php echo $lang->im->debug;?></th>
<td><?php echo $type == 'edit' ? html::radio('debug', $lang->im->debugStatus, zget($config->xuanxuan, 'debug', 0)) : zget($lang->im->debugStatus, zget($config->xuanxuan, 'debug', 0));?></td>
<td><?php echo $type == 'edit' ? html::radio('debug', $lang->im->debugStatus, $debug) : zget($lang->im->debugStatus, $debug);?></td>
<td></td>
</tr>
<tr>
@@ -124,6 +125,7 @@
<?php echo html::a(helper::createLink('setting', 'downloadXXD', 'type=package'), $lang->im->downloadXXD, 'hiddenwin', "class='btn btn-primary download download-package $disabled'");?>
<?php echo html::a(helper::createLink('setting', 'downloadXXD', 'type=config'), $lang->im->downloadConfig, 'hiddenwin', "class='btn btn-primary download $disabled'");?>
<?php echo html::a(helper::createLink('setting', 'xuanxuan', 'type=edit'), $lang->im->changeSetting, '', "class='btn'");?>
<?php if($debug) echo html::a(helper::createLink('im', 'debug', 'source=setting'), $lang->im->viewDebug, '', "class='btn viewDebug' data-toggle='modal'");?>
<?php echo html::a('http://www.zentao.net/book/zentaopmshelp/302.html', $lang->im->help, '_blank', "class='btn'");?>
<?php endif;?>
</td>