Example #1
0
 /**
  * format
  * This takes the current song object
  * and does a ton of formating on it creating f_??? variables on the current
  * object
  */
 public function format($details = true)
 {
     // Format the artist name
     if ($this->artist) {
         $this->f_artist_full = $this->get_artist_name();
         $this->f_artist_link = "<a href=\"" . AmpConfig::get('web_path') . "/artists.php?action=show&amp;artist=" . $this->artist . "\" title=\"" . scrub_out($this->f_artist_full) . "\"> " . scrub_out($this->f_artist) . "</a>";
     } else {
         $wartist = Wanted::get_missing_artist($this->artist_mbid);
         $this->f_artist_link = $wartist['link'];
         $this->f_artist_full = $wartist['name'];
     }
     $this->f_artist = $this->f_artist_full;
     // Format the title
     $this->f_title_full = $this->title;
     $this->f_title = $this->title;
     $this->link = "#";
     $this->f_link = "<a href=\"" . scrub_out($this->link) . "\" title=\"" . scrub_out($this->f_artist) . " - " . scrub_out($this->title) . "\"> " . scrub_out($this->f_title) . "</a>";
     $this->f_album_link = "<a href=\"" . AmpConfig::get('web_path') . "/albums.php?action=show_missing&amp;mbid=" . $this->album_mbid . "&amp;artist=" . $this->artist . "\" title=\"" . $this->f_album . "\">" . $this->f_album . "</a>";
     // Format the track (there isn't really anything to do here)
     $this->f_track = $this->track;
     return true;
 }
Example #2
0
            $chr = "";
        } else {
            $chr = $match;
        }
        /* Enclose this in the purty box! */
        require AmpConfig::get('prefix') . '/templates/show_box_top.inc.php';
        show_alphabet_list('artists', 'artists.php', $match);
        show_alphabet_form($chr, T_('Show Artists starting with'), "artists.php?action=match");
        require AmpConfig::get('prefix') . '/templates/show_box_bottom.inc.php';
        if ($match === "Browse") {
            show_artists();
        } elseif ($match === "Show_all") {
            $offset_limit = 999999;
            show_artists();
        } else {
            if ($chr == '') {
                show_artists('A');
            } else {
                show_artists($chr);
            }
        }
        break;
    case 'show_missing':
        set_time_limit(600);
        $mbid = $_REQUEST['mbid'];
        $wartist = Wanted::get_missing_artist($mbid);
        require AmpConfig::get('prefix') . '/templates/show_missing_artist.inc.php';
        break;
}
// end switch
UI::show_footer();
Example #3
0
 /**
  * Format data.
  */
 public function format()
 {
     if ($this->artist) {
         $artist = new Artist($this->artist);
         $artist->format();
         $this->f_artist_link = $artist->f_link;
     } else {
         $wartist = Wanted::get_missing_artist($this->artist_mbid);
         $this->f_artist_link = $wartist['link'];
     }
     $this->link = AmpConfig::get('web_path') . "/albums.php?action=show_missing&mbid=" . $this->mbid . "&artist=" . $this->artist . "&artist_mbid=" . $this->artist_mbid . "\" title=\"" . $this->name;
     $this->f_link = "<a href=\"" . $this->link . "\">" . $this->name . "</a>";
     $user = new User($this->user);
     $user->format();
     $this->f_user = $user->f_name;
 }
Example #4
0
 /**
  * format
  * This takes the current song object
  * and does a ton of formating on it creating f_??? variables on the current
  * object
  */
 public function format()
 {
     // Format the filename
     preg_match("/^.*\\/(.*?)\$/", $this->file, $short);
     $this->f_file = htmlspecialchars($short[1]);
     // Format the artist name
     if ($this->artist) {
         $this->f_artist_full = $this->get_artist_name();
         $this->f_artist_link = "<a href=\"" . AmpConfig::get('web_path') . "/artists.php?action=show&amp;artist=" . $this->artist . "\" title=\"" . scrub_out($this->f_artist_full) . "\"> " . scrub_out($this->f_artist) . "</a>";
     } else {
         $wartist = Wanted::get_missing_artist($this->artist_mbid);
         $this->f_artist_link = $wartist['link'];
         $this->f_artist_full = $wartist['name'];
     }
     $this->f_artist = $this->f_artist_full;
     // Format the title
     $this->f_title_full = $this->title;
     $this->f_title = $this->title;
     $this->link = "#";
     $this->f_link = "<a href=\"" . scrub_out($this->link) . "\" title=\"" . scrub_out($this->f_artist) . " - " . scrub_out($this->title) . "\"> " . scrub_out($this->f_title) . "</a>";
     $this->f_album_link = "<a href=\"" . AmpConfig::get('web_path') . "/albums.php?action=show_missing&amp;mbid=" . $this->album_mbid . "&amp;artist=" . $this->artist . "\" title=\"" . $this->f_album . "\">" . $this->f_album . "</a>";
     // Format the track (there isn't really anything to do here)
     $this->f_track = $this->track;
     return true;
 }