<!DOCTYPE html PUBLIC '//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
<head>
<{* $Id: webphoto_main_imagemanager.html,v 1.2 2008/09/12 22:57:45 ohwada Exp $ *}>
<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
<title><{$sitename}> <{$lang_imgmanager}></title>
<script type="text/javascript">
<!--//
function appendCode(addCode) {
	var targetDom = window.opener.xoopsGetElementById('<{$target}>');
	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;
  	}
	return;
}
//-->
</script>
<style type="text/css" media="all">
body {margin: 0;}
img {border: 0;}
table {width: 100%; margin: 0;}
a:link {color: #3a76d6; font-weight: bold; background-color: transparent;}
a:visited {color: #9eb2d6; font-weight: bold; background-color: transparent;}
a:hover {color: #e18a00; background-color: transparent;}
table td {background-color: white; font-size: 12px; padding: 0; border-width: 0; vertical-align: top; font-family: Verdana, Arial, Helvetica, sans-serif;}
table#imagenav td {vertical-align: bottom; padding: 5px;}
table#imagemain td {border-right: 1px solid silver; border-bottom: 1px solid silver; padding: 5px; vertical-align: middle;}
table#imagemain th {border: 0; background-color: #2F5376; color:white; font-size: 12px; padding: 5px; vertical-align: top; text-align:center; font-family: Verdana, Arial, Helvetica, sans-serif;}
table#header td {width: 100%; background-color: #2F5376; vertical-align: middle;}
table#header td#headerbar {border-bottom: 1px solid silver; background-color: #dddddd;}
div#pagenav {text-align:center;}
div#footer {text-align:right; padding: 5px;}
div.error  {background-color: #FFCCCC; text-align: center; border-top: 1px solid #DDDDFF; border-left: 1px solid #DDDDFF; border-right: 1px solid #AAAAAA; border-bottom: 1px solid #AAAAAA; font-weight: bold; padding: 10px; }
</style>
</head>

<{strip}>
<body onload="window.resizeTo(<{$xsize}>, <{$ysize}>);">

<{* header *}>
<table id="header" cellspacing="0">
  <tr>
  <td>
    <a href="<{$xoops_url}>/">
    <img src="<{$xoops_url}>/images/logo.gif" width="150" height="80" alt="logo" />
    </a>
  </td>
  <td> </td>
  </tr>
  <tr>
  <td id="headerbar" colspan="2"> </td>
  </tr>
</table>

<{* --- category select form --- *}>
<{if $show_cat_form }>
  <form action="<{$xoops_url}>/imagemanager.php" method="get">
  <table cellspacing="0" id="imagenav">
  <tr>
  <td>
    <select name="cat_id" onchange="submit();"><{$cat_options}></select>
    <input type="hidden" name="target" value="<{$target}>" />
    <input type="submit" value="<{$lang_refresh}>" />
  </td>
  <{if $can_add}>
    <td align="right">
      <input type="button" value="<{$lang_addimage}>" onclick='window.open("<{$xoops_url}>/modules/<{$dirname}>/index.php?fct=submit_imagemanager&amp;cat_id=<{$cat_id}>","submitphoto","WIDTH=600,HEIGHT=450,SCROLLBARS=1,RESIZABLE=1,TOOLBAR=0,MENUBAR=0,STATUS=0,LOCATION=0,DIRECTORIES=0");' />
    </td>
  <{/if}>
  </tr>
  </table>
  </form>

<{else}>
  <div class="error"><{$lang_no_category}></div>
<{/if}>

<{* === phorto list table === *}>
<{if $image_total > 0}>

<div id="pagenav"><{$pagenav}></div>

<table cellspacing="0" id="imagemain">
  <tr>
  <th><{$lang_imagename}></th>
  <th><{$lang_image}></th>
  <th><{$lang_imagesize}></th>
  <th><{$lang_align}></th>
  </tr>

<{* --- photo list begin --- *}>
<{foreach from=$photos item=photo}>
  <tr align="center">
  <td>
    <input type="hidden" name="photo_id[]" value="<{$photo.photo_id}>" />
    <{if $photo.can_edit}>
      <a href="<{$xoops_url}>/modules/<{$dirname}>/index.php?fct=edit&amp;photo_id=<{$photo.photo_id}>" target="_blank">
      <img src="<{$xoops_url}>/modules/<{$dirname}>/images/icons/edit.png" border="0" alt="<{$lang_title_edit}>" title="<{$lang_title_edit}>" />
      </a>
    <{/if}>
    <{$photo.nicename}>
  </td>
  <td>
  <{if $photo.thumb_width && $photo.thumb_height }>
    <img src="<{$photo.src}>" width="<{$photo.thumb_width}>" height="<{$photo.thumb_height}>" alt="<{$photo.nicename}>" title="<{$photo.nicename}>" />
  <{else}>
    <img src="<{$photo.src}>" alt="<{$photo.nicename}>" title="<{$photo.nicename}>" />
  <{/if}>
  </td>
  <td><{$photo.cont_width}> x <{$photo.cont_height}><br />(<{$photo.cont_ext}>)</td>
  <td nowrap="nowrap">

<{* thumbnail or icon *}>
  <{if $makethumb || ! $photo.is_normal }>
    <a href="#" onclick="javascript:appendCode('<{$photo.xcodel}>');">
    <img src="<{$xoops_url}>/modules/<{$dirname}>/images/imagemanager/alignleft.gif" alt="<{$lang_left}>" title="<{$lang_left}>" />
    </a>
    <a href="#" onclick="javascript:appendCode('<{$photo.xcodec}>');">
    <img src="<{$xoops_url}>/modules/<{$dirname}>/images/imagemanager/aligncenter.gif" alt="<{$lang_center}>" title="<{$lang_center}>" />
    </a>
    <a href="#" onclick="javascript:appendCode('<{$photo.xcoder}>');">
    <img src="<{$xoops_url}>/modules/<{$dirname}>/images/imagemanager/alignright.gif" alt="<{$lang_right}>" title="<{$lang_right}>" />
    </a>
    <br /><br />
  <{/if}>

<{* normal photo *}>
  <{if $photo.is_normal}>
    <a href="#" onclick="javascript:appendCode('<{$photo.xcodebl}>');">
    <img src="<{$xoops_url}>/modules/<{$dirname}>/images/imagemanager/alignbigleft.gif" alt="<{$lang_left}>" title="<{$lang_left}>" />
    </a>
    <a href="#" onclick="javascript:appendCode('<{$photo.xcodebc}>');">
    <img src="<{$xoops_url}>/modules/<{$dirname}>/images/imagemanager/alignbigcenter.gif" alt="<{$lang_center}>" title="<{$lang_center}>" />
    </a>
    <a href="#" onclick="javascript:appendCode('<{$photo.xcodebr}>');">
    <img src="<{$xoops_url}>/modules/<{$dirname}>/images/imagemanager/alignbigright.gif" alt="<{$lang_right}>" title="<{$lang_right}>" />
    </a>
  <{/if}>

  </td>
  </tr>
<{/foreach}>
<{* --- photo list end --- *}>

</table>

<{/if}>
<{* === phorto list table end === *}>

<div id="pagenav"><{$pagenav}></div>

<div id="footer">
  <input value="<{$lang_close}>" type="button" onclick="javascript:window.close();" />
</div>

</body>
<{/strip}>
</html>