<{strip}>
<script>
$(function(){
	var mywidth = $(document).find('.gazoimg').width() * 0.8;
	var op = {
		width: mywidth,
		type: 'cover',
		bgColor:'#fff'
	};
	$('img.cube').within(op);

	$(window).resize(function(){
    var mywidth = $(document).find('.gazoimg').width() * 0.8;
		$('span.cube').css('width',mywidth);
		$('span.cube').css('height',mywidth);
	});

});

</script>

<{include file="db:`$mydirname`_header.html"}>
<br />
<{include file="db:`$mydirname`_categories.html"}>
<hr />
<input type="hidden" name="page" value="viewcat" />
<div class="row">
  <div class="one third">
		<form name='cid_select' action='<{$mod_url}>/index.php' method='GET' style='margin:0px;text-align:center;'>
    	<select name='cid' onchange='submit();'>
      	<option value=''><{$lang_directcatsel}></option>
      	<{$category_options}>
    	</select>
		</form>
	</div>
  <div class="one fourth align-center">
		<{$photo_global_sum}>
	</div>
  <div class="one fourth">
		<form name='count_select' action='<{$mod_url}>/' method='GET' style='margin:0px;text-align:center;'>
    	<select name='num' onchange='submit();'>
        <option value=''>Images / Page</option>
        <{foreach from=$viewPhotoCount item=count}>
        	<option value='<{$count}>'><{$count}></option>
        <{/foreach}>
      </select>
		</form>
	</div>
  <div class="one sixth align-center">
		<{if $lang_add_photo}>
			<a href="index.php?page=submit"><{$lang_add_photo}><img src="<{$mod_url}>/images/img_add.png" border="0" alt="&lt;{$lang_add_photo}&gt;" title="<{$lang_add_photo}>" align="absmiddle" /></a>
		<{/if}>
		&nbsp;
	</div>
</div>
<{if $photonavdisp }>
	<div align="right">
		<{$photonav}>
	</div>
<{/if}>
<div class="row">
  <div class="padded">
    <{$lang_new_photo}> &nbsp;<{$photonavinfo}>
	</div>
<{foreach from=$photos item=photo}>
  <div class="one fourth two-up-mobile align-center padded gazoimg" >
    <a href='<{$mod_url}>/index.php?page=photo&lid=<{$photo.lid}>'><img class="cube" src="<{$mod_url}>/index.php?page=image&id=<{$photo.lid}>&sz=0" alt="<{$photo.title}>" bolder="0" /></a>
    <br />
    <small>
			<{$photo.datetime}>(<{$photo.hits}>)
      <br />
			<{* SUBMITTER *}>
      <{$photo.title}>
			<{* EDIT PHOTO *}>
    	<{if $photo.can_edit}>
      	<a href='<{$mod_url}>/index.php?page=editphoto&lid=<{$photo.lid}>'><img src='<{$mod_url}>/images/img_edit.png' border='0' alt='<{$lang_editthisphoto}>' title='<{$lang_editthisphoto}>' /></a>
    	<{/if}>
    </small>
	</div>
<{/foreach}>
</div>
<{if $photonavdisp }>
	<div align="right">
		<{$photonav}>
	</div>
<{/if}>

<{include file='db:system_notification_select.html'}>
<br />
<{include file="db:`$mydirname`_footer.html"}>

<{/strip}>
