function wall() { $uid = intval(v('uid')); $content = n(v('content')); // check if is empty if ($uid > 0 && $content != '') { $this->user->wall_save($uid, format_uid(), $content); send_to_notice($uid, 'system_guestbook', '<a href="/user/space/' . format_uid() . '">' . _sess('u2_nickname') . '</a>给你留言了 ', '<img src="/static/images/quote_left.gif" /> <a href="/user/space#">' . word_substr($content, 15) . '</a> <img src="/static/images/quote_right.gif" />'); $uname = $this->user->get_nickname_by_uid($uid); $title = '<a href="/user/space/' . format_uid() . '">' . _sess('u2_nickname') . '</a>给<a href="/user/space/' . $uid . '#wall">' . $uname . '</a>留言了'; $desp = word_substr($content, 15); send_to_feed(format_uid(), 'system_miniblog', $title, $desp); } header('Location: /user/space/' . $uid); }
if (!$forum) { info_page('错误的论坛id'); } $now = date("Y-m-d H:i:s"); lazy_run_sql("update `app_iforum_posts` set `reply` = `reply` + 1 , `last_post_time` = '{$now}' ,`last_uid` = '" . format_uid() . "' WHERE id = '{$id}' AND `is_active` = 1 AND `parent_id` = '0' LIMIT 1"); global $CI; $CI->load->database(); $data['fid'] = $check['fid']; $data['parent_id'] = $id; $data['title'] = ''; $data['desp'] = r($desp); $data['floor'] = intval(v('floor')); $data['last_uid'] = $data['uid'] = format_uid(); $data['last_post_time'] = $data['time'] = $now; $CI->db->insert('app_iforum_posts', $data); $count = lazy_get_var("select count(*) from `app_iforum_posts` WHERE fid = '{$data['fid']}' AND `parent_id` = '{$id}' AND `is_active` = 1 AND `parent_id` != '0' "); $page_all = ceil($count / $limit); $rid = intval(v('rid')); if (!$rid) { $nuid = $check['uid']; } else { $temp = lazy_get_var("SELECT `uid` FROM `app_iforum_posts` WHERE id = '{$rid}' AND `is_active` = 1 AND `parent_id` = '{$id}' LIMIT 1"); $nuid = $temp ? $temp : $check['uid']; } if ($nuid != format_uid()) { $title = '<a href="/user/space/' . format_uid() . '" target="_blank">' . _sess('u2_nickname') . '</a>回复了主题<a href="/app/native/iforum/display/' . $id . '/' . $page_all . '/" target="_blank">' . strip_tags($check['title']) . '</a>'; send_to_notice($nuid, 'iforum', $title); } $title = '<a href="/user/space/' . format_uid() . '" target="_blank">' . _sess('u2_nickname') . '</a>回复了主题<a href="/app/native/iforum/display/' . $id . '/" target="_blank">' . strip_tags($check['title']) . '</a>'; send_to_feed(format_uid(), 'iforum', $title); header("Location: /app/native/iforum/display/" . $id . "/" . $page_all . "/" . $return_page . '/' . $return_key);
function ticket($id) { $this->is_admin(); $ticket = $this->ajax->get_ticket_by_id($id); if (!$ticket) { die(_text('system_error_id')); } $uid = format_uid(); $appname = '意见反馈'; if ($ticket['action'] == '0') { $data['action'] = '1'; $data['auid'] = $uid; $title = '<a href="/user/space/' . $uid . '" target="_blank">' . _sess('u2_nickname') . '</a>正在处理您的<a href="/app/native/iticket/show/' . $id . '/" target="_blank">' . $appname . '</a>'; send_to_notice($ticket['uid'], 'iticket', $title); } elseif ($ticket['action'] == '1') { if ($ticket['auid'] != $uid) { die(_text('app_ticket_doing')); } else { $data['action'] = '2'; $title = '<a href="/user/space/' . $uid . '" target="_blank">' . _sess('u2_nickname') . '</a>处理了您的<a href="/app/native/iticket/show/' . $id . '/" target="_blank">' . $appname . '</a>'; send_to_notice($ticket['uid'], 'iticket', $title); } } else { die('error'); } $this->ajax->update_ticket_by_id($id, $data); }