<div>
<div style="float: right">
[<a href="./?go=edit&id={$mymovie->id}">Back</a>]
</div>
<h2>Update from IMDb</h2>
{if $movie && $movie->photo()}
<div style="float: right; margin-right: 50px; text-align: center;">
<img src="{$movie->photo()}" alt="{$movie->title()|trim}" title="{$movie->title()|trim}">
</div>
{/if}
<form name="updatefrom" method="POST" action="./?go=update&id={$mymovie->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> </td>
<td>
<input type="submit" name="submit" value="update" class="button">
<input type="reset" name="back" value="cancel" class="button" onclick="location.href='./?go=edit&id={$mymovie->id}';">
</td>
</tr>
<tr id="tr_imdbid">
<td width="150">IMDb number:</td>
<td><input type="text" name="imdbid" id="unsignedinteger_imdbid_0" value="{if $movie}{$movie->imdbid()|trim|replace:"\"":"""}{/if}" 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="{if $movie}{$movie->title()|trim|replace:"\"":"""}{/if}" class="textfield"></td>
</tr>
<tr id="tr_aka">
<td>AKA titles:</td>
<td>
{if $movie}
{assign var=akas value=$movie->alsoknow()}
{/if}
<textarea name="aka" id="text_aka_0" class="textarea">{section name=a loop=$akas}{$akas[a].title|trim|replace:"\"":"""}
{/section}</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="{if $movie}{$movie->year()|trim|replace:"\"":"""}{/if}" class="textfield"></td>
</tr>
<tr id="tr_duration">
<td>Duration (minuten):</td>
<td><input type="text" name="duration" id="unsignedinteger_duration_0" value="{if $movie}{$movie->runtime()|trim|replace:"\"":"""}{/if}" class="textfield"></td>
</tr>
<tr id="tr_rating">
<td>Score:</td>
<td><input type="text" name="rating" id="text_rating_0" value="{if $movie}{$movie->rating()|trim|replace:"\"":"""}{/if}" class="textfield"></td>
</tr>
<tr id="tr_taglines">
<td>Taglines:</td>
<td>
{if $movie}
{assign var=tagline value=$movie->taglines()}
{/if}
<textarea name="taglines" id="text_taglines_0" class="textarea">{section name=t loop=$tagline}{$tagline[t]|trim|replace:"\"":"""}
{/section}</textarea>
</td>
</tr>
<tr id="tr_plotoutline">
<td>Plot outline:</td>
<td><textarea name="plotoutline" id="text_plotoutline_0" class="textarea">{if $movie}{$movie->plotoutline()|trim|replace:"\"":"""}{/if}</textarea></td>
</tr>
<tr id="tr_plots">
<td>Plots:</td>
<td>
{if $movie}
{assign var=plots value=$movie->plot()}
{/if}
<textarea name="plots" id="text_plots_0" class="textarea" style="height: 100px;">{section name=p loop=$plots}{$plots[p]|trim|stripTags|replace:"\"":"""}
{/section}</textarea>
</td>
</tr>
<tr id="tr_languages">
<td>Languages:</td>
<td>
{if $movie}
{assign var=languages value=$movie->languages()}
{/if}
<textarea name="languages" id="text_languages_0" class="textarea">{section name=l loop=$languages}{$languages[l]|trim|replace:"\"":"""}
{/section}</textarea>
</td>
</tr>
<tr id="tr_country">
<td>Country:</td>
<td>
{if $movie}
{assign var=country value=$movie->country()}
{/if}
<textarea name="country" id="text_country_0" class="textarea">{section name=c loop=$country}{$country[c]|trim|replace:"\"":"""}
{/section}</textarea>
</td>
</tr>
<tr id="tr_genres">
<td>Genres:</td>
<td>
{if $movie}
{assign var=genres value=$movie->genres()}
{/if}
<textarea name="genres" id="text_genres_0" class="textarea">{section name=g loop=$genres}{$genres[g]|trim|replace:"\"":"""}
{/section}</textarea>
</td>
</tr>
<tr id="tr_director">
<td>Director:</td>
<td>
{if $movie}
{assign var=director value=$movie->director()}
{/if}
<textarea name="director" id="text_director_0" class="textarea">{section name=d loop=$director}{$director[d].name|trim|replace:"\"":"""}
{/section}</textarea>
</td>
</tr>
<tr id="tr_writer">
<td>Writer:</td>
<td>
{if $movie}
{assign var=writer value=$movie->writing()}
{/if}
<textarea name="writer" id="text_writer_0" class="textarea">{section name=w loop=$writer}{$writer[w].name|trim|replace:"\"":"""}
{/section}</textarea>
</td>
</tr>
<tr id="tr_producer">
<td>Producer:</td>
<td>
{if $movie}
{assign var=writer value=$movie->producer()}
{/if}
<textarea name="producer" id="text_producer_0" class="textarea">{section name=p loop=$producer}{$producer[p].name|trim|replace:"\"":"""}
{/section}</textarea>
</td>
</tr>
<tr id="tr_music">
<td>Music:</td>
<td>
{if $movie}
{assign var=writer value=$movie->composer()}
{/if}
<textarea name="music" id="text_music_0" class="textarea">{section name=m loop=$music}{$music[m].name|trim|replace:"\"":"""}
{/section}</textarea>
</td>
</tr>
<tr id="tr_cast">
<td>Cast:</td>
<td>
{if $movie}
{assign var=cast value=$movie->cast()}
{/if}
<textarea name="cast" id="text_cast_0" class="textarea" style="height: 80px;">{section name=c loop=$cast}{$cast[c].name|trim|replace:"\"":"""}
{/section}</textarea>
</td>
</tr>
<tr>
<td>
{if $movie}
<input type="hidden" name="image" value="{$movie->photo()|trim}">
{/if}
<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=edit&id={$mymovie->id}';">
</td>
</tr>
</table>
</form>
</div>