kopia lustrzana https://github.com/DL7AD/pecanpico10
Added database destructor, fixed data range bug
rodzic
9e3c499fae
commit
88beea3acf
|
@ -5,12 +5,15 @@ class Database extends SQLite3 {
|
|||
private static $instance = null;
|
||||
|
||||
function __construct() {
|
||||
$this->open("/src/pecanpico10/decoder/decoder.sqlite");
|
||||
|
||||
$this->open("/var/www/dl7ad/pecanpico10/decoder/decoder.sqlite");
|
||||
if($this->lastErrorCode())
|
||||
echo $this->lastErrorMsg();
|
||||
}
|
||||
|
||||
function __destruct() {
|
||||
parent::close();
|
||||
}
|
||||
|
||||
static function getInstance() {
|
||||
if(self::$instance == null)
|
||||
self::$instance = new Database();
|
||||
|
@ -41,11 +44,3 @@ class Database extends SQLite3 {
|
|||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -17,9 +17,6 @@ if(array_key_exists('call', $_GET)) {
|
|||
}
|
||||
|
||||
$range = isset($_GET['range']) && is_numeric($_GET['range']) ? $_GET['range'] : 86400;
|
||||
|
||||
if($tel->rxtime < time() - $range)
|
||||
$range = time() - $tel->rxtime;
|
||||
?>
|
||||
<link href="style.css" rel="stylesheet" type="text/css">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
|
|
Ładowanie…
Reference in New Issue