From 17cc2e2909c607a8cad55a9ecf3012bd5a6463d5 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 11 Jan 2021 15:30:25 +0800 Subject: [PATCH] 1 --- webapp/controller/FriendController.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/webapp/controller/FriendController.class.php b/webapp/controller/FriendController.class.php index 1c470a0..a88aad8 100644 --- a/webapp/controller/FriendController.class.php +++ b/webapp/controller/FriendController.class.php @@ -38,7 +38,7 @@ class FriendController extends BaseAuthedController { public function selectUserInfo() { - $account_id = $_REQUEST['account_id']; + $target_id = $_REQUEST['target_id']; $conns = $this->getAllMysql(); if (!$conns) { phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家'); @@ -52,7 +52,7 @@ class FriendController extends BaseAuthedController { foreach ($conns as $conn) { $row = $conn->execQueryOne('SELECT accountid, user_name, avatar_url, game_times, win_times, kill_his, kills, harm_his, harm, integral, modify_time, alive_time, add_HP, head_kuang_id, max_integral, sex FROM user WHERE accountid=:account_id;', array( - ':account_id' => $account_id, + ':account_id' => $target_id, )); if ($row) { $flag = 1; @@ -60,7 +60,7 @@ class FriendController extends BaseAuthedController { $rowbags = $conn->execQuery('SELECT id, color_id FROM bag WHERE accountid=:account_id AND status=0;', array( - ':account_id' => $account_id, + ':account_id' => $target_id, )); if ($rowbags) { $flag = 1; @@ -68,11 +68,11 @@ class FriendController extends BaseAuthedController { $rowequip = $conn->execQueryOne('SELECT using_id FROM equip WHERE accountid=:account_id;', array( - ':account_id' => $account_id, + ':account_id' => $target_id, )); $rowlv = $conn->execQueryOne('SELECT using_id, lv FROM equip WHERE accountid=:account_id AND id=:id;', array( - ':account_id' => $account_id, + ':account_id' => $target_id, ':id' => $rowequip['using_id'] )); if ($rowequip || $rowlv) { @@ -98,7 +98,7 @@ class FriendController extends BaseAuthedController { } } $addreward = new classes\Addreward(); - $vip_level = $addreward->getVipLevel($account_id); + $vip_level = $addreward->getVipLevel($target_id); $avatar_url = $row['avatar_url']; } @@ -133,7 +133,7 @@ class FriendController extends BaseAuthedController { public function selectUser() { - $account_id = $_REQUEST['account_id']; + $target_id = $_REQUEST['target_id']; $conns = $this->getAllMysql(); if (!$conns) { phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家'); @@ -144,7 +144,7 @@ class FriendController extends BaseAuthedController { foreach ($conns as $conn) { $row = $conn->execQueryOne('SELECT user_name FROM user WHERE accountid=:account_id;', array( - ':account_id' => $account_id, + ':account_id' => $target_id, )); if ($row) { $flag = 1;