Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

customvar.htm 6.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. {include file="public/layout" /}
  2. <script type="text/javascript" src="__SKIN__/js/clipboard.min.js"></script>
  3. <body class="system-web" style="overflow-y: scroll;">
  4. <div id="append_parent"></div>
  5. <div id="ajaxwaitid"></div>
  6. <div class="page">
  7. {include file="system/bar" /}
  8. <form method="post" id="handlepost" action="{:url('System/customvar')}" enctype="multipart/form-data" name="form1">
  9. <div class="ncap-form-default">
  10. <dl class="row">
  11. <dt class="tit" style="width: auto">
  12. <label><b>自定义变量</b></label>
  13. &nbsp;&nbsp;<a href="javascript:void(0);" onclick="customvar_index(this);">[管理]</a>
  14. </dt>
  15. </dl>
  16. {volist name="eyou_row" id="vo"}
  17. <dl class="row" id="dl_{$vo['attr_var_name']}">
  18. <dt class="tit">
  19. <label for="{$vo['attr_var_name']}">{$vo['attr_name']}</label>
  20. </dt>
  21. <dd class="opt">
  22. {switch name="$vo['attr_input_type']" }
  23. {case value="1"}
  24. {/case}
  25. {case value="2"}
  26. <textarea rows="5" cols="60" id="{$vo['attr_var_name']}" name="{$vo['attr_var_name']}" style="height:36px;">{$vo.value|default=''}</textarea>
  27. {/case}
  28. {case value="3"}
  29. <div class="input-file-show">
  30. <span class="show">
  31. <a id="img_a_{$vo['attr_var_name']}" class="nyroModal" rel="gal" href="{$vo.value|default='javascript:void(0);'}" target="_blank">
  32. <i id="img_i_{$vo['attr_var_name']}" class="fa fa-picture-o" {notempty name="$vo.value"}onmouseover="layer_tips=layer.tips('<img src={$vo.value|default=''} class=\'layer_tips_img\'>',this,{tips: [1, '#fff']});"{/notempty} onmouseout="layer.close(layer_tips);"></i>
  33. </a>
  34. </span>
  35. <span class="type-file-box">
  36. <input type="text" id="{$vo['attr_var_name']}" name="{$vo['attr_var_name']}" value="{$vo.value|default=''}" class="type-file-text" autocomplete="off">
  37. <input type="button" name="button" id="button1" value="选择上传..." class="type-file-button">
  38. <input class="type-file-file" onClick="GetUploadify(1,'','allimg','{$vo['attr_var_name']}_img_call_back')" size="30" hidefocus="true" nc_type="change_site_logo" title="点击前方预览图可查看大图,点击按钮选择文件并提交表单后上传生效">
  39. </span>
  40. </div>
  41. <script type="text/javascript">
  42. function {$vo['attr_var_name']}_img_call_back(fileurl_tmp)
  43. {
  44. $("#{$vo['attr_var_name']}").val(fileurl_tmp);
  45. $("#img_a_{$vo['attr_var_name']}").attr('href', fileurl_tmp);
  46. $("#img_i_{$vo['attr_var_name']}").attr('onmouseover', "layer_tips=layer.tips('<img src="+fileurl_tmp+" class=\\'layer_tips_img\\'>',this,{tips: [1, '#fff']});");
  47. }
  48. </script>
  49. {/case}
  50. {case value="4"}
  51. <div class="onoff">
  52. <label for="{$vo['attr_var_name']}1" class="cb-enable {if condition='isset($vo.value) AND $vo.value eq 1'}selected{/if}">开启</label>
  53. <label for="{$vo['attr_var_name']}0" class="cb-disable {if condition='!isset($vo.value) OR empty($vo.value)'}selected{/if}">关闭</label>
  54. <input id="{$vo['attr_var_name']}1" name="{$vo['attr_var_name']}" value="1" type="radio" {if condition="isset($vo.value) AND $vo.value eq 1"} checked="checked"{/if}>
  55. <input id="{$vo['attr_var_name']}0" name="{$vo['attr_var_name']}" value="0" type="radio" {if condition="!isset($vo.value) OR empty($vo.value)"} checked="checked"{/if}>
  56. </div>
  57. {/case}
  58. {default /}
  59. <input id="{$vo['attr_var_name']}" name="{$vo['attr_var_name']}" value="{$vo.value|default=''}" class="input-txt" type="text" />
  60. {/switch}
  61. </dd>
  62. {eq name="$web_cmsmode" value="2"}
  63. <dd class="variable">
  64. <div><p>{$vo['attr_var_name']}</p></div>
  65. <div class="r">
  66. {eq name="$vo['attr_input_type']" value="4"}
  67. <a href="javascript:void(0);" onclick="showtext('{$vo['attr_var_name']}');" class="ui-btn3 blue {$vo['attr_var_name']}" data-clipboard-text="{{php} echo 'eyou:empty name=\'$eyou.global.';{/php}{$vo['attr_var_name']}'} 关闭 {{php} echo 'eyou:else /} 开启 {/eyou:empty';{/php}}">复制标签</a>
  68. {else /}
  69. <a href="javascript:void(0);" onclick="showtext('{$vo['attr_var_name']}');" class="ui-btn3 blue {$vo['attr_var_name']}" data-clipboard-text="{{php} echo 'eyou:global name=\'';{/php}{$vo['attr_var_name']}{php} echo '\' /';{/php}}">复制标签</a>
  70. {/eq}
  71. </div>
  72. </dd>
  73. {/eq}
  74. </dl>
  75. {/volist}
  76. <div class="bot">
  77. <a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" onclick="adsubmit();">确认提交</a>
  78. </div>
  79. </div>
  80. </form>
  81. </div>
  82. <script type="text/javascript">
  83. $(function(){
  84. // tipsText();
  85. });
  86. function adsubmit(){
  87. layer_loading("正在处理");
  88. $('#handlepost').submit();
  89. }
  90. function customvar_index(obj)
  91. {
  92. //iframe窗
  93. var iframes = layer.open({
  94. type: 2,
  95. title: '自定义变量列表',
  96. fixed: true, //不固定
  97. shadeClose: false,
  98. shade: layer_shade,
  99. area: ['100%', '100%'],
  100. content: "{:url('System/customvar_index')}",
  101. /*end: function(){
  102. layer.load();
  103. window.location.reload();
  104. }*/
  105. });
  106. layer.full(iframes);
  107. }
  108. function showtext(classname){
  109. var clipboard1 = new Clipboard("."+classname);clipboard1.on("success", function(e) {layer.msg("复制成功");});clipboard1.on("error", function(e) {layer.msg("复制失败!请手动复制", {icon:5});});
  110. }
  111. </script>
  112. {include file="public/footer" /}