contact.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. if (!defined('ES_PATH')) {
  3. exit('Access Denied');
  4. }
  5. class ContactController extends Controller
  6. {
  7. public function index()
  8. {
  9. global $_W;
  10. global $_GPC;
  11. $uniacid = intval($_GPC['__uniacid']);
  12. $articles = pdo_fetchall('SELECT * FROM ' . tablename('ewei_shop_system_article') . ' AS a
  13. WHERE a.status = 1 ORDER BY RAND() DESC LIMIT 4 ');
  14. $relevant_top = pdo_fetch('SELECT * FROM ' . tablename('ewei_shop_system_article') . ' AS a
  15. WHERE a.status = 1 ORDER BY RAND()');
  16. $relevant = pdo_fetchall('SELECT * FROM ' . tablename('ewei_shop_system_article') . ' AS a
  17. WHERE a.status = 1 ORDER BY RAND() DESC LIMIT 6 ');
  18. $casebanner = pdo_fetch('select contact from ' . tablename('ewei_shop_system_setting') . ' where uniacid = :uniacid ', array(':uniacid' => $uniacid));
  19. if (empty($casebanner)) {
  20. $casebanners = pdo_fetchall('select contact from ' . tablename('ewei_shop_system_setting') . ' where 1 ');
  21. foreach ($casebanners as $value) {
  22. if (!empty($value['contact'])) {
  23. $casebanner['contact'] = $value['contact'];
  24. }
  25. }
  26. }
  27. $basicset = $this->basicset();
  28. $title = '联系我们';
  29. include $this->template('contact/index');
  30. }
  31. }
  32. ?>