274c39c3957b2910961cc3d06f74b1d1.php
10 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
/* common/security.twig */
class __TwigTemplate_fd0094b311699d2489da3e5c09c36f51 extends 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
yield "<div id=\"modal-security\" class=\"modal\">
<div class=\"modal-dialog\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">×</button>
<h4 class=\"modal-title text-danger\"><i class=\"fa fa-exclamation-triangle\"></i> ";
// line 6
yield ($context["heading_title"] ?? null);
yield "</h4>
</div>
<div class=\"modal-body\">
<div class=\"alert alert-info\"><i class=\"fa fa-exclamation-circle\"></i> ";
// line 9
yield ($context["text_security"] ?? null);
yield "</div>
<form class=\"form-horizontal\">
<fieldset>
<legend>";
// line 12
yield ($context["text_choose"] ?? null);
yield "</legend>
<div class=\"form-group\">
<select name=\"type\" id=\"input-type\" class=\"form-control\">
<option value=\"automatic\">";
// line 15
yield ($context["text_automatic"] ?? null);
yield "</option>
<option value=\"manual\">";
// line 16
yield ($context["text_manual"] ?? null);
yield "</option>
</select>
</div>
</fieldset>
<fieldset id=\"collapse-automatic\" class=\"collapse\">
<legend>";
// line 21
yield ($context["text_automatic"] ?? null);
yield "</legend>
<div class=\"form-group\">
<div class=\"input-group\">
<div class=\"input-group-btn dropdown\">
<button type=\"button\" id=\"button-path\" data-toggle=\"dropdown\" class=\"btn btn-default\">";
// line 25
yield ($context["document_root"] ?? null);
yield " <span class=\"caret\"></span></button>
<ul class=\"dropdown-menu\">
";
// line 27
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(($context["paths"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["path"]) {
// line 28
yield " ";
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), $context["path"]) > Twig\Extension\CoreExtension::length($this->env->getCharset(), ($context["document_root"] ?? null)))) {
// line 29
yield " <li><a href=\"";
yield $context["path"];
yield "\"><i class=\"fa fa-exclamation-triangle fa-fw text-danger\"></i> ";
yield $context["path"];
yield "</a></li>
";
} else {
// line 31
yield " <li><a href=\"";
yield $context["path"];
yield "\"><i class=\"fa fa-check-circle fa-fw text-success\"></i> ";
yield $context["path"];
yield "</a></li>
";
}
// line 33
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['path'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 34
yield " </ul>
</div>
<input type=\"text\" name=\"directory\" value=\"storage\" placeholder=\"";
// line 36
yield ($context["entry_directory"] ?? null);
yield "\" class=\"form-control\" />
<div class=\"input-group-btn\">
<button type=\"button\" id=\"button-move\" data-loading-text=\"";
// line 38
yield ($context["text_loading"] ?? null);
yield "\" class=\"btn btn-danger\"><i class=\"fa fa-exclamation-triangle\"></i> ";
yield ($context["button_move"] ?? null);
yield "</button>
</div>
</div>
<input type=\"hidden\" name=\"path\" value=\"";
// line 41
yield ($context["document_root"] ?? null);
yield "\" />
</div>
</fieldset>
<fieldset id=\"collapse-manual\" class=\"collapse\">
<legend>";
// line 45
yield ($context["text_manual"] ?? null);
yield "</legend>
<div class=\"form-group\">
<div style=\"height: 300px; overflow-y: scroll;\" class=\"form-control\" disabled=\"disabled\"></div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
</div>
<script type=\"text/javascript\"><!--
\$(document).ready(function() {
\t\$('#modal-security').modal('show');
});
\$('#modal-security select[name=\\'type\\']').on('change', function() {
\t\$('#modal-security fieldset.collapse').removeClass('in');
\t
\t\$('#modal-security #collapse-' + \$(this).val()).addClass('in');
});
\$('#modal-security select[name=\\'type\\']').trigger('change');
\$('#modal-security .dropdown-menu a').on('click', function(e) {
\te.preventDefault();
\t
\t\$('#modal-security #button-path').html(\$(this).html() + ' <span class=\"caret\"></span>');
\t
\t\$('#modal-security input[name=\\'path\\']').val(\$(this).attr('href'));
});
\$('#modal-security .dropdown-menu a').on('click', function(e) {
\te.preventDefault();
\t
\t\$('#button-path').html(\$(this).text() + ' <span class=\"caret\"></span>');
\t
\t\$('input[name=\\'path\\']').val(\$(this).attr('href'));
\t
\t\$('input[name=\\'path\\']').trigger('change');
});
\$('#button-move').on('click', function() {
\tvar element = this;
\t
\t\$.ajax({
\t\turl: 'index.php?route=common/security/move&user_token=";
// line 91
yield ($context["user_token"] ?? null);
yield "',
\t\ttype: 'post',
\t\tdata: \$('input[name=\\'path\\'], input[name=\\'directory\\']'),
\t\tdataType: 'json',
\t\tcrossDomain: true,
\t\tbeforeSend: function() {
\t\t\t\$(element).button('loading');
\t\t},
\t\tcomplete: function() {
\t\t\t\$(element).button('reset');
\t\t},
\t\tsuccess: function(json) {
\t\t\t\$('.alert-dismissible').remove();
\t\t\tif (json['error']) {
\t\t\t\t\$('#modal-security .modal-body').prepend('<div class=\"alert alert-danger alert-dismissible\"><i class=\"fa fa-exclamation-circle\"></i> ' + json['error'] + ' <button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button></div>');
\t\t\t}
\t\t\tif (json['success']) {
\t\t\t\t\$('#modal-security .modal-body').prepend('<div class=\"alert alert-success alert-dismissible\"><i class=\"fa fa-check-circle\"></i> ' + json['success'] + ' <button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button></div>');
\t\t\t}
\t\t},
\t\terror: function(xhr, ajaxOptions, thrownError) {
\t\t\talert(thrownError + \"\\r\\n\" + xhr.statusText + \"\\r\\n\" + xhr.responseText);
\t\t}
\t});
});
\$('#modal-security select[name=\\'type\\']').on('change', function () {
\thtml = '<ol>';
\thtml += '<li><p>";
// line 121
yield ($context["text_move"] ?? null);
yield "</p>';
\thtml += '<p><strong>";
// line 122
yield ($context["storage"] ?? null);
yield "</strong></p>';
\thtml += '<p>";
// line 123
yield ($context["text_to"] ?? null);
yield "</p>';
\thtml += '<p><strong>' + \$('#modal-security input[name=\\'path\\']').val() + \$('#modal-security input[name=\\'directory\\']').val() + '/</strong></p></li>';
\thtml += '<li><p>";
// line 125
yield ($context["text_config"] ?? null);
yield "</p>';
\thtml += '<p><strong>define(\\'DIR_STORAGE\\', DIR_SYSTEM . \\'storage/\\');</strong></p>';
\thtml += '<p>to</p>';
\thtml += '<p><strong>define(\\'DIR_STORAGE\\', \\'' + \$('#modal-security input[name=\\'path\\']').val() + \$('#modal-security input[name=\\'directory\\']').val() + '/\\');</strong></p></li>';
\thtml += '<li><p>";
// line 129
yield ($context["text_admin"] ?? null);
yield "</p>';
\thtml += '<p><strong>define(\\'DIR_STORAGE\\', DIR_SYSTEM . \\'storage/\\');</strong></p>';
\thtml += '<p>to</p>';
\thtml += '<p><strong>define(\\'DIR_STORAGE\\', \\'' + \$('#modal-security input[name=\\'path\\']').val() + \$('#modal-security input[name=\\'directory\\']').val() + '/\\');</strong></p></li>';
html += '</ol>';
\t
\t\$('#collapse-manual .form-control').html(html);
});
\$('input[name=\\'path\\']').trigger('change');
//--></script>";
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "common/security.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 242 => 129, 235 => 125, 230 => 123, 226 => 122, 222 => 121, 189 => 91, 140 => 45, 133 => 41, 125 => 38, 120 => 36, 116 => 34, 110 => 33, 102 => 31, 94 => 29, 91 => 28, 87 => 27, 82 => 25, 75 => 21, 67 => 16, 63 => 15, 57 => 12, 51 => 9, 45 => 6, 38 => 1,);
}
public function getSourceContext()
{
return new Source("", "common/security.twig", "");
}
}