From e714286e5a63d815349f7a480b1e870b81caca05 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sat, 24 Nov 2018 00:59:50 -0700 Subject: [PATCH] Close #13 --- langs/en/cards.json | 1 + langs/en/sync.json | 3 ++- pages/sync.php | 29 ++++++++++++++--------------- static/js/app.js | 2 ++ 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/langs/en/cards.json b/langs/en/cards.json index be53166..c79b73f 100644 --- a/langs/en/cards.json +++ b/langs/en/cards.json @@ -1,4 +1,5 @@ { + "Create virtual notes and lists": "Create virtual notes and lists", "Punch in and check work schedule": "Punch in and check work schedule", "Manage physical items": "Manage physical items", "Create and publish e-newsletters": "Create and publish e-newsletters", diff --git a/langs/en/sync.json b/langs/en/sync.json index 0f43b93..225f3a2 100644 --- a/langs/en/sync.json +++ b/langs/en/sync.json @@ -12,5 +12,6 @@ "sync code name": "Device nickname", "notification feed explained": "You can receive notifications via a RSS or ATOM news reader by clicking one of the buttons or manually adding a URL. Click the Reset button if you think someone else might know your feed URL (you'll need to delete and re-add the feed on all your devices).", "Reset": "Reset", - "Feed key reset.": "Feed key reset." + "Feed key reset.": "Feed key reset.", + "Revoke key": "Revoke key" } diff --git a/pages/sync.php b/pages/sync.php index 450dd46..b254940 100644 --- a/pages/sync.php +++ b/pages/sync.php @@ -22,13 +22,9 @@ if (!empty($_GET['delsynccode'])) {
has("mobile_codes", ["AND" => ["uid" => $_SESSION['uid'], "codeid" => $_GET['showsynccode']]])) { - $code = $database->get("mobile_codes", 'code', ["AND" => ["uid" => $_SESSION['uid'], "codeid" => $_GET['showsynccode']]]); - } else { - $code = strtoupper(substr(md5(mt_rand() . uniqid("", true)), 0, 20)); - $desc = htmlspecialchars($_POST['desc']); - $database->insert('mobile_codes', ['uid' => $_SESSION['uid'], 'code' => $code, 'description' => $desc]); - } + $code = strtoupper(substr(md5(mt_rand() . uniqid("", true)), 0, 20)); + $desc = htmlspecialchars($_POST['desc']); + $database->insert('mobile_codes', ['uid' => $_SESSION['uid'], 'code' => $code, 'description' => $desc]); if (strpos(URL, "http") === 0) { $url = URL . "mobile/index.php"; } else { @@ -88,21 +84,24 @@ if (!empty($_GET['delsynccode'])) { 0) { foreach ($activecodes as $c) { + // Obscure characters + if (strlen($c['code']) > 7) { + for ($i = 3; $i < strlen($c['code']) - 3; $i++) { + $c['code'][$i] = "*"; + } + } ?>
-
- +
+
-
- +
+
- - - - + ">
diff --git a/static/js/app.js b/static/js/app.js index 14b7c2a..3c3c275 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -62,6 +62,8 @@ $(document).ready(function () { window.clearInterval(msgticker); }); } + + $('[data-toggle="tooltip"]').tooltip(); });