// art_details - display one listing
//

#cgivar id
#set TITLE = "Details for one listing"
#include top

<center>
<a href="?rtn=art_menu">Back to art demo home</a> &nbsp; &nbsp;
<a href="?rtn=art_form&id=@id&formmode=update">Edit this listing</a> &nbsp; &nbsp; 
<a href="?rtn=art_delete&id=@id">Delete this listing</a> 

<br>
<br>

#sql #load select * from examp_art where id = @id
#if $sqlrowcount() = 0
  <h2>Listing @id not found!</h2>
  #exit
#endif

<TABLE CELLPADDING=2 CELLSPACING=4><TR>
<TD valign=top>

<table cellpadding=2 cellspacing=2 ><tr>

<tr bgcolor=FFFFFF align=left>
<td bgcolor=FFFFEC align=right><b>Artist</b></td>
<td>@artist</td></tr>

<tr bgcolor=FFFFFF align=left>
<td bgcolor=FFFFEC align=right><b>Title</b></td>
<td>@title</td></tr>

<tr bgcolor=FFFFFF align=left>
<td bgcolor=FFFFEC align=right><b>Format</b></td>
<td>@format</td></tr>
	
<tr bgcolor=FFFFFF align=left>
<td bgcolor=FFFFEC align=right><b>Year</b></td>
<td>@year_created </td></tr>

#set size = $change( "~", '"', @size )
<tr bgcolor=FFFFFF align=left>
<td bgcolor=FFFFEC align=right><b>Size</b><br>(inches)</td>
<td>@size</td></tr>

<tr bgcolor=FFFFFF align=left>
<td bgcolor=FFFFEC align=right><b>Frame</b></td>
<td>@frame</td></tr>


<tr bgcolor=FFFFFF align=left>
<td bgcolor=FFFFEC align=right><b>Est. value (USD)</b></td>
<td>$ @current_value</td></tr>

#if @textdesc = 1
  <tr bgcolor=FFFFFF align=left>
  <td bgcolor=FFFFEC align=right><b>Longer description</b></td>
  <td>
  <table width=300><tr><td>
  #showtext examp_art/@id
  </td></tr></table>
</td></tr>
#endif

</table>

</TD>
<TD valign=top>

// display images if available..
#if @img1 != ""
  <img src="http://quisp.sourceforge.net/live_demo/img/@img1"><br><br>
#else
  <h3>No image available</h3>
#endif
#if @img2 != ""
  <img src="http://quisp.sourceforge.net/live_demo/img/@img2"><br><br>
#endif
#if @img3 != ""
  <img src="http://quisp.sourceforge.net/live_demo/img/@img3"><br><br>
#endif
<center>(images are loaded from sourceforge and my be slow)</center>
</TD></TR>
</TABLE>
