if ($ga->topSong()) { $arr = $ga->arr; $main = $tpl->get('theme/top_song'); $row = $tpl->get_block($main, 'list_row', 1); $html = ""; for ($i = 1; $i <= 10; $i++) { $html .= $tpl->assign($row, array('song.NAME' => $ga->cut_string($arr[$i]['name'], 27, true), 'song.SINGER' => $ga->cut_string($arr[$i]['singer'], 27, true), 'song.IMG' => 'http://' . $arr[$i]['img'], 'song.ID' => $arr[$i]['id'], 'song.NUM' => $i, 'server' => URL_SERVER)); } $main = $tpl->assign($main, array('ga_pre' => $pre, 'ga_next' => $ne, 'ga_page' => $ga->page, 'ga_total' => $ga->count)); # Buff Theme $main = $tpl->assign_blocks($main, array('list' => $html)); $tpl->show($main); } } else { if ($_POST['type'] && $_POST['page'] && $_POST['types']) { if ($ga->topAlbum()) { $arr = $ga->arr; $main = $tpl->get('theme/top_album'); $row = $tpl->get_block($main, 'list_row', 1); $html = ""; for ($i = 1; $i <= count($arr) - 2; $i++) { $html .= $tpl->assign($row, array('song.NAME' => $ga->cut_string($arr[$i]['name'], 27, true), 'song.IMG' => $arr[$i]['img'], 'song.ID' => $arr[$i]['id'], 'song.NUM' => $i, 'song.NAME1' => $arr[$i]['name'], 'server' => URL_SERVER)); } # Buff Theme $main = $tpl->assign_blocks($main, array('list' => $html, 'ga_result' => '1')); $tpl->show($main); } } else { if ($_GET['id']) { header("Content-Type: application/xml; charset=utf-8"); $asx = '<?xml version="1.0" encoding="utf-8"?>' . '<playlist version="1" xmlns="http://xspf.org/ns/0/">' . '<trackList>';