Changeset 2550639
- Timestamp:
- 06/18/2021 10:40:53 PM (5 years ago)
- Location:
- qr-code-login-admin/trunk
- Files:
-
- 2 added
- 3 edited
-
class/class.qrla_users.php (modified) (1 diff)
-
images (added)
-
images/qr_code_login_admin_icon.svg (added)
-
qr-code-login-admin.php (modified) (1 diff)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
qr-code-login-admin/trunk/class/class.qrla_users.php
r2550499 r2550639 17 17 add_filter( 'manage_users_columns', array( $this, 'QRLA_manage_users_columns' ) ); 18 18 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') ); 19 20 } 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 } 20 84 21 85 public function QRLA_init(){ -
qr-code-login-admin/trunk/qr-code-login-admin.php
r2550499 r2550639 6 6 * Author: 4wpBari 7 7 * Author URI: www.4wp.it 8 * Version: 1.0. 08 * Version: 1.0.1 9 9 * Requires at least: 4.4 10 10 * License: GPLv2 -
qr-code-login-admin/trunk/readme.txt
r2550499 r2550639 7 7 Tested up to: 5.7.2 8 8 Requires PHP: 5.6 9 Stable tag: 1.0. 09 Stable tag: 1.0.1 10 10 License: GPLv2 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 28 28 Chiunque disponga del collegamento di accesso avrà diritto ad accedere all'account fino alla scadenza del qr code. 29 29 30 Puoi accedere tramite qrcode tramite il tuo smartphone (se abilitato in fotocamera) , oppure installando applicazioni terze che permettono la lettura 31 Puoi accedere anche tramite pistola ottica qrcode usb 32 30 33 == Installazione == 31 34 … … 42 45 1. Qr Code nella lista utenti 43 46 2. Come impostare la scadenza 47 3. Apertura fotocamera Smartphone e Campo per Lettore Ottico QrCode USB 44 48 45 49 == Changelog == … … 47 51 Nessuna 48 52 49 = 1.0 = 53 = 1.0.1 = 54 55 Inserito Campo per Lettore Usb ottico in Login Admin 56 Inserito tasto per apertura fotocamera smartphone, nel caso si ha lo smartphone con il qrcode incorporato 57 58 = 1.0.0 = 50 59 51 60 Versione iniziale
Note: See TracChangeset
for help on using the changeset viewer.