AdminControl.php 40 KB

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