AdminControl.php 40 KB

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