<?php
/************************************************************************/
/* PHP-NUKE: Top Music AZ list Center */
/* ===================================== */
/* */
/* Copyright (c) 2004-2005 by Sergids */
/* http://www.sergids.com */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/*****************/
/* configuration */
/*****************/
//if you have changed the Top Music Module name, reflect it here:
$tmModuleName="topMusic";
/***************************************************************/
//Don't touch this code please
if (eregi("block-TMAZ.php",$_SERVER[PHP_SELF])) {
Header("Location: ../index.php");
die();
}
//global $prefix, $db;
require_once("modules/".$tmModuleName."/lib/com/sergids/topmusic/model/ArtistDAO.php");
require_once("modules/".$tmModuleName."/lib/com/sergids/topmusic/view/ArtistView.php");
global $db,$prefix,$currentlang;
if(!is_object($tm_config)){
require_once("modules/".$tmModuleName."/lib/com/sergids/topmusic/model/ConfigDAO.php");
require_once("modules/".$tmModuleName."/lib/com/sergids/topmusic/model/ConfigO.php");
$configDAO= new ConfigDAO($db,$prefix);
$tm_config=$configDAO->load();
}
//use easy URL? (according to settings in Top Music module administration)
$TMEasyURL=$tm_config->getEasyURL();
//Eeasy URL Type (according to settings in Top Music module administration)
$TMEasyURLType=$tm_config->getEasyURLType();
//AZ list mode
$TMAZList=$tm_config->getAZAdvanced();
$artistDAO=new ArtistDAO($db,$prefix);
$letters=$artistDAO->getArtistIndexLetters();
$content="<table cellspacing=\"2\" cellpadding=\"0\" border=\"0\">\n<tr>\n<td align=\"center\">\n";
//echo "count=".count($bandList)."<br>";
for($i=0;$i<count($letters);$i++){
$letter_url=ArtistView::getLettersUrl($tmModuleName,$tm_config,$letters[$i]);
$content.="<a href=\"".$letter_url."\">".$letters[$i]."</a>";
if($i<(count($letters)-1))
$content.=" :: ";
}
$content.="</td>\n</tr>\n";
$content.="</table>\n";
?>