AdminControl.php 40 KB

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