Comments (13)
The state maybe difference each device. Normally, we don't need the state. The state of check in and check out can be determined from the sequence of attendance at certain time intervals. You should compare it with other attendance at that time span, for example employee shifts.
from zklibrary.
My best practice, I get the attendance data and I save it into the database. I create a event trigger on the table on insert. If there is no attendance of the user at the time span, so the attendance will be considered as check in, else the attendance will be considered as check out.
To get the real check out, select the last attendance of the user at the time span. But if the is only one attendance of the user at the time span, check out is not exist.
from zklibrary.
@kamshory hats off.Thank you sir...
from zklibrary.
sir can i take the break time??
from zklibrary.
I have any time.
Tell me what can I do.
from zklibrary.
hello
sir i mean can i take the break in /out for employee?
from zklibrary.
I live in Jakarta. How do we can talk?
from zklibrary.
from zklibrary.
@RahamSher were you able to differtentiate between check in and check out? If yes, then how?
from zklibrary.
The first check on the day is check in and the last check on the day is check out. So, at least user check twice in a day.
from zklibrary.
So is the checkin/checkout showing now?
from zklibrary.
sir i want to take the leave time from the machine and the overtime can i take this moves??
from zklibrary.
In the Zkteco MB360 the check in and check out value is in position 66 and they are 2 characters.
00: entry
01: output
04: intermediate entry
05: intermediate output
zkattendance.php in zkgetattendance($self) function
while ( strlen($attendancedata) > 40 ) {
$u = unpack( 'H78', substr( $attendancedata, 0, 39 ) );
//24s1s4s11s
//$uid = hexdec( substr( $u[1], 0, 6 ) );
//$uid = explode(chr(0), $uid);
//$uid = intval( $uid[0] );
/*$u1 = hexdec( substr($u[1], 4, 2) );
$u2 = hexdec( substr($u[1], 6, 2) );
$uid = $u1+($u2*256);*/
$uid = trim(substr( $attendancedata, 4, 14 ), "\x0");
$id = intval( str_replace("\0", '', hex2bin( substr($u[1], 6, 8) ) ) );
$state = hexdec( substr( $u[1], 56, 2 ) );
$timestamp = decode_time( hexdec( reverseHex( substr($u[1], 58, 8) ) ) );
$sentido =hexdec(substr($u[1], 66,2)); // <---------------- check in - check out
# Clean up some messy characters from the user name
#uid = unicode(uid.strip('\x00|\x01\x10x'), errors='ignore')
#uid = uid.split('\x00', 1)[0]
#print "%s, %s, %s" % (uid, state, decode_time( int( reverseHex( timestamp.encode('hex') ), 16 ) ) )
array_push( $attendance, array( $uid, $id, $sentido, $timestamp, $state ) ); // <-- modify
$attendancedata = substr( $attendancedata, 40 );
}`
from zklibrary.
Related Issues (20)
- setTime() method not working as intended for me. HOT 1
- Clear Attendance Record
- How can I connect a devices with communication key (password protected devices)
- Can't connect to device with WiFi/WLAN connection
- Unable to connect to ZkTeco 4500 HOT 2
- X302-S
- How to connect with communication key / password HOT 1
- clearAttendance() HOT 4
- github provide the code for attendence machine but data not comes HOT 2
- G4 ZKTECO
- i cant push data to device (setUserTemplate )
- Webserver HOT 3
- save attendance in database HOT 2
- MB360 HOT 3
- Time out
- Disconnect function message
- Update user's attendance date/time.
- Check in/Check out
- Can not get attendance with running apache2 on Ubuntu HOT 1
- how to connect to codeigniter, please how
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zklibrary.