AdminControl.php 40 KB

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