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

/* sql/query.twig */
class __TwigTemplate_263c33a42d244b83baabb0b0c200d8250230cf6f3a90492bc6a5ad4c70e10f52 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 method=\"post\" action=\"";
        echo PhpMyAdmin\Url::getFromRoute("/import");
        echo "\" class=\"ajax lock-page\" id=\"sqlqueryform\" name=\"sqlform\"";
        // line 2
        echo ((($context["is_upload"] ?? null)) ? (" enctype=\"multipart/form-data\"") : (""));
        echo ">
  ";
        // line 3
        echo PhpMyAdmin\Url::getHiddenInputs(($context["db"] ?? null), ($context["table"] ?? null));
        echo "
  <input type=\"hidden\" name=\"is_js_confirmed\" value=\"0\">
  <input type=\"hidden\" name=\"pos\" value=\"0\">
  <input type=\"hidden\" name=\"goto\" value=\"";
        // line 6
        echo twig_escape_filter($this->env, ($context["goto"] ?? null), "html", null, true);
        echo "\">
  <input type=\"hidden\" name=\"message_to_show\" value=\"";
        // line 7
        echo _gettext("Your SQL query has been executed successfully.");
        echo "\">
  <input type=\"hidden\" name=\"prev_sql_query\" value=\"";
        // line 8
        echo twig_escape_filter($this->env, ($context["query"] ?? null), "html", null, true);
        echo "\">

  ";
        // line 10
        if (((($context["display_tab"] ?? null) == "full") || (($context["display_tab"] ?? null) == "sql"))) {
            // line 11
            echo "    <a id=\"querybox\"></a>
    <div id=\"queryboxcontainer\">
      <fieldset id=\"queryboxf\">
        <legend>";
            // line 14
            echo ($context["legend"] ?? null);
            echo "</legend>
        <div id=\"queryfieldscontainer\">
          <div id=\"";
            // line 16
            echo (( !twig_test_empty(($context["columns_list"] ?? null))) ? ("sqlquerycontainer") : ("sqlquerycontainerfull"));
            echo "\">
            <textarea tabindex=\"100\" name=\"sql_query\" id=\"sqlquery\" cols=\"";
            // line 17
            echo twig_escape_filter($this->env, ($context["textarea_cols"] ?? null), "html", null, true);
            echo "\" rows=\"";
            echo twig_escape_filter($this->env, (($context["textarea_rows"] ?? null) * 2), "html", null, true);
            echo "\"";
            // line 18
            echo ((($context["textarea_auto_select"] ?? null)) ? (" onclick=\"Functions.selectContent(this, sqlBoxLocked, true);\"") : (""));
            echo ">";
            // line 19
            echo twig_escape_filter($this->env, ($context["query"] ?? null), "html", null, true);
            // line 20
            echo "</textarea>
            <div id=\"querymessage\"></div>

            ";
            // line 23
            if ( !twig_test_empty(($context["columns_list"] ?? null))) {
                // line 24
                echo "              <input type=\"button\" value=\"SELECT *\" id=\"selectall\" class=\"btn btn-secondary button sqlbutton\">
              <input type=\"button\" value=\"SELECT\" id=\"select\" class=\"btn btn-secondary button sqlbutton\">
              <input type=\"button\" value=\"INSERT\" id=\"insert\" class=\"btn btn-secondary button sqlbutton\">
              <input type=\"button\" value=\"UPDATE\" id=\"update\" class=\"btn btn-secondary button sqlbutton\">
              <input type=\"button\" value=\"DELETE\" id=\"delete\" class=\"btn btn-secondary button sqlbutton\">
            ";
            }
            // line 30
            echo "            <input type=\"button\" value=\"";
            echo _gettext("Clear");
            echo "\" id=\"clear\" class=\"btn btn-secondary button sqlbutton\">
            ";
            // line 31
            if (($context["codemirror_enable"] ?? null)) {
                // line 32
                echo "              <input type=\"button\" value=\"";
                echo _gettext("Format");
                echo "\" id=\"format\" class=\"btn btn-secondary button sqlbutton\">
            ";
            }
            // line 34
            echo "            <input type=\"button\" value=\"";
            echo _gettext("Get auto-saved query");
            echo "\" id=\"saved\" class=\"btn btn-secondary button sqlbutton\">

            <div>
              <input type=\"checkbox\" name=\"parameterized\" id=\"parameterized\">
              <label for=\"parameterized\">";
            // line 38
            echo _gettext("Bind parameters");
            echo "</label>
              ";
            // line 39
            echo PhpMyAdmin\Util::showDocu("faq", "faq6-40");
            echo "
              <div id=\"parametersDiv\"></div>
            </div>
          </div>

          ";
            // line 44
            if ( !twig_test_empty(($context["columns_list"] ?? null))) {
                // line 45
                echo "            <div id=\"tablefieldscontainer\">
              <label>";
                // line 46
                echo _gettext("Columns");
                echo "</label>
              <select id=\"tablefields\" name=\"dummy\" size=\"";
                // line 47
                echo twig_escape_filter($this->env, (($context["textarea_rows"] ?? null) - 2), "html", null, true);
                echo "\" ondblclick=\"Functions.insertValueQuery()\" multiple>
                ";
                // line 48
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable(($context["columns_list"] ?? null));
                foreach ($context['_seq'] as $context["_key"] => $context["field"]) {
                    // line 49
                    echo "                  <option value=\"";
                    echo twig_escape_filter($this->env, PhpMyAdmin\Util::backquote((($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 = $context["field"]) && is_array($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4) || $__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 instanceof ArrayAccess ? ($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4["Field"] ?? null) : null)), "html", null, true);
                    echo "\"";
                    // line 50
                    (((( !(null === (($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144 = $context["field"]) && is_array($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144) || $__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144 instanceof ArrayAccess ? ($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144["Field"] ?? null) : null)) &&  !(null === (($__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b = $context["field"]) && is_array($__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b) || $__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b instanceof ArrayAccess ? ($__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b["Comment"] ?? null) : null))) && (twig_length_filter($this->env, (($__internal_68aa442c1d43d3410ea8f958ba9090f3eaa9a76f8de8fc9be4d6c7389ba28002 = $context["field"]) && is_array($__internal_68aa442c1d43d3410ea8f958ba9090f3eaa9a76f8de8fc9be4d6c7389ba28002) || $__internal_68aa442c1d43d3410ea8f958ba9090f3eaa9a76f8de8fc9be4d6c7389ba28002 instanceof ArrayAccess ? ($__internal_68aa442c1d43d3410ea8f958ba9090f3eaa9a76f8de8fc9be4d6c7389ba28002["Field"] ?? null) : null)) > 0))) ? (print (twig_escape_filter($this->env, ((" title=\"" . (($__internal_d7fc55f1a54b629533d60b43063289db62e68921ee7a5f8de562bd9d4a2b7ad4 = $context["field"]) && is_array($__internal_d7fc55f1a54b629533d60b43063289db62e68921ee7a5f8de562bd9d4a2b7ad4) || $__internal_d7fc55f1a54b629533d60b43063289db62e68921ee7a5f8de562bd9d4a2b7ad4 instanceof ArrayAccess ? ($__internal_d7fc55f1a54b629533d60b43063289db62e68921ee7a5f8de562bd9d4a2b7ad4["Comment"] ?? null) : null)) . "\""), "html", null, true))) : (print ("")));
                    echo ">
                    ";
                    // line 51
                    echo twig_escape_filter($this->env, (($__internal_01476f8db28655ee4ee02ea2d17dd5a92599be76304f08cd8bc0e05aced30666 = $context["field"]) && is_array($__internal_01476f8db28655ee4ee02ea2d17dd5a92599be76304f08cd8bc0e05aced30666) || $__internal_01476f8db28655ee4ee02ea2d17dd5a92599be76304f08cd8bc0e05aced30666 instanceof ArrayAccess ? ($__internal_01476f8db28655ee4ee02ea2d17dd5a92599be76304f08cd8bc0e05aced30666["Field"] ?? null) : null), "html", null, true);
                    echo "
                  </option>
                ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 54
                echo "              </select>

              <div id=\"tablefieldinsertbuttoncontainer\">
                ";
                // line 57
                if (PhpMyAdmin\Util::showIcons("ActionLinksMode")) {
                    // line 58
                    echo "                  <input type=\"button\" class=\"btn btn-secondary button\" name=\"insert\" value=\"";
                    // line 59
                    echo "<<";
                    echo "\" onclick=\"Functions.insertValueQuery()\" title=\"";
                    echo _gettext("Insert");
                    echo "\">
                ";
                } else {
                    // line 61
                    echo "                  <input type=\"button\" class=\"btn btn-secondary button\" name=\"insert\" value=\"";
                    // line 62
                    echo _gettext("Insert");
                    echo "\" onclick=\"Functions.insertValueQuery()\">
                ";
                }
                // line 64
                echo "              </div>
            </div>
          ";
            }
            // line 67
            echo "
          <div class=\"clearfloat\"></div>
        </div>

        ";
            // line 71
            if (($context["has_bookmark"] ?? null)) {
                // line 72
                echo "          <div id=\"bookmarkoptions\">
            <div class=\"formelement\">
              <label for=\"bkm_label\">";
                // line 74
                echo _gettext("Bookmark this SQL query:");
                echo "</label>
              <input type=\"text\" name=\"bkm_label\" id=\"bkm_label\" tabindex=\"110\" value=\"\">
            </div>

            <div class=\"formelement\">
              <input type=\"checkbox\" name=\"bkm_all_users\" tabindex=\"111\" id=\"id_bkm_all_users\" value=\"true\">
              <label for=\"id_bkm_all_users\">";
                // line 80
                echo _gettext("Let every user access this bookmark");
                echo "</label>
            </div>

            <div class=\"formelement\">
              <input type=\"checkbox\" name=\"bkm_replace\" tabindex=\"112\" id=\"id_bkm_replace\" value=\"true\">
              <label for=\"id_bkm_replace\">";
                // line 85
                echo _gettext("Replace existing bookmark of same name");
                echo "</label>
            </div>
          </div>
        ";
            }
            // line 89
            echo "
        <div class=\"clearfloat\"></div>
      </fieldset>
    </div>

    <fieldset id=\"queryboxfooter\" class=\"tblFooters\">
      <div class=\"formelement\"></div>

      <div class=\"formelement\">
        [
        <label for=\"id_sql_delimiter\">";
            // line 99
            echo _gettext("Delimiter");
            echo "</label>
        <input type=\"text\" name=\"sql_delimiter\" tabindex=\"131\" size=\"3\" value=\"";
            // line 100
            echo twig_escape_filter($this->env, ($context["delimiter"] ?? null), "html", null, true);
            echo "\" id=\"id_sql_delimiter\">
        ]
      </div>

      <div class=\"formelement\">
        <input type=\"checkbox\" name=\"show_query\" value=\"1\" id=\"checkbox_show_query\" tabindex=\"132\">
        <label for=\"checkbox_show_query\">";
            // line 106
            echo _gettext("Show this query here again");
            echo "</label>
      </div>

      <div class=\"formelement\">
        <input type=\"checkbox\" name=\"retain_query_box\" value=\"1\" id=\"retain_query_box\" tabindex=\"133\"";
            // line 111
            echo ((($context["retain_query_box"] ?? null)) ? (" checked") : (""));
            echo ">
        <label for=\"retain_query_box\">";
            // line 112
            echo _gettext("Retain query box");
            echo "</label>
      </div>

      <div class=\"formelement\">
        <input type=\"checkbox\" name=\"rollback_query\" value=\"1\" id=\"rollback_query\" tabindex=\"134\">
        <label for=\"rollback_query\">";
            // line 117
            echo _gettext("Rollback when finished");
            echo "</label>
      </div>

      <div class=\"formelement\">
        ";
            // line 121
            echo PhpMyAdmin\Util::getFKCheckbox();
            echo "
      </div>

      <input class=\"btn btn-primary\" type=\"submit\" id=\"button_submit_query\" name=\"SQL\" tabindex=\"200\" value=\"";
            // line 124
            echo _gettext("Go");
            echo "\">

      <div class=\"clearfloat\"></div>
    </fieldset>
  ";
        }
        // line 129
        echo "
  ";
        // line 130
        if (((($context["display_tab"] ?? null) == "full") &&  !twig_test_empty(($context["bookmarks"] ?? null)))) {
            // line 131
            echo "    <fieldset id=\"fieldsetBookmarkOptions\">
      <legend>";
            // line 132
            echo _gettext("Bookmarked SQL query");
            echo "</legend>
      <div class=\"formelement\">
        <select name=\"id_bookmark\" id=\"id_bookmark\">
          <option value=\"\">&nbsp;</option>
          ";
            // line 136
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["bookmarks"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["bookmark"]) {
                // line 137
                echo "            <option value=\"";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["bookmark"], "id", [], "any", false, false, false, 137), "html", null, true);
                echo "\" data-varcount=\"";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["bookmark"], "variable_count", [], "any", false, false, false, 137), "html", null, true);
                echo "\">
              ";
                // line 138
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["bookmark"], "label", [], "any", false, false, false, 138), "html", null, true);
                echo "
              ";
                // line 139
                if (twig_get_attribute($this->env, $this->source, $context["bookmark"], "is_shared", [], "any", false, false, false, 139)) {
                    // line 140
                    echo "                (";
                    echo _gettext("shared");
                    echo ")
              ";
                }
                // line 142
                echo "            </option>
          ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['bookmark'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 144
            echo "        </select>
      </div>

      <div class=\"formelement\">
        <input type=\"radio\" name=\"action_bookmark\" value=\"0\" id=\"radio_bookmark_exe\" checked>
        <label for=\"radio_bookmark_exe\">";
            // line 149
            echo _gettext("Submit");
            echo "</label>
        <input type=\"radio\" name=\"action_bookmark\" value=\"1\" id=\"radio_bookmark_view\">
        <label for=\"radio_bookmark_view\">";
            // line 151
            echo _gettext("View only");
            echo "</label>
        <input type=\"radio\" name=\"action_bookmark\" value=\"2\" id=\"radio_bookmark_del\">
        <label for=\"radio_bookmark_del\">";
            // line 153
            echo _gettext("Delete");
            echo "</label>
      </div>

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

      <div class=\"formelement hide\">
        ";
            // line 159
            echo _gettext("Variables");
            // line 160
            echo "        ";
            echo PhpMyAdmin\Util::showDocu("faq", "faqbookmark");
            echo "
        <div id=\"bookmark_variables\"></div>
      </div>
    </fieldset>

    <fieldset id=\"fieldsetBookmarkOptionsFooter\" class=\"tblFooters\">
      <input class=\"btn btn-primary\" type=\"submit\" name=\"SQL\" id=\"button_submit_bookmark\" value=\"";
            // line 166
            echo _gettext("Go");
            echo "\">
      <div class=\"clearfloat\"></div>
    </fieldset>
  ";
        }
        // line 170
        echo "
  ";
        // line 171
        if (($context["can_convert_kanji"] ?? null)) {
            // line 172
            echo "    ";
            $this->loadTemplate("encoding/kanji_encoding_form.twig", "sql/query.twig", 172)->display($context);
            // line 173
            echo "  ";
        }
        // line 174
        echo "</form>

<div id=\"sqlqueryresultsouter\"></div>
";
    }

    public function getTemplateName()
    {
        return "sql/query.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  402 => 174,  399 => 173,  396 => 172,  394 => 171,  391 => 170,  384 => 166,  374 => 160,  372 => 159,  363 => 153,  358 => 151,  353 => 149,  346 => 144,  339 => 142,  333 => 140,  331 => 139,  327 => 138,  320 => 137,  316 => 136,  309 => 132,  306 => 131,  304 => 130,  301 => 129,  293 => 124,  287 => 121,  280 => 117,  272 => 112,  268 => 111,  261 => 106,  252 => 100,  248 => 99,  236 => 89,  229 => 85,  221 => 80,  212 => 74,  208 => 72,  206 => 71,  200 => 67,  195 => 64,  190 => 62,  188 => 61,  181 => 59,  179 => 58,  177 => 57,  172 => 54,  163 => 51,  159 => 50,  155 => 49,  151 => 48,  147 => 47,  143 => 46,  140 => 45,  138 => 44,  130 => 39,  126 => 38,  118 => 34,  112 => 32,  110 => 31,  105 => 30,  97 => 24,  95 => 23,  90 => 20,  88 => 19,  85 => 18,  80 => 17,  76 => 16,  71 => 14,  66 => 11,  64 => 10,  59 => 8,  55 => 7,  51 => 6,  45 => 3,  41 => 2,  37 => 1,);
    }

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