Location: PHPKode > projects > Php4dvd - movie database > php4dvd/tpl/default/movies/edit.html
<div>
	<div style="float: right">
		{if $movie->imdbid != ""}
		[<a href="./?go=update&amp;id={$movie->id}">Update from IMDb</a>] &nbsp;&nbsp;
		{/if}
		[<a href="./?go=movie&amp;id={$movie->id}">Back</a>]
	</div>
	
	<h2>Edit movie</h2>
	
	<div style="float: right; margin-right: 50px; text-align: center;">
		{if $movie->hasPhoto($photopath)}
		<img src="{$photopath}{$movie->id}.jpg" alt="{$movie->name|trim}" title="{$movie->name|trim}"><br><br>
		{/if}
		{if $movie->hasCover($coverpath)}
		<a href="javascript:void(0);" onclick="removeCover('{$movie->id}');"><img src="{$coverpath}tn_{$movie->id}.jpg" alt="Remove" title="Remove" width="200"></a>
		{/if}
	</div>
	
	<form name="editform" method="POST" action="./?go=edit&amp;id={$movie->id}" enctype="multipart/form-data" onsubmit="if(verify(this)) return true; else alert('Some fields are not filled in correctly!'); return false;">
	<table>
		<tr>
			<td>&nbsp;</td>
			<td>
				<input type="submit" name="submit" value="update" class="button">
				<input type="reset" name="back" value="cancel" class="button" onclick="location.href='./?go=movie&amp;id={$movie->id}';">
			</td>
		</tr>
		
		<tr id="tr_imdbid">
			<td width="150">IMDb number:</td>
			<td><input type="text" name="imdbid" id="unsignedinteger_imdbid_0" value="{$movie->imdbid|replace:"\"":"&quot;"}" class="textfield"></td>
		</tr>
		
		<tr id="tr_name">
			<td>Title: <span class="inputerror">*</span></td>
			<td><input type="text" name="name" id="text_name_1" value="{$movie->name|replace:"\"":"&quot;"}" class="textfield"></td>
		</tr>
		
		<tr id="tr_aka">
			<td>AKA titles:</td>
			<td>
				<textarea name="aka" id="text_aka_0" class="textarea">{$movie->aka}</textarea>
			</td>
		</tr>
		
		<tr id="tr_year">
			<td>Year: <span class="inputerror">*</span></td>
			<td><input type="text" name="year" id="unsignedinteger_year_1" value="{$movie->year|replace:"\"":"&quot;"}" class="textfield"></td>
		</tr>
		
		<tr id="tr_duration">
			<td>Duration (minutes):</td>
			<td><input type="text" name="duration" id="unsignedinteger_duration_0" value="{$movie->duration|replace:"\"":"&quot;"}" class="textfield"></td>
		</tr>
		
		<tr id="tr_rating">
			<td>Rating:</td>
			<td><input type="text" name="rating" id="text_rating_0" value="{$movie->rating|replace:"\"":"&quot;"}" class="textfield"></td>
		</tr>
		
		<tr id="tr_format">
			<td>Format: <span class="inputerror">*</span></td>
			<td>
				<select name="format" class="select">
					<option value="DVD"{if $movie->format == "DVD"} selected{/if}>DVD</option>
					<option value="Blu-ray"{if $movie->format == "Blu-ray"} selected{/if}>Blu-ray</option>
				</select>
			</td>
		</tr>
		
		<tr id="tr_own">
			<td>I own this movie: <span class="inputerror">*</span></td>
			<td>
				<input type="radio" name="own" id="own_yes" value="1"{if $movie->own} checked{/if}><label for="own_yes">yes</label>
				<input type="radio" name="own" id="own_no" value="0"{if !$movie->own} checked{/if}><label for="own_no">no</label>
			</td>
		</tr>
		
		<tr id="tr_seen">
			<td>I have seen movie: <span class="inputerror">*</span></td>
			<td>
				<input type="radio" name="seen" id="seen_yes" value="1"{if $movie->seen} checked{/if}><label for="seen_yes">yes</label>
				<input type="radio" name="seen" id="seen_no" value="0"{if !$movie->seen} checked{/if}><label for="seen_no">no</label>
			</td>
		</tr>
		
		<tr id="tr_loaned">
			<td>Loaned out: <span class="inputerror">*</span></td>
			<td>
				<input type="radio" name="loaned" id="loaned_yes" value="1" onclick="doDisplay('tr_loandate', true); doDisplay('tr_loanname', true);"{if $movie->loaned} checked{/if}><label for="loaned_yes">yes</label>
				<input type="radio" name="loaned" id="loaned_no" value="0" onclick="doDisplay('tr_loandate', false); doDisplay('tr_loanname', false);"{if !$movie->loaned} checked{/if}><label for="loaned_no">no</label>
			</td>
		</tr>
		
		<tr id="tr_loandate"{if !$movie->loaned} style="display: none;"{/if}>
			<td>When loaned out:</td>
			<td>
				<input type="text" name="loandate" id="date_loandate_0" value="{if $movie->loandate != "0000-00-00"}{$movie->loandate|replace:"\"":"&quot;"}{else}YYYY-MM-DD{/if}" class="textfield" onfocus="if(this.value=='YYYY-MM-DD') this.value='{$smarty.now|date_format:"%Y-%m-%d"}';" onblur="if(this.value.trim()=='') this.value='YYYY-MM-DD';">
			</td>
		</tr>
		
		<tr id="tr_loanname"{if !$movie->loaned} style="display: none;"{/if}>
			<td>Loaned out to:</td>
			<td>
				<input type="text" name="loanname" id="text_loanname_0" value="{$movie->loanname|replace:"\"":"&quot;"}" class="textfield">
			</td>
		</tr>
		
		<tr id="tr_cover">
			<td>Cover:</td>
			<td>
				<input type="file" name="cover" id="text_cover_0" class="textfield" size="35"><br>
				[<a href="http://www.cdcovers.cc/search/dvd/{if $movie}{$movie->name|trim|replace:" ":"-"}{/if}" target="_blank">Search the cover</a>]
			</td>
		</tr>
		
		<tr id="tr_notes">
			<td>Personal notes:</td>
			<td>
				<textarea name="notes" id="text_notes_0" class="textarea">{$movie->notes|replace:"\"":"&quot;"}</textarea>
			</td>
		</tr>
		
		<tr id="tr_taglines">
			<td>Taglines:</td>
			<td>
				<textarea name="taglines" id="text_taglines_0" class="textarea">{$movie->taglines|replace:"\"":"&quot;"}</textarea>
			</td>
		</tr>
		
		<tr id="tr_plotoutline">
			<td>Plot outline:</td>
			<td><textarea name="plotoutline" id="text_plotoutline_0" class="textarea">{$movie->plotoutline|replace:"\"":"&quot;"}</textarea></td>
		</tr>
		
		<tr id="tr_plots">
			<td>Plots:</td>
			<td>
				<textarea name="plots" id="text_plots_0" class="textarea" style="height: 100px;">{$movie->plots|replace:"\"":"&quot;"}</textarea>
			</td>
		</tr>
		
		<tr id="tr_languages">
			<td>Language:</td>
			<td>
				<textarea name="languages" id="text_languages_0" class="textarea">{$movie->languages|replace:"\"":"&quot;"}</textarea>
			</td>
		</tr>
		
		<tr id="tr_country">
			<td>Country:</td>
			<td>
				<textarea name="country" id="text_country_0" class="textarea">{$movie->country|replace:"\"":"&quot;"}</textarea>
			</td>
		</tr>
		
		<tr id="tr_genres">
			<td>Genres:</td>
			<td>
				<textarea name="genres" id="text_genres_0" class="textarea">{$movie->genres|replace:"\"":"&quot;"}</textarea>
			</td>
		</tr>
		
		<tr id="tr_director">
			<td>Director:</td>
			<td>
				<textarea name="director" id="text_director_0" class="textarea">{$movie->director|replace:"\"":"&quot;"}</textarea>
			</td>
		</tr>
		
		<tr id="tr_writer">
			<td>Writer:</td>
			<td>
				<textarea name="writer" id="text_writer_0" class="textarea">{$movie->writer|replace:"\"":"&quot;"}</textarea>
			</td>
		</tr>
		
		<tr id="tr_producer">
			<td>Producer:</td>
			<td>
				<textarea name="producer" id="text_producer_0" class="textarea">{$movie->producer|replace:"\"":"&quot;"}</textarea>
			</td>
		</tr>
		
		<tr id="tr_music">
			<td>Music:</td>
			<td>
				<textarea name="music" id="text_music_0" class="textarea">{$movie->music|replace:"\"":"&quot;"}</textarea>
			</td>
		</tr>
		
		<tr id="tr_cast">
			<td>Cast:</td>
			<td>
				<textarea name="cast" id="text_cast_0" class="textarea" style="height: 80px;">{$movie->cast|replace:"\"":"&quot;"}</textarea>
			</td>
		</tr>
		
		<tr>
			<td>
				<input type="hidden" name="update" value="0">
			</td>
			<td>
				<input type="submit" name="submit" value="update" class="button">
				<input type="reset" name="back" value="cancel" class="button" onclick="location.href='./?go=movie&amp;id={$movie->id}';">
			</td>
		</tr>
		
	</table>
	</form>
</div>
Return current item: Php4dvd - movie database