summaryrefslogtreecommitdiffstats
path: root/public/index.php
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-04-13 13:33:26 +0300
committerFilipp Lepalaan <filipp@mac.com>2010-04-13 13:33:26 +0300
commit63822bacd44d964df3596f928f44a56ab5625d4f (patch)
tree2629dfc3af9e1b67fbc0b7efa8cf4913ab4b40a6 /public/index.php
parent6f2e6899cc404f314648782920e343c8529885d3 (diff)
downloadatwork-63822bacd44d964df3596f928f44a56ab5625d4f.tar.gz
atwork-63822bacd44d964df3596f928f44a56ab5625d4f.tar.bz2
atwork-63822bacd44d964df3596f928f44a56ab5625d4f.zip
Better everything
Diffstat (limited to 'public/index.php')
-rw-r--r--public/index.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/public/index.php b/public/index.php
index 2886540..8ca60a6 100644
--- a/public/index.php
+++ b/public/index.php
@@ -2,12 +2,15 @@
////
// atwork/index.php
+
require_once '../system/init.php';
if (!empty($_POST['date']))
{
$format = '%d-%02d-%02d %02d:%02d';
$date = explode('.', $_POST['date']);
+ // First we check if we insert or update
+
$sql = 'INSERT INTO atwork (user, start, finish) VALUES (?, ?, ?)';
$stmt = $db->prepare($sql);