<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* member/member_list.twig */
class __TwigTemplate_1a541a4a88e71a9e0c16c8e51b57f39cfadeb6530a7f5d7aea53cad4b3c0b9a1 extends \Twig\Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo ($context["header"] ?? null);
        echo ($context["column_left"] ?? null);
        echo "
<div id=\"content\">
  <div class=\"page-header\">
    <div class=\"container-fluid\">
     <button type=\"button\" data-toggle=\"tooltip\" title=\"";
        // line 5
        echo ($context["button_filter"] ?? null);
        echo "\" onclick=\"\$('#filter-member').toggleClass('hidden-sm hidden-xs');\" class=\"btn btn-default hidden-md hidden-lg\"><i class=\"fa fa-filter\"></i></button>
      <div class=\"pull-right\"><a href=\"";
        // line 6
        echo ($context["add"] ?? null);
        echo "\" data-toggle=\"tooltip\" title=\"";
        echo ($context["button_add"] ?? null);
        echo "\" class=\"btn btn-primary\"><i class=\"fa fa-plus\"></i></a>
        <button type=\"button\" data-toggle=\"tooltip\" title=\"";
        // line 7
        echo ($context["button_delete"] ?? null);
        echo "\" class=\"btn btn-danger\" onclick=\"confirm('";
        echo ($context["text_confirm"] ?? null);
        echo "') ? \$('#form-member').submit() : false;\"><i class=\"fa fa-trash-o\"></i></button>
      </div>
      <h1>";
        // line 9
        echo ($context["heading_title"] ?? null);
        echo "</h1>
      <ul class=\"breadcrumb\">
        ";
        // line 11
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["breadcrumbs"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["breadcrumb"]) {
            // line 12
            echo "        <li><a href=\"";
            echo twig_get_attribute($this->env, $this->source, $context["breadcrumb"], "href", [], "any", false, false, false, 12);
            echo "\">";
            echo twig_get_attribute($this->env, $this->source, $context["breadcrumb"], "text", [], "any", false, false, false, 12);
            echo "</a></li>
        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['breadcrumb'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 14
        echo "      </ul>
    </div>
  </div>
  <div class=\"container-fluid\">
    ";
        // line 18
        if (($context["error_warning"] ?? null)) {
            // line 19
            echo "    <div class=\"alert alert-danger alert-dismissible\"><i class=\"fa fa-exclamation-circle\"></i> ";
            echo ($context["error_warning"] ?? null);
            echo "
      <button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>
    </div>
    ";
        }
        // line 23
        echo "    ";
        if (($context["success"] ?? null)) {
            // line 24
            echo "    <div class=\"alert alert-success alert-dismissible\"><i class=\"fa fa-check-circle\"></i> ";
            echo ($context["success"] ?? null);
            echo "
      <button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>
    </div>
    ";
        }
        // line 28
        echo "    <div class=\"row\">
      <div id=\"filter-member\" class=\"col-md-3 col-md-push-9 col-sm-12 hidden-sm hidden-xs\">
        <div class=\"panel panel-default\">
          <div class=\"panel-heading\">
            <h3 class=\"panel-title\"><i class=\"fa fa-filter\"></i> ";
        // line 32
        echo ($context["text_filter"] ?? null);
        echo "</h3>
          </div>
          <div class=\"panel-body\">
            <div class=\"form-group\">
              <label class=\"control-label\" for=\"input-name\">";
        // line 36
        echo ($context["entry_name"] ?? null);
        echo "</label>
              <input type=\"text\" name=\"filter_name\" value=\"";
        // line 37
        echo ($context["filter_name"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_name"] ?? null);
        echo "\" id=\"input-name\" class=\"form-control\" />
            </div>
            <div class=\"form-group\">
              <label class=\"control-label\" for=\"input-email\">";
        // line 40
        echo ($context["entry_email"] ?? null);
        echo "</label>
              <input type=\"text\" name=\"filter_email\" value=\"";
        // line 41
        echo ($context["filter_email"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_email"] ?? null);
        echo "\" id=\"input-email\" class=\"form-control\" />
            </div>
             <div class=\"form-group\">
              <label class=\"control-label\" for=\"input-phone_no\">";
        // line 44
        echo ($context["entry_phone_no"] ?? null);
        echo "</label>
              <input type=\"text\" name=\"filter_phone_no\" value=\"";
        // line 45
        echo ($context["filter_phone_no"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_phone_no"] ?? null);
        echo "\" id=\"input-phone_no\" class=\"form-control\" />
            </div>
            <div class=\"form-group\">
              <label class=\"control-label\" for=\"input-status\">";
        // line 48
        echo ($context["entry_status"] ?? null);
        echo "</label>
              <select name=\"filter_status\" id=\"input-status\" class=\"form-control\">
                <option value=\"\"></option>
                ";
        // line 51
        if ((($context["filter_status"] ?? null) == "1")) {
            // line 52
            echo "                <option value=\"1\" selected=\"selected\">";
            echo ($context["text_active"] ?? null);
            echo "</option>
                ";
        } else {
            // line 54
            echo "                <option value=\"1\">";
            echo ($context["text_active"] ?? null);
            echo "</option>
                ";
        }
        // line 56
        echo "                ";
        if ((($context["filter_status"] ?? null) == "0")) {
            // line 57
            echo "                <option value=\"0\" selected=\"selected\">";
            echo ($context["text_inactive"] ?? null);
            echo "</option>
                ";
        } else {
            // line 59
            echo "                <option value=\"0\">";
            echo ($context["text_inactive"] ?? null);
            echo "</option>
                ";
        }
        // line 61
        echo "              </select>
            </div>
            <div class=\"form-group\">
              <label class=\"control-label\" for=\"input-date-added\">";
        // line 64
        echo ($context["entry_date_added"] ?? null);
        echo "</label>
              <div class=\"input-group date\">
                <input type=\"text\" name=\"filter_date_added\" value=\"";
        // line 66
        echo ($context["filter_date_added"] ?? null);
        echo "\" placeholder=\"";
        echo ($context["entry_date_added"] ?? null);
        echo "\" data-date-format=\"YYYY-MM-DD\" id=\"input-date-added\" class=\"form-control\" />
                <span class=\"input-group-btn\">
                <button type=\"button\" class=\"btn btn-default\"><i class=\"fa fa-calendar\"></i></button>
                </span>
              </div>
            </div>
            <div class=\"form-group text-right\">
              <button type=\"button\" id=\"button-filter\" class=\"btn btn-default\"><i class=\"fa fa-filter\"></i> ";
        // line 73
        echo ($context["button_filter"] ?? null);
        echo "</button>
            </div>
          </div>
        </div>
      </div>
    <div class=\"col-md-9 col-md-pull-3 col-sm-12\">
      <div class=\"panel panel-default\">
        <div class=\"panel-heading\">
          <h3 class=\"panel-title\"><i class=\"fa fa-list\"></i> ";
        // line 81
        echo ($context["text_list"] ?? null);
        echo "</h3>
        </div>
        <div class=\"panel-body\">
          <form action=\"";
        // line 84
        echo ($context["delete"] ?? null);
        echo "\" method=\"post\" enctype=\"multipart/form-data\" id=\"form-member\">
            <div class=\"table-responsive\">
              <table id=\"tbl-tier\" class=\"table table-bordered table-hover\">
                <thead>
                  <tr>
                    <td style=\"width: 1px;\" class=\"text-center\"><input type=\"checkbox\" onclick=\"\$('input[name*=\\'selected\\']').prop('checked', this.checked);\" /></td>
                    <td class=\"text-left\">";
        // line 90
        if ((($context["sort"] ?? null) == "first_name ")) {
            // line 91
            echo "                      <a href=\"";
            echo ($context["sort_first_name"] ?? null);
            echo "\" class=\"";
            echo twig_lower_filter($this->env, ($context["order"] ?? null));
            echo "\">";
            echo ($context["column_first_name"] ?? null);
            echo "</a>
                      ";
        } else {
            // line 93
            echo "                      <a href=\"";
            echo ($context["sort_first_name"] ?? null);
            echo "\">";
            echo ($context["column_first_name"] ?? null);
            echo "</a>
                      ";
        }
        // line 94
        echo "</td>
                    <td class=\"text-left\">";
        // line 95
        if ((($context["sort"] ?? null) == "last_name ")) {
            // line 96
            echo "                      <a href=\"";
            echo ($context["sort_last_name"] ?? null);
            echo "\" class=\"";
            echo twig_lower_filter($this->env, ($context["order"] ?? null));
            echo "\">";
            echo ($context["column_last_name"] ?? null);
            echo "</a>
                      ";
        } else {
            // line 98
            echo "                      <a href=\"";
            echo ($context["sort_last_name"] ?? null);
            echo "\">";
            echo ($context["column_last_name"] ?? null);
            echo "</a>
                      ";
        }
        // line 99
        echo "</td>
                    <td class=\"text-left\">";
        // line 100
        echo ($context["column_email"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 101
        echo ($context["column_phone_no"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 102
        echo ($context["column_gender"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 103
        echo ($context["column_date_of_birth"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 104
        echo ($context["column_tier_level"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 105
        echo ($context["column_tier_expiry_date"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 106
        if ((($context["sort"] ?? null) == "total_available_point")) {
            // line 107
            echo "                      <a href=\"";
            echo ($context["sort_total_available_point"] ?? null);
            echo "\" class=\"";
            echo twig_lower_filter($this->env, ($context["order"] ?? null));
            echo "\">";
            echo ($context["column_total_available_point"] ?? null);
            echo "</a>
                      ";
        } else {
            // line 109
            echo "                      <a href=\"";
            echo ($context["sort_total_available_point"] ?? null);
            echo "\">";
            echo ($context["column_total_available_point"] ?? null);
            echo "</a>
                      ";
        }
        // line 110
        echo "</td>
                    <td class=\"text-left\">";
        // line 111
        echo ($context["column_total_tier_archived_purchase"] ?? null);
        echo "</td>
                    <td class=\"text-left\">";
        // line 112
        if ((($context["sort"] ?? null) == "status")) {
            // line 113
            echo "                      <a href=\"";
            echo ($context["sort_status"] ?? null);
            echo "\" class=\"";
            echo twig_lower_filter($this->env, ($context["order"] ?? null));
            echo "\">";
            echo ($context["column_status"] ?? null);
            echo "</a>
                      ";
        } else {
            // line 115
            echo "                      <a href=\"";
            echo ($context["sort_status"] ?? null);
            echo "\">";
            echo ($context["column_status"] ?? null);
            echo "</a>
                      ";
        }
        // line 116
        echo "</td>
                    <td class=\"text-left\">";
        // line 117
        if ((($context["sort"] ?? null) == "date_added")) {
            // line 118
            echo "                      <a href=\"";
            echo ($context["sort_date_added"] ?? null);
            echo "\" class=\"";
            echo twig_lower_filter($this->env, ($context["order"] ?? null));
            echo "\">";
            echo ($context["column_date_added"] ?? null);
            echo "</a>
                      ";
        } else {
            // line 120
            echo "                      <a href=\"";
            echo ($context["sort_date_added"] ?? null);
            echo "\">";
            echo ($context["column_date_added"] ?? null);
            echo "</a>
                      ";
        }
        // line 121
        echo "</td>
                    <td class=\"text-right\">";
        // line 122
        echo ($context["column_action"] ?? null);
        echo "</td>
                  </tr>
                </thead>
                <tbody>
                  ";
        // line 126
        if (($context["members"] ?? null)) {
            // line 127
            echo "                  ";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["members"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["member"]) {
                // line 128
                echo "                  <tr>
                    <td class=\"text-center\">";
                // line 129
                if (twig_in_filter(twig_get_attribute($this->env, $this->source, $context["member"], "member_id", [], "any", false, false, false, 129), ($context["selected"] ?? null))) {
                    // line 130
                    echo "                      <input type=\"checkbox\" name=\"selected[]\" value=\"";
                    echo twig_get_attribute($this->env, $this->source, $context["member"], "member_id", [], "any", false, false, false, 130);
                    echo "\" checked=\"checked\" />
                      ";
                } else {
                    // line 132
                    echo "                      <input type=\"checkbox\" name=\"selected[]\" value=\"";
                    echo twig_get_attribute($this->env, $this->source, $context["member"], "member_id", [], "any", false, false, false, 132);
                    echo "\" />
                      ";
                }
                // line 133
                echo "</td

                  <td class=\"text-center\">";
                // line 135
                if (twig_in_filter(twig_get_attribute($this->env, $this->source, ($context["tier"] ?? null), "tier_setting_id", [], "any", false, false, false, 135), ($context["selected"] ?? null))) {
                    // line 136
                    echo "                    <input type=\"checkbox\" name=\"selected[]\" value=\"";
                    echo twig_get_attribute($this->env, $this->source, ($context["tier"] ?? null), "tier_setting_id", [], "any", false, false, false, 136);
                    echo "\" checked=\"checked\" />
                    ";
                } else {
                    // line 138
                    echo "                    <input type=\"checkbox\" name=\"selected[]\" value=\"";
                    echo twig_get_attribute($this->env, $this->source, ($context["tier"] ?? null), "tier_setting_id", [], "any", false, false, false, 138);
                    echo "\" />
                    ";
                }
                // line 139
                echo "</td>

                    <td class=\"text-left\">";
                // line 141
                echo twig_get_attribute($this->env, $this->source, $context["member"], "first_name", [], "any", false, false, false, 141);
                echo "</td>
                    <td class=\"text-left\">";
                // line 142
                echo twig_get_attribute($this->env, $this->source, $context["member"], "last_name", [], "any", false, false, false, 142);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 143
                echo twig_get_attribute($this->env, $this->source, $context["member"], "email", [], "any", false, false, false, 143);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 144
                echo twig_get_attribute($this->env, $this->source, $context["member"], "phone_no", [], "any", false, false, false, 144);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 145
                echo twig_get_attribute($this->env, $this->source, $context["member"], "gender", [], "any", false, false, false, 145);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 146
                echo twig_get_attribute($this->env, $this->source, $context["member"], "date_of_birth", [], "any", false, false, false, 146);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 147
                echo twig_get_attribute($this->env, $this->source, $context["member"], "tier_level", [], "any", false, false, false, 147);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 148
                echo twig_get_attribute($this->env, $this->source, $context["member"], "tier_expiry_date", [], "any", false, false, false, 148);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 149
                echo twig_get_attribute($this->env, $this->source, $context["member"], "total_available_point", [], "any", false, false, false, 149);
                echo "</td>
                    <td class=\"text-left\" >";
                // line 150
                echo twig_get_attribute($this->env, $this->source, $context["member"], "total_tier_archived_purchase", [], "any", false, false, false, 150);
                echo "</td>
                    <td class=\"text-left\">";
                // line 151
                echo twig_get_attribute($this->env, $this->source, $context["member"], "status", [], "any", false, false, false, 151);
                echo "</td>
                    <td class=\"text-left\">";
                // line 152
                echo twig_get_attribute($this->env, $this->source, $context["member"], "date_added", [], "any", false, false, false, 152);
                echo "</td>
                    <td class=\"text-right\"><a href=\"";
                // line 153
                echo twig_get_attribute($this->env, $this->source, $context["member"], "edit", [], "any", false, false, false, 153);
                echo "\" data-toggle=\"tooltip\" title=\"";
                echo ($context["button_edit"] ?? null);
                echo "\" class=\"btn btn-primary\"><i class=\"fa fa-pencil\"></i></a></td>
                  </tr>
                  ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['member'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 156
            echo "                  ";
        } else {
            // line 157
            echo "                  <tr>
                    <td class=\"text-center\" colspan=\"14\">";
            // line 158
            echo ($context["text_no_results"] ?? null);
            echo "</td>
                  </tr>
                  ";
        }
        // line 161
        echo "                </tbody>
              </table>
            </div>
          </form>
          <div class=\"row\">
            <div class=\"col-sm-6 text-left\">";
        // line 166
        echo ($context["pagination"] ?? null);
        echo "</div>
            <div class=\"col-sm-6 text-right\">";
        // line 167
        echo ($context["results"] ?? null);
        echo "</div>
          </div>
        </div>
      </div>
  </div>
  </div>
</div>
";
        // line 174
        echo ($context["footer"] ?? null);
        echo " 

<style>
#tbl-tier > tbody > tr > td {
    white-space: normal;
    word-wrap: break-word;
}

.row-fix-width
{
  max-width:100px;
}
</style>

<script type=\"text/javascript\"><!--
  \$('#button-filter').on('click', function() {
    url = 'index.php?route=member/member&user_token=";
        // line 190
        echo ($context["user_token"] ?? null);
        echo "';
    var filter_name = \$('input[name=\\'filter_name\\']').val();
    if (filter_name) {
      url += '&filter_name=' + encodeURIComponent(filter_name);
    }
    var filter_email = \$('input[name=\\'filter_email\\']').val();
    if (filter_email) {
      url += '&filter_email=' + encodeURIComponent(filter_email);
    }
    var filter_phone_no = \$('input[name=\\'filter_phone_no\\']').val();
    if (filter_phone_no) {
      url += '&filter_phone_no=' + encodeURIComponent(filter_phone_no);
    }
    var filter_status = \$('select[name=\\'filter_status\\']').val();
    if (filter_status !== '') {
      url += '&filter_status=' + encodeURIComponent(filter_status); 
    }
    var filter_date_added = \$('input[name=\\'filter_date_added\\']').val();
    if (filter_date_added) {
      url += '&filter_date_added=' + encodeURIComponent(filter_date_added);
    }
    location = url;
  });

  \$('#button-export').on('click', function() {
    url = 'index.php?route=member/member/export&user_token=";
        // line 215
        echo ($context["user_token"] ?? null);
        echo "';
    var filter_name = \$('input[name=\\'filter_name\\']').val();
    if (filter_name) {
      url += '&filter_name=' + encodeURIComponent(filter_name);
    }
    var filter_email = \$('input[name=\\'filter_email\\']').val();
    if (filter_email) {
      url += '&filter_email=' + encodeURIComponent(filter_email);
    }
    var filter_phone_no = \$('input[name=\\'filter_phone_no\\']').val();
    if (filter_phone_no) {
      url += '&filter_phone_no=' + encodeURIComponent(filter_phone_no);
    }
    var filter_status = \$('select[name=\\'filter_status\\']').val();
    if (filter_status !== '') {
      url += '&filter_status=' + encodeURIComponent(filter_status); 
    }
    var filter_date_added = \$('input[name=\\'filter_date_added\\']').val();
    if (filter_date_added) {
      url += '&filter_date_added=' + encodeURIComponent(filter_date_added);
    }
    location = url;
  });
  //--></script>
  <script type=\"text/javascript\"><!--
  \$('.date').datetimepicker({
    language: '";
        // line 241
        echo ($context["datepicker"] ?? null);
        echo "',
    pickTime: false
  });
  //--></script>";
    }

    public function getTemplateName()
    {
        return "member/member_list.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  605 => 241,  576 => 215,  548 => 190,  529 => 174,  519 => 167,  515 => 166,  508 => 161,  502 => 158,  499 => 157,  496 => 156,  485 => 153,  481 => 152,  477 => 151,  473 => 150,  469 => 149,  465 => 148,  461 => 147,  457 => 146,  453 => 145,  449 => 144,  445 => 143,  441 => 142,  437 => 141,  433 => 139,  427 => 138,  421 => 136,  419 => 135,  415 => 133,  409 => 132,  403 => 130,  401 => 129,  398 => 128,  393 => 127,  391 => 126,  384 => 122,  381 => 121,  373 => 120,  363 => 118,  361 => 117,  358 => 116,  350 => 115,  340 => 113,  338 => 112,  334 => 111,  331 => 110,  323 => 109,  313 => 107,  311 => 106,  307 => 105,  303 => 104,  299 => 103,  295 => 102,  291 => 101,  287 => 100,  284 => 99,  276 => 98,  266 => 96,  264 => 95,  261 => 94,  253 => 93,  243 => 91,  241 => 90,  232 => 84,  226 => 81,  215 => 73,  203 => 66,  198 => 64,  193 => 61,  187 => 59,  181 => 57,  178 => 56,  172 => 54,  166 => 52,  164 => 51,  158 => 48,  150 => 45,  146 => 44,  138 => 41,  134 => 40,  126 => 37,  122 => 36,  115 => 32,  109 => 28,  101 => 24,  98 => 23,  90 => 19,  88 => 18,  82 => 14,  71 => 12,  67 => 11,  62 => 9,  55 => 7,  49 => 6,  45 => 5,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "member/member_list.twig", "");
    }
}
