PHP Code:
function onPlayerLogout(pl) {
pl.clientr.seenlast = timevar2;
// HMM, BACKUP IN CASE ABOVE FAILS?
This will always fail. The player object given is read-only at this point.
Also, why are you creating the player object even if the player is online? o.o