2017-05-27 19:32:12 -06:00
|
|
|
<?php
|
|
|
|
|
2017-12-16 13:54:00 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
|
2017-05-27 19:32:12 -06:00
|
|
|
require_once __DIR__ . "/../required.php";
|
2017-06-17 00:33:28 -06:00
|
|
|
require_once __DIR__ . "/iputils.php";
|
2017-05-27 19:32:12 -06:00
|
|
|
|
|
|
|
dieifnotloggedin();
|
|
|
|
|
|
|
|
function insertAuthLog($type, $uid = null, $data = "") {
|
|
|
|
global $database;
|
|
|
|
// find IP address
|
2017-06-17 00:33:28 -06:00
|
|
|
$ip = getClientIP();
|
2017-05-27 19:32:12 -06:00
|
|
|
$database->insert("authlog", ['logtime' => date("Y-m-d H:i:s"), 'logtype' => $type, 'uid' => $uid, 'ip' => $ip, 'otherdata' => $data]);
|
|
|
|
}
|