Location: PHPKode > projects > Top Music module > Top Music 3.0.7/html/modules/topMusic/admin/newSong.php
<?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="songNew" method="post" action="admin.php?op=topmusic&action=addSong&idartist=<?=$_GET['idartist']?>&idalbum=<?=$_GET['idalbum']?>" enctype="multipart/form-data">
	<?php if($message!=""){ ?>
	<tr>
	<td colspan="2"><font color="red"><?=$message?></font></td>
	</tr>
	<?php } ?>
	<tr>
	<td><?=_TOPMUSIC_ARTIST?>:</td><td>
	<?php
	$genericView=new GenericAdminView();
	$genericView->printSelect("artist",$artistList,$artist,"loadSelect('album','artist','album','selectAlbumDiv',true)");
	?>
	</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td><?=_TOPMUSIC_ALBUM?>:</td><td><div id="selectAlbumDiv" style="display:inline">
	<?php
	$genericView->printSelect("album",$albumList,$album);?>
	</div></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td><?=_TOPMUSIC_TITLE?>:</td><td><input type="text" name="title"></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td><?=_TOPMUSIC_NUMBER?>:</td><td><input type="text" name="number"></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td><?=_TOPMUSIC_GENRE?>:</td><td>
	<?php
	$genericView=new GenericAdminView();
	$genericView->printSelect("genre",$genreList);
	?>
	</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<?php
	if(count($songFields)>0){ 
		foreach($songFields as $field){?>
		<tr>
			<td valign="top"><strong><i><?=$field->description?></i></strong>:</td><td> <?=GenericAdminView::printCustomField($field)?> </td>
		</tr>
		<tr>
			<td colspan="2">&nbsp;</td>
		</tr>
	<?	}
	}?>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td valign="top"><?=_TOPMUSIC_TRACK?>:</td><td><input type="text" name="track">&nbsp;<a href="#top" onClick="javascript:url=document.songNew.track.value;if(url.substring(0,4)!='http'){url='modules/<?=_TOPMUSIC_MODULENAME?>/tracks/'+url}window.open(url,'CheckTrackURL','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_HELPTRACK?>"></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td valign="top" algin="left"><?=_TOPMUSIC_VIEWS?>:</td><td><input type="text" name="views" size="5">&nbsp;&nbsp;
	<?=_TOPMUSIC_AVGVOTES?>:<input type="text" name="avgvotes" size="5"></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td valign="top"><?=_TOPMUSIC_LYRICS?>:</td><td><textarea name="lyrics" cols="70" rows="15"></textarea></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td valign="top"><?=_TOPMUSIC_RELATED_SONG?>:</td><td>
	1. Select an artist: <?php
	$genericView=new GenericAdminView();
	$genericView->printSelect("artist_rel",$artistList,"","loadSelect('album','artist_rel','album_rel','albumSelectDiv',false,'related','songSelectDiv');");
	?>
	<br>2. Select an album:<div id="albumSelectDiv" style="display: inline"><?php
	$genericView->printSelect("album_rel",null,"","loadSelect('song','album_rel','related','songSelectDiv',true);");?></div>
	<br>3. Select a song:<div id="songSelectDiv" style="display: inline"><?php
	$genericView->printSelect("related",null,"","");?></div>
	</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td>&nbsp;</td><td><input type="submit" name="submit" value="<?=_TOPMUSIC_INSERT?>"></td>
	</tr>
	</form>
	</table>
	<?php
} else {
	OpenTable();
    echo "Access Denied";
    CloseTable();
}
Return current item: Top Music module