Esempio n. 1
0
function deletePlayer()
{
    global $db;
    $team = TCFunctions::request('team');
    $players = TCFunctions::request('players');
    if (empty($players)) {
        redirectMsg('players.php?team=' . $team, __('No has seleccionado jugadores para eliminar', 'admin_team'), 1);
        die;
    }
    foreach ($players as $k) {
        $player = new TCPlayer($k);
        $player->delete();
    }
    redirectMsg('players.php?team=' . $team, __('¡Jugadores eliminados!', 'admin_team'), 0);
}