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