* code for task #83740.

This commit is contained in:
wangyidong
2023-02-09 09:59:24 +08:00
parent b3c22aeaa1
commit 81e8a96d6f
10 changed files with 255 additions and 70 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ $config->admin->log->saveDays = 30;
if(!isset($config->safe)) $config->safe = new stdclass();
if(!isset($config->safe->weak)) $config->safe->weak = '123456,password,12345,12345678,qwerty,123456789,1234,1234567,abc123,111111,123123';
$config->admin->menuGroup['system'] = array('custom|mode', 'backup', 'cron', 'action|trash', 'admin|xuanxuan', 'setting|xuanxuan', 'admin|license', 'admin|checkweak', 'admin|resetpwdsetting', 'admin|safe', 'custom|timezone', 'search|buildindex', 'admin|tableengine', 'ldap', 'custom|libreoffice');
$config->admin->menuGroup['system'] = array('custom|mode', 'backup', 'cron', 'action|trash', 'admin|xuanxuan', 'setting|xuanxuan', 'admin|license', 'admin|checkweak', 'admin|resetpwdsetting', 'admin|safe', 'custom|timezone', 'search|buildindex', 'admin|tableengine', 'ldap', 'custom|libreoffice', 'conference', 'client');
$config->admin->menuGroup['user'] = array('dept', 'company', 'user', 'group');
$config->admin->menuGroup['switch'] = array('admin|setmodule');
$config->admin->menuGroup['model'] = array('auditcl', 'stage', 'design', 'cmcl', 'reviewcl', 'custom|required', 'custom|set', 'custom|flow', 'custom|code', 'custom|estimate', 'subject', 'process');
@@ -27,4 +27,13 @@ if($config->vision != 'lite')
{
$lang->admin->menuList->system['subMenu']['xuanxuan'] = array('link' => 'Desktop|admin|xuanxuan|', 'subModule' => 'client,setting');
$lang->admin->menuList->system['menuOrder']['20'] = 'xuanxuan';
$lang->admin->menuList->system['tabMenu']['xuanxuan']['index'] = array('link' => 'Home|admin|xuanxuan|');
$lang->admin->menuList->system['tabMenu']['xuanxuan']['setting'] = array('link' => 'Parameter|setting|xuanxuan|');
if($config->edition != 'open')
{
$lang->admin->menuList->system['tabMenu']['xuanxuan']['conference'] = array('link' => 'Conference|conference|admin|');
$lang->navGroup->conference = 'admin';
}
$lang->admin->menuList->system['tabMenu']['xuanxuan']['update'] = array('link' => 'Update|client|browse|', 'subModule' => 'client');
}
@@ -27,4 +27,13 @@ if($config->vision != 'lite')
{
$lang->admin->menuList->system['subMenu']['xuanxuan'] = array('link' => 'Desktop|admin|xuanxuan|', 'subModule' => 'client,setting');
$lang->admin->menuList->system['menuOrder']['20'] = 'xuanxuan';
$lang->admin->menuList->system['tabMenu']['xuanxuan']['index'] = array('link' => 'Home|admin|xuanxuan|');
$lang->admin->menuList->system['tabMenu']['xuanxuan']['setting'] = array('link' => 'Parameter|setting|xuanxuan|');
if($config->edition != 'open')
{
$lang->admin->menuList->system['tabMenu']['xuanxuan']['conference'] = array('link' => 'Conference|conference|admin|');
$lang->navGroup->conference = 'admin';
}
$lang->admin->menuList->system['tabMenu']['xuanxuan']['update'] = array('link' => 'Update|client|browse|', 'subModule' => 'client');
}
@@ -27,4 +27,13 @@ if($config->vision != 'lite')
{
$lang->admin->menuList->system['subMenu']['xuanxuan'] = array('link' => 'Desktop|admin|xuanxuan|', 'subModule' => 'client,setting');
$lang->admin->menuList->system['menuOrder']['20'] = 'xuanxuan';
$lang->admin->menuList->system['tabMenu']['xuanxuan']['index'] = array('link' => 'Home|admin|xuanxuan|');
$lang->admin->menuList->system['tabMenu']['xuanxuan']['setting'] = array('link' => 'Parameter|setting|xuanxuan|');
if($config->edition != 'open')
{
$lang->admin->menuList->system['tabMenu']['xuanxuan']['conference'] = array('link' => 'Conference|conference|admin|');
$lang->navGroup->conference = 'admin';
}
$lang->admin->menuList->system['tabMenu']['xuanxuan']['update'] = array('link' => 'Update|client|browse|', 'subModule' => 'client');
}
@@ -25,6 +25,15 @@ $lang->admin->sizeType['G'] = 1024 * 1024 * 1024;
global $config;
if($config->vision != 'lite')
{
$lang->admin->menuList->system['subMenu']['xuanxuan'] = array('link' => '聊天|admin|xuanxuan|', 'subModule' => 'client,setting');
$lang->admin->menuList->system['subMenu']['xuanxuan'] = array('link' => '聊天|admin|xuanxuan|', 'subModule' => 'client,setting,conference');
$lang->admin->menuList->system['menuOrder']['20'] = 'xuanxuan';
$lang->admin->menuList->system['tabMenu']['xuanxuan']['index'] = array('link' => '首页|admin|xuanxuan|');
$lang->admin->menuList->system['tabMenu']['xuanxuan']['setting'] = array('link' => '参数|setting|xuanxuan|');
if($config->edition != 'open')
{
$lang->admin->menuList->system['tabMenu']['xuanxuan']['conference'] = array('link' => '音视频|conference|admin|');
$lang->navGroup->conference = 'admin';
}
$lang->admin->menuList->system['tabMenu']['xuanxuan']['update'] = array('link' => '更新|client|browse|', 'subModule' => 'client');
}
@@ -1,22 +1,5 @@
<?php
$lang->xuanxuan = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu'] = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu']->index = array('link' => 'Home|admin|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->setting = array('link' => 'Parameter|setting|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->update = array('link' => 'Update|client|browse', 'subModule' => 'client');
//
//$lang->admin->menu->xuanxuan['menuOrder'][0] = 'index';
//$lang->admin->menu->xuanxuan['menuOrder'][5] = 'setting';
//$lang->admin->menu->xuanxuan['menuOrder'][10] = 'update';
global $config;
//if($config->edition != 'open')
//{
// $lang->admin->menu->xuanxuan['subModule'] = 'client,setting,conference';
// $lang->admin->menu->xuanxuan['subMenu']->conference = array('link' => 'Conference|conference|admin');
// $lang->admin->menu->xuanxuan['menuOrder'][7] = 'conference';
// $lang->navGroup->conference = 'admin';
//}
$lang->navGroup->im = 'admin';
$lang->navGroup->setting = 'admin';
@@ -1,22 +1,5 @@
<?php
$lang->xuanxuan = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu'] = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu']->index = array('link' => 'Home|admin|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->setting = array('link' => 'Parameter|setting|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->update = array('link' => 'Update|client|browse', 'subModule' => 'client');
//
//$lang->admin->menu->xuanxuan['menuOrder'][0] = 'index';
//$lang->admin->menu->xuanxuan['menuOrder'][5] = 'setting';
//$lang->admin->menu->xuanxuan['menuOrder'][10] = 'update';
global $config;
//if($config->edition != 'open')
//{
// $lang->admin->menu->xuanxuan['subModule'] = 'client,setting,conference';
// $lang->admin->menu->xuanxuan['subMenu']->conference = array('link' => 'Conference|conference|admin');
// $lang->admin->menu->xuanxuan['menuOrder'][7] = 'conference';
// $lang->navGroup->conference = 'admin';
//}
$lang->navGroup->im = 'admin';
$lang->navGroup->setting = 'admin';
@@ -1,22 +1,5 @@
<?php
$lang->xuanxuan = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu'] = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu']->index = array('link' => 'Home|admin|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->setting = array('link' => 'Parameter|setting|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->update = array('link' => 'Update|client|browse', 'subModule' => 'client');
//
//$lang->admin->menu->xuanxuan['menuOrder'][0] = 'index';
//$lang->admin->menu->xuanxuan['menuOrder'][5] = 'setting';
//$lang->admin->menu->xuanxuan['menuOrder'][10] = 'update';
global $config;
//if($config->edition != 'open')
//{
// $lang->admin->menu->xuanxuan['subModule'] = 'client,setting,conference';
// $lang->admin->menu->xuanxuan['subMenu']->conference = array('link' => 'Conference|conference|admin');
// $lang->admin->menu->xuanxuan['menuOrder'][7] = 'conference';
// $lang->navGroup->conference = 'admin';
//}
$lang->navGroup->im = 'admin';
$lang->navGroup->setting = 'admin';
@@ -1,22 +1,5 @@
<?php
$lang->xuanxuan = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu'] = new stdclass();
//$lang->admin->menu->xuanxuan['subMenu']->index = array('link' => '首页|admin|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->setting = array('link' => '参数|setting|xuanxuan');
//$lang->admin->menu->xuanxuan['subMenu']->update = array('link' => '更新|client|browse', 'subModule' => 'client');
//
//$lang->admin->menu->xuanxuan['menuOrder'][0] = 'index';
//$lang->admin->menu->xuanxuan['menuOrder'][5] = 'setting';
//$lang->admin->menu->xuanxuan['menuOrder'][10] = 'update';
global $config;
//if($config->edition != 'open')
//{
// $lang->admin->menu->xuanxuan['subModule'] = 'client,setting,conference';
// $lang->admin->menu->xuanxuan['subMenu']->conference = array('link' => '音视频|conference|admin');
// $lang->admin->menu->xuanxuan['menuOrder'][7] = 'conference';
// $lang->navGroup->conference = 'admin';
//}
$lang->navGroup->im = 'admin';
$lang->navGroup->setting = 'admin';
@@ -0,0 +1,217 @@
<?php
/**
* The admin view file of conference 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 Wenrui LI <liwenrui@easycorp.ltd>
* @package conference
* @version $Id$
* @link https://xuanim.com
*/
?>
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'>
<div class='cell'>
<div class="nav list-group tab-menu">
<?php foreach($this->config->conference->owtTabList as $tabIndex):?>
<?php $active = ($type == $tabIndex || ($type == 'edit' && $tabIndex == 'server')) ? 'active' : '';?>
<a href="<?php echo '#' . $tabIndex . 'Content'?>" data-toggle="tab" class='<?php echo $active?>'><?php echo $lang->conference->$tabIndex;?></a>
<?php endforeach;?>
</div>
</div>
</div>
<div class="tab-content">
<div class="tab-pane fade <?php echo $type == 'server' || $type == 'edit' ? 'active in' : '';?>" id="serverContent">
<form method='post' id='conference-admin-form' class='form-ajax<?php if($enabled) echo ' conference-enabled';?><?php if(!empty($backendType)) echo " $backendType-selected";?>'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->conference->server?></strong>
</div>
</div>
<table class='table table-form'>
<tr>
<th class="w-150px"><?php echo $lang->conference->enabled;?></th>
<td class="w-400px">
<?php if($type != 'edit'): ?>
<div class="checkbox-primary disabled <?php if($enabled) echo 'checked';?>">
<label><?php echo $lang->conference->enabledTip;?></label>
</div>
<?php else: ?>
<div class="checkbox-primary">
<input type="checkbox" name="enabled" id='enabled' value="true" <?php if($enabled) echo 'checked';?> <?php if($type != 'edit') echo 'disabled';?>>
<label for='enabled'><?php echo $lang->conference->enabledTip;?></label>
</div>
<?php endif; ?>
</td>
<td></td>
</tr>
<?php if($type == 'edit' || $enabled): ?>
<tr class='edit-row common-row'>
<th class="w-120px"><?php echo $lang->conference->backend->type;?></th>
<td class="w-400px code">
<?php if($type == 'edit'):?>
<div class='required required-wrapper'></div>
<?php echo html::radio('backendType', $lang->conference->backend->types, $backendType);?>
<?php else: echo html::radio('backendType', $lang->conference->backend->types, $backendType, 'disabled'); endif; ?>
</td>
<td><?php echo $lang->conference->backendTypeTip;?></td>
</tr>
<tr class='edit-row common-row'>
<th class="w-120px"><?php echo $lang->conference->serverAddr;?></th>
<td class="w-400px code">
<?php if($type == 'edit'): ?>
<div class='required required-wrapper'></div>
<?php echo html::input('serverAddr', $serverAddr, "class='form-control'");?>
<?php else: echo empty($serverAddr) ? $lang->conference->notset : $serverAddr; endif; ?>
</td>
<td><?php echo $lang->conference->serverAddrTip;?></td>
</tr>
<tr class='edit-row common-row'>
<th class="w-120px"><?php echo $lang->conference->https;?></th>
<td class="w-400px">
<?php if($type != 'edit'): ?>
<div class="checkbox-primary disabled <?php if($https) echo 'checked';?>">
<label><?php echo $lang->conference->httpsTip;?></label>
</div>
<?php else: ?>
<div class="checkbox-primary">
<input type="checkbox" name="https" id='https' value="true" <?php if($https) echo 'checked';?> <?php if($type != 'edit') echo 'disabled';?>>
<label for='https'><?php echo $lang->conference->httpsTip;?></label>
</div>
<?php endif; ?>
</td>
<td></td>
</tr>
<tr class='edit-row common-row'>
<th class="w-120px"><?php echo $lang->conference->apiPort;?></th>
<td class="w-400px code">
<?php if($type == 'edit'):?>
<div class='required required-wrapper'></div>
<input type="number" name="apiPort" id="apiPort" <?php echo empty($apiPort) ? '' : "value='$apiPort'";?> min="1" max="65535" class="form-control">
<?php else: echo empty($apiPort) ? $lang->conference->notset : $apiPort; endif; ?>
</td>
<td><?php echo $type == 'edit' ? $lang->conference->apiPortTip : '';?></td>
</tr>
<tr class='edit-row owt-row'>
<th class="w-120px"><?php echo $lang->conference->mgmtPort;?></th>
<td class="w-400px code">
<?php if($type == 'edit'): ?>
<div class='required required-wrapper'></div>
<input type="number" name="mgmtPort" id="mgmtPort" <?php echo empty($mgmtPort) ? '' : "value='$mgmtPort'";?> min="1" max="65535" class="form-control">
<?php else: echo empty($mgmtPort) ? $lang->conference->notset : $mgmtPort; endif; ?>
</td>
<td><?php echo $type == 'edit' ? $lang->conference->mgmtPortTip : '';?></td>
</tr>
<tr class='edit-row srs-row'>
<th class="w-120px"><?php echo $lang->conference->rtcPort;?></th>
<td class="w-400px code">
<?php if($type == 'edit'): ?>
<div class='required required-wrapper'></div>
<input type="number" name="rtcPort" id="rtcPort" <?php echo empty($rtcPort) ? '' : "value='$rtcPort'";?> min="1" max="65535" class="form-control">
<?php else: echo empty($rtcPort) ? $lang->conference->notset : $rtcPort; endif; ?>
</td>
<td><?php echo $type == 'edit' ? $lang->conference->rtcPortTip : '';?></td>
</tr>
<tr class='edit-row owt-row'>
<th class="w-120px"><?php echo $lang->conference->serviceId;?></th>
<td class="w-400px code">
<?php if($type == 'edit'): ?>
<div class='required required-wrapper'></div>
<?php echo html::input('serviceId', $serviceId, "class='form-control'");?>
<?php else: echo empty($serviceId) ? $lang->conference->notset : $serviceId; endif; ?>
</td>
<td><?php echo $type == 'edit' ? $lang->conference->serviceIdTip : '';?></td>
</tr>
<tr class='edit-row owt-row'>
<th class="w-120px vtop"><?php echo $lang->conference->serviceKey;?></th>
<td class="w-400px code wrapper">
<?php if($type == 'edit'): ?>
<div class='required required-wrapper'></div>
<?php echo html::textarea('serviceKey', $serviceKey, "class='form-control' style='height:100px;'");?>
<?php else: echo empty($serviceKey) ? $lang->conference->notset : $serviceKey; endif; ?>
</td>
<td><?php echo $type == 'edit' ? $lang->conference->serviceKeyTip : '';?></td>
</tr>
<?php endif; ?>
<tr>
<th></th>
<td colspan='2'>
<?php if($type == 'edit') echo html::submitButton();?>
<?php if($type != 'edit') echo '<a class="btn btn-primary" href="' . helper::createLink('conference', 'admin', 'type=edit') . '">' . $lang->edit;?>
</td>
</tr>
</table>
</form>
</div>
<div class="tab-pane fade <?php echo $type == 'video' ? 'active in' : '';?>" id="videoContent">
<form method='post' id='ajaxForm' class='form-ajax' action=<?php echo $this->createLink("conference", 'admin', 'type=video');?>>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->conference->video?></strong>
</div>
</div>
<table class='table table-form'>
<tr>
<th class="w-120px"><?php echo $lang->conference->resolutionWidth;?></th>
<td class="code w-100px">
<input type="number" name="resolutionWidth" id="resolutionWidth" <?php echo "placeholder='{$lang->conference->placeholder->resolutionWidth}'" ;echo empty($resolutionWidth) ? '' : "value='$resolutionWidth'";?> min="320" max="1280" class="form-control">
</td>
<td><?php echo $lang->conference->resolutionWidthTip;?></td>
</tr>
<tr>
<th><?php echo $lang->conference->resolutionHeight;?></th>
<td class="code w-100px">
<input type="number" name="resolutionHeight" id="resolutionHeight" <?php echo "placeholder='{$lang->conference->placeholder->resolutionHeight}'" ;echo empty($resolutionHeight) ? '' : "value='$resolutionHeight'";?> min="240" max="720" class="form-control">
<td><?php echo $lang->conference->resolutionHeightTip;?></td>
</tr>
<tr><th></th><td></td></tr>
<tr>
<th></th>
<td colspan='2'>
<?php echo html::submitButton();?>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<style>
.edit-row {display: none}
#conference-admin-form.conference-enabled .edit-row {display: table-row}
.srs-selected .owt-row {display: none!important}
.owt-selected .srs-row {display: none!important}
#videoContent, #serverContent{padding-top:0px;}
.tab-content .main-header {margin-bottom:20px;}
</style>
<script>
$(function()
{
$('.side-col .nav a[data-toggle=tab]').click(function()
{
$(this).parent().find('a').removeClass('active');
$(this).addClass('active');
});
$.setAjaxForm('#conference-admin-form');
$('#enabled').on('change', function()
{
$('#conference-admin-form').toggleClass('conference-enabled', $('#enabled').is(':checked'));
});
$('input[type="radio"][name="backendType"]').on('change', function(e)
{
if(e.target.value == 'owt')
{
$('#conference-admin-form').removeClass('srs-selected');
$('#conference-admin-form').addClass('owt-selected');
}
if(e.target.value == 'srs')
{
$('#conference-admin-form').removeClass('owt-selected');
$('#conference-admin-form').addClass('srs-selected');
}
});
});
</script>
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>