11-20-2016, 05:57 PM
Ok. I'm at a computer. I made a new userspice 4.1.8c install and made a file in the root folder called pizza.php
I created a new db table called clicks with 4 columns
id -int(11)
user_id -int(11)
username -varchar(255)
timein - datetime
I'm just going to make a simple checkin button that updates the db just to get you going. I tested this one and it works. I didn't use functions...I just made a form. I'm not sure what the 4 buttons are supposed to do, but this should definitely point you in the right direction. Again, for example purposes, this file goes in the root of your project and should be named pizza.php
http://hastebin.com/obayoriyat.xml
I created a new db table called clicks with 4 columns
id -int(11)
user_id -int(11)
username -varchar(255)
timein - datetime
I'm just going to make a simple checkin button that updates the db just to get you going. I tested this one and it works. I didn't use functions...I just made a form. I'm not sure what the 4 buttons are supposed to do, but this should definitely point you in the right direction. Again, for example purposes, this file goes in the root of your project and should be named pizza.php
http://hastebin.com/obayoriyat.xml


I now have it logging timestamps in two different tables (for logging purposes), as well as updating a boolean for being on break or not and displaying the users "on break" so that everyone can see who is actually on break. Thank you so much for helping lay the ground work for this, it's pretty damn cool and the more I play with it, the more I understand the $user->data() awesomeness.