Пример #1
0
function deleteTeams()
{
    global $db;
    $teams = TCFunctions::request('teams');
    if (empty($teams)) {
        redirectMsg('teams.php', __('No has seleccionado ningún equipo', 'admin_team'), 1);
        die;
    }
    foreach ($teams as $k) {
        $team = new TCTeam($k);
        $team->delete();
    }
    redirectMsg('teams.php', __('Base de datos actualizada correctamente', 'admin_team'), 0);
}
Пример #2
0
function deleteCoachs()
{
    global $db;
    $coachs = TCFunctions::request('coachs');
    if (empty($coachs)) {
        redirectMsg('coachs.php', __('Selecciona al menos un entrenador', 'admin_template'), 1);
        die;
    }
    foreach ($coachs as $k) {
        $coach = new TCCoach($k);
        $coach->delete();
    }
    redirectMsg('coachs.php', __('Base de datos actulizada correctamente', 'admin_template'), 0);
}
Пример #3
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);
}