Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aa2e02beac | |||
| a74010325f | |||
| e9e2b81cf0 | |||
| b3ae073d01 | |||
| 92c069d852 | |||
| 4b1b65b38b | |||
| 5d9fe2757d | |||
| f9648cd682 | |||
| 6893788bd2 | |||
| e96358d652 | |||
| ca530ec17c | |||
| 0923f5e0e0 | |||
| c830d3f90c | |||
| b3185f966c | |||
| 420873584e | |||
| f69ef32f84 | |||
| cc58529145 | |||
| 29180b036c | |||
| 8b2bc5229b |
@ -2,8 +2,8 @@
|
||||
if(preg_match("/libdefine.php/i", $_SERVER['PHP_SELF'])){header("location: index.php");die;}
|
||||
// ==== My SERVER CONFIG
|
||||
DEFINE("DB_HCM","dbhcm");
|
||||
// DEFINE("DB_HOST_NAME","localhost");
|
||||
DEFINE("DB_HOST_NAME","192.168.1.4");
|
||||
DEFINE("DB_HOST_NAME","localhost");
|
||||
// DEFINE("DB_HOST_NAME","192.168.1.4");
|
||||
// DEFINE("DB_USER_NAME","antrian");
|
||||
// DEFINE("DB_USER_NAME","appproject");
|
||||
DEFINE("DB_USER_NAME","apphcm");
|
||||
|
||||
2659
dbhcm_20250625.sql
2659
dbhcm_20250625.sql
File diff suppressed because one or more lines are too long
0
fixingcheckinlate.php
Normal file → Executable file
0
fixingcheckinlate.php
Normal file → Executable file
0
fixingcheckout.php
Normal file → Executable file
0
fixingcheckout.php
Normal file → Executable file
0
fixingcheckoutbydate.php
Normal file → Executable file
0
fixingcheckoutbydate.php
Normal file → Executable file
0
fixingr2late.php
Normal file → Executable file
0
fixingr2late.php
Normal file → Executable file
0
getattsync.php
Normal file → Executable file
0
getattsync.php
Normal file → Executable file
0
getattsync2.php
Normal file → Executable file
0
getattsync2.php
Normal file → Executable file
0
getattsyncbydate.php
Normal file → Executable file
0
getattsyncbydate.php
Normal file → Executable file
0
getdatadevices.php
Normal file → Executable file
0
getdatadevices.php
Normal file → Executable file
0
getdatadevices2.php
Normal file → Executable file
0
getdatadevices2.php
Normal file → Executable file
0
getdatadevicesbydate.php
Normal file → Executable file
0
getdatadevicesbydate.php
Normal file → Executable file
10
getdatadevicesbyip.php
Normal file → Executable file
10
getdatadevicesbyip.php
Normal file → Executable file
@ -82,8 +82,8 @@ class LogController
|
||||
|
||||
public function index()
|
||||
{
|
||||
$ip = "192.168.100.76"; //$row['deviceip'];
|
||||
$qry="select * from tbl_deviceinfo where _idx=36 and isdeleted=0 order by _idx asc";
|
||||
$ip = "172.16.116.5"; //$row['deviceip'];
|
||||
$qry="select * from tbl_deviceinfo where isreprocess=1 and isdeleted=0 order by _idx asc";
|
||||
#echo $qry;
|
||||
$rs=$this->selectquerySP($qry);
|
||||
if($rs){
|
||||
@ -107,7 +107,7 @@ class LogController
|
||||
$data = [];
|
||||
foreach ($getData as $att) {
|
||||
// echo date("Y-m-d", strtotime($att['timestamp']));
|
||||
if (date("Y-m-d", strtotime($att['timestamp'])) == date("Y-m-d")) {
|
||||
if (date("Y-m-d", strtotime($att['timestamp'])) == date("Y-m-d",strtotime($rw['reprocessdate']))) {
|
||||
// $data[] = [
|
||||
// "idUser" => $att['id'],
|
||||
// "name" => isset($users[$att['id']]) ? $users[$att['id']]['name'] : $att['id'],
|
||||
@ -117,12 +117,12 @@ class LogController
|
||||
// "deviceIP" => $ip
|
||||
// ];
|
||||
// echo json_encode($att)."\n";
|
||||
$res=$this->fn_setattendance($att, $ip);
|
||||
// $res=$this->fn_setattendance($att, $ip);
|
||||
$reslog=$this->fn_setattendancelogs($att, $ip);
|
||||
$data[] = [
|
||||
"fingerid" => $att['id'],
|
||||
"time" => date("Y-m-d H:i:s", strtotime($att['timestamp'])),
|
||||
"status" => $res
|
||||
"status" => $reslog
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
14
getdatadevicesbylogs.php
Normal file → Executable file
14
getdatadevicesbylogs.php
Normal file → Executable file
@ -7,7 +7,7 @@ class LogController
|
||||
// $ppHCMTT#2024
|
||||
|
||||
public function fn_getconn(){
|
||||
$pdo = new PDO("mysql:host=192.168.1.4;dbname=dbhcm", "apphcm", "\$ppHCMTT#2024");
|
||||
$pdo = new PDO("mysql:host=localhost;dbname=dbhcm", "apphcm", "\$ppHCMTT#2024");
|
||||
return $pdo;
|
||||
}
|
||||
public function selectquerySP($sql){
|
||||
@ -719,10 +719,22 @@ class LogController
|
||||
$rtn=true;
|
||||
return $rtn;
|
||||
}
|
||||
|
||||
public function fn_idxdept(){
|
||||
|
||||
$qry="update tbl_attendanceemployee a, tbl_employee e set a.idxdept = e.idxdept
|
||||
where e._idx=a.idxemployee and a.idxdept=0";
|
||||
$this->executeSP($qry);
|
||||
$qry="update tbl_attendancelist a, tbl_employee e set a.idxdept = e.idxdept
|
||||
where e._idx=a.idxemployee and a.idxdept=0";
|
||||
$this->executeSP($qry);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
$cl = new LogController();
|
||||
$rtn =$cl->index();
|
||||
$rtn =$cl->fn_idxdept();
|
||||
|
||||
#if(isset($_REQUEST['isgetdata'])){
|
||||
# echo "indx";
|
||||
|
||||
4
getdatadevicesbylogsbydates.php
Normal file → Executable file
4
getdatadevicesbylogsbydates.php
Normal file → Executable file
@ -7,7 +7,7 @@ class LogController
|
||||
// $ppHCMTT#2024
|
||||
|
||||
public function fn_getconn(){
|
||||
$pdo = new PDO("mysql:host=192.168.1.4;dbname=dbhcm", "apphcm", "\$ppHCMTT#2024");
|
||||
$pdo = new PDO("mysql:host=localhost;dbname=dbhcm", "apphcm", "\$ppHCMTT#2024");
|
||||
return $pdo;
|
||||
}
|
||||
public function selectquerySP($sql){
|
||||
@ -78,7 +78,7 @@ class LogController
|
||||
$argv=$_SERVER['argv'];
|
||||
// echo $argv[1];return false;
|
||||
$qry="select * from tbl_attendancelogs
|
||||
where cast(dates as date)=cast('".$argv[1]."' as date) and isprocess=0
|
||||
where cast(dates as date)=cast('".$argv[1]."' as date)
|
||||
order by _idx asc";
|
||||
$rs=$this->selectquerySP($qry);
|
||||
if($rs){
|
||||
|
||||
Reference in New Issue
Block a user