人人商城

fields.tpl.php 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/header', TEMPLATE_INCLUDEPATH)) : (include template('common/header', TEMPLATE_INCLUDEPATH));?>
  2. <div class="we7-page-title">会员管理</div>
  3. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('mc/common', TEMPLATE_INCLUDEPATH)) : (include template('mc/common', TEMPLATE_INCLUDEPATH));?>
  4. <?php if($do == 'list') { ?>
  5. <form action="" method="post">
  6. <div class="panel panel-default">
  7. <div class="panel-heading">
  8. 字段管理
  9. </div>
  10. <div class="panel-body table-responsive">
  11. <table class="table table-hover">
  12. <thead class="navbar-inner">
  13. <tr>
  14. <th>排序</th>
  15. <th>字段</th>
  16. <th>标题</th>
  17. <th>是否启用</th>
  18. <th>操作</th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. <?php if(is_array($account_member_fields)) { foreach($account_member_fields as $field) { ?>
  23. <tr>
  24. <td>
  25. <input type="text" class="form-control" style="width: 50%;" name="displayorder[<?php echo $field['fieldid'];?>]" value="<?php echo $field['displayorder'];?>" />
  26. <input type="hidden" name="id[<?php echo $field['fieldid'];?>]" value="<?php echo $field['id'];?>" />
  27. <input type="hidden" name="fieldid[<?php echo $field['fieldid'];?>]" value="<?php echo $field['fieldid'];?>" />
  28. <input type="hidden" name="title[<?php echo $field['fieldid'];?>]" value="<?php echo $field['title'];?>" />
  29. </td>
  30. <td><?php echo $field['field'];?></td>
  31. <td><?php echo $field['title'];?></td>
  32. <td>
  33. <input type="checkbox" name="available[<?php echo $field['fieldid'];?>]" value="1" <?php if($field['available']) { ?> checked <?php } ?> />
  34. </td>
  35. <td>
  36. <?php if(!empty($field['id'])) { ?>
  37. <a href="<?php echo url('mc/fields/post', array('id' => $field['id']))?>" title="编辑" class="btn btn-primary btn-sm">编辑</a>
  38. <?php } ?>
  39. </td>
  40. </tr>
  41. <?php } } ?>
  42. <tr>
  43. <td></td>
  44. <td></td>
  45. <td></td>
  46. <td>
  47. <input type="checkbox" id="selectAll" onclick="var ck = this.checked;$(':checkbox').each(function(){this.checked = ck});">
  48. <a class="btn btn-success btn-sm" style="margin-left: -25px;" onclick="$('#selectAll').click();">全选</a>
  49. </td>
  50. <td></td>
  51. </tr>
  52. </tbody>
  53. </table>
  54. </div>
  55. <div>
  56. <button type="submit" class="btn btn-primary col-lg-1" name="submit" value="提交">提交</button>
  57. <input type="hidden" name="token" value="<?php echo $_W['token'];?>" />
  58. </div>
  59. </div>
  60. </form>
  61. <?php } else if($do == 'post') { ?>
  62. <div class="panel panel-default">
  63. <div class="panel-heading">
  64. 编辑字段
  65. </div>
  66. <div class="panel-body">
  67. <form class="form-horizontal form" action="" method="post">
  68. <input type="hidden" name="id" value="<?php echo $field['id'];?>">
  69. <div class="form-group">
  70. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">排序</label>
  71. <div class="col-sm-10 col-xs-12">
  72. <input type="text" class="form-control" name="displayorder" value="<?php echo $field['displayorder'];?>">
  73. </div>
  74. </div>
  75. <div class="form-group">
  76. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">名称</label>
  77. <div class="col-sm-10 col-xs-12">
  78. <input type="text" class="form-control" name="title" value="<?php echo $field['title'];?>">
  79. </div>
  80. </div>
  81. <div class="form-group">
  82. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">启用</label>
  83. <div class="col-sm-10 col-xs-12">
  84. <label for="radio_1" class="radio-inline">
  85. <input type="radio" name="available" id="radio_1" value="1" <?php if(empty($field) || $field['available'] == 1) { ?> checked<?php } ?> /> 是
  86. </label>
  87. <label for="radio_0" class="radio-inline">
  88. <input type="radio" name="available" id="radio_0" value="0" <?php if(!empty($field) && $field['available'] == 0) { ?> checked<?php } ?> /> 否
  89. </label>
  90. </div>
  91. </div>
  92. <div class="form-group">
  93. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label"></label>
  94. <div class="col-sm-10 col-xs-12">
  95. <input type="submit" class="btn btn-primary" name="submit" />
  96. <input type="hidden" name="token" value="<?php echo $_W['token'];?>" />
  97. </div>
  98. </div>
  99. </form>
  100. </div>
  101. </div>
  102. <?php } ?>
  103. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?>