Location: PHPKode > projects > Top Music module > Top Music 3.0.7/html/modules/topMusic/admin/musicmoz_updateartist.php
<?php
define('FORUM_ADMIN','1');
define(INCLUDE_PATH,"../../../");
$tm_include='';

require_once(INCLUDE_PATH."config.php");
require_once(INCLUDE_PATH."db/db.php");

require_once("../lib/com/sergids/topmusic/model/ConfigDAO.php");
require_once("../../../modules/topMusic/admin/lib/com/sergids/topmusic/model/MusicMozAdminDAO.php");
require_once("../../../modules/topMusic/admin/lib/com/sergids/topmusic/model/GenreAdminDAO.php");
require_once("../../../modules/topMusic/admin/lib/com/sergids/topmusic/model/ArtistAdminO.php");
require_once("../../../modules/topMusic/admin/lib/com/sergids/topmusic/view/MusicMozAdminView.php");
require_once("../../../modules/topMusic/admin/lib/com/sergids/topmusic/view/GenericAdminView.php");

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

$confDAO=new ConfigDAO($db,$prefix);
$language=$confDAO->getNukeLanguage();
$currentlang=$language;

include_once("../../../modules/topMusic/admin/language/lang-$language.php");

$musicDAO = new MusicMozAdminDAO($db,$prefix);
$genreDAO = new GenreAdminDAO($db,$prefix);

MusicMozAdminView::printHead($Default_Theme);
?>

<table border=0 bgcolor="#18165c" cellpadding=3 cellspacing=0 width="100%"><tr><td valign=middle align=left>
&nbsp;
<img src="http://musicmoz.org/img/header.gif" alt="MusicMoz"align=middle border="0">
</td></tr><tr><td bgcolor="#336699" align=right>
<a href="http://www.musicmoz.org" target="_blank"><small><font color="#ffffff" face="Arial, Helvetica, sans-serif">visit musicmoz.org</font></small></a>
</td></tr></table>
<p>

<?php
$artistname=$_GET["artist"];
$artistname=str_replace("The ","",$artistname);
$artists=$musicDAO->searchArtist(stripslashes($artistname));
//print_r($artists);
if(count($artists)>0)
	$artist=$musicDAO->getArtist(stripslashes($artists[0]->musicmoz_url));
else
	$artist=new ArtistAdminO();

$genreList=$genreDAO->getGenreList($language);

?>
<script language="JavaScript" type="text/javascript">
  function updateField(fieldname){
  	var thisform=document.getElementById('artistWsUpdateForm');
  	var thatform=window.opener.document.getElementById('artistEditForm');
  	eval('thatform.'+fieldname+'.value=thisform.'+fieldname+'.value');
  }
</script>
  <form name="artistWsUpdateForm" id="artistWsUpdateForm">
	<table cellspacing="0" cellpadding="0" border="0">
	<?php if($message!=""){ ?>
	<tr>
	<td colspan="2"><font color="red"><?=$message?></font></td>
	</tr>
	<?php } ?>
	<tr>
	<td><strong><?=_TOPMUSIC_NAME?></strong>:</td><td><?=$artist->getName()?></td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td>
	<? if($artist->getBornYear()!=""){ ?>
		<a href="#" onClick="updateField('bornyear')"><img src="images/arrow_blue_left.gif" border="0"></a>
	<?}	?>
	<strong><?=_TOPMUSIC_BORNYEAR?></strong>:</td><td><input id="bornyear" type="text" value="<?=$artist->getBornYear()?>"></td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td>
	<? if($artist->getDeadYear()!=""){ ?>
		<a href="#" onClick="updateField('deadyear')"><img src="images/arrow_blue_left.gif" border="0"></a>
	<?}	?>
	<strong><?=_TOPMUSIC_DEADYEAR?></strong>:</td><td><input id="deadyear" type="text" value="<?=$artist->getDeadYear()?>"></td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td>
	<? if($artist->getGenreId()!=""){ ?>
		<a href="#" onClick="opener.document.getElementById('artistEditForm').genre.selectedIndex=document.getElementById('artistWsUpdateForm').genre.selectedIndex"><img src="images/arrow_blue_left.gif" border="0"></a>
	<?}	?>
	<strong><?=_TOPMUSIC_GENRE?></strong>:</td><td>
	<?php
	GenericAdminView::printSelect("genre",$genreList,$artist->getGenreid(),"");
	?>
	</td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td valign="top">
	<? if($artist->getWeb()!=""){ ?>
		<a href="#" onClick="updateField('web')"><img src="images/arrow_blue_left.gif" border="0"></a>
	<?}	?>
	<strong><?=_TOPMUSIC_WEB?></strong>:</td><td><input type="text" name="web" value="<?=$artist->getWeb()?>">&nbsp;<a href="#top" onClick="javascript:window.open(document.artistWsUpdateForm.web.value,'CheckWebURL')"><?=_TOPMUSIC_CHECK?></a></td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td valign="top">
	<? if($artist->getPhoto()!=""){ ?>
		<a href="#" onClick="updateField('photo')"><img src="images/arrow_blue_left.gif" border="0"></a>
	<?}	?>
	<strong><?=_TOPMUSIC_PHOTO_URL?></strong>:</td><td><img src="<?=$artist->getPhoto()?>" width="200">
	<input type="hidden" name="photo" value="<?=$artist->getPhoto()?>">
	</td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td valign="top">
		<? if($artist->getMembers()!=""){ ?>
		<a href="#" onClick="updateField('members')"><img src="images/arrow_blue_left.gif" border="0"></a>
		<?}?>
		<strong><?=_TOPMUSIC_MEMBERS?></strong>:</td><td><?=$artist->getMembers()?>
		<input type="hidden" name="members" id="members" value="<?=$artist->getMembers()?>">
		</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"><strong><?=_TOPMUSIC_BIOGRAPHY?> (<?=$currentlang?>):</td><td><textarea name="biography" cols="70" rows="15"><?=$artist->getBiography()?></textarea>
    </td>
	</tr>
	<tr>
	<td>&nbsp;</td><td align="right"></td>
	</tr>
	</table>
	</form>
	
	<center><table border="0" bgcolor="#18165c" cellpadding="3" cellspacing="0">
<tr>
<td>
    <table width="100%" cellpadding="2" cellspacing="0" border="0">
        <tr align="center">
        <td><font face="sans-serif, Arial, Helvetica" size="2"
            color="#FFFFFF">Help build the largest human-contributed
            music project online</font></td></tr>
        <tr bgcolor="#CCCCCC" align="center">
        <td><font face="sans-serif, Arial, Helvetica" size="2"> <a
            href="http://musicmoz.org/add.html" target="_blank">Submit
            Information</a> - <a href="http://musicmoz.org/about.html" target="_blank"><b>Open Music
            Project</b></a> -
            <a href="http://musicmoz.org/" target="_blank">Become
            an Editor</a> </font>
        </td></tr>
    </table>
</td>
</tr>
</table>
</center>
	
	<?php
	MusicMozAdminView::printFoot();
	?>
	
	
Return current item: Top Music module