AdminControl.php 40 KB

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