Location: PHPKode > projects > Top Music module > Top Music 3.0.7/html/modules/topMusic/admin/musicmoz_updatealbum.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/AlbumAdminO.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);
$albumname=$_GET["album"];
$albums=$musicDAO->searchAlbum(stripslashes($albumname),stripslashes($artistname));

if(count($albums)>0)
	$album=$musicDAO->getAlbum(stripslashes($albums[0]->musicmoz_url));
else
	$album=new AlbumAdminO();

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

?>
<script language="JavaScript" type="text/javascript">
  function updateField(fieldname){
  	var thisform=document.getElementById('albumWsUpdateForm');
  	var thatform=opener.document.getElementById('albumEditForm');
  	eval('thatform.'+fieldname+'.value=thisform.'+fieldname+'.value');
  }
</script>
  
  
  	<table cellspacing="0" cellpadding="0" border="0">
	<form name="albumWsUpdateForm" id="albumWsUpdateForm">
	<input type="hidden" name="actiondel">

	<tr>
	<td><?=_TOPMUSIC_ARTIST?>:</td>
	<td><?=$_GET["artist"]?>
	</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td><?=_TOPMUSIC_TITLE?>:</td><td><input type="text" name="title" value="<?=$album->getTitle()?>"></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td>
	<? if($album->getYeardate()!=""){ ?>
		<a href="#" onClick="updateField('yeardate')"><img src="images/arrow_blue_left.gif" border="0"></a>
	<?}	?>
	<?=_TOPMUSIC_DATE?>:</td><td><input type="text" name="yeardate" value="<?=$album->getYeardate()?>"></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td>
	<? if($album->getGenreid()!=""){ ?>
		<a href="#" onClick="updateField('genre')"><img src="images/arrow_blue_left.gif" border="0"></a>
	<?}	?>
	<?=_TOPMUSIC_GENRE?>:</td><td>
	<?php
	$genericView=new GenericAdminView();
	$genericView->printSelect("genre",$genreList,$album->getGenreid(),"");
	?>
	</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<?php
	if(count($albumFields)>0){ 
		foreach($albumFields 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 valign="top">
	<? if($album->getFrontcoverUrl()!=""){ ?>
		<a href="#" onClick="updateField('frontcover_url')"><img src="images/arrow_blue_left.gif" border="0"></a>
	<?}	?>
	<?=_TOPMUSIC_FRONTCOVER_URL?>:</td><td><input type="text" name="frontcover_url" value="<?=$album->getFrontcoverUrl()?>">
  
  </td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td valign="top">
	<? if($album->getBackcoverUrl()!=""){ ?>
		<a href="#" onClick="updateField('backcover_url')"><img src="images/arrow_blue_left.gif" border="0"></a>
	<?}	?>
	<?=_TOPMUSIC_BACKCOVER_URL?>:</td><td><input type="text" name="backcover_url" value="<?=$album->getBackcoverUrl()?>"></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
	<td valign="top"><?=_TOPMUSIC_COMMENTS?> (<?=$currentlang?>):</td><td><textarea name="comments" cols="70" rows="15"><?=$album->getComments()?></textarea>
	</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	</form>
	</table>
	
	<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