人人商城

info.ctrl.php 1.1KB

12345678910111213141516171819202122232425262728293031
  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');
  8. $do = in_array($do, $dos) ? $do : 'display';
  9. if ($do == 'display') {
  10. $data = uni_setting($_W['uniacid'], array('site_info', 'styleid'));
  11. $styleid = $data['styleid'];
  12. $site_info = empty($data['site_info']) ? array('site_info' => array()) : $data['site_info'];
  13. $styles = pdo_fetchall('SELECT * FROM ' . tablename('site_styles') . ' WHERE uniacid = :uniacid', array(':uniacid' => $_W['uniacid']));
  14. if (checksubmit('submit')) {
  15. $pdata['site_info'] = iserializer(array(
  16. 'sitename' => $_GPC['sitename'],
  17. 'keywords' => $_GPC['keywords'],
  18. 'description' => $_GPC['description'],
  19. 'footer' => htmlspecialchars_decode($_GPC['footer'])
  20. ));
  21. $pdata['styleid'] = intval($_GPC['styleid']);
  22. pdo_update('uni_settings', $pdata, array('uniacid' => $_W['uniacid']));
  23. cache_delete("unisetting:{$_W['uniacid']}");
  24. message('信息设置成功!', url('site/info/display'), 'success');
  25. }
  26. }
  27. template('site/info');