Exemplo n.º 1
0
    public function PostIsSpam()
    {
        global $db;
        if ($this->mCanReport) {
            $sql = 'INSERT INTO ' . DB_PREFIX . 'spam_reports (the_time, ip, job_id)
			                    VALUES (NOW(), "' . $this->mIp . '", ' . $this->mJobId . ')';
            if ($db->query($sql)) {
                if ($this->GetTotalVotesPerPost() > REPORT_POST_NOTIFY_ON) {
                    $job = new Job($this->mJobId);
                    $mihai = new Postman();
                    $mihai->MailReportSpam($job->GetInfo());
                }
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }