summaryrefslogtreecommitdiffstats
path: root/src/web
diff options
context:
space:
mode:
authorJohannes Rudolph <johannes.rudolph@gmx.com>2018-02-12 23:16:11 +0100
committerSebastian Reichel <sre@ring0.de>2018-06-28 01:53:40 +0200
commitc70d626e473c8cbdbd87125a256ca221c0c3fa23 (patch)
treeb865181b45bbe4a6beba7e8045ec9d98d18d9b41 /src/web
parent764c39f4facfe42d926cd952dcf0f7e2768097a8 (diff)
downloadserial-barcode-scanner-c70d626e473c8cbdbd87125a256ca221c0c3fa23.tar.bz2
Add RFID support
Diffstat (limited to 'src/web')
-rw-r--r--src/web/csv.vala10
-rw-r--r--src/web/web.vala1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/web/csv.vala b/src/web/csv.vala
index 299af8d..5d4daba 100644
--- a/src/web/csv.vala
+++ b/src/web/csv.vala
@@ -1,4 +1,5 @@
/* Copyright 2012, Sebastian Reichel <sre@ring0.de>
+ * Copyright 2017-2018, Johannes Rudolph <johannes.rudolph@gmx.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -66,6 +67,15 @@ public class CSVMemberFile {
m.pgp = csv_value(linedata[9]);
m.hidden = int.parse(csv_value(linedata[10])) != 0;
m.disabled = int.parse(csv_value(linedata[11])) != 0;
+ string[] rfid = {};
+ if(csv_value(linedata[12]) != "")
+ rfid += csv_value(linedata[12]);
+ if(csv_value(linedata[13]) != "")
+ rfid += csv_value(linedata[13]);
+ if(csv_value(linedata[14]) != "")
+ rfid += csv_value(linedata[14]);
+ m.rfid = rfid;
+
m.soundTheme = "";
if(csv_value(linedata[0]) != "EXTERNEMITGLIEDSNUMMER")
members += m;
diff --git a/src/web/web.vala b/src/web/web.vala
index 37e6edc..f4207ad 100644
--- a/src/web/web.vala
+++ b/src/web/web.vala
@@ -351,6 +351,7 @@ public class WebServer {
t.replace("PGPKEYID", userinfo.pgp);
t.replace("DISABLED", userinfo.disabled ? "true" : "false");
t.replace("HIDDEN", userinfo.hidden ? "true" : "false");
+ t.replace("RFID", string.joinv("<br>",userinfo.rfid));
var userauth = db.get_user_auth(id);
t.replace("ISSUPERUSER", userauth.superuser ? "true" : "false");