Fixed index
This commit is contained in:
parent
65204a6c59
commit
769f6b16c3
23
index.php
23
index.php
@ -39,19 +39,22 @@ if (!isset($session_punch['0']['intime'])): $status = "Out"; ?>
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$punchtime = $timenow . ':00';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$punchtime = date('Y-m-d H:i:s');
|
||||||
if (!empty($_POST)):
|
if (!empty($_POST)):
|
||||||
if (isset($_POST['notes'])):
|
if (!empty($_POST['notes'])): $notes = $_POST['notes']; else: $notes = NULL; endif;
|
||||||
if (!empty($_POST['notes'])): $notes = $_POST['notes'];
|
if ($status == "In"): punchOut($yaptc_db, $punchid, $notes, $punchtime, NULL);
|
||||||
else: $notes = NULL;
|
elseif ($status == "Out"): punchIn($yaptc_db, $_SESSION['user_id'], $notes, $punchtime, NULL);
|
||||||
endif;
|
|
||||||
else: $notes = NULL;
|
|
||||||
endif;
|
|
||||||
if ($status == "In"): punchOut($yaptc_db, $punchid, $notes, $punchtime, 0);
|
|
||||||
elseif ($status == "Out"): punchIn($yaptc_db, $_SESSION['user_id'], $notes, $punchtime, 0);
|
|
||||||
endif;
|
endif;
|
||||||
header('Location: ' . $_SERVER['PHP_SELF']);
|
header('Location: ' . $_SERVER['PHP_SELF']);
|
||||||
endif; ?>
|
endif;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user