Barcode Scanner: QRCode adjustment for an existing login
Budget: $10 – $30 USD
Hi,
I have the below code which is working with "Touch". When a user thouch the button then he is required to enter a PIN and then he is logged in. The same is also for logout.
Now I want to extend this login and logout precess with a QRCode.
Each user will receive his own QRCode and when the QRCode has been scanned then he can login or logout.
The entries are going to be inserted into mysq database.
I am using a hand Barcode-Scanner from aliexpress: https://de.aliexpress.com/item/1005004308697632.html?spm=a2g0o.order_list.order_list_main.5.d6ec5c5fxBk7Ab&gatewayAdapt=glo2deu
The below code is php code.
Plese consider to adjust this code "function ListOptions_Rendered()" the rest of application will not be touched.
// ListOptions Rendered event
function ListOptions_Rendered()
{
If ($this->Inhouse->CurrentValue == 0){
$this->ListOptions->Items["Eintritt"]->Body = "<a href=\"#\" onclick=\"return (window.prompt('Enter Your PIN')=='" . $this->Pin->CurrentValue . "'||alert('PIN Incorrect'))&&(alert('PIN Correct')||ew.submitAction
(event, {
action: 'Eintritt',
method: 'ajax',msg: 'Click OK to Login',
key: " . $this->KeyToJson(TRUE) . ", success: function() {document.location.reload(true)}}));\">
<i class='fas fa-play-circle fa-3x'></i></a>";
}
else{
$this->ListOptions->Items["Austritt"]->Body = "<a href=\"#\" onclick=\"return (window.prompt('Enter Your PIN')=='" . $this->Pin->CurrentValue . "'||alert('PIN Incorrect'))&&(alert('PIN Correct')||ew.submitAction
(event, {
action: 'Austritt',
method: 'ajax', msg: 'Click OK to Logout',
key: " . $this->KeyToJson(TRUE) . ", success: function() {document.location.reload(true)}}));\">
<i class='fas fa-stop-circle fa-3x'></i></a>";
}
}
I have the below code which is working with "Touch". When a user thouch the button then he is required to enter a PIN and then he is logged in. The same is also for logout.
Now I want to extend this login and logout precess with a QRCode.
Each user will receive his own QRCode and when the QRCode has been scanned then he can login or logout.
The entries are going to be inserted into mysq database.
I am using a hand Barcode-Scanner from aliexpress: https://de.aliexpress.com/item/1005004308697632.html?spm=a2g0o.order_list.order_list_main.5.d6ec5c5fxBk7Ab&gatewayAdapt=glo2deu
The below code is php code.
Plese consider to adjust this code "function ListOptions_Rendered()" the rest of application will not be touched.
// ListOptions Rendered event
function ListOptions_Rendered()
{
If ($this->Inhouse->CurrentValue == 0){
$this->ListOptions->Items["Eintritt"]->Body = "<a href=\"#\" onclick=\"return (window.prompt('Enter Your PIN')=='" . $this->Pin->CurrentValue . "'||alert('PIN Incorrect'))&&(alert('PIN Correct')||ew.submitAction
(event, {
action: 'Eintritt',
method: 'ajax',msg: 'Click OK to Login',
key: " . $this->KeyToJson(TRUE) . ", success: function() {document.location.reload(true)}}));\">
<i class='fas fa-play-circle fa-3x'></i></a>";
}
else{
$this->ListOptions->Items["Austritt"]->Body = "<a href=\"#\" onclick=\"return (window.prompt('Enter Your PIN')=='" . $this->Pin->CurrentValue . "'||alert('PIN Incorrect'))&&(alert('PIN Correct')||ew.submitAction
(event, {
action: 'Austritt',
method: 'ajax', msg: 'Click OK to Logout',
key: " . $this->KeyToJson(TRUE) . ", success: function() {document.location.reload(true)}}));\">
<i class='fas fa-stop-circle fa-3x'></i></a>";
}
}