From 91e11655d87d2c83bdc7117d753ce17b0cba3462 Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Sun, 24 Dec 2017 09:03:23 +0000 Subject: [PATCH] Closes #50 * works for Up, Down, Update * Close works when etherpad isn't open, otherwise scrolls to top --- include_header_shop.html | 75 ++++++++++++++++++++++++++++++++++------ shop_log_iframe.php | 20 +++++------ 2 files changed, 73 insertions(+), 22 deletions(-) diff --git a/include_header_shop.html b/include_header_shop.html index 0c1d656..513de29 100644 --- a/include_header_shop.html +++ b/include_header_shop.html @@ -19,7 +19,7 @@ function resetTimer() - + YBDB @@ -38,19 +38,74 @@ function resetTimer() diff --git a/shop_log_iframe.php b/shop_log_iframe.php index 5bf4e8d..420dd05 100644 --- a/shop_log_iframe.php +++ b/shop_log_iframe.php @@ -102,6 +102,7 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form_new") && ($_PO //Update Record isset($_POST["MM_update"]) if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "FormUpdate")) { + $updateSQL = sprintf("UPDATE shop_hours SET time_out=%s WHERE shop_visit_id=%s", GetSQLValueString($_POST['time_out'], "date"), GetSQLValueString($_POST['shop_visit_id'], "int")); @@ -115,6 +116,7 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "FormUpdate")) { } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "FormEdit")) { + $updateSQL = sprintf("UPDATE shop_hours SET contact_id=%s, shop_user_role=%s, project_id=%s, time_in=%s, time_out=%s, comment=%s WHERE shop_visit_id=%s", GetSQLValueString($_POST['contact_id'], "int"), GetSQLValueString($_POST['user_role'], "text"), @@ -235,18 +237,12 @@ if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "FormEdit")) { - - ';" /> - - ';"/> - ';" /> + + + + + + =$shop_id & (current_shop_by_ip()-5)<=$shop_id ) {