]> Softwares of Agnibho - simpleipd.git/blob - lib/log.php
Bugfix
[simpleipd.git] / lib / log.php
1 <?php
2 class LG extends SQLite3 {
3 function __construct(){
4 $this->open(CONFIG_LOG);
5 }
6 function log($pid, $action, $data){
7 $stmt=$this->prepare("INSERT INTO log (pid, user, ip, action, time, data) VALUES (:pid, :user, :ip, :action, :time, :data)");
8 $stmt->bindValue(":pid", $pid);
9 $stmt->bindValue(":user", $_SESSION["user"]);
10 $stmt->bindValue(":ip", $_SERVER["REMOTE_ADDR"]);
11 $stmt->bindValue(":action", $action);
12 $stmt->bindValue(":time", time());
13 $stmt->bindValue(":data", $data);
14 $stmt->execute();
15 }
16 }
17 $log = new LG();
18 ?>