Plugin Directory

Changeset 2550639


Ignore:
Timestamp:
06/18/2021 10:40:53 PM (5 years ago)
Author:
4wpbari
Message:

Update v 1.0.1

Location:
qr-code-login-admin/trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • qr-code-login-admin/trunk/class/class.qrla_users.php

    r2550499 r2550639  
    1717            add_filter( 'manage_users_columns', array( $this, 'QRLA_manage_users_columns' ) );
    1818            add_filter( 'manage_users_custom_column', array( $this, 'QRLA_manage_users_custom_column' ), 10, 3 );
     19            add_filter( 'login_message', array( $this, 'QRLA_show_camera_and_usb_optical_field') );
    1920        }
     21       
     22        public function QRLA_show_camera_and_usb_optical_field() {
     23
     24        ?>
     25
     26        <script>
     27        function process()
     28        {
     29        var url = "" + document.getElementById("url").value;
     30        location.href = url;
     31        return false;
     32        }
     33        </script>
     34        <script>
     35        function openQRCamera(node) {
     36        var reader = new FileReader();
     37        reader.onload = function() {
     38        node.value = "";
     39        qrcode.callback = function(res) {
     40        if(res instanceof Error) {
     41        alert("No QR code found. Please make sure the QR code is within the camera's frame and try again.");
     42        } else {
     43        node.parentNode.previousElementSibling.value = res;
     44        }
     45        };
     46        qrcode.decode(reader.result);
     47        };
     48        reader.readAsDataURL(node.files[0]);
     49        }
     50
     51        function showQRIntro() {
     52        return confirm("Use your camera if your smartphone have a QR code function.");
     53        }
     54        </script>
     55        <form onSubmit="return process();">
     56        Open Camera<label class=qrcode-text-btn><input type=file accept="image/*" capture=environment onclick="return showQRIntro();" onchange="openQRCamera(this);" tabindex=-1></label>
     57        <p style="text-align: center;"><strong>or</strong></p>
     58        Scan Your QrCode<input type="text" name="url" id="url" placeholder="With Optical Scan USB" pattern="https?://.*" class=qrcode-text>
     59        <p class="submit">
     60        <input type="submit" class="button button-primary button-large" value="GO NOW">
     61        </p>
     62        </form>
     63
     64
     65
     66        <?php
     67   
     68        $stylecss = '
     69        <style>
     70
     71        body, input {font-size:14pt}
     72        input, label {vertical-align:middle}
     73        .qrcode-text {padding-right:1.7em; margin-right:0}
     74        .qrcode-text-btn {display:inline-block; background:url(/wp-content/plugins/qr-code-login-admin/images/qr_code_login_admin_icon.svg) 50% 50% no-repeat; height:5em; width:5em; cursor:pointer}
     75        .qrcode-text-btn > input[type=file] {position:absolute; overflow:hidden; width:1px; height:1px; opacity:0}
     76        </style>
     77   
     78        ';
     79   
     80        echo $stylecss;
     81
     82
     83        }
    2084
    2185        public function QRLA_init(){
  • qr-code-login-admin/trunk/qr-code-login-admin.php

    r2550499 r2550639  
    66 * Author: 4wpBari
    77 * Author URI: www.4wp.it
    8  * Version: 1.0.0
     8 * Version: 1.0.1
    99 * Requires at least: 4.4
    1010 * License: GPLv2
  • qr-code-login-admin/trunk/readme.txt

    r2550499 r2550639  
    77Tested up to: 5.7.2
    88Requires PHP: 5.6
    9 Stable tag: 1.0.0
     9Stable tag: 1.0.1
    1010License: GPLv2
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2828Chiunque disponga del collegamento di accesso avrà diritto ad accedere all'account fino alla scadenza del qr code.
    2929
     30Puoi accedere tramite qrcode tramite il tuo smartphone (se abilitato in fotocamera) , oppure installando applicazioni terze che permettono la lettura
     31Puoi accedere anche tramite pistola ottica qrcode usb
     32
    3033== Installazione ==
    3134
     
    42451. Qr Code nella lista utenti
    43462. Come impostare la scadenza
     473. Apertura fotocamera Smartphone e Campo per Lettore Ottico QrCode USB
    4448
    4549== Changelog ==
     
    4751Nessuna
    4852
    49 = 1.0 =
     53= 1.0.1 =
     54
     55Inserito Campo per Lettore Usb ottico in Login Admin
     56Inserito tasto per apertura fotocamera smartphone, nel caso si ha lo smartphone con il qrcode incorporato
     57
     58= 1.0.0 =
    5059
    5160Versione iniziale
Note: See TracChangeset for help on using the changeset viewer.