Location: PHPKode > projects > Top Music module > Top Music 3.0.7/html/modules/topMusic/admin/amazon_cover.php
<?php
define("ADMIN_FILE",1);
define("FORUM_ADMIN",1);
include_once("../../../mainfile.php");
require_once("../../../modules/topMusic/admin/lib/com/sergids/topmusic/model/AmazonAdminDAO.php");

global $prefix,$db,$language,$Default_Theme;

if(file_exists("../../../modules/topMusic/admin/language/lang-".$language.".php")) {
	require_once("../../../modules/topMusic/admin/language/lang-".$language.".php");
} else {
	require_once("../../../modules/topMusic/admin/language/lang-english.php");
}

$amazonDAO=new AmazonAdminDAO($db,$prefix);
$covers=$amazonDAO->searchAlbumCover($_GET['artist'],$_GET['title']); ?>
<html>
	<head>
		<LINK REL="StyleSheet" HREF="../../../themes/<?=$Default_Theme?>/style/style.css" TYPE="text/css">
		<title><?=_TOPMUSIC?> - <?=_TOPMUSIC_AMAZONTOOLZ?></title>
	</head>
	<body>
<?php if(count($covers)==0){ ?>
	<table width="100%">
		<tr><td>&nbsp;</td></tr>
		<tr><td align="center"><?=_TOPMUSIC_NOCOVERSFOUND?>.</td></tr>
		<tr><td>&nbsp;</td></tr>
		<tr><td align="center"><a href="#" onClick="window.close()"><?=_TOPMUSIC_CLOSE?></a></td></tr>
	</table>
<?php }else{ ?>
	<script language="javascript">
		function setCover(url){
			window.opener.document.albumEditForm.frontcover_url.value=url;
			window.close();
		}
	</script>
	<table width="100%">
		<?php foreach($covers as $album){ ?>
			<tr><td><a href="#" onClick="setCover('<?=$album->frontcover_url?>')"><img src="<?=$album->frontcover_url?>" border="0"></a></td><td><?=$album->getTitle()?> (<?=$album->artistname?>)</td></tr>
		<?php } ?>
		<tr><td>&nbsp;</td></tr>
		<tr><td align="center"><a href="#" onClick="window.close()"><?=_TOPMUSIC_CLOSE?></a></td></tr>
	</table>
<?php } ?>
</body>
</html>
Return current item: Top Music module