state != 'suspect'
SQL
+$db.execute('insert into c values (NULL, ?, ?, ?, ?, ?)',
+ [state,
+ IP,
+ NOW,
+ GOTO,
+ COMMENT_TXT])
if date
new_count = $db.execute(query + 'and date > ?',date)
else
new_count = $db.execute(query)
end
+new_count = new_count[0][0]
if new_count == 1
require 'net/smtp'
def send_email(opts={})
- opts[:to] ||= ENV['USER']
+ opts[:to] ||= 'root'
opts[:server] ||= 'localhost'
- opts[:from] ||= ENV['USER']
- opts[:from_alias] ||= ENV['USER']
+ opts[:from] ||= 'root'
+ opts[:from_alias] ||= 'root'
opts[:subject] ||= "test subject"
opts[:body] ||= ""
send_email :subject => 'new comments on iankelling.org'
end
-$db.execute('insert into c values (NULL, ?, ?, ?, ?, ?)',
- [state,
- IP,
- NOW,
- GOTO,
- COMMENT_TXT])
-
post(md_file)
redir