ajaxgetdropmenu.html.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * The ajaxgetdropmenu view file of market module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2024 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Qiyu Xie <xieqiyu@easycorp.ltd>
  7. * @package market
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. /* 旧页面获取旧的1.5级导航。*/
  12. if(in_array("{$module}-{$method}", $config->index->oldPages))
  13. {
  14. include '../view/ajaxgetdropmenu.html.php';
  15. return;
  16. }
  17. $data = array();
  18. foreach($marketPairs as $id => $name)
  19. {
  20. $item = array();
  21. $item['id'] = $id;
  22. $item['name'] = $name;
  23. $item['text'] = $name;
  24. $item['title'] = $name;
  25. $item['active'] = $marketID == $id;
  26. $item['keys'] = zget($marketsPinYin, $name, '');
  27. $item['url'] = sprintf($link, $id);
  28. $item['type'] = 'item';
  29. $data[] = $item;
  30. }
  31. $json = array();
  32. $json['data'] = $data;
  33. $json['searchHint'] = $lang->searchAB;
  34. renderJson($json);