<{* $Id: webphoto_main_photo.html,v 1.16 2009/03/21 08:16:17 ohwada Exp $ *}>

<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php">
<{$xoops_modulename}></a> &gt;&gt; 
<b><{$sub_title}> <{$photo.title_s}></b>
<br />

<script type="text/javascript" src="<{$xoops_url}>/modules/<{$xoops_dirname}>/libs/code.js"></script>

<{* === gmap js === *}>
<{if $show_gmap }>
  <{include file="db:`$mydirname`_inc_gmap_js.html" }>
  <{include file="db:`$mydirname`_inc_gmap_icons.html" }>

<script type="text/javascript">
//<![CDATA[

  webphoto_gmap_info[0] = new Array( <{$gmap_photo.gmap_latitude}>, <{$gmap_photo.gmap_longitude}>, <{$gmap_photo.gmap_icon_id}>, '<{$gmap_photo.gmap_info}>' );

//]]>
</script>
<{/if}>
<{* === gmap js end === *}>

<{* === windows js === *}>
<{if $show_js_window }>
<script type="text/javascript">
//<![CDATA[
<{if $show_js_boxlist }>
  var webphoto_box_list = "<{$js_boxlist}>";
<{/if}>
<{if $show_js_load }>
  window.onload   = <{$js_load}>;
<{/if}>
<{if $show_js_unload }>
  window.onunload = <{$js_unload}>;
<{/if}>
//]]>
</script>
<{/if}>
<{* === windows js end === *}>

<div class="webphoto_page_title">
  <{$sub_title}> <{$photo.title_s}>
</div>

<{* === menue === *}>
<{include file="db:`$mydirname`_inc_menu.html" }>

<{* === search form === *}>
<{include file="db:`$mydirname`_inc_search.html" }>

<{* === gmap === *}>
<{if $show_gmap }>
  <div id="webphoto_box_gmap_b">
  <a href="javascript:webphoto_box_gmap_off()">
  <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/images/icons/box_minus.png" width="16" height="16" border="0" alt="minus" />
  <{$lang_gmap_off}></a> <br />
  <{$lang_gmap_desc}><br />
  <div id="webphoto_gmap_not_compatible" class="webphoto_error"></div>
  <div id="webphoto_gmap_map" class="webphoto_gmap_normal">Loading ...</div>
  </div>

  <div id="webphoto_box_gmap_a" style="display:none">
  <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/images/icons/box_plus.png" width="16" height="16" border="0" alt="minus" />
  <a href="javascript:webphoto_box_gmap_on()">
  <{$lang_gmap_on}></a> </a>
  </div>

  <br />
<{/if}>

<div align="center">
  <{$photo_nav}>
</div>
<br />

<div align="center">

<{* IMAGES *}>
  <{if $photo.displaytype == 1 }>

    <{if $photo.img_middle_width && $photo.img_middle_height }>
      <a href="<{$photo.media_url_s}>" target="_blank" onClick="window.open('<{$photo.media_url_s}>', '', 'width=<{$photo.window_x}>,height=<{$photo.window_y}>' ); return(false);">
      <img src="<{$photo.img_middle_src_s}>" border="0" align="center" vspace="3" hspace="7" alt="<{$photo.title_s}>" title="<{$photo.title_s}>" width="<{$photo.img_middle_width}>" height="<{$photo.img_middle_height}>" />

    <{else}>
      <a href="<{$photo.media_url_s}>" target="_blank" onClick="window.open('<{$photo.media_url_s}>', '', '' ); return(false);">
      <img src="<{$photo.img_middle_src_s}>" border="0" align="center" vspace="3" hspace="7" alt="<{$photo.title_s}>" title="<{$photo.title_s}>" width="<{$cfg_middle_width}>" />
    <{/if}>

    </a> <br />
    <span class="webphoto_photo_title"><{$photo.title_s}></span>

    <{if $photo.cont_size_disp}>
      ( <{$photo.cont_size_disp}> )
    <{/if}>
    <br />

<{* ENBED *}>
  <{elseif $photo.displaytype == 10 }>
    <{$photo.embed_embed}> 
    <br /><br />
    <{if $photo.embed_link != '' }>
      <a href="<{$photo.embed_link}>" target="_blank">
      <{$photo.title_s}></a>
    <{else}>
      <{$photo.title_s}>
    <{/if}>

    <{if $photo.cont_size_disp}>
      ( <{$photo.cont_size_disp}> )
    <{/if}>

    <br />

<{* FALSH PLAYER *}>
  <{elseif $photo.displaytype_flash }>
    <{$photo.flash_player}>
    <br />
    <span class="webphoto_photo_title"><{$photo.title_s}></span>

    <{if $photo.cont_size_disp}>
      ( <{$photo.cont_size_disp}> )
    <{/if}>
    <br />

<{* GENERAL *}>
  <{elseif $photo.media_url_s }>
    <a href="<{$photo.media_url_s}>" target="_blank">

    <{if $photo.img_middle_src_s && $photo.img_middle_width && $photo.img_middle_height }>
      <img src="<{$photo.img_middle_src_s}>" border="0" align="center" vspace="3" hspace="7" alt="<{$photo.title_s}>" title="<{$photo.title_s}>" width="<{$photo.img_middle_width}>" height="<{$photo.img_middle_height}>" />
    <{elseif $photo.img_middle_src_s }>
      <img src="<{$photo.img_middle_src_s}>" border="0" align="center" vspace="3" hspace="7" alt="<{$photo.title_s}>" title="<{$photo.title_s}>" width="<{$cfg_middle_width}>" />
    <{elseif $photo.thumb_width && $photo.thumb_height }>
      <img src="<{$photo.imgsrc_thumb}>" border="0" align="center" vspace="3" hspace="7" alt="<{$photo.title_s}>" title="<{$photo.title_s}>" width="<{$photo.thumb_width}>" height="<{$photo.thumb_height}>" />
    <{else}>
      <img src="<{$photo.imgsrc_thumb}>" border="0" align="center" vspace="3" hspace="7" alt="<{$photo.title_s}>" title="<{$photo.title_s}>" width="<{$cfg_middle_width}>" />
    <{/if}>

    </a> <br />
    <span class="webphoto_photo_title"><{$photo.title_s}></span> <br />

    <{if $photo.is_video && $photo.cont_duration_disp }>
      ( <{$photo.cont_duration_disp}> ) 
    <{/if}>

    <{if $photo.cont_size_disp}>
      ( <{$photo.cont_size_disp}> )
    <{/if}>

    <br />

<{* NO FILE TYPE *}>
  <{else}>
    <span class="webphoto_photo_title"><{$photo.title_s}></span> <br />
  <{/if}>

</div><br />

<{if $photo.show_codebox }>
  <div align="center">
  <div class="webphoto_div_codebox">
  <form name="webphoto_codebox_form" id="webphoto_codebox_form"> 
  <table class="webphoto_table_code">
  <{if $photo.show_code_page }>
    <tr><td class="webphoto_td_code_left">
      <a href="<{$photo.code_page_url}>" target="_self" title="<{$lang_page_view}>">
      <{$lang_item_codeinfo_page}>
      </a>
    </td><td class="webphoto_td_code_middle">
    </td><td class="webphoto_td_code_right">
      <input name="webphoto_page_link" type="text" value="<{$photo.code_page_url}>" size="40" class="webphoto_input_codebox" onClick="webphoto_code_focus( this )" readonly="true">
    </td></tr>
  <{/if}>
  <{if $photo.show_code_cont }>
    <tr><td class="webphoto_td_code_left">
      <{$photo.code_cont_link}>
    </td><td class="webphoto_td_code_middle">
      <{$photo.code_cont_size}>
    </td><td class="webphoto_td_code_right">
      <input name="webphoto_cont_link" type="text" value="<{$photo.code_cont_url_s}>" size="40" class="webphoto_input_codebox" onClick="webphoto_code_focus( this )" readonly="true">
    </td></tr>
  <{/if}>
  <{if $photo.show_code_flash }>
    <tr><td class="webphoto_td_code_left">
      <{$photo.code_flash_link}>
    </td><td class="webphoto_td_code_middle">
      <{$photo.code_flash_size}>
    </td><td class="webphoto_td_code_right">
      <input name="webphoto_flash_link" type="text" value="<{$photo.code_flash_url_s}>" size="40" class="webphoto_input_codebox" onClick="webphoto_code_focus( this )" readonly="true">
    </td></tr>
  <{/if}>
  <{if $photo.show_code_pdf }>
    <tr><td class="webphoto_td_code_left">
      <{$photo.code_pdf_link}>
    </td><td class="webphoto_td_code_middle">
      <{$photo.code_pdf_size}>
    </td><td class="webphoto_td_code_right">
      <input name="webphoto_pdf_link" type="text" value="<{$photo.code_pdf_url_s}>" size="40" class="webphoto_input_codebox" onClick="webphoto_code_focus( this )" readonly="true">
    </td></tr>
  <{/if}>
    <{if $photo.show_code_swf }>
    <tr><td class="webphoto_td_code_left">
      <{$photo.code_swf_link}>
    </td><td class="webphoto_td_code_middle">
      <{$photo.code_swf_size}>
    </td><td class="webphoto_td_code_right">
      <input name="webphoto_swf_link" type="text" value="<{$photo.code_swf_url_s}>" size="40" class="webphoto_input_codebox" onClick="webphoto_code_focus( this )" readonly="true">
    </td></tr>
  <{/if}>
  <{if $photo.show_code_thumb }>
    <tr><td class="webphoto_td_code_left">
      <{$photo.code_thumb_link}>
    </td><td class="webphoto_td_code_middle">
      <{$photo.code_thumb_size}>
    </td><td class="webphoto_td_code_right">
      <input name="webphoto_code_thumb" type="text" value="<{$photo.code_thumb_url_s}>" size="40" class="webphoto_input_codebox" onClick="webphoto_code_focus( this )" readonly="true">
    </td></tr>
  <{/if}>
  <{if $photo.show_code_middle }>
    <tr><td class="webphoto_td_code_left">
      <{$photo.code_middle_link}>
    </td><td class="webphoto_td_code_middle">
      <{$photo.code_middle_size}>
    </td><td class="webphoto_td_code_right">
      <input name="webphoto_code_middle" type="text" value="<{$photo.code_middle_url_s}>" size="40" class="webphoto_input_codebox" onClick="webphoto_code_focus( this )" readonly="true">
    </td></tr>
  <{/if}>
  <{if $photo.show_code_site}>
    <tr><td class="webphoto_td_code_left">
      <{$photo.code_site_link}>
    </td><td class="webphoto_td_code_middle">
    </td><td class="webphoto_td_code_right">
      <input name="webphoto_code_site" type="text" value="<{$photo.code_site_url_s}>" size="40" class="webphoto_input_codebox" onClick="webphoto_code_focus( this )" readonly="true">
    </td></tr>
  <{/if}>
  <{if $photo.show_code_play }>
    <tr><td class="webphoto_td_code_left">
      <{$photo.code_play_link}>
    </td><td class="webphoto_td_code_middle">
    </td><td class="webphoto_td_code_right">
      <input name="webphoto_code_play" type="text" value="<{$photo.code_play_url_s}>" size="40" class="webphoto_input_codebox" onClick="webphoto_code_focus( this )" readonly="true">
    </td></tr>
  <{/if}>
  <{if $photo.show_code_embed }>
    <tr><td class="webphoto_td_code_left">
      <{$lang_item_codeinfo_embed}>
    </td><td class="webphoto_td_code_middle">
    </td><td class="webphoto_td_code_right">
      <input name="webphoto_code_embed" type="text" value="<{$photo.code_embed_s}>" size="40" class="webphoto_input_codebox" onClick="webphoto_code_focus( this )" readonly="true">
    </td></tr>
  <{/if}>
  <{if $photo.show_code_js }>
    <tr><td class="webphoto_td_code_left">
      <{$lang_item_codeinfo_js}>
    </td><td class="webphoto_td_code_middle">
    </td><td class="webphoto_td_code_right">
      <input name="webphoto_code_js" type="text" value="<{$photo.code_js_s}>" size="40" class="webphoto_input_codebox" onClick="webphoto_code_focus( this )" readonly="true">
    </td></tr>
  <{/if}>
  </table>
  </form>
  </div></div><br />
<{/if}>

<div align="left">
  <{include file="db:`$mydirname`_inc_photo_info.html"}>
</div>

<{* EDIT ICON *}>
<{if $photo.can_edit}>
  <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php?fct=edit&amp;photo_id=<{$photo.photo_id}>">
  <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/images/icons/edit.png" border="0" alt="<{$lang_title_edit}>" title="<{$lang_title_edit}>" /><{$lang_title_edit}></a><br />
<{/if}>

<div align="center">
<img src="<{$qrs_url}>/<{$mobile_qr_image}>" border="0" alt="qr_image" /><br />
<a href="mailto:<{$mobile_email}>?subject=webphoto_url&amp;body=<{$mobile_url}>"><{$lang_mobile_mailto}></a><br />
</div>
<br />

<{if $show_tagedit }>
  <div align="center">
  <div class="webphoto_tagedit_form">
  <{$lang_dsc_tag_editable}> <br />
  <{$lang_dsc_tag_divid}> <br />
  <form action="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php" method="post">
  <input type="hidden" name="<{$token_name}>" value="<{$token_value}>" />
  <input type="hidden" name="fct" value="photo" />
  <input type="hidden" name="op"  value="tagedit" />
  <input type="hidden" name="photo_id"  value="<{$photo_id}>" />
  <input type="text" name="tags" size="50" maxlength="255" value="<{$tags}>" class="webphoto_tagedit" /> <br />
  <input type="submit" name="submit" value="<{$lang_edit_tag}>" />
  </form>
  </div>
  </div>
  <br />
<{/if}>

<div align="center">
  <{$photo_nav}>
</div>
<br />

<div class="webphoto_commentsnav">
  <{$commentsnav}>
  <{$lang_notice}>
</div>

<div class="webphoto_comments">
<{* start comments loop *}>
<{if $comment_mode == "flat"}>
  <{include file="db:system_comments_flat.html"}>
<{elseif $comment_mode == "thread"}>
  <{include file="db:system_comments_thread.html"}>
<{elseif $comment_mode == "nest"}>
  <{include file="db:system_comments_nest.html"}>
<{/if}>
<{* end comments loop *}>
</div>
<br />

<{* d3forum comment integration *}>
<{if $cfg_comment_dirname && $cfg_comment_forum_id }>
  <{* remove asterrisk (*) in the folloing, if you use *}>
  <{* d3forum_comment dirname=$cfg_comment_dirname forum_id=$cfg_comment_forum_id class="WebphotoD3commentContent" mytrustdirname="webphoto" id=$photo.photo_id subject=$photo.title_s subject_escaped=1 view=$cfg_comment_view posts_num=10 *}>
<{/if}>

<{if $show_notification_select }>
  <div align="center">
    <{include file="db:`$mydirname`_inc_notification_select.html"}>
  </div>
  <br />
<{/if}>

<hr />
<noscript>
  <div class="webphoto_error"><{$lang_js_invalid}></div>
</noscript>

<div class="webphoto_execution_time">execution time : <{$execution_time}> sec </div>
<{if $is_module_admin && ($memory_usage > 0)}>
	<div class="webphoto_memory_usage">memory usage : <{$memory_usage}> MB </div>
<{/if}>

<{if $is_module_admin }>
  <br />
  <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/admin/index.php"><{$lang_goto_admin}></a>
<{/if}>
