因D版都是使用老的接口,无法应用于新版ecshop系统。
只需更新一个文件即可。ecsservice.php
修改 checkLogin 函数:
function checkLogin($username, $password) { $username = base64_decode($username); $password = base64_decode($password); //return true; // 增加的如下部分 by UUECS QQ909065309 $sql_uuecs="SELECT `ec_salt` FROM". $GLOBALS['ecs']->table('admin_user') ." WHERE user_name = '" . $username ."'"; $ec_salt =$GLOBALS['db']->getOne($sql_uuecs); // 修改如下部分 $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).$ec_salt)."'"; $row = $GLOBALS['db']->getRow($sql); if ($row) { return true; }else{ return false; }