<?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 cellspacing="0" cellpadding="0" border="0">
<form name="albumNew" method="post" action="admin.php?op=topmusic&action=addAlbum&idartist=<?=$_GET['idartist']?>" enctype="multipart/form-data">
<?php if($message!=""){ ?>
<tr>
<td colspan="2"><font color="red"><?=$message?></font></td>
</tr>
<?php } ?>
<tr>
<td><?=_TOPMUSIC_BANDLIST?>:</td><td>
<?php
$genericView=new GenericAdminView();
$genericView->printSelect("artist",$artistList,$artist);
?>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><?=_TOPMUSIC_NAME?>:</td><td><input type="text" name="title"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><?=_TOPMUSIC_DATE?>:</td><td><input type="text" name="yeardate"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><?=_TOPMUSIC_GENRE?>:</td><td>
<?php
$genericView=new GenericAdminView();
$genericView->printSelect("genre",$genreList);
?>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<?php
if(count($albumFields)>0){
foreach($albumFields as $field){?>
<tr>
<td valign="top"><strong><i><?=$field->description?> (<?=$field->type?>)</i></strong>:</td><td> <?=GenericAdminView::printCustomField($field)?> </td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<? }
}?>
<?php if($configAdmin->upload){ ?>
<tr>
<td valign="top"><?=_TOPMUSIC_FRONTCOVER_FILE?>:</td><td><input type="file" name="frontcover_file"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<?php } ?>
<tr>
<td valign="top"><?=_TOPMUSIC_FRONTCOVER_URL?>:</td><td><input type="text" name="frontcover_url"> <a href="#top" onClick="javascript:window.open(document.albumNew.frontcover_url.value,'CheckPhotoURL','width=500,height=400,toolbar=no, scrollbars=yes,titlebar=no, statusbar=no')"><?=_TOPMUSIC_CHECK?></a><img src="modules/topMusic/images/question.gif" hspace="4" align="middle" title="<?=_TOPMUSIC_HELPCOVER?>"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<?php if($configAdmin->upload){ ?>
<tr>
<td valign="top"><?=_TOPMUSIC_BACKCOVER_FILE?>:</td><td><input type="file" name="backcover_file"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<?php } ?>
<tr>
<td valign="top"><?=_TOPMUSIC_BACKCOVER_URL?>:</td><td><input type="text" name="backcover_url"> <a href="#top" onClick="javascript:window.open(document.albumNew.backcover_url.value,'CheckPhotoURL','width=500,height=400,toolbar=no, scrollbars=yes,titlebar=no, statusbar=no')"><?=_TOPMUSIC_CHECK?></a><img src="modules/topMusic/images/question.gif" hspace="4" align="middle" title="<?=_TOPMUSIC_HELPCOVER?>"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td valign="top"><?=_TOPMUSIC_SHOPURL?>:</td><td><input type="text" name="amazonid"> <a href="#top" onClick="javascript:window.open('http://www.amazon.com/exec/obidos/ASIN/'+document.albumNew.amazonid.value+'/sergidscom02-20?dev-t=mason-wrapper%26camp=2025%26link_code=xm2','CheckAmazonURL')"><?=_TOPMUSIC_CHECK?></a><img src="modules/topMusic/images/question.gif" hspace="4" align="middle" title="<?=_TOPMUSIC_HELPAMAZON?>"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td valign="top" algin="left"><?=_TOPMUSIC_VIEWS?>:</td><td><input type="text" name="views" size="5">
<?=_TOPMUSIC_AVGVOTES?>:<input type="text" name="avgvotes" size="5"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td valign="top"><?=_TOPMUSIC_COMMENTS?> (<?=$currentlang?>):</td><td><textarea name="comments" cols="70" rows="15"></textarea></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td valign="top"><?=_TOPMUSIC_RELATED_ALBUM?>:</td><td>
1. Select an artist: <?php
$genericView=new GenericAdminView();
$genericView->printSelect("artist_rel",$artistList,"","loadSelect('album','artist_rel','related','albumSelectDiv',true);");
?>
<br>2. Select an album: <div id="albumSelectDiv"><?php
$genericView->printSelect("related",null);?></div>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td><td ><input type="submit" name="submit" value="<?=_TOPMUSIC_INSERT?>"></td>
</tr>
</form>
</table>
<?php
} else {
OpenTable();
echo "Access Denied";
CloseTable();
}