/var/www/hkosl.com/b2b2c/webadmin/ajax_passwordChecker.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
    
require_once "check_login.php";
    require_once 
"function_auth.php";
//var_dump($_REQUEST);

    
if ($_REQUEST['fld']) {
        
$fld_password $_REQUEST['fld'];
    }

    
$status Password::strength($_REQUEST[$fld_password], $_REQUEST['username'], $msg);

    if (
$_REQUEST['allowEmpty'] == "true" && $_REQUEST[$fld_password] == '') {
        
$status true;
    }

    if (isset(
$_REQUEST['type']) && $_REQUEST['type'] == 'JSON') {
        print 
json_encode(array('strength' => $status'msg' => $msg));
        exit;
    } else {
        if (
$status) {
            print 
"true";
            exit;
        } else {
            print 
json_encode($msg);
            
//print "false";
            
exit;
        }
    }