diff --git a/js/UpdateUserTable.js b/js/UpdateUserTable.js index 0dcc21d..0d470ca 100644 --- a/js/UpdateUserTable.js +++ b/js/UpdateUserTable.js @@ -1,11 +1,11 @@ /* - * 2022 Ivo Fernandes + * 2022-2023 Ivo Xavier * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 3. * - * utFoods is distributed in the hope that it will be useful, + * kaltracker is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -16,14 +16,14 @@ function connectDB() { - return LocalStorage.openDatabaseSync("utFoods_db", "0.1", "utFoods_data", 2000000); + return LocalStorage.openDatabaseSync("kaltracker_db", "0.2", "keepsYourData", 2000000); } function updateWeight(newWeight){ var update_weight_statement = 'UPDATE user \ SET weight = new_weight \ - WHERE user.id == id_login'.replace("new_weight",newWeight).replace("id_login", app_settings.id_login) + WHERE user.id == id_login'.replace("new_weight",newWeight).replace("id_login", 1) var db = connectDB(); var rs; @@ -31,14 +31,14 @@ function updateWeight(newWeight){ rs = tx.executeSql(update_weight_statement); } ); - return console.log("New weight defined") + } function updateAge(newAge){ var update_age_statement = 'UPDATE user \ SET age = newAge \ - WHERE user.id == id_login'.replace("newAge",newAge).replace("id_login", app_settings.id_login) + WHERE user.id == id_login'.replace("newAge",newAge).replace("id_login", 1) var db = connectDB(); var rs; @@ -46,7 +46,7 @@ function updateAge(newAge){ rs = tx.executeSql(update_age_statement); } ); - return console.log("New age defined") + } @@ -55,7 +55,7 @@ function updateAge(newAge){ var update_height_statement = 'UPDATE user \ SET height = new_height \ - WHERE user.id == id_login'.replace("new_height",newHeight).replace("id_login", app_settings.id_login) + WHERE user.id == id_login'.replace("new_height",newHeight).replace("id_login", 1) var db = connectDB(); var rs; @@ -63,7 +63,7 @@ function updateAge(newAge){ rs = tx.executeSql(update_height_statement); } ); - return console.log("New height defined") + } @@ -71,7 +71,7 @@ function updateAge(newAge){ var update_goal_statement = 'UPDATE user \ SET rec_cal = new_goal \ - WHERE user.id == id_login'.replace("new_goal",newGoal).replace("id_login", app_settings.id_login) + WHERE user.id == id_login'.replace("new_goal",newGoal).replace("id_login", 1) var db = connectDB(); var rs; @@ -79,14 +79,14 @@ function updateAge(newAge){ rs = tx.executeSql(update_goal_statement); } ); - return console.log("New goal defined") + } function updateActivity(newActivity){ var update_activity_statement = 'UPDATE user \ SET activity = new_activity \ - WHERE user.id == id_login'.replace("new_activity",newActivity).replace("id_login", app_settings.id_login) + WHERE user.id == id_login'.replace("new_activity",newActivity).replace("id_login", 1) var db = connectDB(); var rs; @@ -94,7 +94,7 @@ function updateAge(newAge){ rs = tx.executeSql(update_activity_statement); } ); - return console.log("New activity defined") + } @@ -102,7 +102,7 @@ function updateAge(newAge){ var update_ap_hi_statement = 'UPDATE user \ SET ap_hi = new_aphi \ - WHERE user.id == id_login'.replace("new_aphi",ap_hi).replace("id_login", app_settings.id_login) + WHERE user.id == id_login'.replace("new_aphi",ap_hi).replace("id_login", 1) var db = connectDB(); var rs; @@ -110,14 +110,14 @@ function updateAge(newAge){ rs = tx.executeSql(update_ap_hi_statement); } ); - return console.log("ap_hi defined") + } function updateApLo(ap_lo){ var update_ap_lo_statement = 'UPDATE user \ SET ap_lo = new_aplo \ - WHERE user.id == id_login'.replace("new_aplo",ap_lo).replace("id_login", app_settings.id_login) + WHERE user.id == id_login'.replace("new_aplo",ap_lo).replace("id_login", 1) var db = connectDB(); var rs; @@ -125,5 +125,5 @@ function updateAge(newAge){ rs = tx.executeSql(update_ap_lo_statement); } ); - return console.log("ap_lo defined") - } \ No newline at end of file + + } diff --git a/po/kaltracker.ivoxavier.pot b/po/kaltracker.ivoxavier.pot index 0db154f..5ad1d58 100644 --- a/po/kaltracker.ivoxavier.pot +++ b/po/kaltracker.ivoxavier.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: kaltracker.ivoxavier\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-02-09 11:37+0000\n" +"POT-Creation-Date: 2023-02-09 11:50+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"