Без опису
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. {include file="public/layout" /}
  2. <body class="bodystyle" style="cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page min-hg-c-10">
  6. {include file="foreign/bar" /}
  7. <form class="form-horizontal" id="post_form" action="" method="post">
  8. <div id="explanation" class="explanation">
  9. <div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
  10. <h4 title="提示相关设置操作时应注意的要点">提示</h4>
  11. <span title="收起提示" id="explanationZoom" style="display: block;"></span>
  12. </div>
  13. <ul>
  14. <li>仅支持伪静态及静态URL模式,设置入口:SEO模块>URL模式选择</li>
  15. <li>开启助手,能帮助用户解决网站提示需要改为英文或其他语言的问题</li>
  16. <li style="text-indent: 1em;">1. 在单语言情况下,所有语言统一显示英文</li>
  17. <li style="text-indent: 1em;">2. 在多语言情况下,中文显示中文,其他语言统一显示英文</li>
  18. </ul>
  19. </div>
  20. <div class="flexigrid htitx mt20">
  21. <div class="hDiv">
  22. <div class="hDivBox">
  23. <table cellspacing="0" cellpadding="0" style="width: 100%">
  24. <thead>
  25. <tr>
  26. <th class="sign w10" axis="col0">
  27. <div class="tc"></div>
  28. </th>
  29. <th abbr="article_title" axis="col3" class="w10">
  30. <div id="anchor-sms" class="tc">配置修改</div>
  31. </th>
  32. <th abbr="ac_id" axis="col4">
  33. <div class=""></div>
  34. </th>
  35. </tr>
  36. </thead>
  37. </table>
  38. </div>
  39. </div>
  40. <div class="ncap-form-default">
  41. <dl class="row">
  42. <dt class="tit">
  43. <label>是否启用</label>
  44. </dt>
  45. <dd class="opt">
  46. <label class="curpoin">
  47. <input type="radio" name="foreign_is_status" id="input_is_status_1" value="1" {if condition="!empty($foreignData['foreign_is_status'])"} checked="checked" {/if} />启用
  48. </label>&nbsp;&nbsp;
  49. <label class="curpoin">
  50. <input type="radio" name="foreign_is_status" id="input_is_status_0" value="0" {if condition="empty($foreignData['foreign_is_status'])"} checked="checked" {/if} />关闭
  51. </label>&nbsp;&nbsp;
  52. <p class="notic"></p>
  53. </dd>
  54. </dl>
  55. <dl class="row">
  56. <dt class="tit">
  57. <label>语言包变量</label>
  58. </dt>
  59. <dd class="opt">
  60. {if condition="!empty($foreignData['foreign_is_status'])"}
  61. <a href="javascript:void(0);" data-href="{:url('Foreign/official_pack_index')}" class="ncap-btn ncap-btn-green" onclick="openFullframe(this, '语言包变量', '90%', '90%');">管理</a>
  62. {else /}
  63. <a href="javascript:void(0);" class="ncap-btn ncap-btn-green grey" onclick="showErrorAlert('先启用外贸助手并保存', 4);">管理</a>
  64. {/if}
  65. <span class="err"></span>
  66. <p class="notic"></p>
  67. </dd>
  68. </dl>
  69. <dl class="row subrow" {if condition="$global['seo_pseudo'] == 1"} title="动态URL模式不支持启用" {/if}>
  70. <dt class="tit">
  71. <label>文档URL格式</label>
  72. </dt>
  73. <dd class="opt">
  74. <label class="curpoin"><input type="radio" name="seo_titleurl_format" value="0" {if condition="empty($global.seo_titleurl_format)"}checked="checked"{/if} onclick="selectFormat(this);">系统默认</label>&nbsp;&nbsp;
  75. <label class="curpoin"><input type="radio" name="seo_titleurl_format" value="1" {if condition="!empty($global.seo_titleurl_format)"}checked="checked"{/if} onclick="selectFormat(this);">外贸链接</label>&nbsp;&nbsp;
  76. <span class="err"></span>
  77. <p class="notic2 {if condition="!empty($global.seo_titleurl_format)"} none {/if}" id="notic_seo_titleurl_format_0">以文档ID作为结尾文件名,示例:{$Request.domain}__ROOT_DIR__/news/123.html</p>
  78. <p class="notic2 {if condition="empty($global.seo_titleurl_format)"} none {/if}" id="notic_seo_titleurl_format_1">以文档标题的中文拼音或英文作为结尾文件名,示例:{$Request.domain}__ROOT_DIR__/news/wenzhangbiaoti.html</p>
  79. </dd>
  80. </dl>
  81. <div class="div_seo_titleurl_format_0" {if condition="!empty($global.seo_titleurl_format)"} style="display: none;" {/if}>
  82. <dl class="row subrow" {if condition="$global['seo_pseudo'] == 1"} title="动态URL模式不支持启用" {/if}>
  83. <dt class="tit">
  84. <label>文档URL文件名</label>
  85. </dt>
  86. <dd class="opt">
  87. <label class="curpoin"><input type="radio" name="foreign_clear_htmlfilename" value="1" {if condition="!empty($foreignData.foreign_clear_htmlfilename)"}checked="checked"{/if}>自动清空</label>&nbsp;&nbsp;
  88. <label class="curpoin"><input type="radio" name="foreign_clear_htmlfilename" value="0" {if condition="empty($foreignData.foreign_clear_htmlfilename)"}checked="checked"{/if}>继续保留</label>&nbsp;&nbsp;
  89. <span class="err"></span>
  90. <p class="notic2">清空后,访问文档页恢复成以文档ID结尾的URL,示例:{$Request.domain}__ROOT_DIR__/news/123.html</p>
  91. </dd>
  92. </dl>
  93. </div>
  94. <dl class="row">
  95. <dt class="tit">
  96. <label for="basic_indexname">面包屑首页名</label>
  97. </dt>
  98. <dd class="opt">
  99. <input id="basic_indexname" name="basic_indexname" value="{$global.basic_indexname|default='首页'}" class="input-txt" type="text" />
  100. <p class="notic"></p>
  101. </dd>
  102. </dl>
  103. <div class="bot">
  104. <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">保存设置</a>
  105. </div>
  106. </div>
  107. <div class="hDiv" {if condition="empty($global.seo_titleurl_format) || $global['seo_pseudo'] == 1"} style="display: none; {/if}">
  108. <div class="hDivBox">
  109. <table cellspacing="0" cellpadding="0" style="width: 100%">
  110. <thead>
  111. <tr>
  112. <th class="sign w10" axis="col0">
  113. <div class="tc"></div>
  114. </th>
  115. <th abbr="article_title" axis="col3" class="w10">
  116. <div id="anchor-sms" class="tc">文档更新</div>
  117. </th>
  118. <th abbr="ac_id" axis="col4">
  119. <div class=""></div>
  120. </th>
  121. </tr>
  122. </thead>
  123. </table>
  124. </div>
  125. </div>
  126. <div class="ncap-form-default" {if condition="empty($global.seo_titleurl_format) || $global['seo_pseudo'] == 1"} style="display: none; {/if}">
  127. <dl class="row subrow" {if condition="$global['seo_pseudo'] == 1"} title="动态URL模式不支持启用" {/if}>
  128. <dt class="tit">
  129. <label>更新文档URL</label>
  130. </dt>
  131. <dd class="opt">
  132. <label class="curpoin"><input type="radio" name="foreign_htmlfilename_mode" value="0" {if condition="empty($foreignData.foreign_htmlfilename_mode)"} checked="checked" {/if} onclick="select2Format(this);">外贸文档名</label>&nbsp;&nbsp;
  133. <label class="curpoin"><input type="radio" name="foreign_htmlfilename_mode" value="1" {if condition="!empty($foreignData.foreign_htmlfilename_mode)"} checked="checked" {/if} onclick="select2Format(this);">ID文档名</label>&nbsp;&nbsp;
  134. <span class="err"></span>
  135. <p class="notic2 {if condition="!empty($foreignData.foreign_htmlfilename_mode)"} none {/if}" id="notic_foreign_htmlfilename_mode_0">以文档标题的中文拼音或英文作为结尾文件名,示例:{$Request.domain}__ROOT_DIR__/news/wenzhangbiaoti.html</p>
  136. <p class="notic2 {if condition="empty($foreignData.foreign_htmlfilename_mode)"} none {/if}" id="notic_foreign_htmlfilename_mode_1">以文档ID作为结尾文件名,示例:{$Request.domain}__ROOT_DIR__/news/123.html</p>
  137. </dd>
  138. </dl>
  139. <div class="bot">
  140. <a class="ncap-btn-big ncap-btn-green" type="button" id="submitBtn" onclick="handle_archives(this);">立即更新</a>
  141. </div>
  142. </div>
  143. </div>
  144. </form>
  145. </div>
  146. <script type="text/javascript">
  147. $(function(){
  148. var seo_pseudo = {$global['seo_pseudo']|default=1};
  149. if (1 == seo_pseudo) {
  150. $('dl.subrow input[type=radio]').prop('disabled', true);
  151. }
  152. });
  153. function selectFormat(obj)
  154. {
  155. $('.div_seo_titleurl_format_0').hide();
  156. $('.div_seo_titleurl_format_1').hide();
  157. $('#notic_seo_titleurl_format_0').hide();
  158. $('#notic_seo_titleurl_format_1').hide();
  159. if ($('input[name=seo_titleurl_format]:checked').val() == 0) {
  160. $('.div_seo_titleurl_format_0').show();
  161. $('#notic_seo_titleurl_format_0').show();
  162. } else {
  163. $('.div_seo_titleurl_format_1').show();
  164. $('#notic_seo_titleurl_format_1').show();
  165. }
  166. }
  167. // 判断输入框是否为空
  168. function checkForm(){
  169. layer_loading('正在处理');
  170. $.ajax({
  171. type : 'post',
  172. url : "{:url('Foreign/conf_save', ['_ajax'=>1])}",
  173. data : $('#post_form').serialize(),
  174. dataType : 'json',
  175. success : function(res){
  176. layer.closeAll();
  177. if(res.code == 1){
  178. layer.msg(res.msg, {shade: layer_shade, time: 1000}, function(){
  179. window.location.reload();
  180. });
  181. }else{
  182. showErrorMsg(res.msg);
  183. }
  184. },
  185. error: function(e){
  186. layer.closeAll();
  187. showErrorAlert(e.responseText);
  188. }
  189. });
  190. }
  191. function select2Format(obj)
  192. {
  193. $('#notic_foreign_htmlfilename_mode_0').hide();
  194. $('#notic_foreign_htmlfilename_mode_1').hide();
  195. if ($('input[name=foreign_htmlfilename_mode]:checked').val() == 0) {
  196. $('#notic_foreign_htmlfilename_mode_0').show();
  197. } else {
  198. $('#notic_foreign_htmlfilename_mode_1').show();
  199. }
  200. }
  201. /**
  202. * 批量更新URL
  203. */
  204. function handle_archives(obj)
  205. {
  206. var foreign_htmlfilename_mode = $('input[name=foreign_htmlfilename_mode]:checked').val();
  207. var confirm = layer.confirm('批量更新文档成外贸链接,是否更新?', {
  208. shade: layer_shade,
  209. area: ['480px', '190px'],
  210. move: false,
  211. title: '提示',
  212. btnAlign:'r',
  213. closeBtn: 3,
  214. btn: ['确认', '取消'], //按钮
  215. success: function () {
  216. $(".layui-layer-content").css('text-align', 'left');
  217. }
  218. }, function () {
  219. layer.close(confirm);
  220. var url = "{:url('Foreign/htmlfilename_handel')}";
  221. if (url.indexOf('?') > -1) {
  222. url += '&';
  223. } else {
  224. url += '?';
  225. }
  226. url += 'foreign_htmlfilename_mode='+foreign_htmlfilename_mode;
  227. var index = layer.open({type: 2,title: '开始更新',area: ['500px', '300px'],fix: false, maxmin: false,content: url});
  228. }, function (index) {
  229. layer.closeAll(index);
  230. });
  231. }
  232. </script>
  233. {include file="public/footer" /}