AdminControl.php 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906
  1. <?php
  2. namespace app\admin\controller;
  3. use think\facade\View;
  4. use app\BaseController;
  5. /**
  6. * ============================================================================
  7. *
  8. * ============================================================================
  9. * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
  10. * 网站地址: https://www.valimart.net/
  11. * ----------------------------------------------------------------------------
  12. *
  13. * ============================================================================
  14. * 控制器
  15. */
  16. class AdminControl extends BaseController
  17. {
  18. /**
  19. * 管理员资料 name id group
  20. */
  21. protected $admin_info;
  22. protected $permission;
  23. public function initialize()
  24. {
  25. $config_list = rkcache('config', true);
  26. config($config_list, 'ds_config');
  27. View::assign('ick_kci', checkSecurity());
  28. if (request()->controller() != 'Login') {
  29. $this->admin_info = $this->systemLogin();
  30. if ($this->admin_info['admin_id'] != 1) {
  31. // 验证权限
  32. $this->checkPermission();
  33. }
  34. $this->setMenuList();
  35. }
  36. }
  37. /**
  38. * 取得当前管理员信息
  39. *
  40. * @param
  41. * @return 数组类型的返回结果
  42. */
  43. protected final function getAdminInfo()
  44. {
  45. return $this->admin_info;
  46. }
  47. /**
  48. * 系统后台登录验证
  49. *
  50. * @param
  51. * @return array 数组类型的返回结果
  52. */
  53. protected final function systemLogin()
  54. {
  55. $admin_info = array(
  56. 'admin_id' => session('admin_id'),
  57. 'admin_name' => session('admin_name'),
  58. 'admin_gid' => session('admin_gid'),
  59. 'admin_is_super' => session('admin_is_super'),
  60. );
  61. if (empty($admin_info['admin_id']) || empty($admin_info['admin_name']) || !isset($admin_info['admin_gid']) || !isset($admin_info['admin_is_super'])) {
  62. session(null);
  63. $this->redirect('admin/Login/index');
  64. }
  65. return $admin_info;
  66. }
  67. public function setMenuList()
  68. {
  69. $menu_list = $this->menuList();
  70. $menu_list = $this->parseMenu($menu_list);
  71. View::assign('menu_list', $menu_list);
  72. }
  73. /**
  74. * 验证当前管理员权限是否可以进行操作
  75. *
  76. * @param string $link_nav
  77. * @return
  78. */
  79. protected final function checkPermission($link_nav = null)
  80. {
  81. if ($this->admin_info['admin_is_super'] == 1) return true;
  82. $controller = request()->controller();
  83. $action = request()->action();
  84. if (empty($this->permission)) {
  85. $admin_model = model('admin');
  86. $gadmin = $admin_model->getOneGadmin(array('gid' => $this->admin_info['admin_gid']));
  87. $permission = ds_decrypt($gadmin['glimits'], MD5_KEY . md5($gadmin['gname']));
  88. $this->permission = $permission = explode('|', $permission);
  89. } else {
  90. $permission = $this->permission;
  91. }
  92. //显示隐藏小导航,成功与否都直接返回
  93. if (is_array($link_nav)) {
  94. if (!in_array("{$link_nav['controller']}.{$link_nav['action']}", $permission) && !in_array($link_nav['controller'], $permission)) {
  95. return false;
  96. } else {
  97. return true;
  98. }
  99. }
  100. //以下几项不需要验证
  101. $tmp = array('Index', 'Dashboard', 'Login');
  102. if (in_array($controller, $tmp)) {
  103. return true;
  104. }
  105. if (in_array($controller, $permission) || in_array("$controller.$action", $permission)) {
  106. return true;
  107. } else {
  108. $extlimit = array('ajax', 'export_step1');
  109. if (in_array($action, $extlimit) && (in_array($controller, $permission) || strpos(serialize($permission), '"' . $controller . '.'))) {
  110. return true;
  111. }
  112. //带前缀的都通过
  113. foreach ($permission as $v) {
  114. if (!empty($v) && strpos("$controller.$action", $v . '_') !== false) {
  115. return true;
  116. break;
  117. }
  118. }
  119. }
  120. if ($this->admin_info['admin_name'] != 'dsmall') {
  121. $this->error(lang('ds_assign_right'), 'Dashboard/welcome');
  122. } else if (request()->isPost() || preg_match('/del/', request()->action())) {
  123. $this->error(lang('ds_assign_right'));
  124. }
  125. }
  126. /**
  127. * 过滤掉无权查看的菜单
  128. *
  129. * @param array $menu
  130. * @return array
  131. */
  132. private final function parseMenu($menu = array())
  133. {
  134. if ($this->admin_info['admin_is_super'] == 1) {
  135. return $menu;
  136. }
  137. foreach ($menu as $k => $v) {
  138. foreach ($v['children'] as $ck => $cv) {
  139. $tmp = explode(',', $cv['args']);
  140. //以下几项不需要验证
  141. $except = array('Index', 'Dashboard', 'Login');
  142. if (in_array($tmp[1], $except))
  143. continue;
  144. if (!in_array($tmp[1], array_values($this->permission)) && !in_array($tmp[1] . '.' . $tmp[0], array_values($this->permission))) {
  145. if ($this->admin_info['admin_name'] != 'dsmall') {
  146. unset($menu[$k]['children'][$ck]);
  147. }
  148. }
  149. }
  150. if (empty($menu[$k]['children'])) {
  151. unset($menu[$k]);
  152. unset($menu[$k]['children']);
  153. }
  154. }
  155. return $menu;
  156. }
  157. /**
  158. * 记录系统日志
  159. *
  160. * @param $lang 日志语言包
  161. * @param $state 1成功0失败null不出现成功失败提示
  162. * @param $admin_name
  163. * @param $admin_id
  164. */
  165. protected final function log($lang = '', $state = 1, $admin_name = '', $admin_id = 0)
  166. {
  167. if ($admin_name == '') {
  168. $admin_name = session('admin_name');
  169. $admin_id = session('admin_id');
  170. }
  171. $data = array();
  172. if (is_null($state)) {
  173. $state = null;
  174. } else {
  175. $state = $state ? '' : lang('ds_fail');
  176. }
  177. $data['adminlog_content'] = $lang . $state;
  178. $data['adminlog_time'] = TIMESTAMP;
  179. $data['admin_name'] = $admin_name;
  180. $data['admin_id'] = $admin_id;
  181. $data['adminlog_ip'] = request()->ip();
  182. $data['adminlog_url'] = request()->controller() . '&' . request()->action();
  183. $adminlog_model = model('adminlog');
  184. return $adminlog_model->addAdminlog($data);
  185. }
  186. /**
  187. * 添加到任务队列
  188. *
  189. * @param array $goods_array
  190. * @param boolean $ifdel 是否删除以原记录
  191. */
  192. protected function addcron($data = array(), $ifdel = false)
  193. {
  194. $cron_model = model('cron');
  195. if (isset($data[0])) { // 批量插入
  196. $where = array();
  197. foreach ($data as $k => $v) {
  198. // 删除原纪录条件
  199. if ($ifdel) {
  200. $where[] = '(cron_type = "' . $data['cron_type'] . '" and cron_value = "' . $data['cron_value'] . '")';
  201. }
  202. }
  203. // 删除原纪录
  204. if ($ifdel) {
  205. $cron_model->delCron(implode(',', $where));
  206. }
  207. $cron_model->addCronAll($data);
  208. } else { // 单条插入
  209. // 删除原纪录
  210. if ($ifdel) {
  211. $cron_model->delCron(array('cron_type' => $data['cron_type'], 'cron_value' => $data['cron_value']));
  212. }
  213. $cron_model->addCron($data);
  214. }
  215. }
  216. /**
  217. * 当前选中的栏目
  218. */
  219. protected function setAdminCurItem($curitem = '')
  220. {
  221. View::assign('admin_item', $this->getAdminItemList());
  222. View::assign('curitem', $curitem);
  223. }
  224. /**
  225. * 获取卖家栏目列表,针对控制器下的栏目
  226. */
  227. protected function getAdminItemList()
  228. {
  229. return array();
  230. }
  231. /*
  232. * 侧边栏列表
  233. */
  234. function menuList()
  235. {
  236. return array(
  237. 'dashboard' => array(
  238. 'name' => 'dashboard',
  239. 'text' => lang('ds_dashboard'),
  240. 'show' => TRUE,
  241. 'children' => array(
  242. 'welcome' => array(
  243. 'ico' => "&#xe70b;",
  244. 'text' => lang('ds_welcome'),
  245. 'args' => 'welcome,Dashboard,dashboard',
  246. ),
  247. /*
  248. 'aboutus' => array(
  249. 'text' => lang('ds_aboutus'),
  250. 'args' => 'aboutus,dashboard,dashboard',
  251. ),
  252. */
  253. 'config' => array(
  254. 'ico' => '&#xe6e0;',
  255. 'text' => lang('ds_base'),
  256. 'args' => 'base,Config,dashboard',
  257. ),
  258. 'member' => array(
  259. 'ico' => '&#xe667;',
  260. 'text' => lang('ds_member_manage'),
  261. 'args' => 'member,Member,dashboard',
  262. ),
  263. ),
  264. ),
  265. 'setting' => array(
  266. 'name' => 'setting',
  267. 'text' => lang('ds_setting'),
  268. 'show' => TRUE,
  269. 'children' => array(
  270. 'config' => array(
  271. 'ico' => '&#xe6e0;',
  272. 'text' => lang('ds_base'),
  273. 'args' => 'base,Config,setting',
  274. ),
  275. 'account' => array(
  276. 'ico' => '&#xe678;',
  277. 'text' => lang('ds_account'),
  278. 'args' => 'qq,Account,setting',
  279. ),
  280. 'upload_set' => array(
  281. 'ico' => '&#xe72a;',
  282. 'text' => lang('ds_upload_set'),
  283. 'args' => 'default_thumb,Upload,setting',
  284. ),
  285. 'seo' => array(
  286. 'ico' => '&#xe6e0;',
  287. 'text' => lang('ds_seo_set'),
  288. 'args' => 'index,Seo,setting',
  289. ),
  290. 'message' => array(
  291. 'ico' => '&#xe71b;',
  292. 'text' => lang('ds_message'),
  293. 'args' => 'email,Message,setting',
  294. ),
  295. 'payment' => array(
  296. 'ico' => '&#xe74d;',
  297. 'text' => lang('ds_payment'),
  298. 'args' => 'index,Payment,setting',
  299. ),
  300. 'admin' => array(
  301. 'ico' => '&#xe67b;',
  302. 'text' => lang('ds_admin'),
  303. 'args' => 'admin,Admin,setting',
  304. ),
  305. 'express' => array(
  306. 'ico' => '&#xe69e;',
  307. 'text' => lang('ds_express'),
  308. 'args' => 'index,Express,setting',
  309. ),
  310. 'Region' => array(
  311. 'ico' => '&#xe720;',
  312. 'text' => lang('ds_region'),
  313. 'args' => 'index,Region,setting',
  314. ),
  315. 'db' => array(
  316. 'ico' => '&#xe6f5;',
  317. 'text' => lang('ds_db'),
  318. 'args' => 'db,Database,setting',
  319. ),
  320. 'admin_log' => array(
  321. 'ico' => '&#xe71f;',
  322. 'text' => lang('ds_adminlog'),
  323. 'args' => 'loglist,Adminlog,setting',
  324. ),
  325. ),
  326. ),
  327. 'member' => array(
  328. 'name' => 'member',
  329. 'text' => lang('ds_member'),
  330. 'show' => TRUE,
  331. 'children' => array(
  332. 'member' => array(
  333. 'ico' => '&#xe667;',
  334. 'text' => lang('ds_member_manage'),
  335. 'args' => 'member,Member,member',
  336. ),
  337. 'member_auth' => array(
  338. 'ico' => '&#xe6ea;',
  339. 'text' => lang('member_auth'),
  340. 'args' => 'index,MemberAuth,member',
  341. ),
  342. 'membergrade' => array(
  343. 'ico' => '&#xe6a3;',
  344. 'text' => lang('ds_membergrade'),
  345. 'args' => 'index,Membergrade,member',
  346. ),
  347. 'exppoints' => array(
  348. 'ico' => '&#xe727;',
  349. 'text' => lang('ds_exppoints'),
  350. 'args' => 'index,Exppoints,member',
  351. ),
  352. 'notice' => array(
  353. 'ico' => '&#xe71b;',
  354. 'text' => lang('ds_notice'),
  355. 'args' => 'index,Notice,member',
  356. ),
  357. 'points' => array(
  358. 'ico' => '&#xe6f5;',
  359. 'text' => lang('ds_points'),
  360. 'args' => 'index,Points,member',
  361. ),
  362. 'predeposit' => array(
  363. 'ico' => '&#xe6e2;',
  364. 'text' => lang('ds_predeposit'),
  365. 'args' => 'pdrecharge_list,Predeposit,member',
  366. ),
  367. 'snsmalbum' => array(
  368. 'ico' => '&#xe72a;',
  369. 'text' => lang('ds_snsmalbum'),
  370. 'args' => 'index,Snsmalbum,member',
  371. ),
  372. 'snsmember' => array(
  373. 'ico' => '&#xe73e;',
  374. 'text' => lang('ds_snsmember'),
  375. 'args' => 'index,Snsmember,member',
  376. ),
  377. 'instant_message' => array(
  378. 'ico' => '&#xe71f;',
  379. 'text' => lang('instant_message'),
  380. 'args' => 'index,InstantMessage,member',
  381. ),
  382. ),
  383. ),
  384. 'goods' => array(
  385. 'name' => 'goods',
  386. 'text' => lang('ds_goods'),
  387. 'show' => TRUE,
  388. 'children' => array(
  389. 'goodsclass' => array(
  390. 'ico' => '&#xe652;',
  391. 'text' => lang('ds_goodsclass'),
  392. 'args' => 'goods_class,Goodsclass,goods',
  393. ),
  394. 'Brand' => array(
  395. 'ico' => '&#xe6b0;',
  396. 'text' => lang('ds_brand_manage'),
  397. 'args' => 'index,Brand,goods',
  398. ),
  399. 'Goods' => array(
  400. 'ico' => '&#xe732;',
  401. 'text' => lang('ds_goods_manage'),
  402. 'args' => 'index,Goods,goods',
  403. ),
  404. 'Type' => array(
  405. 'ico' => '&#xe728;',
  406. 'text' => lang('ds_type'),
  407. 'args' => 'index,Type,goods',
  408. ),
  409. 'Spec' => array(
  410. 'ico' => '&#xe71d;',
  411. 'text' => lang('ds_spec'),
  412. 'args' => 'index,Spec,goods',
  413. ),
  414. 'album' => array(
  415. 'ico' => '&#xe72a;',
  416. 'text' => lang('ds_album'),
  417. 'args' => 'index,Goodsalbum,goods',
  418. ),
  419. 'video' => array(
  420. 'ico' => '&#xe6fa;',
  421. 'text' => lang('ds_video'),
  422. 'args' => 'index,Goodsvideo,goods',
  423. ),
  424. 'Arrivalnotice' => array(
  425. 'ico' => '&#xe71b;',
  426. 'text' => lang('ds_arrivalnotice'),
  427. 'args' => 'index,Arrivalnotice,goods',
  428. ),
  429. ),
  430. ),
  431. 'store' => array(
  432. 'name' => 'store',
  433. 'text' => lang('ds_store'),
  434. 'show' => TRUE,
  435. 'children' => array(
  436. 'Store' => array(
  437. 'ico' => '&#xe6ec;',
  438. 'text' => lang('ds_store_manage'),
  439. 'args' => 'store,Store,store',
  440. ),
  441. 'Storemoney' => array(
  442. 'ico' => '&#xe6e2;',
  443. 'text' => lang('ds_store_money'),
  444. 'args' => 'index,Storemoney,store',
  445. ),
  446. 'Storedeposit' => array(
  447. 'ico' => '&#xe72b;',
  448. 'text' => lang('ds_store_deposit'),
  449. 'args' => 'index,Storedeposit,store',
  450. ),
  451. 'Storegrade' => array(
  452. 'ico' => '&#xe6a3;',
  453. 'text' => lang('ds_storegrade'),
  454. 'args' => 'index,Storegrade,store',
  455. ),
  456. 'Storeclass' => array(
  457. 'ico' => '&#xe652;',
  458. 'text' => lang('ds_storeclass'),
  459. 'args' => 'store_class,Storeclass,store',
  460. ),
  461. // 'Chain' => array(
  462. // 'ico'=>'&#xe69e;',
  463. // 'text' => lang('ds_chain'),
  464. // 'args' => 'index,Chain,store',
  465. // ),
  466. 'Storesnstrace' => array(
  467. 'ico' => '&#xe6ec;',
  468. 'text' => lang('ds_storesnstrace'),
  469. 'args' => 'index,Storesnstrace,store',
  470. ),
  471. 'Storehelp' => array(
  472. 'ico' => '&#xe6b4;',
  473. 'text' => lang('ds_Storehelp'),
  474. 'args' => 'index,Storehelp,store',
  475. ),
  476. 'Storejoin' => array(
  477. 'ico' => '&#xe6ff;',
  478. 'text' => lang('ds_storejoin'),
  479. 'args' => 'index,Storejoin,store',
  480. ),
  481. 'Ownshop' => array(
  482. 'ico' => '&#xe6ec;',
  483. 'text' => lang('ds_ownshop'),
  484. 'args' => 'index,Ownshop,store',
  485. ),
  486. ),
  487. ),
  488. 'trade' => array(
  489. 'name' => 'trade',
  490. 'text' => lang('ds_trade'),
  491. 'show' => TRUE,
  492. 'children' => array(
  493. 'order' => array(
  494. 'ico' => '&#xe69c;',
  495. 'text' => lang('ds_order'),
  496. 'args' => 'index,Order,trade',
  497. ),
  498. 'vrorder' => array(
  499. 'ico' => '&#xe71f;',
  500. 'text' => lang('ds_vrorder'),
  501. 'args' => 'index,Vrorder,trade',
  502. ),
  503. 'refund' => array(
  504. 'ico' => '&#xe6f3;',
  505. 'text' => lang('ds_refund'),
  506. 'args' => 'refund_manage,Refund,trade',
  507. ),
  508. 'return' => array(
  509. 'ico' => '&#xe6f3;',
  510. 'text' => lang('ds_return'),
  511. 'args' => 'return_manage,Returnmanage,trade',
  512. ),
  513. 'vrrefund' => array(
  514. 'ico' => '&#xe6f3;',
  515. 'text' => lang('ds_vrrefund'),
  516. 'args' => 'refund_manage,Vrrefund,trade',
  517. ),
  518. 'Bill' => array(
  519. 'ico' => '&#xe69c;',
  520. 'text' => lang('ds_bill_manage'),
  521. 'args' => 'show_statis,Bill,trade',
  522. ),
  523. 'consulting' => array(
  524. 'ico' => '&#xe71c;',
  525. 'text' => lang('ds_consulting'),
  526. 'args' => 'Consulting,Consulting,trade',
  527. ),
  528. 'inform' => array(
  529. 'ico' => '&#xe70c;',
  530. 'text' => lang('ds_inform'),
  531. 'args' => 'inform_list,Inform,trade',
  532. ),
  533. 'evaluate' => array(
  534. 'ico' => '&#xe6f2;',
  535. 'text' => lang('ds_evaluate'),
  536. 'args' => 'evalgoods_list,Evaluate,trade',
  537. ),
  538. 'complain' => array(
  539. 'ico' => '&#xe676;',
  540. 'text' => lang('ds_complain'),
  541. 'args' => 'complain_new_list,Complain,trade',
  542. ),
  543. ),
  544. ),
  545. 'website' => array(
  546. 'name' => 'website',
  547. 'text' => lang('ds_website'),
  548. 'show' => TRUE,
  549. 'children' => array(
  550. 'Articleclass' => array(
  551. 'ico' => '&#xe652;',
  552. 'text' => lang('ds_articleclass'),
  553. 'args' => 'index,Articleclass,website',
  554. ),
  555. 'Article' => array(
  556. 'ico' => '&#xe71d;',
  557. 'text' => lang('ds_article'),
  558. 'args' => 'index,Article,website',
  559. ),
  560. 'Document' => array(
  561. 'ico' => '&#xe74f;',
  562. 'text' => lang('ds_document'),
  563. 'args' => 'index,Document,website',
  564. ),
  565. 'Navigation' => array(
  566. 'ico' => '&#xe67d;',
  567. 'text' => lang('ds_navigation'),
  568. 'args' => 'index,Navigation,website',
  569. ),
  570. 'Adv' => array(
  571. 'ico' => '&#xe707;',
  572. 'text' => lang('ds_adv'),
  573. 'args' => 'ap_manage,Adv,website',
  574. ),
  575. 'EditablePagePc' => array(
  576. 'ico' => '&#xe60c;',
  577. 'text' => lang('editable_page_pc'),
  578. 'args' => 'page_list,EditablePage,website',
  579. ),
  580. 'EditablePageH5' => array(
  581. 'ico' => '&#xe601;',
  582. 'text' => lang('editable_page_h5'),
  583. 'args' => 'h5_page_list,EditablePage,website',
  584. ),
  585. 'Link' => array(
  586. 'ico' => '&#xe67d;',
  587. 'text' => lang('ds_friendlink'),
  588. 'args' => 'index,Link,website',
  589. ),
  590. 'Mallconsult' => array(
  591. 'ico' => '&#xe750;',
  592. 'text' => lang('ds_mall_consult'),
  593. 'args' => 'index,Mallconsult,website',
  594. ),
  595. 'Feedback' => array(
  596. 'ico' => '&#xe672;',
  597. 'text' => lang('ds_feedback'),
  598. 'args' => 'flist,Feedback,website',
  599. ),
  600. ),
  601. ),
  602. 'operation' => array(
  603. 'name' => 'operation',
  604. 'text' => lang('ds_operation'),
  605. 'show' => TRUE,
  606. 'children' => array(
  607. 'Operation' => array(
  608. 'ico' => '&#xe734;',
  609. 'text' => lang('ds_operation_set'),
  610. 'args' => 'index,Operation,operation',
  611. ),
  612. ),
  613. ),
  614. 'stat' => array(
  615. 'name' => 'stat',
  616. 'text' => lang('ds_stat'),
  617. 'show' => TRUE,
  618. 'children' => array(
  619. 'stat_general' => array(
  620. 'ico' => '&#xe734;',
  621. 'text' => lang('ds_statgeneral'),
  622. 'args' => 'general,Statgeneral,stat',
  623. ),
  624. 'stat_industry' => array(
  625. 'ico' => '&#xe745;',
  626. 'text' => lang('ds_statindustry'),
  627. 'args' => 'scale,Statindustry,stat',
  628. ),
  629. 'stat_member' => array(
  630. 'ico' => '&#xe73f;',
  631. 'text' => lang('ds_statmember'),
  632. 'args' => 'newmember,Statmember,stat',
  633. ),
  634. 'stat_store' => array(
  635. 'ico' => '&#xe6ec;',
  636. 'text' => lang('ds_statstore'),
  637. 'args' => 'newstore,Statstore,stat',
  638. ),
  639. 'stat_trade' => array(
  640. 'ico' => '&#xe745;',
  641. 'text' => lang('ds_stattrade'),
  642. 'args' => 'income,Stattrade,stat',
  643. ),
  644. 'stat_goods' => array(
  645. 'ico' => '&#xe732;',
  646. 'text' => lang('ds_statgoods'),
  647. 'args' => 'pricerange,Statgoods,stat',
  648. ),
  649. 'stat_marketing' => array(
  650. 'ico' => '&#xe745;',
  651. 'text' => lang('ds_statmarketing'),
  652. 'args' => 'promotion,Statmarketing,stat',
  653. ),
  654. 'stat_stataftersale' => array(
  655. 'ico' => '&#xe745;',
  656. 'text' => lang('ds_stataftersale'),
  657. 'args' => 'refund,Stataftersale,stat',
  658. ),
  659. ),
  660. ),
  661. 'mobile' => array(
  662. 'name' => 'mobile',
  663. 'text' => lang('mobile'),
  664. 'show' => TRUE,
  665. 'children' => array(
  666. 'app_appadv' => array(
  667. 'text' => lang('appadv'),
  668. 'args' => 'index,Appadv,mobile',
  669. ),
  670. ),
  671. ),
  672. 'wechat' => array(
  673. 'name' => 'wechat',
  674. 'text' => lang('wechat'),
  675. 'show' => TRUE,
  676. 'children' => array(
  677. 'wechat_setting' => array(
  678. 'ico' => '&#xe6e0;',
  679. 'text' => lang('wechat_setting'),
  680. 'args' => 'setting,Wechat,wechat',
  681. ),
  682. 'wechat_material' => array(
  683. 'ico' => '&#xe679;',
  684. 'text' => lang('wechat_material'),
  685. 'args' => 'material,Wechat,wechat',
  686. ),
  687. 'wechat_menu' => array(
  688. 'ico' => '&#xe679;',
  689. 'text' => lang('wechat_menu'),
  690. 'args' => 'menu,Wechat,wechat',
  691. ),
  692. 'wechat_keywords' => array(
  693. 'ico' => '&#xe672;',
  694. 'text' => lang('wechat_keywords'),
  695. 'args' => 'k_text,Wechat,wechat',
  696. ),
  697. 'wechat_member' => array(
  698. 'ico' => '&#xe729;',
  699. 'text' => lang('wechat_member'),
  700. 'args' => 'member,Wechat,wechat',
  701. ),
  702. 'wechat_push' => array(
  703. 'ico' => '&#xe71b;',
  704. 'text' => lang('wechat_push'),
  705. 'args' => 'SendList,Wechat,wechat',
  706. ),
  707. ),
  708. ),
  709. 'flea' => array(
  710. 'name' => 'flea',
  711. 'text' => lang('flea'),
  712. 'show' => FALSE,
  713. 'children' => array(
  714. 'flea_mes' => array(
  715. 'text' => lang('flea_mes'),
  716. 'args' => 'flea,Flea,flea',
  717. ),
  718. 'flea_index' => array(
  719. 'ico' => '&#xe6e0;',
  720. 'text' => lang('flea_seo'),
  721. 'args' => 'index,Fleaseo,flea',
  722. ),
  723. 'flea_class' => array(
  724. 'ico' => '&#xe652;',
  725. 'text' => lang('flea_class'),
  726. 'args' => 'flea_class,Fleaclass,flea',
  727. ),
  728. 'flea_class_index' => array(
  729. 'ico' => '&#xe652;',
  730. 'text' => lang('flea_class_index'),
  731. 'args' => 'flea_class_index,Fleaclassindex,flea',
  732. ),
  733. 'flea_region' => array(
  734. 'ico' => '&#xe720;',
  735. 'text' => lang('flea_region'),
  736. 'args' => 'flea_region,Flearegion,flea',
  737. ),
  738. 'flea_adv_manage' => array(
  739. 'ico' => '&#xe72a;',
  740. 'text' => lang('flea_adv_manage'),
  741. 'args' => 'adv_manage,Fleaseo,flea',
  742. ),
  743. ),
  744. ),
  745. 'live' => array(
  746. 'name' => 'live',
  747. 'text' => lang('ds_live'),
  748. 'show' => TRUE,
  749. 'children' => array(
  750. 'live_setting' => array(
  751. 'ico' => '&#xe71f;',
  752. 'text' => lang('live_setting'),
  753. 'args' => 'index,LiveSetting,live',
  754. ),
  755. 'live_apply' => array(
  756. 'ico' => '&#xe71f;',
  757. 'text' => lang('live_apply'),
  758. 'args' => 'index,LiveApply,live',
  759. ),
  760. 'live_goods' => array(
  761. 'ico' => '&#xe71f;',
  762. 'text' => lang('live_goods'),
  763. 'args' => 'index,LiveGoods,live',
  764. ),
  765. ),
  766. ),
  767. );
  768. }
  769. /*
  770. * 权限选择列表
  771. */
  772. function limitList()
  773. {
  774. $_limit = array(
  775. array('name' => lang('ds_setting'), 'child' => array(
  776. array('name' => lang('ds_base'), 'action' => null, 'controller' => 'Config'),
  777. array('name' => lang('ds_account'), 'action' => null, 'controller' => 'Account'),
  778. array('name' => lang('ds_upload_set'), 'action' => null, 'controller' => 'Upload'),
  779. array('name' => lang('ds_seo_set'), 'action' => null, 'controller' => 'Seo'),
  780. array('name' => lang('ds_payment'), 'action' => null, 'controller' => 'Payment'),
  781. array('name' => lang('ds_message'), 'action' => null, 'controller' => 'Message'),
  782. array('name' => lang('ds_admin'), 'action' => null, 'controller' => 'Admin'),
  783. array('name' => lang('ds_express'), 'action' => null, 'controller' => 'Express'),
  784. array('name' => lang('ds_region'), 'action' => null, 'controller' => 'Region'),
  785. array('name' => lang('ds_db'), 'action' => null, 'controller' => 'Database'),
  786. array('name' => lang('ds_adminlog'), 'action' => null, 'controller' => 'Adminlog'),
  787. )),
  788. array('name' => lang('ds_goods'), 'child' => array(
  789. array('name' => lang('ds_goods_manage'), 'action' => null, 'controller' => 'Goods'),
  790. array('name' => lang('ds_goodsclass'), 'action' => null, 'controller' => 'Goodsclass'),
  791. array('name' => lang('ds_brand_manage'), 'action' => null, 'controller' => 'Brand'),
  792. array('name' => lang('ds_type'), 'action' => null, 'controller' => 'Type'),
  793. array('name' => lang('ds_spec'), 'action' => null, 'controller' => 'Spec'),
  794. array('name' => lang('ds_album'), 'action' => null, 'controller' => 'Goodsalbum'),
  795. array('name' => lang('ds_video'), 'action' => null, 'controller' => 'Goodsvideo'),
  796. array('name' => lang('ds_arrivalnotice'), 'action' => null, 'controller' => 'Arrivalnotice'),
  797. )),
  798. array('name' => lang('ds_store'), 'child' => array(
  799. array('name' => lang('ds_store_manage'), 'action' => null, 'controller' => 'Store'),
  800. array('name' => lang('ds_store_money'), 'action' => null, 'controller' => 'Storemoney'),
  801. array('name' => lang('ds_store_deposit'), 'action' => null, 'controller' => 'Storedeposit'),
  802. array('name' => lang('ds_storegrade'), 'action' => null, 'controller' => 'Storegrade'),
  803. array('name' => lang('ds_storeclass'), 'action' => null, 'controller' => 'Storeclass'),
  804. // array('name' => lang('ds_chain'), 'action' => null, 'controller' => 'Chain'),
  805. array('name' => lang('ds_storesnstrace'), 'action' => null, 'controller' => 'Storesnstrace'),
  806. array('name' => lang('ds_Storehelp'), 'action' => null, 'controller' => 'Storehelp'),
  807. array('name' => lang('ds_storejoin'), 'action' => null, 'controller' => 'Storejoin'),
  808. array('name' => lang('ds_ownshop'), 'action' => null, 'controller' => 'Ownshop'),
  809. )),
  810. array('name' => lang('ds_member'), 'child' => array(
  811. array('name' => lang('ds_member_manage'), 'action' => null, 'controller' => 'Member'),
  812. array('name' => lang('member_auth'), 'action' => null, 'controller' => 'MemberAuth'),
  813. array('name' => lang('ds_membergrade'), 'action' => null, 'controller' => 'Membergrade'),
  814. array('name' => lang('ds_exppoints'), 'action' => null, 'controller' => 'Exppoints'),
  815. array('name' => lang('ds_notice'), 'action' => null, 'controller' => 'Notice'),
  816. array('name' => lang('ds_points'), 'action' => null, 'controller' => 'Points'),
  817. array('name' => lang('ds_snsmalbum'), 'action' => null, 'controller' => 'Snsmalbum'),
  818. array('name' => lang('ds_snsmember'), 'action' => null, 'controller' => 'Snsmember'),
  819. array('name' => lang('ds_predeposit'), 'action' => null, 'controller' => 'Predeposit'),
  820. array('name' => lang('instant_message'), 'action' => null, 'controller' => 'InstantMessage'),
  821. )),
  822. array('name' => lang('ds_trade'), 'child' => array(
  823. array('name' => lang('ds_order'), 'action' => null, 'controller' => 'Order'),
  824. array('name' => lang('ds_vrorder'), 'action' => null, 'controller' => 'Vrorder'),
  825. array('name' => lang('ds_refund'), 'action' => null, 'controller' => 'Refund'),
  826. array('name' => lang('ds_return'), 'action' => null, 'controller' => 'Returnmanage'),
  827. array('name' => lang('ds_vrrefund'), 'action' => null, 'controller' => 'Vrrefund'),
  828. array('name' => lang('ds_bill_manage'), 'action' => null, 'controller' => 'Bill'),
  829. array('name' => lang('ds_consulting'), 'action' => null, 'controller' => 'Consulting'),
  830. array('name' => lang('ds_inform'), 'action' => null, 'controller' => 'Inform'),
  831. array('name' => lang('ds_evaluate'), 'action' => null, 'controller' => 'Evaluate'),
  832. array('name' => lang('ds_complain'), 'action' => null, 'controller' => 'Complain'),
  833. )),
  834. array('name' => lang('ds_website'), 'child' => array(
  835. array('name' => lang('ds_articleclass'), 'action' => null, 'controller' => 'Articleclass'),
  836. array('name' => lang('ds_article'), 'action' => null, 'controller' => 'Article'),
  837. array('name' => lang('ds_document'), 'action' => null, 'controller' => 'Document'),
  838. array('name' => lang('ds_navigation'), 'action' => null, 'controller' => 'Navigation'),
  839. array('name' => lang('ds_adv'), 'action' => null, 'controller' => 'Adv'),
  840. array('name' => lang('editable_page_pc'), 'action' => 'page_list', 'controller' => 'EditablePage'),
  841. array('name' => lang('editable_page_h5'), 'action' => 'h5_page_list', 'controller' => 'EditablePage'),
  842. array('name' => lang('ds_friendlink'), 'action' => null, 'controller' => 'Link'),
  843. array('name' => lang('ds_mall_consult'), 'action' => null, 'controller' => 'Mallconsult'),
  844. array('name' => lang('ds_feedback'), 'action' => null, 'controller' => 'Feedback'),
  845. )),
  846. array('name' => lang('ds_operation'), 'child' => array(
  847. array('name' => lang('ds_operation_set'), 'action' => null, 'controller' => 'Operation|Promotionwholesale|Promotionxianshi|Promotionmansong|Promotionbundling|Promotionbooth|Groupbuy|Vrgroupbuy|Voucher|Promotionmgdiscount|Promotionpintuan|Promotionbargain|Activity|EditablePage|Inviter|Bonus|Marketmanage|Pointprod|Pointorder|Rechargecard|Flea|Fleaseo|Fleaclass|Fleaclassindex|Flearegion|Fleaseo|Promotionpresell'),
  848. )),
  849. array('name' => lang('ds_stat'), 'child' => array(
  850. array('name' => lang('ds_statgeneral'), 'action' => null, 'controller' => 'Statgeneral'),
  851. array('name' => lang('ds_statindustry'), 'action' => null, 'controller' => 'Statindustry'),
  852. array('name' => lang('ds_statmember'), 'action' => null, 'controller' => 'Statmember'),
  853. array('name' => lang('ds_statstore'), 'action' => null, 'controller' => 'Statstore'),
  854. array('name' => lang('ds_stattrade'), 'action' => null, 'controller' => 'Stattrade'),
  855. array('name' => lang('ds_statgoods'), 'action' => null, 'controller' => 'Statgoods'),
  856. array('name' => lang('ds_statmarketing'), 'action' => null, 'controller' => 'Statmarketing'),
  857. array('name' => lang('ds_stataftersale'), 'action' => null, 'controller' => 'Stataftersale'),
  858. )),
  859. array('name' => lang('mobile'), 'child' => array(
  860. array('name' => lang('appadv'), 'action' => null, 'controller' => 'Appadv'),
  861. )),
  862. array('name' => lang('wechat'), 'child' => array(
  863. array('name' => lang('wechat_setting'), 'action' => 'setting', 'controller' => 'Wechat'),
  864. array('name' => lang('wechat_template_message'), 'action' => 'template_message', 'controller' => 'Wechat'),
  865. array('name' => lang('wechat_menu'), 'action' => 'menu', 'controller' => 'Wechat'),
  866. array('name' => lang('wechat_keywords'), 'action' => 'k_text', 'controller' => 'Wechat'),
  867. array('name' => lang('wechat_member'), 'action' => 'member', 'controller' => 'Wechat'),
  868. array('name' => lang('wechat_push'), 'action' => 'SendList', 'controller' => 'Wechat'),
  869. )),
  870. array('name' => lang('ds_live'), 'child' => array(
  871. array('name' => lang('live_setting'), 'action' => null, 'controller' => 'LiveSetting'),
  872. array('name' => lang('live_apply'), 'action' => null, 'controller' => 'LiveApply'),
  873. array('name' => lang('live_goods'), 'action' => null, 'controller' => 'LiveGoods'),
  874. )),
  875. );
  876. return $_limit;
  877. }
  878. }