<?php
/************************************************************************/
/* Top Music: Administration Module */
/* ================================ */
/* */
/* Copyright (c) 2004 by SergiDs.com */
/* http://phpnuke.org */
/* */
/* 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. */
/************************************************************************/
if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }
$aid = trim($aid);
$result = mysql_query("select radminsuper from ".$prefix."_authors where aid='$aid'");
list($radminsuper) = mysql_fetch_row($result);
if ($radminsuper==1) {
?>
<table border="0" align="center">
<tr>
<td scope="col"> </th>
<td scope="col"> </th>
<td scope="col"> </th>
</tr>
<tr>
<th scope="col"> </th>
<th scope="col">
<?php if($albumO->title!=""){
print _TOPMUSIC_SONGLISTOF.':'.$albumO->title;
} else {
print _TOPMUSIC_ORPHANSONGS;
}?>
</th>
<th scope="col"> </th>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>
<table width="100%" border="0">
<tr>
<td scope="col" align="center">
<?php if($albumO->getFrontcoverFile()){ ?>
<img name="foto" src="modules/<?=_TOPMUSIC_MODULENAME?>/photos/albums/<?=$albumO->getFrontcoverFile()?>" width="79" alt="<?=$albumO->getTitle()?>"></th>
<?php }elseif($albumO->trontcover_url){ ?>
<img name="foto" src="<?=$albumO->trontcover_url?>" width="79" alt="<?=$albumO->getTitle()?>"></th>
<?php }else{ ?>
<img name="foto" src="modules/<?=_TOPMUSIC_MODULENAME?>/photos/anonym.jpg" width="79" alt="<?=$artistO->name?>"></th>
<?php } ?>
<td scope="col">
<table border="0">
<form name="albumForm" id="albumForm" method="POST" action="admin.php?op=topmusic&action=listSong&idalbum=<?=$album?>">
<tr>
<td><strong><?=_TOPMUSIC_ARTIST?></strong>:</td>
<td>
<?php
$genericView=new GenericAdminView();
$genericView->printSelect("artist",$artistList,$idartist,"loadSelectSubmit('album','artist','album','albumSelectDiv','loadAlbum')");
?>
</td>
</tr>
<tr>
<td><strong><?=_TOPMUSIC_TITLE?></strong>:</td>
<td><div id="albumSelectDiv" style="display: inline;"><?php
$genericView=new GenericAdminView();
$genericView->printSelect("album",$albumList,$album,"loadAlbum()");
?></div>
</td>
</tr>
<script>
</script>
<tr>
<td align="left"><strong><?=_TOPMUSIC_YEAR?>:</strong></td>
<td><?=$albumO->getYeardate()?></td>
</tr>
<tr>
<td align="left"><strong><?=_TOPMUSIC_GENRE?>:</strong></td>
<td><?=$albumO->getGenrename()?></td>
</tr>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</form>
</table></td>
</tr>
<tr>
<td> </td>
<td><a href="#" onClick="window.open('modules/<?=_TOPMUSIC_MODULENAME?>/admin/musicmoz_searchsong.php?idartist=<?=$albumO->idartist?>&idalbum=<?=$albumO->id?>','getSongMMoz','scrollbars=yes,width=400,height=400,statusbar=no')"><?=_TOPMUSIC_GETSONGFROM?> MusicMoz</a></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<?php if(count($songList)>0){ ?>
<tr>
<td colspan="2"><strong><?=_TOPMUSIC_LISTOFSONGS?>:</strong></td>
</tr>
<tr>
<td colspan="2"><?php
$songView=new SongAdminView();
$songView->printSongList($songList);
?></td>
</tr>
<?php }else{ ?>
<tr>
<td colspan="2"><strong><?=_TOPMUSIC_LISTORPHANSONGS?>:</strong></td>
</tr>
<tr>
<td colspan="2">
<?php
$songView=new SongAdminView();
$songView->printOrphanSongList($orphanList);
?>
</td>
</tr>
<?php } ?>
<tr>
<td> </td>
<td> </td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<script language="javascript">
function loadAlbum(){
var form = $('albumForm');
var sel1 = $('artist');
var sel2 = $('album');
form.action='admin.php?op=topmusic&action=listSong&idartist='+sel1[sel1.selectedIndex].value+'&idalbum='+sel2[sel2.selectedIndex].value;
form.submit();
}
</script>
<?php
} else {
OpenTable();
echo "Access Denied";
CloseTable();
}
?>