AdminControl.php 41 KB

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