Changeset 2556464
- Timestamp:
- 06/30/2021 02:48:04 PM (5 years ago)
- Location:
- qr-code-login-admin
- Files:
-
- 15 added
- 3 edited
-
tags/1.0.2 (added)
-
tags/1.0.2/class (added)
-
tags/1.0.2/class/class.qrla.php (added)
-
tags/1.0.2/class/class.qrla_main.php (added)
-
tags/1.0.2/class/class.qrla_settings.php (added)
-
tags/1.0.2/class/class.qrla_users.php (added)
-
tags/1.0.2/images (added)
-
tags/1.0.2/images/qr_code_login_admin_icon.svg (added)
-
tags/1.0.2/js (added)
-
tags/1.0.2/js/qrcode.js (added)
-
tags/1.0.2/js/qrcode.min.js (added)
-
tags/1.0.2/qr-code-login-admin.php (added)
-
tags/1.0.2/readme.txt (added)
-
tags/1.0.2/templates (added)
-
tags/1.0.2/templates/qrla_settings.php (added)
-
trunk/class/class.qrla_users.php (modified) (6 diffs)
-
trunk/qr-code-login-admin.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
qr-code-login-admin/trunk/class/class.qrla_users.php
r2550639 r2556464 21 21 22 22 public function QRLA_show_camera_and_usb_optical_field() { 23 24 if ( wp_is_mobile() ) { 23 25 24 26 ?> 25 27 26 <script>27 function process()28 {29 var url = "" + document.getElementById("url").value;30 location.href = url;31 return false;32 }33 </script>34 28 <script> 35 29 function openQRCamera(node) { … … 53 47 } 54 48 </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 49 Open Camera <label class=qrcode-text-btn><input type=file accept="image/*" capture=environment onclick="return showQRIntro();" onchange="openQRCamera(this);" tabindex=-1></label> 65 50 66 51 <?php … … 72 57 input, label {vertical-align:middle} 73 58 .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:5 em; width:5em; cursor:pointer}59 .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:5.5em; width:5.5em; cursor:pointer} 75 60 .qrcode-text-btn > input[type=file] {position:absolute; overflow:hidden; width:1px; height:1px; opacity:0} 76 61 </style> … … 82 67 83 68 } 69 70 71 72 73 if ( !wp_is_mobile() ) { 74 75 ?> 76 <script> 77 function process() 78 { 79 var url = "" + document.getElementById("url").value; 80 location.href = url; 81 return false; 82 } 83 </script> 84 <form onSubmit="return process();"> 85 Scan Your QrCode<input type="text" name="url" id="url" placeholder="With Optical Scan USB" pattern="https?://.*" class=qrcode-text> 86 <p class="submit"> 87 <input type="submit" class="button button-primary button-large" value="GO NOW"> 88 </p> 89 </form> 90 <?php 91 } 92 } 93 84 94 85 95 public function QRLA_init(){ … … 93 103 94 104 $column['auto_qrcode_badge'] = __( 'Auto login Qrcode', 'automaticqrla' ); 105 $column['auto_qrcode_expired'] = __( 'Expired Qrcode', 'automaticqrla' ); 95 106 } 96 107 return $column; … … 116 127 $qrcodegenerated = $divqrcode . $this->get_qrcode_js($link,200,"qrcode"); 117 128 return $qrcodegenerated; 129 } 130 131 132 case 'auto_qrcode_expired' : 133 134 if ( ! $user_id || $user_id == get_current_user_id() ) { 135 136 $code_time = get_option( 'QRLA_time' ); 137 $time_limit = get_option( 'QRLA_time_limit' ); 138 $time_limit = $time_limit * 86400;//24h 139 $expiredtime = $code_time + $time_limit ; 140 $expired_datetime = date('Y-m-d H:i:s', $expiredtime); 141 $date_now = date('Y-m-d H:i:s', strtotime( 'now' )); 142 if( ( $code_time + $time_limit ) > strtotime( 'now' ) ){ 143 //return message will expire 144 return sprintf( '<div>Today is </div>'. $date_now . '<div>Your Qr Code will expire on </div>' . $expired_datetime ); 145 } 146 if( ( $code_time + $time_limit ) < strtotime( 'now' ) ){ 147 //return message has expire 148 return sprintf( '<div>Your Qr Code has expire on </div>'. $expired_datetime . '<div>If the wp cron is not restarted, deactive and active the plugin for restart </div>' . '<a href="' . admin_url( 'plugins.php' ) . '">' . __( 'by going here', 'automaticqrla' ) . '<div> and after, set the days! </div>' . '</a>' ); 149 } 118 150 } 119 break;151 //break; 120 152 default: 121 153 122 154 } 123 return $val;155 //return $val; 124 156 } 125 157 -
qr-code-login-admin/trunk/qr-code-login-admin.php
r2550639 r2556464 6 6 * Author: 4wpBari 7 7 * Author URI: www.4wp.it 8 * Version: 1.0. 18 * Version: 1.0.2 9 9 * Requires at least: 4.4 10 10 * License: GPLv2 … … 19 19 define( 'QRLA_REQUIRED_PHP_VERSION', '5.3' ); // because of get_called_class() 20 20 define( 'QRLA_REQUIRED_WP_VERSION', '3.1' ); // because of esc_textarea() 21 define( 'QRLA_VER', '1.0. 0' );21 define( 'QRLA_VER', '1.0.2' ); 22 22 define( 'QRLA_PATH', __FILE__ ); 23 23 define( 'QRLA_DIR', plugin_dir_path( __FILE__ ) ); -
qr-code-login-admin/trunk/readme.txt
r2550639 r2556464 7 7 Tested up to: 5.7.2 8 8 Requires PHP: 5.6 9 Stable tag: 1.0. 19 Stable tag: 1.0.2 10 10 License: GPLv2 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 31 31 Puoi accedere anche tramite pistola ottica qrcode usb 32 32 33 Newsss! Se avete necessità di offrire la scansione via web del qrcode, evitando di installare app di terze parti in quanto non si dispone della funzionalità in fotocamera 34 del qrcode, abbiamo rilasciato un plugin che permette di effettuare scansioni tramite la pagina web. 35 Basta semplicemente applicare lo shortcode su una vostra pagina e potete offrire un lettore di qrcode istantaneo 36 [Qui il link del repository](https://wordpress.org/plugins/qr-code-and-barcode-scanner-reader/) 37 33 38 == Installazione == 34 39 … … 49 54 == Changelog == 50 55 51 Nessuna 56 = 1.0.2 = 57 58 Inserita colonna con data di scadenza in base ai giorni impostati, affianco al qrcode. 59 Impostata visualizzazione in mobile per apertura fotocamera in login, impostata per desktop visualizzazione campo per lettori ottici in login. 60 52 61 53 62 = 1.0.1 =
Note: See TracChangeset
for help on using the changeset viewer.