Advertisement
RobinJ1995

Untitled

Oct 27th, 2011
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. function addToLog($type, $channel, $host, $message)
  2. {
  3. global $database;
  4. $temp = explode('!', $host);
  5. $nick = $temp[0];
  6. unset($temp);
  7. $timestamp = time();
  8. $nickprefix = '';
  9. $query = $database->prepare("INSERT INTO log (channel, nick, host, message, type, timestamp, nickprefix) VALUES (:channel, :nick, :host, :message, :type, :time, '');");
  10. $query->bindParam(':channel', $channel);
  11. $query->bindParam(':nick', $nick);
  12. $query->bindParam(':host', $host);
  13. $query->bindParam(':message', $message);
  14. $query->bindParam(':type', $type);
  15. $query->bindParam(':time', $timestamp);
  16. $query->execute();
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement