getuserprice.php 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <form action="<?php echo $this->dir?>users/saveprice/<?php echo $userid?>"
  2. method="post">
  3. <table class="table table-hover">
  4. <thead>
  5. <tr class="info">
  6. <th>
  7. 编号
  8. </th>
  9. <th>
  10. 通道名称
  11. </th>
  12. <th>
  13. 默认分成
  14. </th>
  15. <th>
  16. 用户分成
  17. </th>
  18. <th>
  19. 设置状态
  20. </th>
  21. </tr>
  22. </thead>
  23. <tbody>
  24. <?php if($data):?>
  25. <?php foreach($data as $key=>
  26. $val):?>
  27. <tr>
  28. <td class="text-center">
  29. <?php echo $val[ 'id']?>
  30. </td>
  31. <?php $acc=$this->model()->select('id,name,is_display')->from('acc')->where(array('fields'=>'acwid=?','values'=>array($val['acwid'])))->fetchAll();if($acc):?>
  32. <td>
  33. <select name="channelid[<?php echo $val['id']?>]" class="form-control">
  34. <?php foreach($acc as $key2=>$val2):?>
  35. <option value="<?php echo $val2['id']?>" <?php echo $val2[ 'id']==$val['id'] ? ' selected' : ''?>
  36. >
  37. <?php echo $val2[ 'name']?>
  38. <?php echo $val2[ 'is_display']==1 ? '(非默认)' : ''?>
  39. </option>
  40. <?php endforeach;?>
  41. </select>
  42. </td>
  43. <?php endif;?>
  44. <td>
  45. <?php echo isset($val[ 'uprice_default']) ? $val[ 'uprice_default'] :
  46. $val[ 'uprice']?>
  47. </td>
  48. <td>
  49. <input type="text" class="form-control" size="4" name="uprice[<?php echo $val['id']?>]"
  50. value="<?php echo $val['uprice']?>">
  51. </td>
  52. <td>
  53. <select name="is_state[<?php echo $val['id']?>]" class="form-control">
  54. <option value="0" <?php echo $val[ 'is_state']=='0' ? ' selected' : ''?>
  55. >已开通
  56. </option>
  57. <option value="1" <?php echo $val[ 'is_state']=='1' ? ' selected' : ''?>
  58. >已暂停
  59. </option>
  60. </select>
  61. </td>
  62. </tr>
  63. <?php endforeach;?>
  64. <?php endif;?>
  65. </tbody>
  66. </table>
  67. <div class="text-center">
  68. <button type="submit" class="btn btn-success">
  69. &nbsp;
  70. <span class="glyphicon glyphicon-save">
  71. </span>
  72. &nbsp;保存设置&nbsp;
  73. </button>
  74. &nbsp;&nbsp;
  75. <a onclick="if(!confirm('是否要执行此操作?'))return false;" href="<?php echo $this->dir?>users/resetprice/<?php echo $userid?>"
  76. class="btn btn-danger">
  77. <span class="glyphicon glyphicon-refresh">
  78. </span>
  79. &nbsp;重置分成
  80. </a>
  81. </div>
  82. <br>
  83. </form>