store.ctrl.php 998 B

1234567891011121314151617181920212223242526
  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. $dos = array('display', 'detail');
  8. $do = in_array($do, $dos) ? $do : 'display';
  9. if($do == 'display') {
  10. $profile = mc_fetch($_W['member']['uid'], array('nickname', 'avatar', 'mobile', 'groupid'));
  11. $mcgroups = mc_groups();
  12. $profile['group'] = $mcgroups[$profile['groupid']];
  13. $stores = pdo_fetchall('SELECT * FROM ' . tablename('activity_stores') . ' WHERE uniacid = :uniacid', array(':uniacid' => $_W['uniacid']));
  14. }
  15. if($do == 'detail') {
  16. $id = intval($_GPC['id']);
  17. $store = pdo_get('activity_stores', array('uniacid' => $_W['uniacid'], 'id' => $id));
  18. if(empty($store)) {
  19. message('门店不存在或已删除', referer(), 'error');
  20. }
  21. $store['photo_list'] = iunserializer($store['photo_list']);
  22. $store['category'] = iunserializer($store['category']);
  23. }
  24. template('mc/store');