Location: PHPKode > projects > Top Music module > Top Music 3.0.7/html/modules/topMusic/admin/newArtist.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) {
	
	?>
	<script language="javascript">
	function checkForumURL(url){
		if(isNaN(url))
			window.open(url,'CheckForumURL');
		else
			window.open('modules.php?name=Forums&file=viewforum&f='+url,'CheckForumURL');
	}
	</script>
	<table cellspacing="0" cellpadding="0" border="0">
	<form name="artistNew" method="post" action="admin.php?op=topmusic&action=addArtist" enctype="multipart/form-data">
	<?php if($message!=""){ ?>
	<tr>
	<td colspan="2"><font color="red"><?=$message?></font></td>
	</tr>
	<?php } ?>
	<tr>
	<td><?=_TOPMUSIC_NAME?>:</td><td><input type="text" name="name"></td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td><?=_TOPMUSIC_BORNYEAR?>:</td><td><input type="text" name="bornyear"></td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td><?=_TOPMUSIC_DEADYEAR?>:</td><td><input type="text" name="deadyear"></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>
	<tr>
	<td valign="top"><?=_TOPMUSIC_WEB?>:</td><td><input type="text" name="web">&nbsp;<a href="#top" onClick="javascript:window.open(document.artistNew.web.value,'CheckWebURL')"><?=_TOPMUSIC_CHECK?></a></td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td valign="top"><?=_TOPMUSIC_FORUM?>:</td><td><input type="text" name="forum">&nbsp;<a href="#top" onClick="javascript:checkForumURL(document.artistNew.forum.value)"><?=_TOPMUSIC_CHECK?></a><img src="modules/topMusic/images/question.gif" hspace="4" align="middle" title="<?=_TOPMUSIC_HELPFORUM?>"></td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td valign="top"><?=_TOPMUSIC_PHOTO_URL?>:</td><td><input type="text" name="photo_url">&nbsp;
	<a href="#top" onClick="javascript:CheckImageUrl(document.artistNew.photo_url.value,'modules/<?=_TOPMUSIC_MODULENAME?>/photos/');"><?=_TOPMUSIC_CHECK?></a></td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<?php if($configAdmin->upload){ ?>
	<tr>
		<td valign="top">
			<?=_TOPMUSIC_PHOTO_FILE?>:</td>
		<td>
			<input type="file" name="photo_upload">&nbsp;
		</td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<?php } ?>
	<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_MEMBERS?>:</td><td><textarea name="members" cols="70" rows="8"></textarea></td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<?php
		if(count($artistFields)>0){ 
			foreach($artistFields 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">&nbsp;</td>
			</tr>
	<?		}
		}?>
	<tr>
	<td valign="top"><?=_TOPMUSIC_BIOGRAPHY?> (<?=$currentlang?>):</td><td><textarea name="biography" cols="70" rows="15"></textarea></td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td valign="top"><?=_TOPMUSIC_RELATED_ARTIST?>:</td><td>
	<?php
	$genericView=new GenericAdminView();
	$genericView->printSelect("related",$artistList);
	?>
	</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