Guest User

Untitled

a guest
Apr 26th, 2026
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP8 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 8.3.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 24.02.2026
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. namespace plugin\adm\app\controller;
  15.  
  16. use plugin\adm\app\model\Account;
  17. use plugin\adm\app\model\Accountcate;
  18. use plugin\adm\app\model\Accountzc;
  19. use plugin\adm\app\model\Admin;
  20. use plugin\adm\app\model\Ckfl;
  21. use plugin\adm\app\model\Cklist;
  22. use plugin\adm\app\model\Crklx;
  23. use plugin\adm\app\model\Dplist;
  24. use plugin\adm\app\model\Dpmini;
  25. use plugin\adm\app\model\Geowzfbdd;
  26. use plugin\adm\app\model\Geowzfbmt;
  27. use plugin\adm\app\model\Geowzfbsk;
  28. use plugin\adm\app\model\Goodscate;
  29. use plugin\adm\app\model\Goodsgroup;
  30. use plugin\adm\app\model\Goodsgroupsx;
  31. use plugin\adm\app\model\Goodsunit;
  32. use plugin\adm\app\model\Gyscate;
  33. use plugin\adm\app\model\Kharea;
  34. use plugin\adm\app\model\Khcate;
  35. use plugin\adm\app\model\Khfund;
  36. use plugin\adm\app\model\Khjslx;
  37. use plugin\adm\app\model\Khlabel;
  38. use plugin\adm\app\model\Khlist;
  39. use plugin\adm\app\model\Member;
  40. use plugin\adm\app\model\Qdzh;
  41. use plugin\adm\app\model\Sklist;
  42. use plugin\adm\app\model\Sklx;
  43. use plugin\adm\app\model\Szlx;
  44. use plugin\adm\app\model\User;
  45. use plugin\adm\app\model\Wxopenset;
  46. use support\Request;
  47. use support\think\Db;
  48. use support\View;
  49.  
  50. class AccountController extends BaseController
  51. {
  52. public function __construct()
  53. {
  54. parent::__construct();
  55. $session = request()->session();
  56. $user = $session->get('usermsg');
  57.  
  58. if (!$user) {
  59. throw new BusinessException('请重新登录', 3000);
  60. }
  61. }
  62.  
  63. /**
  64. * 账号管理
  65. * @param Request $request
  66. */
  67. public function index(Request $request)
  68. {
  69. $clist = Accountcate::where([[
  70. 'status',
  71. '=',
  72. 1
  73. ], [
  74. 'recycle',
  75. '=',
  76. 0
  77. ]])->order(['weight' => 'desc', 'id' => 'asc'])->select()->toArray();
  78.  
  79. if (empty($clist)) {
  80. $clist = [];
  81. }
  82.  
  83. View::assign('clist', $clist);
  84. $qdlist = Qdzh::where([[
  85. 'status',
  86. '=',
  87. 1
  88. ], [
  89. 'recycle',
  90. '=',
  91. 0
  92. ]])->order(['weight' => 'desc', 'id' => 'asc'])->select()->toArray();
  93.  
  94. if (empty($qdlist)) {
  95. $qdlist = [];
  96. }
  97.  
  98. View::assign('qdlist', $qdlist);
  99. $free = 1;
  100. View::assign('free', $free);
  101.  
  102. return view('account/index');
  103. }
  104.  
  105. /**
  106. * 账号列表
  107. * @param Request $request
  108. */
  109. public function select(Request $request)
  110. {
  111. $data = $request->post();
  112.  
  113. if (!empty($data['name'])) {
  114. $kwd = $data['name'];
  115. $wheres[] = [
  116. 'name',
  117. 'like',
  118. '%' . $kwd . '%'
  119. ];
  120. }
  121.  
  122. if (!empty($data['cateid'])) {
  123. $wheres[] = [
  124. 'cateid',
  125. '=',
  126. $data['cateid']
  127. ];
  128. }
  129.  
  130. if (!empty($data['qdid'])) {
  131. $wheres[] = [
  132. 'qdid',
  133. '=',
  134. $data['qdid']
  135. ];
  136. }
  137.  
  138. if (!empty($data['type'])) {
  139. $wheres[] = [
  140. 'type',
  141. '=',
  142. ($data['type'] - 1)
  143. ];
  144. }
  145.  
  146. if (!empty($data['uname'])) {
  147. $kwd = $data['uname'];
  148. $wheres[] = [
  149. 'uname',
  150. 'like',
  151. '%' . $kwd . '%'
  152. ];
  153. }
  154.  
  155. if (!empty($data['phone'])) {
  156. $kwd = $data['phone'];
  157. $wheres[] = [
  158. 'phone',
  159. 'like',
  160. '%' . $kwd . '%'
  161. ];
  162. }
  163.  
  164. if (!empty($data['lyfs'])) {
  165. $wheres[] = [
  166. 'lyfs',
  167. '=',
  168. ($data['lyfs'] - 1)
  169. ];
  170. }
  171.  
  172. if ((!empty($data['starttime'])) && (!empty($data['endtime']))) {
  173. $stime = strtotime($data['starttime']);
  174. $etime = strtotime($data['endtime']);
  175. $wheres[] = [
  176. 'addtime',
  177. 'between',
  178. $stime . ',' . $etime
  179. ];
  180. }
  181.  
  182. $wheres[] = [
  183. 'recycle',
  184. '=',
  185. 0
  186. ];
  187. $list = Account::with(['accountcate', 'qdzh'])->where($wheres)->order(['id' => 'desc'])->paginate(['list_rows' => $data['limit'], 'page' => $data['page']]);
  188. $totals = $list->total();
  189. $list = $list->toArray();
  190. ...........................................................
  191. ................................
  192. ...............
Advertisement
Add Comment
Please, Sign In to add comment