Update web view
This commit is contained in:
		| @@ -47,9 +47,9 @@ class User | |||||||
|  |  | ||||||
|     function IsAccountBlocked($id) |     function IsAccountBlocked($id) | ||||||
|     { |     { | ||||||
|         foreach($this->accounts as $i => $ac)  |         foreach($this->accounts as $i => $account)  | ||||||
|             if ($ac->id == $id) |             if ($account["id"] == "$id") | ||||||
|                 return $ac["blocked"] == "1"; |                 return $account["blocked"] == "1"; | ||||||
|  |  | ||||||
|         return false; |         return false; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -107,15 +107,12 @@ while($operation = $operations->fetchArray()) | |||||||
|     if ($date <= $cur_date) |     if ($date <= $cur_date) | ||||||
|         $accounts[$operation["account"]]["cur"] += $operation["amount"]; |         $accounts[$operation["account"]]["cur"] += $operation["amount"]; | ||||||
|  |  | ||||||
|     if ($operation["transfert"] != "" && ($operation["amount"] < 0   |     if (!($operation["transfert"] == "" || ($operation["amount"] > 0 &&  $_SESSION["user"]->IsAccountBlocked($operation["account"])))) | ||||||
|                                           || $_SESSION["user"]->IsAccountBlocked($operation["account"]))) |  | ||||||
|         continue; |         continue; | ||||||
|  |  | ||||||
|  |  | ||||||
|     if ($operation["transfert"] != "") |     if ($operation["transfert"] != "") | ||||||
|     { |  | ||||||
|         $operation["amount"] = -$operation["amount"]; |         $operation["amount"] = -$operation["amount"]; | ||||||
|     } |  | ||||||
|  |  | ||||||
|     if ($operation["amount"] < 0) |     if ($operation["amount"] < 0) | ||||||
|     { |     { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user