diff --git a/includes/functions.inc.php b/includes/functions.inc.php index 7b6f2b1..9d1647a 100755 --- a/includes/functions.inc.php +++ b/includes/functions.inc.php @@ -33,6 +33,27 @@ function killSession() +// Edit Punch +function editPunch($yaptc_db, $punchid, $intime, $outtime, $notes) +{ +$stmt = $yaptc_db->prepare("UPDATE punches SET punches.intime = :intime, punches.outtime = :outtime, punches.notes = :notes WHERE punches.id = :punchid;"); +$stmt->execute(array( + ':punchid' => $punchid, + ':intime' => $intime, + ':outtime' => $outtime, + ':notes' => $notes + )); +} +// Delete Punch +function deletePunch($yaptc_db, $punchid) +{ +$stmt = $yaptc_db->prepare("DELETE FROM punches WHERE punches.id = :punchid;"); +$stmt->execute(array( + ':punchid' => $punchid + )); +} + + // Punch Out function punchOut($yaptc_db, $punchid, $notes, $outtime, $modified=NULL) { diff --git a/manualpunch.php b/manualpunch.php index c2aa48c..053c53f 100755 --- a/manualpunch.php +++ b/manualpunch.php @@ -13,7 +13,7 @@ else: ?> " . $status . " since " . $statustime . ""; ?> +echo "
Edit existing punches for users if needed.
+In/Out | Name | Hours | Flag | Notes | Action |
---|---|---|---|---|---|