site.php 860 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. class NewsModuleSite extends WeModuleSite {
  8. public function doMobileDetail() {
  9. global $_W, $_GPC;
  10. $id = intval($_GPC['id']);
  11. $row = table('news_reply')->getById($id);
  12. if (!empty($row['url'])) {
  13. header('Location: ' . $row['url']);
  14. }
  15. $row = istripslashes($row);
  16. $title = $row['title'];
  17. if ('android' == $_W['os'] && 'wechat' == $_W['container'] && $_W['account']['account']) {
  18. $subscribeurl = "weixin://profile/{$_W['account']['account']}";
  19. } else {
  20. $subscribeurl = table('account_wechats')->where(array('uniacid' => intval($_W['uniacid'])))->getcolumn('subscribeurl');
  21. }
  22. include $this->template('detail');
  23. }
  24. }