The optimum off-line energy management scheme for multi-user multi-relay networks employing energy harvesting and wireless energy transfer is studied. Specifically, the users are capable of harvesting and transferring energy to each other over consecutive transmissions, though they have no fixed energy supplies. Meanwhile, network coding for the users' messages is conducted at the relays to enable cooperative transmission with source nodes in independent but not necessarily identically distributed (i.n.i.d.) Nakagami-$m$ fading channels. Therefore, a simultaneous two level cooperation, i.e., information-level and energy-level cooperation is conducted. The problem of energy efficiency (EE) maximization under constraints of the energy causality and a predefined outage probability threshold is formulated and shown to be non-convex. By exploiting fractional and geometric programming, a convex form-based iterative algorithm is developed to solve the problem efficiently. Close-to-optimal power allocation and energy cooperation policies across consecutive transmissions are found. Moreover, the effects of relay locations and wireless energy transmission efficiency are investigated and the performance comparison with the current state of solutions demonstrates that the proposed policies can manage the harvested energy more efficiently.