Closed junaidranjha closed 6 years ago
Dear @junaidranjha I get all the data by calling this function $zk->getAttendance().It return data without any issue.My problem is that I want the attendance of a specific user.Kindly guide if you have the key.
@suryacaprice & @junaidranjha I have the data but please guide me that how i differentiate check in and check out of a user,please I am stuck over here.
Two things to do 👍 1) go to zklib->zkattendance.php and function zkgetattendance() replace this line $state = hexdec( substr( $u[1], 56, 2 ) ); with this one $state = hexdec( reverseHex(substr( $u[1], 66, 2 )) );
2) zktest.php Replace this code while(list($idx, $attendancedata) = each($attendance)): if ( $attendancedata[2] == 14 ) $status = 'Check Out'; else $status = 'Check In';
With this code if ( $attendancedata[2] == 1 ) $status = 'Check Out'; else $status = 'Check In';
And you done !!!
Dear @send2dawood thank you for sharing your great idea.:+1:
@RahamSher , does it work on your part? because still it doesnt work in my code.
@effiehubahib it works for me.Thank you sir @send2dawood
sir @send2dawood actually I have a very big amount of data which take much time but I want to get the data of a specific date.How it would be possible.Kindly guide please.
It's better you take a DB dump in case of size, the machine uses an SQLite DB and then process it on your system.
my device is connected i can get user data and attendance data but problem is i am not able to get attendance of last whole month its like if i am accessing getattendance() it returns data from last months 31st uptill now while i want it to get all the data.