d9024c2459355748de4510061a69a199aa584ee6c62438aae21ddb7927ba6acd.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* server/privileges/privileges_summary.twig */
  14. class __TwigTemplate_ed075abcfed74a01ef053488933a96f7d3c7f82020b1d4e525df45d0f74ee172 extends \Twig\Template
  15. {
  16. private $source;
  17. private $macros = [];
  18. public function __construct(Environment $env)
  19. {
  20. parent::__construct($env);
  21. $this->source = $this->getSourceContext();
  22. $this->parent = false;
  23. $this->blocks = [
  24. ];
  25. }
  26. protected function doDisplay(array $context, array $blocks = [])
  27. {
  28. $macros = $this->macros;
  29. // line 1
  30. echo "<form class=\"submenu-item\" action=\"server_privileges.php\" id=\"";
  31. echo twig_escape_filter($this->env, ($context["form_id"] ?? null), "html", null, true);
  32. echo "\" method=\"post\">
  33. ";
  34. // line 2
  35. echo PhpMyAdmin\Url::getHiddenInputs();
  36. echo "
  37. <input type=\"hidden\" name=\"username\" value=\"";
  38. // line 3
  39. echo twig_escape_filter($this->env, ($context["username"] ?? null), "html", null, true);
  40. echo "\">
  41. <input type=\"hidden\" name=\"hostname\" value=\"";
  42. // line 4
  43. echo twig_escape_filter($this->env, ($context["hostname"] ?? null), "html", null, true);
  44. echo "\">
  45. <fieldset>
  46. <legend data-submenu-label=\"";
  47. // line 7
  48. echo twig_escape_filter($this->env, ($context["sub_menu_label"] ?? null), "html", null, true);
  49. echo "\">
  50. ";
  51. // line 8
  52. echo twig_escape_filter($this->env, ($context["legend"] ?? null), "html", null, true);
  53. echo "
  54. </legend>
  55. <table class=\"data\">
  56. <thead>
  57. <tr>
  58. <th>";
  59. // line 14
  60. echo twig_escape_filter($this->env, ($context["type_label"] ?? null), "html", null, true);
  61. echo "</th>
  62. <th>";
  63. // line 15
  64. echo _gettext("Privileges");
  65. echo "</th>
  66. <th>";
  67. // line 16
  68. echo _gettext("Grant");
  69. echo "</th>
  70. ";
  71. // line 17
  72. if ((($context["type"] ?? null) == "database")) {
  73. // line 18
  74. echo " <th>";
  75. echo _gettext("Table-specific privileges");
  76. echo "</th>
  77. ";
  78. } elseif (( // line 19
  79. ($context["type"] ?? null) == "table")) {
  80. // line 20
  81. echo " <th>";
  82. echo _gettext("Column-specific privileges");
  83. echo "</th>
  84. ";
  85. }
  86. // line 22
  87. echo " <th colspan=\"2\">";
  88. echo _gettext("Action");
  89. echo "</th>
  90. </tr>
  91. </thead>
  92. <tbody>
  93. ";
  94. // line 27
  95. if ((twig_length_filter($this->env, ($context["privileges"] ?? null)) == 0)) {
  96. // line 28
  97. echo " ";
  98. $context["colspan"] = (((($context["type"] ?? null) == "database")) ? (7) : ((((($context["type"] ?? null) == "table")) ? (6) : (5))));
  99. // line 29
  100. echo " <tr>
  101. <td colspan=\"";
  102. // line 30
  103. echo twig_escape_filter($this->env, ($context["colspan"] ?? null), "html", null, true);
  104. echo "\"><center><em>";
  105. echo _gettext("None");
  106. echo "</em></center></td>
  107. </tr>
  108. ";
  109. } else {
  110. // line 33
  111. echo " ";
  112. $context['_parent'] = $context;
  113. $context['_seq'] = twig_ensure_traversable(($context["privileges"] ?? null));
  114. foreach ($context['_seq'] as $context["_key"] => $context["privilege"]) {
  115. // line 34
  116. echo " <tr>
  117. <td>";
  118. // line 35
  119. echo twig_escape_filter($this->env, (($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 = $context["privilege"]) && is_array($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4) || $__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 instanceof ArrayAccess ? ($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4["name"] ?? null) : null), "html", null, true);
  120. echo "</td>
  121. <td><code>";
  122. // line 36
  123. echo (($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144 = $context["privilege"]) && is_array($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144) || $__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144 instanceof ArrayAccess ? ($__internal_62824350bc4502ee19dbc2e99fc6bdd3bd90e7d8dd6e72f42c35efd048542144["privileges"] ?? null) : null);
  124. echo "</code></td>
  125. <td>";
  126. // line 37
  127. echo twig_escape_filter($this->env, (((($__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b = $context["privilege"]) && is_array($__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b) || $__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b instanceof ArrayAccess ? ($__internal_1cfccaec8dd2e8578ccb026fbe7f2e7e29ac2ed5deb976639c5fc99a6ea8583b["grant"] ?? null) : null)) ? (_gettext("Yes")) : (_gettext("No"))), "html", null, true);
  128. echo "</td>
  129. ";
  130. // line 39
  131. if ((($context["type"] ?? null) == "database")) {
  132. // line 40
  133. echo " <td>";
  134. echo twig_escape_filter($this->env, (((($__internal_68aa442c1d43d3410ea8f958ba9090f3eaa9a76f8de8fc9be4d6c7389ba28002 = $context["privilege"]) && is_array($__internal_68aa442c1d43d3410ea8f958ba9090f3eaa9a76f8de8fc9be4d6c7389ba28002) || $__internal_68aa442c1d43d3410ea8f958ba9090f3eaa9a76f8de8fc9be4d6c7389ba28002 instanceof ArrayAccess ? ($__internal_68aa442c1d43d3410ea8f958ba9090f3eaa9a76f8de8fc9be4d6c7389ba28002["table_privs"] ?? null) : null)) ? (_gettext("Yes")) : (_gettext("No"))), "html", null, true);
  135. echo "</td>
  136. ";
  137. } elseif (( // line 41
  138. ($context["type"] ?? null) == "table")) {
  139. // line 42
  140. echo " <td>";
  141. echo twig_escape_filter($this->env, (((($__internal_d7fc55f1a54b629533d60b43063289db62e68921ee7a5f8de562bd9d4a2b7ad4 = $context["privilege"]) && is_array($__internal_d7fc55f1a54b629533d60b43063289db62e68921ee7a5f8de562bd9d4a2b7ad4) || $__internal_d7fc55f1a54b629533d60b43063289db62e68921ee7a5f8de562bd9d4a2b7ad4 instanceof ArrayAccess ? ($__internal_d7fc55f1a54b629533d60b43063289db62e68921ee7a5f8de562bd9d4a2b7ad4["column_privs"] ?? null) : null)) ? (_gettext("Yes")) : (_gettext("No"))), "html", null, true);
  142. echo "</td>
  143. ";
  144. }
  145. // line 44
  146. echo "
  147. <td>";
  148. // line 45
  149. echo (($__internal_01476f8db28655ee4ee02ea2d17dd5a92599be76304f08cd8bc0e05aced30666 = $context["privilege"]) && is_array($__internal_01476f8db28655ee4ee02ea2d17dd5a92599be76304f08cd8bc0e05aced30666) || $__internal_01476f8db28655ee4ee02ea2d17dd5a92599be76304f08cd8bc0e05aced30666 instanceof ArrayAccess ? ($__internal_01476f8db28655ee4ee02ea2d17dd5a92599be76304f08cd8bc0e05aced30666["edit_link"] ?? null) : null);
  150. echo "</td>
  151. <td>";
  152. // line 46
  153. echo (($__internal_01c35b74bd85735098add188b3f8372ba465b232ab8298cb582c60f493d3c22e = $context["privilege"]) && is_array($__internal_01c35b74bd85735098add188b3f8372ba465b232ab8298cb582c60f493d3c22e) || $__internal_01c35b74bd85735098add188b3f8372ba465b232ab8298cb582c60f493d3c22e instanceof ArrayAccess ? ($__internal_01c35b74bd85735098add188b3f8372ba465b232ab8298cb582c60f493d3c22e["revoke_link"] ?? null) : null);
  154. echo "</td>
  155. </tr>
  156. ";
  157. }
  158. $_parent = $context['_parent'];
  159. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['privilege'], $context['_parent'], $context['loop']);
  160. $context = array_intersect_key($context, $_parent) + $_parent;
  161. // line 49
  162. echo " ";
  163. }
  164. // line 50
  165. echo " </tbody>
  166. </table>
  167. ";
  168. // line 53
  169. if ((($context["type"] ?? null) == "database")) {
  170. // line 54
  171. echo " <label for=\"text_dbname\">";
  172. echo _gettext("Add privileges on the following database(s):");
  173. echo "</label>";
  174. // line 56
  175. if ( !twig_test_empty(($context["databases"] ?? null))) {
  176. // line 57
  177. echo " <select name=\"pred_dbname[]\" multiple=\"multiple\">
  178. ";
  179. // line 58
  180. $context['_parent'] = $context;
  181. $context['_seq'] = twig_ensure_traversable(($context["databases"] ?? null));
  182. foreach ($context['_seq'] as $context["_key"] => $context["database"]) {
  183. // line 59
  184. echo " <option value=\"";
  185. echo twig_escape_filter($this->env, PhpMyAdmin\Util::convertBitDefaultValue($context["database"]), "html", null, true);
  186. echo "\">
  187. ";
  188. // line 60
  189. echo twig_escape_filter($this->env, $context["database"], "html", null, true);
  190. echo "
  191. </option>
  192. ";
  193. }
  194. $_parent = $context['_parent'];
  195. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['database'], $context['_parent'], $context['loop']);
  196. $context = array_intersect_key($context, $_parent) + $_parent;
  197. // line 63
  198. echo " </select>
  199. ";
  200. }
  201. // line 66
  202. echo "<input type=\"text\" id=\"text_dbname\" name=\"dbname\">
  203. ";
  204. // line 67
  205. echo PhpMyAdmin\Util::showHint(_gettext("Wildcards % and _ should be escaped with a \\ to use them literally."));
  206. echo "
  207. ";
  208. } elseif (( // line 68
  209. ($context["type"] ?? null) == "table")) {
  210. // line 69
  211. echo " <input type=\"hidden\" name=\"dbname\" value=\"";
  212. echo twig_escape_filter($this->env, ($context["database"] ?? null), "html", null, true);
  213. echo "\">
  214. <label for=\"text_tablename\">";
  215. // line 71
  216. echo _gettext("Add privileges on the following table:");
  217. echo "</label>";
  218. // line 73
  219. if ( !twig_test_empty(($context["tables"] ?? null))) {
  220. // line 74
  221. echo " <select name=\"pred_tablename\" class=\"autosubmit\">
  222. <option value=\"\" selected=\"selected\">";
  223. // line 75
  224. echo _gettext("Use text field");
  225. echo ":</option>
  226. ";
  227. // line 76
  228. $context['_parent'] = $context;
  229. $context['_seq'] = twig_ensure_traversable(($context["tables"] ?? null));
  230. foreach ($context['_seq'] as $context["_key"] => $context["table"]) {
  231. // line 77
  232. echo " <option value=\"";
  233. echo twig_escape_filter($this->env, $context["table"], "html", null, true);
  234. echo "\">";
  235. echo twig_escape_filter($this->env, $context["table"], "html", null, true);
  236. echo "</option>
  237. ";
  238. }
  239. $_parent = $context['_parent'];
  240. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['table'], $context['_parent'], $context['loop']);
  241. $context = array_intersect_key($context, $_parent) + $_parent;
  242. // line 79
  243. echo " </select>
  244. ";
  245. }
  246. // line 82
  247. echo "<input type=\"text\" id=\"text_tablename\" name=\"tablename\">
  248. ";
  249. } else {
  250. // line 84
  251. echo " <input type=\"hidden\" name=\"dbname\" value=\"";
  252. echo twig_escape_filter($this->env, ($context["database"] ?? null), "html", null, true);
  253. echo "\">
  254. <label for=\"text_routinename\">";
  255. // line 86
  256. echo _gettext("Add privileges on the following routine:");
  257. echo "</label>";
  258. // line 88
  259. if ( !twig_test_empty(($context["routines"] ?? null))) {
  260. // line 89
  261. echo " <select name=\"pred_routinename\" class=\"autosubmit\">
  262. <option value=\"\" selected=\"selected\">";
  263. // line 90
  264. echo _gettext("Use text field");
  265. echo ":</option>
  266. ";
  267. // line 91
  268. $context['_parent'] = $context;
  269. $context['_seq'] = twig_ensure_traversable(($context["routines"] ?? null));
  270. foreach ($context['_seq'] as $context["_key"] => $context["routine"]) {
  271. // line 92
  272. echo " <option value=\"";
  273. echo twig_escape_filter($this->env, $context["routine"], "html", null, true);
  274. echo "\">";
  275. echo twig_escape_filter($this->env, $context["routine"], "html", null, true);
  276. echo "</option>
  277. ";
  278. }
  279. $_parent = $context['_parent'];
  280. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['routine'], $context['_parent'], $context['loop']);
  281. $context = array_intersect_key($context, $_parent) + $_parent;
  282. // line 94
  283. echo " </select>
  284. ";
  285. }
  286. // line 97
  287. echo "<input type=\"text\" id=\"text_routinename\" name=\"routinename\">
  288. ";
  289. }
  290. // line 99
  291. echo " </fieldset>
  292. <fieldset class=\"tblFooters\">
  293. <input class=\"btn btn-primary\" type=\"submit\" value=\"";
  294. // line 102
  295. echo _gettext("Go");
  296. echo "\">
  297. </fieldset>
  298. </form>
  299. ";
  300. }
  301. public function getTemplateName()
  302. {
  303. return "server/privileges/privileges_summary.twig";
  304. }
  305. public function isTraitable()
  306. {
  307. return false;
  308. }
  309. public function getDebugInfo()
  310. {
  311. return array ( 310 => 102, 305 => 99, 301 => 97, 297 => 94, 286 => 92, 282 => 91, 278 => 90, 275 => 89, 273 => 88, 270 => 86, 264 => 84, 260 => 82, 256 => 79, 245 => 77, 241 => 76, 237 => 75, 234 => 74, 232 => 73, 229 => 71, 223 => 69, 221 => 68, 217 => 67, 214 => 66, 210 => 63, 201 => 60, 196 => 59, 192 => 58, 189 => 57, 187 => 56, 183 => 54, 181 => 53, 176 => 50, 173 => 49, 164 => 46, 160 => 45, 157 => 44, 151 => 42, 149 => 41, 144 => 40, 142 => 39, 137 => 37, 133 => 36, 129 => 35, 126 => 34, 121 => 33, 113 => 30, 110 => 29, 107 => 28, 105 => 27, 96 => 22, 90 => 20, 88 => 19, 83 => 18, 81 => 17, 77 => 16, 73 => 15, 69 => 14, 60 => 8, 56 => 7, 50 => 4, 46 => 3, 42 => 2, 37 => 1,);
  312. }
  313. public function getSourceContext()
  314. {
  315. return new Source("", "server/privileges/privileges_summary.twig", "/wwwroot/OA/public/phpMyAdmin/templates/server/privileges/privileges_summary.twig");
  316. }
  317. }