You are not logged in!!!"; } else { $userid = $_SESSION['user_id']; $result = $sql->prepare("SELECT punches.id as punchid, users.id as user, punchtypes.id as typeid, punchtypes.punchname as type, punches.time as time, punches.notes as notes, punches.modified as modified FROM punches INNER JOIN users ON punches.userid = users.id INNER JOIN punchtypes ON punches.punchtypeid = punchtypes.id WHERE users.id = $userid ORDER BY punches.id DESC LIMIT 1"); $result->execute(); $last = $result->fetchObject(); echo "
You have been Punched $last->type since $last->time.
"; echo "Clicking the button below will immediately enter a new punch for you depending on your current status. Any notes you enter will be attached to the punch for your administrator to review.
"; echo ""; } //********** END CONTENT **********// require_once($yaptc_inc . "footer.inc.php"); ?>