<style type="text/css">
<!--
body { background:#fff; }
.horizontal { list-style:none; text-align:right; margin:5px; }
.horizontal li { display:inline; }
.horizontal li.close { margin-left:1em; }
-->
</style>
<script type="text/javascript">
<!--//
function appendCode(addCode) {
	var targetDom = window.opener.xoopsGetElementById('<{$target|xoops_escape}>');
	if (targetDom.createTextRange && targetDom.caretPos){
  		var caretPos = targetDom.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? addCode + ' ' : addCode;  
	} else if (targetDom.getSelection && targetDom.caretPos){
		var caretPos = targetDom.caretPos;
		caretPos.text = caretPos.text.charat(caretPos.text.length - 1) == ' ' ? addCode + ' ' : addCode;
	} else {
		targetDom.value = targetDom.value + addCode;
  	}
	window.close();
	return;
}
//-->
</script>

<form method="get" action="<{$moduleUrl}>/index.php" style="margin:10px;">
<{*  <select name="category_id" onchange="location='<{$moduleUrl}>/index.php?op=ImageBoard&amp;target=<{$target|xoops_escape}>&amp;category_id='+this.options[this.selectedIndex].value">*}>
  <input type="hidden" name="target" value="<{$target|xoops_escape}>" />
  <input type="hidden" name="op" value="ImageBoard" />
  <select name="category_id">
    <option value="0">---</option>
    <{html_options options=$categories selected=$category_id}>
  </select>
  <input type="submit" value="<{$smarty.const._SUBMIT}>" />
</form>

<ul class="horizontal">
<{if $hasUploadPerm}>
  <li><a href="<{$moduleUrl}>/index.php?op=ImageAdd&amp;category_id=<{$category->getShow('category_id')}>&amp;target=<{$target|xoops_escape}>"><img src="<{$moduleUrl}>/images/photo_add.gif" alt="" title="<{$smarty.const._MD_MYUPLOADER_LANG_ADD_IMAGE}>" /></a></li>
<{/if}>
  <li class="close"><input value="<{$smarty.const._CLOSE}>" type="button" onclick="javascript:window.close();" /></li>
</ul>

<{if $objects}>
<table class="outer" cellspacing="1">
  <tr>
    <th><{$smarty.const._MD_MYUPLOADER_LANG_IMAGE_TITLE}>
    <th><{$smarty.const._MD_MYUPLOADER_LANG_IMAGE}>
    <th><{$smarty.const._MD_MYUPLOADER_LANG_IMAGE_POSITION}>
  <{foreach item=obj from=$objects}>
    <tr class="<{cycle values='odd,odd,even,even'}>" style="text-align:center;">
      <td rowspan="2" style="vertical-align:middle;"><{$obj->getShow('image_title')}>
      <td rowspan="2">
    <{if $obj->mUploadable}>
      <a href="<{$moduleUrl}>/index.php?op=ImageAdd&amp;image_id=<{$obj->getShow('image_id')}>&amp;target=<{$target|xoops_escape}>" title="<{$smarty.const._EDIT}>"><img src="<{$uploadDir|escape}>/<{$obj->getShow('image_bodyname')}>_thumb.<{$obj->getShow('image_extension')}>" /></a>
    <{else}>
      <img src="<{$uploadDir|escape}>/<{$obj->getShow('image_bodyname')}>_thumb.<{$obj->getShow('image_extension')}>" />
	<{/if}>
      <td style="vertical-align:middle;">
        <a href="#" onclick="javascript:appendCode('[site<{$tag}> width=<{$obj->getShow('image_width')}> height=<{$obj->getShow('image_height')}> alt=\'<{$obj->getShow('image_title')}>\' align=left]<{$siteUploadDir|escape}>/<{$obj->getShow('image_filename')}>[/site<{$tag}>]');"><img src="<{$moduleUrl}>/images/alignbigleft.gif" alt="Left" title="a main image to the left" /></a>
        <a href="#" onclick="javascript:appendCode('[site<{$tag}> width=<{$obj->getShow('image_width')}> height=<{$obj->getShow('image_height')}> alt=\'<{$obj->getShow('image_title')}>\' align=cente]<{$siteUploadDir|escape}>/<{$obj->getShow('image_filename')}>[/site<{$tag}>]');"><img src="<{$moduleUrl}>/images/alignbigcenter.gif" alt="Center" title="a main image to the center" /></a>
        <a href="#" onclick="javascript:appendCode('[site<{$tag}> width=<{$obj->getShow('image_width')}> height=<{$obj->getShow('image_height')}> alt=\'<{$obj->getShow('image_title')}>\' align=right]<{$uploadDir|escape}>/<{$obj->getShow('image_filename')}>[/site<{$tag}>]');"><img src="<{$moduleUrl}>/images/alignbigright.gif" alt="Left" title="a main image to the right" /></a>
    <tr class="<{cycle values='odd,odd,even,even'}>" style="text-align:center;vertical-align:middle;">
      <td style="vertical-align:middle;">
        <a href="#" onclick="javascript:appendCode('[siteurl=<{$siteUploadDir|escape}>/<{$obj->getShow('image_filename')}>][site<{$tag}> width=<{$obj->getShow('image_thumbwidth')}> height=<{$obj->getShow('image_thumbheight')}> alt=\'<{$obj->getShow('image_title')}>\' title=\'<{$obj->getShow('image_title')}>\' caption=\'<{$obj->getShow('image_description')}>\' align=left<{if $moduleConfig.highslide}> class=highslide id=hs<{$obj->getShow('image_id')}><{/if}>]<{$siteUploadDir|escape}>/<{$obj->getShow('image_bodyname')}>_thumb.<{$obj->getShow('image_extension')}>[/site<{$tag}>][/siteurl]');"><img src="<{$moduleUrl}>/images/alignleft.gif" alt="Left" title="a thumbnail to the left<{if $moduleConfig.highslide}> with a highslide effect<{/if}>" /></a>
        <a href="#" onclick="javascript:appendCode('[siteurl=<{$siteUploadDir|escape}>/<{$obj->getShow('image_filename')}>][site<{$tag}> width=<{$obj->getShow('image_thumbwidth')}> height=<{$obj->getShow('image_thumbheight')}> alt=\'<{$obj->getShow('image_title')}>\' title=\'<{$obj->getShow('image_title')}>\' caption=\'<{$obj->getShow('image_description')}>\' align=center<{if $moduleConfig.highslide}> class=highslide id=hs<{$obj->getShow('image_id')}><{/if}>]<{$siteUploadDir|escape}>/<{$obj->getShow('image_bodyname')}>_thumb.<{$obj->getShow('image_extension')}>[/site<{$tag}>][/siteurl]');"><img src="<{$moduleUrl}>/images/aligncenter.gif" alt="Center" title="a thumbnail to the center<{if $moduleConfig.highslide}> with a highslide effect<{/if}>" /></a>
        <a href="#" onclick="javascript:appendCode('[siteurl=<{$siteUploadDir|escape}>/<{$obj->getShow('image_filename')}>][site<{$tag}> width=<{$obj->getShow('image_thumbwidth')}> height=<{$obj->getShow('image_thumbheight')}> alt=\'<{$obj->getShow('image_title')}>\' title=\'<{$obj->getShow('image_title')}>\' caption=\'<{$obj->getShow('image_description')}>\' align=right<{if $moduleConfig.highslide}> class=highslide id=hs<{$obj->getShow('image_id')}><{/if}>]<{$siteUploadDir|escape}>/<{$obj->getShow('image_bodyname')}>_thumb.<{$obj->getShow('image_extension')}>[/site<{$tag}>][/siteurl]');"><img src="<{$moduleUrl}>/images/alignright.gif" alt="Left" title="a thumbnail to the right<{if $moduleConfig.highslide}> with a highslide effect<{/if}>" /></a>
        
  <{/foreach}>
</table>
<{/if}>

<{if $pageNavi}>
<div class="pagenavi" style="text-align:center; margin:5px;"><{xoops_pagenavi pagenavi=$pageNavi}></div>
<{/if}>