1 {{ page_settings_error_html|raw }}
2 {{ page_settings_html|raw }}
4 <iframe id="import_upload_iframe" name="import_upload_iframe" width="1" height="1" class="hide"></iframe>
5 <div id="import_form_status" class="hide"></div>
6 <div id="importmain" class="container-fluid">
7 <img src="{{ theme_image_path }}ajax_clock_small.gif" width="16" height="16" alt="ajax clock" class="hide">
9 <script type="text/javascript">
11 {% include 'import/javascript.twig' with {
12 'upload_id': upload_id,
14 'theme_image_path': theme_image_path
19 <form id="import_file_form"
20 action="{{ url('/import') }}"
22 enctype="multipart/form-data"
25 {%- if handler != 'PhpMyAdmin\\Plugins\\Import\\Upload\\UploadNoplugin' %}
26 target="import_upload_iframe"
29 {{ get_hidden_inputs(hidden_inputs) }}
31 <div class="exportoptions" id="header">
33 {{ get_image('b_import', 'Import'|trans) }}
34 {% block title %}{% endblock %}
38 <div class="importoptions">
39 <h3>{% trans 'File to import:' %}</h3>
41 {# We don't have show anything about compression, when no supported #}
42 {% if compressions is not empty %}
43 <div class="formelementrow" id="compression_info">
45 {{ 'File may be compressed (%s) or uncompressed.'|trans|format(compressions|join(', ')) }}
47 {% trans 'A compressed file\'s name must end in <strong>.[format].[compression]</strong>. Example: <strong>.sql.zip</strong>' %}
52 <div class="formelementrow" id="upload_form">
53 {% if is_upload and upload_dir is not empty %}
56 <input type="radio" name="file_location" id="radio_import_file" required="required">
57 <label for="radio_import_file">{% trans 'Browse your computer:' %}</label>
59 <div id="upload_form_status" class="hide"></div>
60 <div id="upload_form_status_info" class="hide"></div>
62 <input type="file" name="import_file" id="input_import_file" aria-label="{% trans 'Browse your computer' %}">
64 {{ get_formatted_maximum_upload_size(max_upload_size) }}
66 <input type="hidden" name="MAX_FILE_SIZE" value="{{ max_upload_size }}">
68 <p>{% trans 'You may also drag and drop a file on any page.' %}</p>
71 <input type="radio" name="file_location" id="radio_local_import_file"
72 {{- timeout_passed_global is not empty and local_import_file is not empty ? ' checked' }}>
73 <label for="radio_local_import_file">
74 {{ 'Select from the web server upload directory [strong]%s[/strong]:'|trans|format(user_upload_dir)|sanitize }}
77 {% if local_files is same as(false) %}
78 {{ 'The directory you set for upload work cannot be reached.'|trans|error }}
79 {% elseif local_files is not empty %}
80 <select size="1" name="local_import_file" id="select_local_import_file" aria-label="{% trans 'Select file to import' %}">
81 <option value=""></option>
85 <em>{% trans 'There are no files to upload!' %}</em>
89 {% elseif is_upload %}
90 <label for="input_import_file">{% trans 'Browse your computer:' %}</label>
92 <div id="upload_form_status" class="hide"></div>
93 <div id="upload_form_status_info" class="hide"></div>
95 <input type="file" name="import_file" id="input_import_file">
97 {{ get_formatted_maximum_upload_size(max_upload_size) }}
99 <input type="hidden" name="MAX_FILE_SIZE" value="{{ max_upload_size }}">
101 <p>{% trans 'You may also drag and drop a file on any page.' %}</p>
102 {% elseif upload_dir is not empty %}
103 <label for="select_local_import_file">
104 {{ 'Select from the web server upload directory [strong]%s[/strong]:'|trans|format(user_upload_dir)|sanitize }}
107 {% if local_files is same as(false) %}
108 {{ 'The directory you set for upload work cannot be reached.'|trans|error }}
109 {% elseif local_files is not empty %}
110 <select size="1" name="local_import_file" id="select_local_import_file">
111 <option value=""></option>
112 {{ local_files|raw }}
115 <em>{% trans 'There are no files to upload!' %}</em>
118 {{ 'File uploads are not allowed on this server.'|trans|notice }}
122 <div class="formelementrow" id="charaset_of_file">
123 {# Charset of file #}
124 <label for="charset_of_file">{% trans 'Character set of the file:' %}</label>
125 {% if is_encoding_supported %}
126 <select id="charset_of_file" name="charset_of_file" size="1">
127 {% for charset in encodings %}
128 <option value="{{ charset }}"
129 {% if (import_charset is empty and charset == 'utf-8')
130 or charset == import_charset %}
138 <select lang="en" dir="ltr" name="charset_of_file" id="charset_of_file">
139 <option value=""></option>
140 {% for charset in charsets %}
141 <option value="{{ charset.name }}" title="{{ charset.description }}"
142 {{- charset.name == 'utf8' ? ' selected' }}>
151 <div class="importoptions">
152 <h3>{% trans 'Partial import:' %}</h3>
154 {% if timeout_passed is defined and timeout_passed %}
155 <div class="formelementrow">
156 <input type="hidden" name="skip" value="{{ offset }}">
157 {{ 'Previous import timed out, after resubmitting will continue from position %d.'|trans|format(offset) }}
161 <div class="formelementrow">
162 <input type="checkbox" name="allow_interrupt" value="yes" id="checkbox_allow_interrupt"
163 {{ checkbox_check('Import', 'allow_interrupt') }}>
164 <label for="checkbox_allow_interrupt">
165 {% trans 'Allow the interruption of an import in case the script detects it is close to the PHP timeout limit. <em>(This might be a good way to import large files, however it can break transactions.)</em>' %}
169 {% if not (timeout_passed is defined and timeout_passed) %}
170 <div class="formelementrow">
171 <label for="text_skip_queries">
172 {% trans 'Skip this number of queries (for SQL) starting from the first one:' %}
174 <input type="number" name="skip_queries" value="
175 {{- get_default_plugin('Import', 'skip_queries') -}}
176 " id="text_skip_queries" min="0">
179 {# If timeout has passed,
180 do not show the Skip dialog to avoid the risk of someone
181 entering a value here that would interfere with "skip" #}
182 <input type="hidden" name="skip_queries" value="
183 {{- get_default_plugin('Import', 'skip_queries') -}}
184 " id="text_skip_queries">
188 <div class="importoptions">
189 <h3>{% trans 'Other options:' %}</h3>
190 <div class="formelementrow">
191 <input type="hidden" name="fk_checks" value="0">
192 <input type="checkbox" name="fk_checks" id="fk_checks" value="1"{{ is_foreign_key_check ? ' checked' }}>
193 <label for="fk_checks">{% trans 'Enable foreign key checks' %}</label>
197 <div class="importoptions">
198 <h3>{% trans 'Format:' %}</h3>
199 {{ get_choice('Import', 'format', import_list) }}
200 <div id="import_notification"></div>
203 <div class="importoptions" id="format_specific_opts">
204 <h3>{% trans 'Format-specific options:' %}</h3>
205 <p class="no_js_msg" id="scroll_to_options_msg">
206 {% trans 'Scroll down to fill in the options for the selected format and ignore the options for other formats.' %}
208 {{ get_options('Import', import_list) }}
210 <div class="clearfloat"></div>
212 {# Japanese encoding setting #}
213 {% if can_convert_kanji %}
214 <div class="importoptions" id="kanji_encoding">
215 <h3>{% trans 'Encoding Conversion:' %}</h3>
216 {% include 'encoding/kanji_encoding_form.twig' %}
220 <div class="importoptions justify-content-end" id="submit">
221 <input id="buttonGo" class="btn btn-primary" type="submit" value="{% trans 'Go' %}">