site.table.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. defined('IN_IA') or exit('Access Denied');
  7. class SiteTable extends We7Table {
  8. protected $site_nav_table ='site_nav';
  9. protected $site_multi_table = 'site_multi';
  10. protected $site_category_table = 'site_category';
  11. protected $site_article_table = 'site_article';
  12. protected $site_page_table = 'site_page';
  13. protected $site_slide_table = 'site_slide';
  14. public function siteNavList($params) {
  15. global $_W;
  16. $this->query->from($this->site_nav_table);
  17. if (!empty($params['uniacid'])) {
  18. $this->query->where('uniacid', $params['uniacid']);
  19. }
  20. if (!empty($params['position'])) {
  21. $this->query->where('position', $params['position']);
  22. }
  23. if (!empty($params['status'])) {
  24. $this->query->where('status', $params['status']);
  25. }
  26. if (!empty($params['multiid'])) {
  27. $this->query->where('multiid', $params['multiid']);
  28. }
  29. $this->query->orderby(array('displayorder' => 'DESC', 'id' => 'ASC'));
  30. return $this->query->getall();
  31. }
  32. }