xuanxuan.html.php 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <?php
  2. /**
  3. * The configure xuanxuan view file of setting module of RanZhi.
  4. *
  5. * @copyright Copyright 2009-2017 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Gang Liu <liugang@cnezsoft.com>
  8. * @package setting
  9. * @version $Id$
  10. * @link http://www.ranzhico.com
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <?php $this->app->loadLang('client')?>
  15. <div id='mainContent' class='main-content'>
  16. <div class='center-block'>
  17. <div class='main-header'>
  18. <div class='heading'>
  19. <h4><?php echo $lang->im->settings;?></h4>
  20. </div>
  21. </div>
  22. <form method='post' id='ajaxForm' class='form-ajax'>
  23. <table class='table table-form'>
  24. <tr>
  25. <th class='w-130px'><?php echo $lang->im->version;?></th>
  26. <td class='w-p30'><?php echo $config->xuanxuan->version;?></td>
  27. </tr>
  28. <tr>
  29. <th class='w-130px'><?php echo $lang->im->turnon;?></th>
  30. <td class='w-p30'><?php echo $type == 'edit' ? html::radio('turnon', $lang->im->turnonList, $turnon) : zget($lang->im->turnonList, $config->xuanxuan->turnon);?></td>
  31. <td></td>
  32. </tr>
  33. <tr>
  34. <th><?php echo $lang->im->key;?></th>
  35. <td class='code'>
  36. <?php $key = zget($config->xuanxuan, 'key', '');?>
  37. <?php $style = (!$key or $key == str_repeat(8, 32)) ? "style='margin-bottom: 0px; border-color: rgb(149, 59, 57);'" : '';?>
  38. <?php echo $type == 'edit' ? html::input('key', zget($config->xuanxuan, 'key', ''), "class='form-control' readonly='readonly' $style") : zget($config->xuanxuan, 'key', '');?>
  39. <?php if($type == 'edit' && (!$key or $key == str_repeat(8, 32))):?>
  40. <span id="keyLabel" for="key" class="text-error red"><?php echo !$key ? $lang->im->errorKey : $lang->im->defaultKey;?></span>
  41. <?php endif;?>
  42. </td>
  43. <td><?php echo $type == 'edit' ? html::a('javascript:void(0)', $lang->im->createKey, '', 'onclick="createKey()"') : '';?></td>
  44. </tr>
  45. <tr>
  46. <th><?php echo $lang->im->backendLang;?></th>
  47. <td><?php echo $type == 'edit' ? html::select('backendLang', $config->langs, $config->xuanxuan->backendLang, "class='form-control'") : zget($lang->setting->langs, $config->xuanxuan->backendLang, '');?></td>
  48. <td></td>
  49. </tr>
  50. <tr>
  51. <th><?php echo $lang->im->xxdServer;?></th>
  52. <td><?php echo $type == 'edit' ? html::input('server', $domain, "class='form-control'") : $domain;?></td>
  53. <td class='text-muted'><?php if($type == 'edit') echo $lang->im->xxdServerTip;?></td>
  54. </tr>
  55. <tr>
  56. <th><?php echo $lang->im->pollingInterval;?></th>
  57. <td><?php echo $type == 'edit' ? html::input('pollingInterval', zget($config->xuanxuan, 'pollingInterval', 60), " class='form-control'") : zget($config->xuanxuan, 'pollingInterval', 60) . $lang->im->secs;?></td>
  58. <td class='text-muted'><?php if($type == 'edit') echo $lang->im->xxdPollIntTip;?></td>
  59. </tr>
  60. <tr>
  61. <th><?php echo $lang->im->xxd->ip;?></th>
  62. <td class='code'><?php echo $type == 'edit' ? html::input('ip', zget($config->xuanxuan, 'ip', '0.0.0.0'), "class='form-control' placeholder='{$lang->im->placeholder->xxd->ip}'") : zget($config->xuanxuan, 'ip', '0.0.0.0');?></td>
  63. <td></td>
  64. </tr>
  65. <tr>
  66. <th><?php echo $lang->im->xxd->chatPort;?></th>
  67. <td><?php echo $type == 'edit' ? html::input('chatPort', zget($config->xuanxuan, 'chatPort', 11444), "placeholder='{$lang->im->placeholder->xxd->chatPort}' class='form-control'") : zget($config->xuanxuan, 'chatPort', 11444);?></td>
  68. <td></td>
  69. </tr>
  70. <tr>
  71. <th><?php echo $lang->im->xxd->commonPort;?></th>
  72. <td><?php echo $type == 'edit' ? html::input('commonPort', zget($config->xuanxuan, 'commonPort', 11443), "placeholder='{$lang->im->placeholder->xxd->commonPort}' class='form-control'") : zget($config->xuanxuan, 'commonPort', 11443);?></td>
  73. <td></td>
  74. </tr>
  75. <tr>
  76. <th><?php echo $lang->im->xxd->uploadFileSize;?></th>
  77. <td>
  78. <?php if($type == 'edit'):?>
  79. <div class='input-group'>
  80. <span class='input-group-addon'><?php echo $lang->im->xxd->max;?></span>
  81. <?php echo html::input('uploadFileSize', zget($config->xuanxuan, 'uploadFileSize', 20), "class='form-control' placeholder='{$lang->im->placeholder->xxd->uploadFileSize}' ");?>
  82. <span class='input-group-addon'>M</span>
  83. </div>
  84. <?php else:?>
  85. <?php echo $lang->im->xxd->max . zget($config->xuanxuan, 'uploadFileSize', 20) . 'M';?>
  86. <?php endif;?>
  87. </td>
  88. <td></td>
  89. </tr>
  90. <tr>
  91. <th><?php echo $lang->im->xxd->aes;?></th>
  92. <td>
  93. <?php $aes = zget($config->xuanxuan, 'aes', 'on');?>
  94. <?php echo $type == 'edit' ? html::radio('aes', $lang->im->aesOptions, $aes, "class='checkbox'") : zget($lang->im->aesOptions, $aes);?>
  95. </td>
  96. <td class='text-muted'><?php if($type == 'edit') echo $lang->im->xxdAESTip;?></td>
  97. </tr>
  98. <tr>
  99. <th><?php echo $lang->im->xxd->https;?></th>
  100. <td>
  101. <?php $https = zget($config->xuanxuan, 'https', 'off');?>
  102. <?php echo $type == 'edit' ? html::radio('https', $lang->im->httpsOptions, $https, "class='checkbox'") : zget($lang->im->httpsOptions, $https);?>
  103. </td>
  104. <td></td>
  105. </tr>
  106. <tr class='sslTR <?php if($https == 'off' || empty($type)) echo 'hide';?>'>
  107. <th><?php echo $lang->im->xxd->sslcrt;?></th>
  108. <td><?php echo html::textarea('sslcrt', zget($config->xuanxuan, 'sslcrt', ''), "placeholder='{$lang->im->placeholder->xxd->sslcrt}' class='form-control'");?></td>
  109. <td></td>
  110. </tr>
  111. <tr class='sslTR <?php if($https == 'off' || empty($type)) echo 'hide';?>'>
  112. <th><?php echo $lang->im->xxd->sslkey;?></th>
  113. <td><?php echo html::textarea('sslkey', zget($config->xuanxuan, 'sslkey', ''), "placeholder='{$lang->im->placeholder->xxd->sslkey}' class='form-control'");?></td>
  114. <td></td>
  115. </tr>
  116. <tr>
  117. <th><?php echo $lang->im->debug;?></th>
  118. <td>
  119. <?php $debug = zget($config->xuanxuan, 'debug', 0);?>
  120. <?php echo $type == 'edit' ? html::radio('debug', $lang->im->debugStatus, $debug) : zget($lang->im->debugStatus, $debug);?>
  121. </td>
  122. <td></td>
  123. </tr>
  124. <?php if($type != 'edit'):?>
  125. <tr>
  126. <th><?php echo $lang->im->xxd->os;?></th>
  127. <td><?php echo html::select('os', $lang->im->osList, zget($config->xuanxuan, $os), "class='form-control chosen'");?></td>
  128. <td></td>
  129. </tr>
  130. <?php endif;?>
  131. <tr>
  132. <th></th>
  133. <td colspan='2'>
  134. <?php if($type == 'edit'):?>
  135. <?php echo html::submitButton();?>
  136. <?php echo html::a(helper::createLink('setting', 'xuanxuan'), $lang->goback, '', 'class="btn" style="min-width: 120px"');?>
  137. <?php else:?>
  138. <?php $disabled = $config->xuanxuan->turnon ? '' : 'disabled';?>
  139. <?php if(common::hasPriv('im', 'downloadXxdPackage')) echo html::a(helper::createLink('setting', 'downloadXXD', 'type=package'), $lang->im->downloadXXD, 'hiddenwin', "class='btn btn-primary download download-package $disabled'" . " $disabled");?>
  140. <?php echo html::a(helper::createLink('setting', 'downloadXXD', 'type=config'), $lang->im->downloadConfig, 'hiddenwin', "class='btn btn-primary download $disabled'" . " $disabled");?>
  141. <?php echo html::a(helper::createLink('setting', 'xuanxuan', 'type=edit'), $lang->im->changeSetting, '', "class='btn'");?>
  142. <?php if($debug and common::hasPriv('im', 'debug')) echo html::a(helper::createLink('im', 'debug', 'source=setting'), $lang->im->viewDebug, '', "class='btn viewDebug iframe' data-height=220");?>
  143. <?php echo html::a('http://www.zentao.net/book/zentaopmshelp/302.html', $lang->im->help, '_blank', "class='btn'");?>
  144. <?php endif;?>
  145. </td>
  146. </tr>
  147. </table>
  148. </form>
  149. </div>
  150. </div>
  151. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>