home.ctrl.php 1.0 KB

123456789101112131415161718192021222324
  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. load()->model('app');
  8. $multiid = intval($_GPC['t']);
  9. if(empty($multiid)) {
  10. load()->model('account');
  11. $setting = uni_setting($_W['uniacid'], array('default_site'));
  12. $multiid = $setting['default_site'];
  13. }
  14. $title = $_W['page']['title'];
  15. $navs = app_navs('home', $multiid);
  16. $share_tmp = pdo_fetch('SELECT title,description,thumb FROM ' . tablename('cover_reply') . ' WHERE uniacid = :aid AND multiid = :id AND module = :m', array(':aid' => $_W['uniacid'], ':id' => $multiid, ':m' => 'site'));
  17. $_share['imgUrl'] = tomedia($share_tmp['thumb']);
  18. $_share['desc'] = $share_tmp['description'];
  19. $_share['title'] = $share_tmp['title'];
  20. $category_list = pdo_getall('site_category', array('uniacid' => $_W['uniacid'], 'multiid' => $multiid), array(), 'id');
  21. if (!empty($multiid)) {
  22. isetcookie('__multiid', $multiid);
  23. }
  24. template('home/home');