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

class GenreAdminView{
	function printGenreList($genreList) {
		echo "<script language=\"javascript\" type=\"text/javascript\">\n";
		echo "function delItem(idgenre){\n";
		echo "	if(confirm('"._TOPMUSIC_SURE."')){\n";
		echo "		document.delForm.action='admin.php?op=topmusic&action=delGenre&idgenre='+idgenre;\n";
		echo "		document.delForm.submit();\n";
		echo "	}\n";
		echo "}\n";
		echo "</script>\n";
		echo "<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\">\n";
		echo "<form name=\"delForm\" method=\"post\" action=\"\">\n";
		echo "	<tr><td><b>#</b></td><td>&nbsp;</td><td><b>"._TOPMUSIC_NAME."</b></td><td>&nbsp;</td><td></td></tr>\n";
		for($i=0;$i<count($genreList);$i++){
			$genre=$genreList[$i];
			echo "	<tr>\n";
			echo "		<td>".$genre[0]."</td><td>&nbsp;</td>\n";
			echo "		<td>".$genre[1]."</td><td>&nbsp;</td>\n";
			echo "		<td><a href=\"admin.php?op=topmusic&action=editGenre&idgenre=".$genre[0]."\">"._TOPMUSIC_EDIT."</td><td>&nbsp;</td><td><a href=\"javascript:delItem(".$genre[0].");\">"._TOPMUSIC_DELETE."</a></td>\n";
			echo "	</tr>\n";
		}
		echo "</form>\n";
		echo "</table>\n<br>\n";
	}
	
}

?>
Return current item: Top Music module