elseif($tpl['name'] == 'frnd_pm') { $tpl['template'] = $this->safesql($tpl['template']); $time = time(); $this->query("INSERT INTO ".PREFIX."_pm (subj, text, user, user_from, date, pm_read, folder) VALUES ('$subject', '$tpl[template]', '{$to_userid['user_id']}', '{$this->member_id['name']}', '$time', 'no', 'inbox')"); $this->query("UPDATE ".PREFIX."_users SET pm_all = pm_all + 1, pm_unread = pm_unread + 1 WHERE user_id = {$to_userid['user_id']}"); }