人人商城

qiniu.html 4.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {template '_header'}
  2. <div class="page-heading"> <h2>七牛存储</h2> </div>
  3. <form method="post" class="form-horizontal form-validate">
  4. <div class="form-group">
  5. <label class="col-xs-12 col-sm-3 col-md-2 control-label">是否开启</label>
  6. <div class="col-sm-9">
  7. {ifp 'sysset.qiniu.edit'}
  8. <label class="radio-inline"><input type="radio" name="data[upload]" value="1" {if $data['upload']==1} checked="checked"{/if} onclick="openQiniu(true)"/>开启</label>
  9. <label class="radio-inline"><input type="radio" name="data[upload]" value="0" {if empty($data['upload'])} checked="checked"{/if} onclick="openQiniu(false)"/>关闭</label>
  10. <span class="help-block">开启七牛存储,关闭则使用系统默认的存储方式 [{if $admin['upload']==1}七牛{else}本地{/if}], <a href="http://www.qiniu.com/" target="_blank">七牛存储</a></span>
  11. {else}
  12. <div class='form-control-static'>{if $data['upload']==1}开启{else}关闭{/if}</div>
  13. {/if}
  14. </div>
  15. </div>
  16. <div id='qiniu' {if empty($data['upload'])}style='display:none'{/if}>
  17. <div class="form-group " >
  18. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">存储区域</label>
  19. <div class="col-sm-9">
  20. {ifp 'sysset.qiniu.edit'}
  21. <select name="data[zone]" class="form-control">
  22. <option value="zone0" {if $data['zone']=='zone0'} selected{/if}>华东</option>
  23. <option value="zone1" {if $data['zone']=='zone1'} selected{/if}>华北</option>
  24. </select>
  25. {else}
  26. <div class='form-control-static'>{if $data['zone']=='zone0'}华东{else}华北{/if}</div>
  27. {/if}
  28. </div>
  29. </div>
  30. <div class="form-group " >
  31. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">ACCESS_KEY</label>
  32. <div class="col-sm-9">
  33. {ifp 'sysset.qiniu.edit'}
  34. <input type="text" name="data[access_key]" class="form-control" value="{$data['access_key']}" data-rule-required='true'>
  35. {else}
  36. <div class='form-control-static'>{$data['access_key']}</div>
  37. {/if}
  38. </div>
  39. </div>
  40. <div class="form-group" >
  41. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">SECRET_KEY</label>
  42. <div class="col-sm-9">
  43. {ifp 'sysset.qiniu.edit'}
  44. <input type="text" name="data[secret_key]" class="form-control" value="{$data['secret_key']}" data-rule-required='true'/>
  45. {else}
  46. <div class='form-control-static'>{$data['secret_key']}</div>
  47. {/if}
  48. </div>
  49. </div>
  50. <div class="form-group" >
  51. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">BUCKET(空间名称)</label>
  52. <div class="col-sm-9">
  53. {ifp 'sysset.qiniu.edit'}
  54. <input type="text" name="data[bucket]" class="form-control" value="{$data['bucket']}" data-rule-required='true'/>
  55. {else}
  56. <div class='form-control-static'>{$data['bucket']}</div>
  57. {/if}
  58. </div>
  59. </div>
  60. <div class="form-group">
  61. <label class="col-xs-12 col-sm-3 col-md-2 control-label must">URL(空间链接)</label>
  62. <div class="col-sm-9">
  63. {ifp 'sysset.qiniu.edit'}
  64. <input type="text" name="data[url]" class="form-control" value="{$data['url']}" data-rule-required='true'/>
  65. {else}
  66. <div class='form-control-static'>{$data['url']}</div>
  67. {/if}
  68. </div>
  69. </div>
  70. </div>
  71. {ifp 'sysset.qiniu.edit'}
  72. <div class="form-group">
  73. <label class="col-xs-12 col-sm-3 col-md-2 control-label "></label>
  74. <div class="col-sm-9">
  75. <input type="submit" value="提交" class="btn btn-primary"/>
  76. </div>
  77. </div>
  78. {/if}
  79. <script language="javascript">
  80. function openQiniu(open) {
  81. if (open) {
  82. $('#qiniu').show();
  83. } else {
  84. $('#qiniu').hide();
  85. }
  86. }
  87. </script>
  88. </form>
  89. {template '_footer'}