You are here

function mp3player_players in MP3 Player 6.2

Same name and namespace in other branches
  1. 6 mp3player.module \mp3player_players()
  2. 7.2 mp3player.module \mp3player_players()

Return list of all available players along with settings.

9 calls to mp3player_players()
filefieldmp3player_field_formatter_info in filefieldmp3player/filefieldmp3player.module
Implementation of hook_field_formatter_info().
filefieldmp3player_theme in filefieldmp3player/filefieldmp3player.module
Implementation of hook_theme().
mp3player_player_delete in ./mp3player.module
Form to delete a player.
mp3player_player_delete_submit in ./mp3player.module
Delete a player.
mp3player_player_form in ./mp3player.module
Custom submit function for the system settings form. Form to edit a player.

... See full list

2 string references to 'mp3player_players'
mp3player_player_form_submit in ./mp3player.module
form_submit
mp3player_update_1 in ./mp3player.install

File

./mp3player.module, line 117
mp3player main module file.

Code

function mp3player_players($pid = NULL) {
  $players = array();
  $result = db_query('SELECT * FROM {mp3player_players} ORDER BY pid');
  while ($player = db_fetch_array($result)) {
    $players[$player['pid']] = $player;
  }
  if ($pid != NULL && isset($players[$pid])) {
    return $players[$pid];
  }
  else {
    return $players;
  }
}