<?php /* Smarty version 2.6.22, created on 2014-02-15 02:41:04
         compiled from /home/joomaria/public_html/zipmarket/apps/collections/views/index.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'url', '/home/joomaria/public_html/zipmarket/apps/collections/views/index.html', 39, false),array('modifier', 'escape', '/home/joomaria/public_html/zipmarket/apps/collections/views/index.html', 41, false),array('modifier', 'nl2br', '/home/joomaria/public_html/zipmarket/apps/collections/views/index.html', 50, false),)), $this); ?>

  <div class="page-info">
    <div class="container">
      <div id="breadcrumbs">
        <a href='/' class="first">Home</a> \ <a href='/categories/all/'>Files</a> \
      </div>

<h1 class="page-title">Public Collections</h1>
      
    </div>


  </div>


    <div id="content">
      <div class="container">
          
<div class="content-l">
  <div class="page-controls">
<form action="" class="sort-control" id="sort-by-form" method="get">
  <label for="sort_by" class="sort-control-label"><?php echo $this->_tpl_vars['lang']['order_by']; ?>
:</label>
				<select class="sort_select" id="sort_by" name="sort_by">
				<option value="published_at"<?php if ($_GET['sort_by'] == 'published_at'): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['lang']['date']; ?>
</option>
					<option value="name"<?php if ($_GET['sort_by'] == 'name'): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['lang']['title']; ?>
</option>
					<option value="average_rating"<?php if ($_GET['sort_by'] == 'average_rating'): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['lang']['rating']; ?>
</option>
				</select>   
				<a href="javascript: void(0);" onclick="submitOrder(this);" title="" class="<?php if ($_GET['order'] == 'asc'): ?>asc<?php else: ?>desc<?php endif; ?>">
				<img src="/static/img/<?php if ($_GET['order'] == 'asc'): ?>asc<?php else: ?>desc<?php endif; ?>.png"  alt="" /></a>
	      <input id="order-type" name="order" type="hidden" value="<?php if ($_GET['order'] == 'asc'): ?>asc<?php else: ?>desc<?php endif; ?>" />
</form>

    <div class="pagination"><?php echo $this->_tpl_vars['paging']; ?>
</div>   
  </div>
<?php if ($this->_tpl_vars['collections']): ?>
  <ul class="collection-list">
  <?php $_from = $this->_tpl_vars['collections']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['c']):
?>
    <li class="content-box">
  <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
collections/view/<?php echo $this->_tpl_vars['c']['id']; ?>
/<?php echo ((is_array($_tmp=$this->_tpl_vars['c']['name'])) ? $this->_run_mod_handler('url', true, $_tmp) : smarty_modifier_url($_tmp)); ?>
.html" class="collection-image">
  <?php if ($this->_tpl_vars['c']['photo'] != ''): ?>
					  	<img alt="<?php echo ((is_array($_tmp=$this->_tpl_vars['c']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" height="140" src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/collections/<?php echo $this->_tpl_vars['c']['photo']; ?>
" width="260" />
	<?php else: ?>
					  	<img alt="<?php echo ((is_array($_tmp=$this->_tpl_vars['c']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" height="140" src="<?php echo $this->_tpl_vars['data_server']; ?>
img/default-collection.jpg" width="260" />
   <?php endif; ?>					
   </a>

  <div class="collection-info">
    <h3><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
collections/view/<?php echo $this->_tpl_vars['c']['id']; ?>
/<?php echo ((is_array($_tmp=$this->_tpl_vars['c']['name'])) ? $this->_run_mod_handler('url', true, $_tmp) : smarty_modifier_url($_tmp)); ?>
"><?php echo $this->_tpl_vars['c']['name']; ?>
</a></h3>
    <span>By <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['username']; ?>
"><?php echo $this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['username']; ?>
</a></span>
    <p><?php echo ((is_array($_tmp=$this->_tpl_vars['c']['text'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>
</p>  
  </div>

  <div class="collection-meta">
    <strong><?php echo $this->_tpl_vars['c']['items']; ?>
 <?php echo $this->_tpl_vars['lang']['items']; ?>
</strong>
    <br />
    
<?php unset($this->_sections['foo']);
$this->_sections['foo']['name'] = 'foo';
$this->_sections['foo']['start'] = (int)1;
$this->_sections['foo']['loop'] = is_array($_loop=6) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['foo']['step'] = ((int)1) == 0 ? 1 : (int)1;
$this->_sections['foo']['show'] = true;
$this->_sections['foo']['max'] = $this->_sections['foo']['loop'];
if ($this->_sections['foo']['start'] < 0)
    $this->_sections['foo']['start'] = max($this->_sections['foo']['step'] > 0 ? 0 : -1, $this->_sections['foo']['loop'] + $this->_sections['foo']['start']);
else
    $this->_sections['foo']['start'] = min($this->_sections['foo']['start'], $this->_sections['foo']['step'] > 0 ? $this->_sections['foo']['loop'] : $this->_sections['foo']['loop']-1);
if ($this->_sections['foo']['show']) {
    $this->_sections['foo']['total'] = min(ceil(($this->_sections['foo']['step'] > 0 ? $this->_sections['foo']['loop'] - $this->_sections['foo']['start'] : $this->_sections['foo']['start']+1)/abs($this->_sections['foo']['step'])), $this->_sections['foo']['max']);
    if ($this->_sections['foo']['total'] == 0)
        $this->_sections['foo']['show'] = false;
} else
    $this->_sections['foo']['total'] = 0;
if ($this->_sections['foo']['show']):

            for ($this->_sections['foo']['index'] = $this->_sections['foo']['start'], $this->_sections['foo']['iteration'] = 1;
                 $this->_sections['foo']['iteration'] <= $this->_sections['foo']['total'];
                 $this->_sections['foo']['index'] += $this->_sections['foo']['step'], $this->_sections['foo']['iteration']++):
$this->_sections['foo']['rownum'] = $this->_sections['foo']['iteration'];
$this->_sections['foo']['index_prev'] = $this->_sections['foo']['index'] - $this->_sections['foo']['step'];
$this->_sections['foo']['index_next'] = $this->_sections['foo']['index'] + $this->_sections['foo']['step'];
$this->_sections['foo']['first']      = ($this->_sections['foo']['iteration'] == 1);
$this->_sections['foo']['last']       = ($this->_sections['foo']['iteration'] == $this->_sections['foo']['total']);
?>
<?php if ($this->_tpl_vars['c']['rating'] >= $this->_sections['foo']['index']): ?><img src="/static/img/star-on.png" alt="" /><?php else: ?><img src="/static/img/star-off.png" alt="" /><?php endif; ?>
<?php endfor; endif; ?>
							
	<br /><small><?php echo $this->_tpl_vars['c']['votes']; ?>
 ratings</small>
  </div>
</li>
<?php endforeach; endif; unset($_from); ?>
  </ul>
<?php else: ?>
<div class="content-box vertical-space"><?php echo $this->_tpl_vars['lang']['no_collections']; ?>
</div>
<?php endif; ?>
  <div class="pagination"><?php echo $this->_tpl_vars['paging']; ?>
</div>
</div>

<div class="sidebar-s sidebar-right">
  <h2 class="box-heading">What are Collections?</h2>
  <div class="content-box vertical-space">
    <p>Collections are groups of items compiled by different users on a theme.</p>
    <p>They can be set to Private for personal use, or Public so that they appear on this page and on a user's homepage.</p>
  </div>

  <h2 class="box-heading">Search Collections</h2>
  <div class="content-box vertical-space">
    <form class="sidebar-search" method="get" action="/<?php echo $this->_tpl_vars['languageURL']; ?>
search/">
	<input type="text" name="term" value="<?php echo $this->_tpl_vars['lang']['search_collections']; ?>
" onfocus="this.value='';"
  
    <input id="type" name="type" type="hidden" value="collections" />


  <button type="submit" class="image-button search no-margin">Search</button>
</form>
  </div>
</div>

      </div>
    </div>