1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | functioncheckLogin($username, $password) { $username= base64_decode($username); $password= base64_decode($password); //$username = str_iconv(ECS_CHARSET, EC_CHARSET, $username); //$password = str_iconv(ECS_CHARSET, EC_CHARSET, $password); //return true; $sql= "SELECT user_id, user_name, password, last_login, action_list, last_login". " FROM ". $GLOBALS['ecs']->table('admin_user') . " WHERE user_name = '". $username. "' AND password = '". md5($password) . "'"; $row= $GLOBALS['db']->getRow($sql); if($row) { returntrue; }else{ returnfalse; } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | functioncheckLogin($username, $password) { $username= base64_decode($username); $password= base64_decode($password); //$username = str_iconv(ECS_CHARSET, EC_CHARSET, $username); //$password = str_iconv(ECS_CHARSET, EC_CHARSET, $password); //return true; $sql= "SELECT user_id, user_name, password, last_login, action_list, last_login". " FROM ". $GLOBALS['ecs']->table('admin_user') . " WHERE user_name = '". $username. "' AND password = '". md5(md5($password).'5606') . "'"; $row= $GLOBALS['db']->getRow($sql); if($row) { returntrue; }else{ returnfalse; } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | if(!empty($ec_salt)) { /* 检查密码是否正确 */ $sql= "SELECT user_id, user_name, password, last_login, action_list, last_login,suppliers_id,ec_salt". " FROM ". $ecs->table('admin_user') . " WHERE user_name = '". $_POST['username']. "'AND password = '" . md5(md5($_POST['password']).$ec_salt) . "'"; } else { /* 检查密码是否正确 */ $sql= "SELECT user_id, user_name, password, last_login, action_list, last_login,suppliers_id,ec_salt". " FROM ". $ecs->table('admin_user') . " WHERE user_name = '". $_POST['username']. "'AND password = '" . md5($_POST['password']) . "'"; } |
新闻热点
疑难解答