| Server IP : 127.0.0.1 / Your IP : 192.168.99.1 Web Server : Apache/2.4.35 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9 System : Windows NT WIN-JEJMB9EN0L0 10.0 build 14393 (Windows Server 2016) AMD64 User : Administrator ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/wamp/www/sipapbd_xxxx/application/modules/auth/controllers/ |
Upload File : |
<?php
require_once(BASEPATH.'../assets/libSSE/libsse.php');
include(APPPATH.'config/database.php');
class TimeEventChild extends SSEEvent {
public $id;
public $modul;
public $database;
public $username;
public $password;
public function update(){
$res = ibase_connect($this->database,$this->username,$this->password) or die("" . ibase_errmsg());
$sth = ibase_query($res, "SELECT * FROM LOCKING where ID='".$this->id."' AND MODUL='".$this->modul."' ") or die(ibase_errmsg());
while ($row = ibase_fetch_object($sth)) {
$hh = $row->LAST_CHANGED."/".$row->STATUS."/".$row->USERNAME;
}
ibase_close($res);
return $hh;
}
}
//inisialisasi class libSSE
$sse = new SSE();
$sse->exec_limit=300;
$sse->sleep_time=2;
$chl = new TimeEventChild();
$chl->id=$_GET['id'];
$chl->modul=$_GET['modul'];
$chl->database=$db['default']['hostname'].':'.$db['default']['database'];
$chl->username=$db['default']['username'];
$chl->password=$db['default']['password'];
$sse->addEventListener('form',$chl);
$sse->start();