mirror of
https://github.com/sigmasternchen/webcli
synced 2025-03-15 06:08:54 +00:00
some new methods for logging
This commit is contained in:
parent
4e6b5362ce
commit
7bc9de66ad
1 changed files with 12 additions and 0 deletions
|
@ -35,5 +35,17 @@
|
||||||
return -1;
|
return -1;
|
||||||
return $result->fetch_object()->ID;
|
return $result->fetch_object()->ID;
|
||||||
}
|
}
|
||||||
|
static public function login($uid, $session, $success) {
|
||||||
|
global $db;
|
||||||
|
$db->query("INSERT INTO `logLogins` (`currentUserFK`, `newUserFK`, `connectFK`, `time`, `success`) VALUES (" . $session['uid'] . ", " . $uid . ", " . actionLogger::getConnectFK($session) . ", " . time() . ", " . $success . ")");
|
||||||
|
}
|
||||||
|
static public function command($session, $command) {
|
||||||
|
global $db;
|
||||||
|
$db->query("INSERT INTO `logCommands`(`time`, `connectFK`, `userFK`, `command`) VALUES (" . time() . ", " . actionLogger::getConnectFK($session) . ", " . $session['uid'] . ", '" . $db->real_escape_string($command) . "')");
|
||||||
|
}
|
||||||
|
static public function init($session) {
|
||||||
|
global $db;
|
||||||
|
$db->query("INSERT INTO `logInits`(`userFK`, `connectFK`, `time`) VALUES (" . $session['uid'] . ", " . actionLogger::getConnectFK($session) . ", " . time() . ")");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue