<?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;

/* server/privileges/users_overview.twig */
class __TwigTemplate_a4af5c56ccec57138b7270acd3607b2ea1478be335cf1c9dccab87957dbde798 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 "<form name=\"usersForm\" id=\"usersForm\" action=\"";
        echo PhpMyAdmin\Url::getFromRoute("/server/privileges");
        echo "\" method=\"post\">
  ";
        // line 2
        echo PhpMyAdmin\Url::getHiddenInputs();
        echo "
  <div class=\"responsivetable row\">
    <table id=\"tableuserrights\" class=\"data\">
      <thead>
        <tr>
          <th></th>
          <th>";
        // line 8
        echo _gettext("User name");
        echo "</th>
          <th>";
        // line 9
        echo _gettext("Host name");
        echo "</th>
          <th>";
        // line 10
        echo _gettext("Password");
        echo "</th>
          <th>
            ";
        // line 12
        echo _gettext("Global privileges");
        // line 13
        echo "            ";
        echo PhpMyAdmin\Util::showHint("Note: MySQL privilege names are expressed in English.");
        echo "
          </th>
          ";
        // line 15
        if (($context["menus_work"] ?? null)) {
            // line 16
            echo "            <th>";
            echo _gettext("User group");
            echo "</th>
          ";
        }
        // line 18
        echo "          <th>";
        echo _gettext("Grant");
        echo "</th>
          <th colspan=\"";
        // line 19
        echo (((($context["user_group_count"] ?? null) > 0)) ? ("3") : ("2"));
        echo "\">";
        echo _gettext("Action");
        echo "</th>
        </tr>
      </thead>

      <tbody>
        ";
        // line 24
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["hosts"] ?? null));
        $context['loop'] = [
          'parent' => $context['_parent'],
          'index0' => 0,
          'index'  => 1,
          'first'  => true,
        ];
        if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
            $length = count($context['_seq']);
            $context['loop']['revindex0'] = $length - 1;
            $context['loop']['revindex'] = $length;
            $context['loop']['length'] = $length;
            $context['loop']['last'] = 1 === $length;
        }
        foreach ($context['_seq'] as $context["_key"] => $context["host"]) {
            // line 25
            echo "          <tr>
            <td>
              <input type=\"checkbox\" class=\"checkall\" id=\"checkbox_sel_users_";
            // line 27
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 27), "html", null, true);
            echo "\" value=\"";
            // line 28
            echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["host"], "user", [], "any", false, false, false, 28) . "&amp;#27;") . twig_get_attribute($this->env, $this->source, $context["host"], "host", [], "any", false, false, false, 28)), "html", null, true);
            echo "\" name=\"selected_usr[]\">
            </td>
            <td>
              <label for=\"checkbox_sel_users_";
            // line 31
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 31), "html", null, true);
            echo "\">
                ";
            // line 32
            if (twig_test_empty(twig_get_attribute($this->env, $this->source, $context["host"], "user", [], "any", false, false, false, 32))) {
                // line 33
                echo "                  <span class=\"text-danger\">";
                echo _gettext("Any");
                echo "</span>
                ";
            } else {
                // line 35
                echo "                  ";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["host"], "user", [], "any", false, false, false, 35), "html", null, true);
                echo "
                ";
            }
            // line 37
            echo "              </label>
            </td>
            <td>";
            // line 39
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["host"], "host", [], "any", false, false, false, 39), "html", null, true);
            echo "</td>
            <td>
              ";
            // line 41
            if (twig_get_attribute($this->env, $this->source, $context["host"], "has_password", [], "any", false, false, false, 41)) {
                // line 42
                echo "                ";
                echo _gettext("Yes");
                // line 43
                echo "              ";
            } else {
                // line 44
                echo "                <span class=\"text-danger\">";
                echo _gettext("No");
                echo "</span>
              ";
            }
            // line 46
            echo "              ";
            echo (( !twig_get_attribute($this->env, $this->source, $context["host"], "has_select_priv", [], "any", false, false, false, 46)) ? (PhpMyAdmin\Util::showHint(_gettext("The selected user was not found in the privilege table."))) : (""));
            echo "
            </td>
            <td>
              <code>";
            // line 49
            echo twig_join_filter(twig_get_attribute($this->env, $this->source, $context["host"], "privileges", [], "any", false, false, false, 49), ", ");
            echo "</code>
            </td>
            ";
            // line 51
            if (($context["menus_work"] ?? null)) {
                // line 52
                echo "              <td class=\"usrGroup\">";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["host"], "group", [], "any", false, false, false, 52), "html", null, true);
                echo "</td>
            ";
            }
            // line 54
            echo "            <td>";
            echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["host"], "has_grant", [], "any", false, false, false, 54)) ? (_gettext("Yes")) : (_gettext("No"))), "html", null, true);
            echo "</td>
            ";
            // line 55
            if (($context["is_grantuser"] ?? null)) {
                // line 56
                echo "              <td class=\"center\">
                <a class=\"edit_user_anchor\" href=\"";
                // line 57
                echo PhpMyAdmin\Url::getFromRoute("/server/privileges", ["username" => twig_get_attribute($this->env, $this->source,                 // line 58
$context["host"], "user", [], "any", false, false, false, 58), "hostname" => twig_get_attribute($this->env, $this->source,                 // line 59
$context["host"], "host", [], "any", false, false, false, 59), "dbname" => "", "tablename" => "", "routinename" => ""]);
                // line 63
                echo "\">
                  ";
                // line 64
                echo PhpMyAdmin\Util::getIcon("b_usredit", _gettext("Edit privileges"));
                echo "
                </a>
              </td>
            ";
            }
            // line 68
            echo "            ";
            if ((($context["menus_work"] ?? null) && (($context["user_group_count"] ?? null) > 0))) {
                // line 69
                echo "              <td class=\"center\">
                ";
                // line 70
                if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["host"], "user", [], "any", false, false, false, 70))) {
                    // line 71
                    echo "                  <a class=\"edit_user_group_anchor ajax\" href=\"";
                    echo PhpMyAdmin\Url::getFromRoute("/server/privileges", ["username" => twig_get_attribute($this->env, $this->source, $context["host"], "user", [], "any", false, false, false, 71)]);
                    echo "\">
                    ";
                    // line 72
                    echo PhpMyAdmin\Util::getIcon("b_usrlist", _gettext("Edit user group"));
                    echo "
                  </a>
                ";
                }
                // line 75
                echo "              </td>
            ";
            }
            // line 77
            echo "            <td class=\"center\">
              <a class=\"export_user_anchor ajax\" href=\"";
            // line 78
            echo PhpMyAdmin\Url::getFromRoute("/server/privileges", ["username" => twig_get_attribute($this->env, $this->source,             // line 79
$context["host"], "user", [], "any", false, false, false, 79), "hostname" => twig_get_attribute($this->env, $this->source,             // line 80
$context["host"], "host", [], "any", false, false, false, 80), "initial" =>             // line 81
($context["initial"] ?? null), "export" => true]);
            // line 83
            echo "\">
                ";
            // line 84
            echo PhpMyAdmin\Util::getIcon("b_tblexport", _gettext("Export"));
            echo "
              </a>
            </td>
          </tr>
        ";
            ++$context['loop']['index0'];
            ++$context['loop']['index'];
            $context['loop']['first'] = false;
            if (isset($context['loop']['length'])) {
                --$context['loop']['revindex0'];
                --$context['loop']['revindex'];
                $context['loop']['last'] = 0 === $context['loop']['revindex0'];
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['host'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 89
        echo "      </tbody>
    </table>
  </div>

  <div class=\"floatleft row\">
    <img class=\"selectallarrow\" width=\"38\" height=\"22\" src=\"";
        // line 95
        echo twig_escape_filter($this->env, ($context["pma_theme_image"] ?? null), "html", null, true);
        echo "arrow_";
        echo twig_escape_filter($this->env, ($context["text_dir"] ?? null), "html", null, true);
        echo ".png\" alt=\"";
        echo _gettext("With selected:");
        echo "\">
    <input type=\"checkbox\" id=\"usersForm_checkall\" class=\"checkall_box\" title=\"";
        // line 96
        echo _gettext("Check all");
        echo "\">
    <label for=\"usersForm_checkall\">";
        // line 97
        echo _gettext("Check all");
        echo "</label>
    <em class=\"with-selected\">";
        // line 98
        echo _gettext("With selected:");
        echo "</em>

    ";
        // line 100
        echo PhpMyAdmin\Util::getButtonOrImage("submit_mult", "mult_submit", _gettext("Export"), "b_tblexport", "export");
        echo "

    <input type=\"hidden\" name=\"initial\" value=\"";
        // line 102
        echo twig_escape_filter($this->env, ($context["initial"] ?? null), "html", null, true);
        echo "\">
  </div>

  <div class=\"clearfloat\"></div>

  ";
        // line 107
        if (($context["is_createuser"] ?? null)) {
            // line 108
            echo "    <div class=\"row\">
      <div class=\"col-12\">
        <fieldset id=\"fieldset_add_user\">
          <legend>";
            // line 111
            echo _pgettext(            "Create new user", "New");
            echo "</legend>
          <a id=\"add_user_anchor\" href=\"";
            // line 112
            echo PhpMyAdmin\Url::getFromRoute("/server/privileges", ["adduser" => true]);
            echo "\">
            ";
            // line 113
            echo PhpMyAdmin\Util::getIcon("b_usradd", _gettext("Add user account"));
            echo "
          </a>
        </fieldset>
      </div>
    </div>
  ";
        }
        // line 119
        echo "
  <div class=\"row\">
    <div class=\"col-12\">
      <fieldset id=\"fieldset_delete_user\">
        <legend>
          ";
        // line 124
        echo PhpMyAdmin\Util::getIcon("b_usrdrop");
        echo _gettext("Remove selected user accounts");
        // line 125
        echo "        </legend>
        <input type=\"hidden\" name=\"mode\" value=\"2\">

        <p>(";
        // line 128
        echo _gettext("Revoke all active privileges from the users and delete them afterwards.");
        echo ")</p>

        <input type=\"checkbox\" name=\"drop_users_db\" id=\"checkbox_drop_users_db\" title=\"";
        // line 131
        echo _gettext("Drop the databases that have the same names as the users.");
        echo "\">
        <label for=\"checkbox_drop_users_db\" title=\"";
        // line 133
        echo _gettext("Drop the databases that have the same names as the users.");
        echo "\">
          ";
        // line 134
        echo _gettext("Drop the databases that have the same names as the users.");
        // line 135
        echo "        </label>
      </fieldset>
    </div>
  </div>

  <fieldset id=\"fieldset_delete_user_footer\" class=\"tblFooters\">
    <input id=\"buttonGo\" class=\"btn btn-primary ajax\" type=\"submit\" name=\"delete\" value=\"";
        // line 141
        echo _gettext("Go");
        echo "\">
  </fieldset>
</form>
";
    }

    public function getTemplateName()
    {
        return "server/privileges/users_overview.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  366 => 141,  358 => 135,  356 => 134,  352 => 133,  348 => 131,  343 => 128,  338 => 125,  335 => 124,  328 => 119,  319 => 113,  315 => 112,  311 => 111,  306 => 108,  304 => 107,  296 => 102,  291 => 100,  286 => 98,  282 => 97,  278 => 96,  270 => 95,  263 => 89,  244 => 84,  241 => 83,  239 => 81,  238 => 80,  237 => 79,  236 => 78,  233 => 77,  229 => 75,  223 => 72,  218 => 71,  216 => 70,  213 => 69,  210 => 68,  203 => 64,  200 => 63,  198 => 59,  197 => 58,  196 => 57,  193 => 56,  191 => 55,  186 => 54,  180 => 52,  178 => 51,  173 => 49,  166 => 46,  160 => 44,  157 => 43,  154 => 42,  152 => 41,  147 => 39,  143 => 37,  137 => 35,  131 => 33,  129 => 32,  125 => 31,  119 => 28,  116 => 27,  112 => 25,  95 => 24,  85 => 19,  80 => 18,  74 => 16,  72 => 15,  66 => 13,  64 => 12,  59 => 10,  55 => 9,  51 => 8,  42 => 2,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "server/privileges/users_overview.twig", "/home/files/phpmyadmin/release/phpMyAdmin-5.1+snapshot/templates/server/privileges/users_overview.twig");
    }
}
