Пример #1
0
     } else {
         admin();
     }
     break;
 case "editplayer":
     //
     if ($pcat == 4) {
         editPlayer();
     } else {
         admin();
     }
     break;
 case "saveplayer":
     //
     if ($pcat == 3 || $pcat == 4) {
         savePlayer();
     } else {
         admin();
     }
     break;
 case "updateplayer":
     //
     if ($pcat == 4) {
         updatePlayer();
     } else {
         admin();
     }
     break;
 case "deleteplayer":
     //
     if ($pcat == 4) {
Пример #2
0
    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);
}
$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : '';
switch ($op) {
    case 'new':
        formPlayer();
        break;
    case 'save':
        savePlayer();
        break;
    case 'edit':
        formPlayer(1);
        break;
    case 'saveedit':
        savePlayer(1);
        break;
    case 'delete':
        deletePlayer();
        break;
    default:
        showPlayers();
        break;
}