Location: PHPKode > projects > Top Music module > Top Music 3.0.7/html/modules/topMusic/admin/lib/com/sergids/topmusic/view/AdminTopView.php
<?php

class AdminTopView{
	function printMenu($action){
echo "<link rel=\"stylesheet\" href=\"modules/topMusic/themes/sergids/css/common.css\" TYPE=\"text/css\" MEDIA=\"screen\">";
echo "<link rel=\"stylesheet\" href=\"modules/topMusic/themes/sergids/css/tabs.css\" TYPE=\"text/css\" MEDIA=\"screen\">";
OpenTable();
echo "<div id=\"tm_module\">\n
<div id=\"tm_title\"><center>"._TOPMUSICADMIN."</center></div>\n
</div>\n

<div id=\"tm_module\">\n
<div id=\"tm_header\">\n<ul>";

		if($action!="addArtist")
			echo "<li><a href=\"admin.php?op=topmusic&action=addArtist\" title=\""._TOPMUSIC_ARTISTNEWDESC."\">";
		else
			echo "<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_ARTISTNEWDESC."\">";
		echo _TOPMUSIC_ARTISTNEW."</a></li>";

		// ** AZ **
		if($action!="AZ" && $action!="")
			echo '<li><a href="admin.php?op=topmusic&action=AZ" title="'._TOPMUSIC_BANDSAZDESC.'">';
		else
			echo '<li id="selected"><a href="#" title="'._TOPMUSIC_BANDSAZDESC.'">';
		echo _TOPMUSIC_BANDSAZ."</a></li>";
		
		
		if($action!="customFieldsArtist")
			echo "<li><a href=\"admin.php?op=topmusic&action=customFieldsArtist\" title=\""._TOPMUSIC_CUSTOMFIELDS_ARTIST."\">";
		else
			echo "<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_CUSTOMFIELDS_ARTIST."\">";
		echo "Custom fields</a></li>";
	
		
echo "</ul>
</div>\n

<div id=\"tm_header\"><ul>";

		if($action!="addAlbum")
			echo"<li><a href=\"admin.php?op=topmusic&action=addAlbum&idartist=".$_GET["idartist"]."\" title=\""._TOPMUSIC_ALBUMNEWDESC."\">";
		else
			echo"<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_ALBUMNEWDESC."\">";
		echo _TOPMUSIC_ALBUMNEW."</a></li>";

		if($action!="listAlbum")
			echo "<li><a href=\"admin.php?op=topmusic&action=listAlbum&idartist=".$_GET["idartist"]."\" title=\""._TOPMUSIC_ALBUMLISTDESC."\">";
		else
			echo "<li><a href=\"#\" title=\""._TOPMUSIC_ALBUMLISTDESC."\">";
		echo _TOPMUSIC_ALBUMLIST."</a></li>";
		
		if($action!="customFieldsAlbum")
			echo"<li><a href=\"admin.php?op=topmusic&action=customFieldsAlbum\" title=\""._TOPMUSIC_CUSTOMFIELDS_ALBUM."\">";
		else
			echo"<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_CUSTOMFIELDS_ALBUM."\">";
		echo "Custom fields</a></li>";
		
		
		if($action!="orphanAlbums")
			echo "<li><a href=\"admin.php?op=topmusic&action=orphanAlbums\" title=\""._TOPMUSIC_ORPHANALBUMSDESC."\">";
		else
			echo "<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_ORPHANALBUMSDESC."\">";
		echo _TOPMUSIC_ORPHANALBUMS."</a></li>";
		
		
echo "</ul>
</div>

<div id=\"tm_header\"><ul>";


		if($action!="addSong") 
			echo "<li><a href=\"admin.php?op=topmusic&action=addSong&idartist=".$_GET["idartist"]."&idalbum=".$_GET["idalbum"]."\" title=\""._TOPMUSIC_SONGNEWDESC."\">";
		else
			echo "<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_SONGNEWDESC."\">";
		echo _TOPMUSIC_SONGNEW."</a></li>";

		if($action!="listSong")
			echo "<li><a href=\"admin.php?op=topmusic&action=listSong&idartist=".$_GET["idartist"]."&idalbum=".$_GET["idalbum"]."\" title=\""._TOPMUSIC_SONGLISTDESC."\">";
		else
			echo "<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_SONGLISTDESC."\">";
		echo _TOPMUSIC_SONGLIST."</a></li>";
		
		if($action!="customFieldsSong") 
			echo "<li><a href=\"admin.php?op=topmusic&action=customFieldsSong\" title=\""._TOPMUSIC_CUSTOMFIELDS_SONG."\">";
		else
			echo "<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_CUSTOMFIELDS_SONG."\">";
		echo "Custom fields</a></li>";
		
		if($action!="orphanSongs")
			echo "<li><a href=\"admin.php?op=topmusic&action=orphanSongs\" title=\""._TOPMUSIC_ORPHANSONGSDESC."\">";
		else
			echo "<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_ORPHANSONGSDESC."\">";
		echo _TOPMUSIC_ORPHANSONGS."</a></li>";
		
		
echo "</ul>
</div>

<div id=\"tm_header\"> 
<ul>";
	// ** Settings **
	if($action!="config")
	  echo "<li><a href=\"admin.php?op=topmusic&action=config\" title=\""._TOPMUSIC_CONFIGUREDESC."\">";
	else
		echo "<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_CONFIGUREDESC."\">";
	echo _TOPMUSIC_CONFIGURE."</a></li>";

	if($action!="search")
		echo "<li><a href=\"admin.php?op=topmusic&action=search\" title=\""._TOPMUSIC_SEARCHDESC."\">";
	else
		echo "<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_SEARCHDESC."\">";
	echo _TOPMUSIC_SEARCH."</a></li>";
	
	echo "<li><a href=\"modules/topMusic/admin/sitemap.php\" title=\""._TOPMUSIC_SITEMAP."\" target=\"_blank\">";
	echo "Sitemap</a></li>";
	
	if($action!="addGenre")
		echo "<li><a href=\"admin.php?op=topmusic&action=addGenre\" title=\""._TOPMUSIC_GENRENEWDESC."\">";
	else
		echo "<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_GENRENEWDESC."\">";
	echo _TOPMUSIC_GENRENEW."</a></li>";
	
	
	if($action!="listGenre")
		echo "<li><a href=\"admin.php?op=topmusic&action=listGenre\" title=\""._TOPMUSIC_GENRELISTDESC."\">";
	else
		echo "<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_GENRELISTDESC."\">";
	echo _TOPMUSIC_GENRELIST."</a></li>";
	
	if($action!="addChart")
		echo "<li><a href=\"admin.php?op=topmusic&action=addChart\" title=\""._TOPMUSIC_CHARTLISTDESC."\">";
	else
		echo "<li id=\"selected\"><a href=\"#\" title=\""._TOPMUSIC_CHARTLISTDESC."\">";
	echo _TOPMUSIC_CHARTLIST."</a></li>";
	
echo "</ul></div>

</div>
<div id=\"tm_module\">";

	}
	function printLanguageSelect($languageslist,$lang,$behavior=""){
		echo "<select name=\"lang\" ".$behavior.">\n";
		    $handle=opendir("language");
		    while ($file = readdir($handle)) {
				if (ereg("^lang\-(.+)\.php", $file, $matches)) {
		            $langFound = $matches[1];
		            $languageslist .= "$langFound ";
		        }
		    }
		    closedir($handle);
		   $languageslist = explode(" ", $languageslist);
		    sort($languageslist);
		    for ($i=0; $i < sizeof($languageslist); $i++) {
				if($languageslist[$i]!="") {
				    echo "<option value=\"$languageslist[$i]\" ";
					if($languageslist[$i]==$lang) echo "selected";
					echo ">".ucfirst($languageslist[$i])."\n";
				}
			}
		    echo "</select>\n";
	}
	function printFoot(){
		echo "</div>\n";
		echo "<div id=\"tm_module\">\n";
		echo "&copy; 2003-2007 <b>Top Music</b> :: <a href=\"http://www.sergids.com\" target=\"_blank\">SergiDs.com</a> :: <a href=\"http://www.sergids.com/topmusic-support.html\" target=\"_blank\">Support</a> :: <a href=\"http://www.sergids.com/topmusic/\" target=\"_blank\">Demo</a>";
		echo "</div>\n";
		CloseTable();
	}

}
?>
Return current item: Top Music module