<?php
  /**
   * Memberships Page
   *
   * @package Wojo Framework
   * @author wojoscripts.com
   * @copyright 2017
   * @version $Id: _memberships.tpl.php, v1.00 2017-05-05 10:12:05 gewa Exp $
   */
  if (!defined("_WOJO"))
      die('Direct access to this location is not allowed.');
?>

<div class="double-padding">
  <h1><?php echo $this->row->title;?></h1>
  <div class="wojo big space divider"></div>
  <?php echo Url::out_url($this->row->body);?>
  <div class="wojo big space divider"></div>
  <?php if(!App::Auth()->is_User()):?>
  <p class="content-right padding-top">
    <i class="icon info sign"></i>
    <?php echo str_replace(array("[LOGIN]", "[REGISTER]"), array(' <a href="' . Url::url('/login') . '" class="wojo bold text">' . strtolower(Lang::$word->LOGIN) . '</a>', '<a href="' . Url::url('/register') . '" class="wojo bold text">' . strtolower(Lang::$word->REGISTER) . '</a>'), Lang::$word->FRONT_VIP_ERROR);?></p>
  <div class="wojo divider"></div>
  <div class="wojo big space divider"></div>
  <?php endif;?>
  <?php if($this->packages):?>
  <div class="row screen-block-3 tablet-block-2 mobile-block-1 phone-block-1 gutters align-center">
    <?php foreach($this->packages as $row):?>
    <div class="column">
      <div class="wojo secondary attached segment content-center">
        <?php if($row->thumb):?>
        <img src="<?php echo UPLOADURL;?>/memberships/<?php echo $row->thumb;?>" alt="<?php echo $row->title;?>">
        <?php else:?>
        <img src="<?php echo UPLOADURL;?>/memberships/default.svg" alt="<?php echo $row->title;?>">
        <?php endif;?>
        <div class="wojo space divider"></div>
        <h4 class="content-center">
          <?php echo Utility::formatMoney($row->price);?>
          <?php echo $row->title;?>
        </h4>
        <p class="wojo small text">
          <?php echo $row->description;?>
        </p>
      </div>
    </div>
    <?php endforeach;?>
  </div>
  <?php endif;?>
</div>