AdminControl.php 40 KB

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