init web ems all

This commit is contained in:
agtuser
2024-09-27 17:13:36 +08:00
parent 81c97acbe9
commit 5cc56f8078
4263 changed files with 798779 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<input type="checkbox" name="{{ html_field_name }}"
{%- if html_field_id is defined %} id="{{ html_field_id }}"{% endif -%}
{%- if checked is defined and checked %} checked="checked"{% endif -%}
{%- if onclick is defined and onclick %} class="autosubmit"{% endif %} /><label
{%- if html_field_id is defined %} for="{{ html_field_id }}"
{%- endif %}>{{ label }}</label>

View File

@@ -0,0 +1,16 @@
{% if privs_available %}
<input name="field_adjust_privileges[{{ column_number }}]"
id="field_{{ column_number }}_{{ ci - ci_offset }}"
checked="checked"
type="checkbox"
value="NULL"
class="allow_null"/>
{% else %}
<input name="field_adjust_privileges[{{ column_number }}]"
id="field_{{ column_number }}_{{ ci - ci_offset }}"
disabled
type="checkbox"
value="NULL"
class="allow_null"
title="{% trans "You don't have sufficient privileges to perform this operation; Please refer to the documentation for more details" %}"/>
{% endif %}

View File

@@ -0,0 +1,21 @@
{% if submit_attribute is defined and submit_attribute != false %}
{% set attribute = submit_attribute %}
{% elseif column_meta['Extra'] is defined
and column_meta['Extra'] == 'on update CURRENT_TIMESTAMP' %}
{% set attribute = 'on update CURRENT_TIMESTAMP' %}
{% elseif extracted_columnspec['attribute'] is defined %}
{% set attribute = extracted_columnspec['attribute'] %}
{% else %}
{% set attribute = '' %}
{% endif %}
{% set attribute = attribute|upper %}
<select name="field_attribute[{{ column_number }}]"
id="field_{{ column_number }}_{{ ci - ci_offset }}">
{% set cnt_attribute_types = attribute_types|length - 1 %}
{% for i in 0..cnt_attribute_types %}
<option value="{{ attribute_types[i] }}"
{{- attribute == attribute_types[i]|upper ? ' selected="selected"' }}>
{{ attribute_types[i] }}
</option>
{% endfor %}
</select>

View File

@@ -0,0 +1,240 @@
{# Cell index: If certain fields get left out, the counter shouldn't change. #}
{% set ci = 0 %}
{# Every time a cell shall be left out the STRG-jumping feature, $ci_offset has
to be incremented ($ci_offset++) #}
{% set ci_offset = -1 %}
<td class="center">
{# column name #}
{% include 'columns_definitions/column_name.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta,
'cfg_relation': cfg_relation,
'max_rows': max_rows
} only %}
{% set ci = ci + 1 %}
</td>
<td class="center">
{# column type #}
{% include 'columns_definitions/column_type.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta,
'type_upper': type_upper
} only %}
{% set ci = ci + 1 %}
</td>
<td class="center">
{# column length #}
{% include 'columns_definitions/column_length.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'length_values_input_size': length_values_input_size,
'length_to_display': length
} only %}
{% set ci = ci + 1 %}
</td>
<td class="center">
{# column default #}
{% include 'columns_definitions/column_default.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta,
'type_upper': type_upper,
'char_editing': char_editing
} only %}
{% set ci = ci + 1 %}
</td>
<td class="center">
{# column collation #}
{{ Charsets_getCollationDropdownBox(
dbi,
disable_is,
'field_collation[' ~ column_number ~ ']',
'field_' ~ column_number ~ '_' ~ (ci - ci_offset),
column_meta['Collation'] is not empty ? column_meta['Collation'] : null,
false
) }}
{% set ci = ci + 1 %}
</td>
<td class="center">
{# column attribute #}
{% include 'columns_definitions/column_attribute.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta,
'extracted_columnspec': extracted_columnspec,
'submit_attribute': submit_attribute,
'attribute_types': attribute_types
} only %}
{% set ci = ci + 1 %}
</td>
<td class="center">
{# column NULL #}
{% include 'columns_definitions/column_null.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta
} only %}
{% set ci = ci + 1 %}
</td>
{% if change_column is defined and change_column is not empty %}
{# column Adjust privileges, Only for 'Edit' Column(s) #}
<td class="center">
{% include 'columns_definitions/column_adjust_privileges.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'privs_available': privs_available
} only %}
{% set ci = ci + 1 %}
</td>
{% endif %}
{% if not is_backup %}
{# column indexes, See my other comment about this 'if'. #}
<td class="center">
{% include 'columns_definitions/column_indexes.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta
} only %}
{% set ci = ci + 1 %}
</td>
{% endif %}
<td class="center">
{# column auto_increment #}
{% include 'columns_definitions/column_auto_increment.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta
} only %}
{% set ci = ci + 1 %}
</td>
<td class="center">
{# column comments #}
{% include 'columns_definitions/column_comment.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'max_length': max_length,
'value': column_meta['Field'] is defined
and comments_map is iterable
and comments_map[column_meta['Field']] is defined
? comments_map[column_meta['Field']]|e
} only %}
{% set ci = ci + 1 %}
</td>
{# column virtuality #}
{% if is_virtual_columns_supported %}
<td class="center">
{% include 'columns_definitions/column_virtuality.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta,
'char_editing': char_editing,
'expression': column_meta['Expression'] is defined ? column_meta['Expression'],
'options': options
} only %}
{% set ci = ci + 1 %}
</td>
{% endif %}
{# move column #}
{% if fields_meta is defined %}
{% set current_index = 0 %}
{% set cols = move_columns|length - 1 %}
{% set break = false %}
{% for mi in 0..cols %}
{% if move_columns[mi].name == column_meta['Field'] and not break %}
{% set current_index = mi %}
{% set break = true %}
{% endif %}
{% endfor %}
<td class="center">
{% include 'columns_definitions/move_column.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta,
'move_columns': move_columns,
'current_index': current_index
} only %}
{% set ci = ci + 1 %}
</td>
{% endif %}
{% if cfg_relation['mimework'] and browse_mime and cfg_relation['commwork'] %}
<td class="center">
{# Column Mime-type #}
{% include 'columns_definitions/mime_type.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta,
'available_mime': available_mime,
'mime_map': mime_map
} only %}
{% set ci = ci + 1 %}
</td>
<td class="center">
{# Column Browser transformation #}
{% include 'columns_definitions/transformation.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta,
'available_mime': available_mime,
'mime_map': mime_map,
'type': 'transformation'
} only %}
{% set ci = ci + 1 %}
</td>
<td class="center">
{# column Transformation options #}
{% include 'columns_definitions/transformation_option.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta,
'mime_map': mime_map,
'type_prefix': ''
} only %}
{% set ci = ci + 1 %}
</td>
<td class="center">
{# Column Input transformation #}
{% include 'columns_definitions/transformation.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta,
'available_mime': available_mime,
'mime_map': mime_map,
'type': 'input_transformation'
} only %}
{% set ci = ci + 1 %}
</td>
<td class="center">
{# column Input transformation options #}
{% include 'columns_definitions/transformation_option.twig' with {
'column_number': column_number,
'ci': ci,
'ci_offset': ci_offset,
'column_meta': column_meta,
'mime_map': mime_map,
'type_prefix': 'input_'
} only %}
{% set ci = ci + 1 %}
</td>
{% endif %}

View File

@@ -0,0 +1,7 @@
<input name="field_extra[{{ column_number }}]"
id="field_{{ column_number }}_{{ ci - ci_offset }}"
{% if column_meta['Extra'] is defined and column_meta['Extra']|lower == 'auto_increment' -%}
checked="checked"
{%- endif %}
type="checkbox"
value="AUTO_INCREMENT" />

View File

@@ -0,0 +1,7 @@
<input id="field_{{ column_number }}_{{ ci - ci_offset }}"
type="text"
name="field_comments[{{ column_number }}]"
size="12"
maxlength="{{ max_length }}"
value="{{ value|raw }}"
class="textfield" />

View File

@@ -0,0 +1,46 @@
{# here we put 'NONE' as the default value of drop-down; otherwise users would
have problems if they forget to enter the default value (example, for an INT) #}
{% set translation %}{% trans %}None{% context %}for default{% endtrans %}{% endset %}
{% set default_options = {
'NONE': translation,
'USER_DEFINED': 'As defined:'|trans,
'NULL': 'NULL',
'CURRENT_TIMESTAMP': 'CURRENT_TIMESTAMP'
} %}
{# For a TIMESTAMP, do not show the string "CURRENT_TIMESTAMP" as a default value #}
{% set default_value = '' %}
{% if column_meta['DefaultValue'] is defined %}
{% set default_value = column_meta['DefaultValue'] %}
{% endif %}
{% if type_upper == 'BIT' %}
{% set default_value = Util_convertBitDefaultValue(column_meta['DefaultValue']) %}
{% elseif type_upper == 'BINARY' or type_upper == 'VARBINARY' %}
{% set default_value = bin2hex(column_meta['DefaultValue']) %}
{% endif %}
<select name="field_default_type[{{ column_number }}]"
id="field_{{ column_number }}_{{ ci - ci_offset }}"
class="default_type">
{% for key, value in default_options %}
<option value="{{ key }}"
{%- if column_meta['DefaultType'] is defined
and column_meta['DefaultType'] == key %}
selected="selected"
{%- endif %}>
{{ value }}
</option>
{% endfor %}
</select>
{% if char_editing == 'textarea' %}
<textarea name="field_default_value[{{ column_number }}]"
cols="15"
class="textfield
default_value">{{ default_value }}</textarea>
{% else %}
<input type="text"
name="field_default_value[{{ column_number }}]"
size="12"
value="{{ default_value }}"
class="textfield default_value" />
{% endif %}

View File

@@ -0,0 +1,152 @@
<form method="post" action="{{ action }}" class="
{{- action == 'tbl_create.php' ? 'create_table' : 'append_fields' -}}
_form ajax lock-page">
{{ Url_getHiddenInputs(form_params) }}
{# happens when an index has been set on a column #}
{# and a column is added to the table creation dialog #}
{# This contains a JSON-encoded string #}
<input type="hidden" name="primary_indexes" value="
{{- primary_indexes is not empty ? primary_indexes : '[]' }}">
<input type="hidden" name="unique_indexes" value="
{{- unique_indexes is not empty ? unique_indexes : '[]' }}">
<input type="hidden" name="indexes" value="
{{- indexes is not empty ? indexes : '[]' }}">
<input type="hidden" name="fulltext_indexes" value="
{{- fulltext_indexes is not empty ? fulltext_indexes : '[]' }}">
<input type="hidden" name="spatial_indexes" value="
{{- spatial_indexes is not empty ? spatial_indexes : '[]' }}">
{% if action == 'tbl_create.php' %}
<div id="table_name_col_no_outer">
<table id="table_name_col_no" class="tdblock">
<tr class="vmiddle floatleft">
<td>{% trans 'Table name' %}:
<input type="text"
name="table"
size="40"
maxlength="64"
value="{{ table is defined ? table }}"
class="textfield" autofocus required />
</td>
<td>
{% trans 'Add' %}
<input type="number"
id="added_fields"
name="added_fields"
size="2"
value="1"
min="1"
onfocus="this.select()" />
{% trans 'column(s)' %}
<input type="button"
name="submit_num_fields"
value="{% trans 'Go' %}" />
</td>
</tr>
</table>
</div>
{% endif %}
{% if content_cells is iterable %}
{% include 'columns_definitions/table_fields_definitions.twig' with {
'is_backup': is_backup,
'fields_meta': fields_meta,
'mimework': mimework,
'content_cells': content_cells,
'change_column': change_column,
'is_virtual_columns_supported': is_virtual_columns_supported,
'browse_mime': browse_mime,
'server_type': server_type,
'max_rows': max_rows,
'char_editing': char_editing,
'attribute_types': attribute_types,
'privs_available': privs_available,
'max_length': max_length,
'dbi': dbi,
'disable_is': disable_is
} only %}
{% endif %}
{% if action == 'tbl_create.php' %}
<div class="responsivetable">
<table>
<tr class="vtop">
<th>{% trans 'Table comments:' %}</th>
<td width="25">&nbsp;</td>
<th>{% trans 'Collation:' %}</th>
<td width="25">&nbsp;</td>
<th>
{% trans 'Storage Engine:' %}
{{ Util_showMySQLDocu('Storage_engines') }}
</th>
<td width="25">&nbsp;</td>
<th>
{% trans 'Connection:' %}
{{ Util_showMySQLDocu('federated-create-connection') }}
</th>
</tr>
<tr>
<td>
<input type="text"
name="comment"
size="40"
maxlength="60"
value="{{ comment is defined ? comment }}"
class="textfield" />
</td>
<td width="25">&nbsp;</td>
<td>
{{ Charsets_getCollationDropdownBox(
dbi,
disable_is,
'tbl_collation',
null,
tbl_collation,
false
) }}
</td>
<td width="25">&nbsp;</td>
<td>
{{ StorageEngine_getHtmlSelect(
'tbl_storage_engine',
null,
tbl_storage_engine
) }}
</td>
<td width="25">&nbsp;</td>
<td>
<input type="text"
name="connection"
size="40"
value="{{ connection is defined ? connection }}"
placeholder="scheme://user_name[:password]@host_name[:port_num]/db_name/tbl_name"
class="textfield"
required="required" />
</td>
</tr>
{% if have_partitioning %}
<tr class="vtop">
<th colspan="5">
{% trans 'PARTITION definition:' %}
{{ Util_showMySQLDocu('Partitioning') }}
</th>
</tr>
<tr>
<td colspan="5">
{% include 'columns_definitions/partitions.twig' with {
'partition_details': partition_details
} only %}
</td>
</tr>
{% endif %}
</table>
</div>
{% endif %}
<fieldset class="tblFooters">
<input type="button"
class="preview_sql"
value="{% trans 'Preview SQL' %}" />
<input type="submit"
name="do_save_data"
value="{% trans 'Save' %}" />
</fieldset>
<div id="properties_message"></div>
</form>

View File

@@ -0,0 +1,7 @@
<input name="col_extra[{{ column_number }}]"
id="field_{{ column_number }}_{{ ci - ci_offset }}"
{% if column_meta['Extra'] is not empty and column_meta['Extra'] == 'auto_increment' -%}
checked="checked"
{%- endif %}
type="checkbox"
value="auto_increment" />

View File

@@ -0,0 +1,24 @@
<select name="field_key[{{ column_number }}]"
id="field_{{ column_number }}_{{ ci - ci_offset }}" data-index="">
<option value="none_{{ column_number }}">---</option>
<option value="primary_{{ column_number }}" title="{% trans "Primary" %}"
{{- column_meta['Key'] is defined and column_meta['Key'] == 'PRI' ? ' selected="selected"' }}>
PRIMARY
</option>
<option value="unique_{{ column_number }}" title="{% trans "Unique" %}"
{{- column_meta['Key'] is defined and column_meta['Key'] == 'UNI' ? ' selected="selected"' }}>
UNIQUE
</option>
<option value="index_{{ column_number }}" title="{% trans "Index" %}"
{{- column_meta['Key'] is defined and column_meta['Key'] == 'MUL' ? ' selected="selected"' }}>
INDEX
</option>
<option value="fulltext_{{ column_number }}" title="{% trans "Fulltext" %}"
{{- column_meta['Key'] is defined and column_meta['Key'] == 'FULLTEXT' ? ' selected="selected"' }}>
FULLTEXT
</option>
<option value="spatial_{{ column_number }}" title="{% trans "Spatial" %}"
{{- column_meta['Key'] is defined and column_meta['Key'] == 'SPATIAL' ? ' selected="selected"' }}>
SPATIAL
</option>
</select>

View File

@@ -0,0 +1,11 @@
<input id="field_{{ column_number }}_{{ ci - ci_offset }}"
type="text"
name="field_length[{{ column_number }}]"
size="{{ length_values_input_size }}"
value="{{ length_to_display }}"
class="textfield" />
<p class="enum_notice" id="enum_notice_{{ column_number }}_{{ ci - ci_offset }}">
<a href="#" class="open_enum_editor">
{% trans 'Edit ENUM/SET values' %}
</a>
</p>

View File

@@ -0,0 +1,43 @@
{% set title = '' %}
{% if column_meta['column_status'] is defined %}
{% if column_meta['column_status']['isReferenced'] %}
{% set title = title ~ 'Referenced by %s.'|trans|format(
column_meta['column_status']['references']|join(',')
) %}
{% endif %}
{% if column_meta['column_status']['isForeignKey'] %}
{% if title is not empty %}
{% set title = title ~ '\n'|raw %}
{% endif %}
{% set title = title ~ 'Is a foreign key.'|trans %}
{% endif %}
{% endif %}
{% if title is empty %}
{% set title = 'Column'|trans %}
{% endif %}
<input id="field_{{ column_number }}_{{ ci - ci_offset }}"
{% if column_meta['column_status'] is defined
and not column_meta['column_status']['isEditable'] %}
disabled="disabled"
{% endif %}
type="text"
name="field_name[{{ column_number }}]"
maxlength="64"
class="textfield"
title="{{ title }}"
size="10"
value="{{ column_meta['Field'] is defined ? column_meta['Field'] }}" />
{% if cfg_relation['centralcolumnswork']
and not (column_meta['column_status'] is defined
and not column_meta['column_status']['isEditable']) %}
<p style="font-size:80%;margin:5px 2px"
id="central_columns_{{ column_number }}_{{ ci - ci_offset }}">
<a data-maxrows="{{ max_rows }}"
href="#"
class="central_columns_dialog">
{% trans 'Pick from Central Columns' %}
</a>
</p>
{% endif %}

View File

@@ -0,0 +1,8 @@
<input name="field_null[{{ column_number }}]"
id="field_{{ column_number }}_{{ ci - ci_offset }}"
{% if column_meta['Null'] is not empty and column_meta['Null'] != 'NO' and column_meta['Null'] != 'NOT NULL' -%}
checked="checked"
{%- endif %}
type="checkbox"
value="YES"
class="allow_null" />

View File

@@ -0,0 +1,8 @@
<select class="column_type"
name="field_type[{{ column_number }}]"
id="field_{{ column_number }}_{{ ci - ci_offset }}"
{%- if column_meta['column_status'] is defined and not column_meta['column_status']['isEditable'] -%}
disabled="disabled"
{%- endif %}>
{{ Util_getSupportedDatatypes(true, type_upper) }}
</select>

View File

@@ -0,0 +1,31 @@
<select name="field_virtuality[{{ column_number }}]"
id="field_{{ column_number }}_{{ ci - ci_offset }}"
class="virtuality">
{% for key, value in options %}
<option value="{{ key }}"
{%- if column_meta['Extra'] is defined
and key != ''
and strpos(column_meta['Extra'], key) is same as(0) %}
selected="selected"
{%- endif %}>
{{ value }}
</option>
{% endfor %}
</select>
{% if char_editing == 'textarea' %}
{% apply spaceless %}
<textarea name="field_expression[{{ column_number }}]"
cols="15"
class="textfield expression">
{{ expression }}
</textarea>
{% endapply %}
{% else %}
<input type="text"
name="field_expression[{{ column_number }}]"
size="12"
value="{{ expression }}"
placeholder="{% trans 'Expression' %}"
class="textfield expression" />
{% endif %}

View File

@@ -0,0 +1,17 @@
<select id="field_{{ column_number }}_{{ ci - ci_offset }}"
size="1"
name="field_mimetype[{{ column_number }}]">
<option value="">&nbsp;</option>
{% if available_mime['mimetype'] is defined
and available_mime['mimetype'] is iterable %}
{% for mimetype in available_mime['mimetype'] %}
{% set checked = column_meta['Field'] is defined
and mime_map[column_meta['Field']]['mimetype'] is defined
and mime_map[column_meta['Field']]['mimetype'] == mimetype|replace({'/': '_'})
? ' selected' %}
<option value="{{ mimetype|replace({'/': '_'}) }}"{{ checked }}>
{{ mimetype|lower }}
</option>
{% endfor %}
{% endif %}
</select>

View File

@@ -0,0 +1,15 @@
<select id="field_{{ column_number }}_{{ ci - ci_offset }}"
name="field_move_to[{{ column_number }}]"
size="1"
width="5em">
<option value="" selected="selected">&nbsp;</option>
<option value="-first"{{ current_index == 0 ? ' disabled="disabled"' }}>
{% trans 'first' %}
</option>
{% for mi in 0..move_columns|length - 1 %}
<option value="{{ move_columns[mi].name }}"
{{- current_index == mi or current_index == mi + 1 ? ' disabled="disabled"' }}>
{{ 'after %s'|trans|format(Util_backquote(move_columns[mi].name|e)) }}
</option>
{% endfor %}
</select>

View File

@@ -0,0 +1,180 @@
{% set partition_options = [
'',
'HASH',
'LINEAR HASH',
'KEY',
'LINEAR KEY',
'RANGE',
'RANGE COLUMNS',
'LIST',
'LIST COLUMNS'
] %}
{% set sub_partition_options = ['', 'HASH', 'LINEAR HASH', 'KEY', 'LINEAR KEY'] %}
{% set value_type_options = ['', 'LESS THAN', 'LESS THAN MAXVALUE', 'IN'] %}
<table id="partition_table">
<tr class="vmiddle">
<td><label for="partition_by">{% trans 'Partition by:' %}</label></td>
<td>
<select name="partition_by" id="partition_by">
{% for option in partition_options %}
<option value="{{ option }}"
{%- if partition_details['partition_by'] == option %}
selected="selected"
{%- endif %}>
{{ option }}
</option>
{% endfor %}
</select>
</td>
<td>
(<input name="partition_expr" type="text"
placeholder="{% trans 'Expression or column list' %}"
value="{{ partition_details['partition_expr'] }}" />)
</td>
</tr>
<tr class="vmiddle">
<td><label for="partition_count">{% trans 'Partitions:' %}</label></td>
<td colspan="2">
<input name="partition_count" type="number" min="2"
value="{{ partition_details['partition_count'] }}" />
</td>
</tr>
{% if partition_details['can_have_subpartitions'] %}
<tr class="vmiddle">
<td><label for="subpartition_by">{% trans 'Subpartition by:' %}</label></td>
<td>
<select name="subpartition_by" id="subpartition_by">
{% for option in sub_partition_options %}
<option value="{{ option }}"
{%- if partition_details['subpartition_by'] == option %}
selected="selected"
{%- endif %}>
{{ option }}
</option>
{% endfor %}
</select>
</td>
<td>
(<input name="subpartition_expr" type="text"
placeholder="{% trans 'Expression or column list' %}"
value="{{ partition_details['subpartition_expr'] }}" />)
</td>
</tr>
<tr class="vmiddle">
<td><label for="subpartition_count">{% trans 'Subpartitions:' %}</label></td>
<td colspan="2">
<input name="subpartition_count" type="number" min="2"
value="{{ partition_details['subpartition_count'] }}" />
</td>
</tr>
{% endif %}
</table>
{% if partition_details['partition_count'] > 1 %}
<table id="partition_definition_table">
<thead><tr>
<th>{% trans 'Partition' %}</th>
{% if partition_details['value_enabled'] %}
<th>{% trans 'Values' %}</th>
{% endif %}
{% if partition_details['can_have_subpartitions']
and partition_details['subpartition_count'] > 1 %}
<th>{% trans 'Subpartition' %}</th>
{% endif %}
<th>{% trans 'Engine' %}</th>
<th>{% trans 'Comment' %}</th>
<th>{% trans 'Data directory' %}</th>
<th>{% trans 'Index directory' %}</th>
<th>{% trans 'Max rows' %}</th>
<th>{% trans 'Min rows' %}</th>
<th>{% trans 'Table space' %}</th>
<th>{% trans 'Node group' %}</th>
</tr></thead>
{% for partition in partition_details['partitions'] %}
{% set rowspan = partition['subpartition_count'] is not empty
? partition['subpartition_count'] + 1 : 2 %}
<tr>
<td rowspan="{{ rowspan }}">
<input type="text" name="{{ partition['prefix'] }}[name]"
value="{{ partition['name'] }}" />
</td>
{% if partition_details['value_enabled'] %}
<td rowspan="{{ rowspan }}" class="vmiddle">
<select class="partition_value"
name="{{ partition['prefix'] }}[value_type]">
{% for option in value_type_options %}
<option value="{{ option }}"
{%- if partition['value_type'] == option %}
selected="selected"
{%- endif %}>
{{ option }}
</option>
{% endfor %}
</select>
<input type="text" class="partition_value"
name="{{ partition['prefix'] }}[value]"
value="{{ partition['value'] }}" />
</td>
{% endif %}
</tr>
{% if partition['subpartitions'] is defined %}
{% set subpartitions = partition['subpartitions'] %}
{% else %}
{% set subpartitions = [partition] %}
{% endif %}
{% for subpartition in subpartitions %}
<tr>
{% if partition_details['can_have_subpartitions']
and partition_details['subpartition_count'] > 1 %}
<td>
<input type="text" name="{{ subpartition['prefix'] }}[name]"
value="{{ subpartition['name'] }}" />
</td>
{% endif %}
<td>
{{ StorageEngine_getHtmlSelect(
subpartition['prefix'] ~ '[engine]',
null,
subpartition['engine'],
false,
true
) }}
</td>
<td>
{% apply spaceless %}
<textarea name="{{ subpartition['prefix'] }}[comment]">
{{ subpartition['comment'] }}
</textarea>
{% endapply %}
</td>
<td>
<input type="text" name="{{ subpartition['prefix'] }}[data_directory]"
value="{{ subpartition['data_directory'] }}" />
</td>
<td>
<input type="text" name="{{ subpartition['prefix'] }}[index_directory]"
value="{{ subpartition['index_directory'] }}" />
</td>
<td>
<input type="number" name="{{ subpartition['prefix'] }}[max_rows]"
value="{{ subpartition['max_rows'] }}" />
</td>
<td>
<input type="number" min="0" name="{{ subpartition['prefix'] }}[min_rows]"
value="{{ subpartition['min_rows'] }}" />
</td>
<td>
<input type="text" min="0" name="{{ subpartition['prefix'] }}[tablespace]"
value="{{ subpartition['tablespace'] }}" />
</td>
<td>
<input type="text" name="{{ subpartition['prefix'] }}[node_group]"
value="{{ subpartition['node_group'] }}" />
</td>
</tr>
{% endfor %}
{% endfor %}
</table>
{% endif %}

View File

@@ -0,0 +1,123 @@
<div class="responsivetable">
<table id="table_columns" class="noclick">
<caption class="tblHeaders">
{% trans 'Structure' %}
{{ Util_showMySQLDocu('CREATE_TABLE') }}
</caption>
<tr>
<th>
{% trans 'Name' %}
</th>
<th>
{% trans 'Type' %}
{{ Util_showMySQLDocu('data-types') }}
</th>
<th>
{% trans 'Length/Values' %}
{{ Util_showHint('If column type is "enum" or "set", please enter the values using this format: \'a\',\'b\',\'c\'…<br />If you ever need to put a backslash ("\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').'|trans) }}
</th>
<th>
{% trans 'Default' %}
{{ Util_showHint('For default values, please enter just a single value, without backslash escaping or quotes, using this format: a'|trans) }}
</th>
<th>
{% trans 'Collation' %}
</th>
<th>
{% trans 'Attributes' %}
</th>
<th>
{% trans 'Null' %}
</th>
{# Only for 'Edit' Column(s) #}
{% if change_column is defined and change_column is not empty %}
<th>
{% trans 'Adjust privileges' %}
{{ Util_showDocu('faq', 'faq6-39') }}
</th>
{% endif %}
{# We could remove this 'if' and let the key information be shown and
editable. However, for this to work, structure.lib.php must be
modified to use the key fields, as tbl_addfield does. #}
{% if not is_backup %}
<th>
{% trans 'Index' %}
</th>
{% endif %}
<th>
<abbr title="AUTO_INCREMENT">A_I</abbr>
</th>
<th>
{% trans 'Comments' %}
</th>
{% if is_virtual_columns_supported %}
<th>
{% trans 'Virtuality' %}
</th>
{% endif %}
{% if fields_meta is defined %}
<th>
{% trans 'Move column' %}
</th>
{% endif %}
{% if mimework and browse_mime %}
<th>
{% trans 'MIME type' %}
</th>
<th>
<a href="transformation_overview.php
{{- Url_getCommon() }}#transformation" title="
{%- trans 'List of available transformations and their options' -%}
" target="_blank">
{% trans 'Browser display transformation' %}
</a>
</th>
<th>
{% trans 'Browser display transformation options' %}
{{ Util_showHint('Please enter the values for transformation options using this format: \'a\', 100, b,\'c\'…<br />If you ever need to put a backslash ("\\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').'|trans) }}
</th>
<th>
<a href="transformation_overview.php{{ Url_getCommon() }}#input_transformation"
title="{% trans 'List of available transformations and their options' %}"
target="_blank">
{% trans 'Input transformation' %}
</a>
</th>
<th>
{% trans 'Input transformation options' %}
{{ Util_showHint('Please enter the values for transformation options using this format: \'a\', 100, b,\'c\'…<br />If you ever need to put a backslash ("\\") or a single quote ("\'") amongst those values, precede it with a backslash (for example \'\\\\xyz\' or \'a\\\'b\').'|trans) }}
</th>
{% endif %}
</tr>
{% set options = {'': '', 'VIRTUAL': 'VIRTUAL'} %}
{% if server_type == 'MariaDB' %}
{% set options = options|merge({'PERSISTENT': 'PERSISTENT'}) %}
{% set options = options|merge({'STORED': 'STORED'}) %}
{% else %}
{% set options = options|merge({'STORED': 'STORED'}) %}
{% endif %}
{% for content_row in content_cells %}
<tr>
{% include 'columns_definitions/column_attributes.twig' with content_row|merge({
'options': options,
'change_column': change_column,
'is_virtual_columns_supported': is_virtual_columns_supported,
'browse_mime': browse_mime,
'max_rows': max_rows,
'char_editing': char_editing,
'attribute_types': attribute_types,
'privs_available': privs_available,
'max_length': max_length,
'dbi': dbi,
'disable_is': disable_is
}) only %}
</tr>
{% endfor %}
</table>
</div>

View File

@@ -0,0 +1,26 @@
<select id="field_{{ column_number }}_{{ ci - ci_offset }}"
size="1"
name="field_{{ type }}[{{ column_number }}]">
<option value="" title="{% trans 'None' %}"></option>
{% if available_mime[type] is defined and available_mime[type] is iterable %}
{% for mimekey, transform in available_mime[type] %}
{% set checked = column_meta['Field'] is defined
and mime_map[column_meta['Field']][type] is defined
and mime_map[column_meta['Field']][type] matches
'@' ~ preg_quote(available_mime[type ~ '_file'][mimekey], '@') ~ '3?@i'
? 'selected ' %}
{% set tooltip = Transformations_getDescription(
available_mime[type ~ '_file'][mimekey]
) %}
{% set parts = transform|split(':') %}
{% set name = Transformations_getName(
available_mime[type ~ '_file'][mimekey]
) ~ ' (' ~ parts[0]|lower ~ ':' ~ parts[1] ~ ')' %}
<option value="{{ available_mime[type ~ '_file'][mimekey] }}"
{{ checked }}
title="{{ tooltip }}">
{{ name }}
</option>
{% endfor %}
{% endif %}
</select>

View File

@@ -0,0 +1,9 @@
{% set options_key = type_prefix ~ 'transformation_options' %}
<input id="field_{{ column_number }}_{{ ci - ci_offset }}"
type="text"
name="field_{{ options_key }}[{{ column_number }}]"
size="16"
class="textfield"
value="{% if column_meta['Field'] is defined and mime_map[column_meta['Field']][options_key] is defined -%}
{{- mime_map[column_meta['Field']][options_key] -}}
{%- endif %}" />

View File

@@ -0,0 +1,4 @@
<div class="error">
<img src="themes/dot.gif" title="" alt="" class="icon ic_s_error" />
{{ msg }}
</div>

View File

@@ -0,0 +1,6 @@
<dl>
<dt>{{ name }}</dt>
{% for error in error_list %}
<dd>{{ error|raw }}</dd>
{% endfor %}
</dl>

View File

@@ -0,0 +1,14 @@
{% set colspan = 2 %}
{% if is_setup %}
{% set colspan = colspan + 1 %}
{% endif %}
{% if show_buttons %}
<tr>
<td colspan="{{ colspan }}" class="lastrow">
<input type="submit" name="submit_save" value="{% trans 'Apply' %}" class="green" />
<input type="button" name="submit_reset" value="{% trans 'Reset' %}" />
</td>
</tr>
{% endif %}
</table>
</fieldset>

View File

@@ -0,0 +1,17 @@
<fieldset
{%- for key, value in attributes -%}
{{- ' ' }}{{ key }}="{{ value }}"
{%- endfor %}>
<legend>{{ title }}</legend>
{% if description is not empty %}
<p>{{ description|raw }}</p>
{% endif %}
{# This must match with displayErrors() in scripts.js #}
{% if errors is iterable and errors|length > 0 %}
<dl class="errors">
{% for error in errors %}
<dd>{{ error }}</dd>
{% endfor %}
</dl>
{% endif %}
<table width="100%" cellspacing="0">

View File

@@ -0,0 +1 @@
</form>

View File

@@ -0,0 +1,5 @@
<tr class="group-header group-header-{{ group }}">
<th colspan="{{ colspan }}">
{{ header_text }}
</th>
</tr>

View File

@@ -0,0 +1 @@
</div>

View File

@@ -0,0 +1,25 @@
<div class="message welcome">
<span>{{ welcome_message }}</span>
</div>
{% for bookmark in bookmarks %}
<div class="message collapsed bookmark" bookmarkid="{{ bookmark.getId() }}"
targetdb="{{ bookmark.getDatabase() }}">
{% include 'console/query_action.twig' with {
'parent_div_classes': 'action_content',
'content_array': [
['action collapse', 'Collapse'|trans],
['action expand', 'Expand'|trans],
['action requery', 'Requery'|trans],
['action edit_bookmark', 'Edit'|trans],
['action delete_bookmark', 'Delete'|trans],
{0: 'text targetdb', 1: 'Database'|trans, 'extraSpan': bookmark.getDatabase()}
]
} only %}
<span class="bookmark_label{{ bookmark.getUser() is empty ? ' shared' }}">
{{ bookmark.getLabel() }}
</span>
<span class="query">
{{ bookmark.getQuery() }}
</span>
</div>
{% endfor %}

View File

@@ -0,0 +1,192 @@
<div id="pma_console_container">
<div id="pma_console">
{# Console toolbar #}
{% include 'console/toolbar.twig' with {
'parent_div_classes': 'collapsed',
'content_array': [
{0: 'switch_button console_switch', 1: 'Console'|trans, 'image': image},
['button clear', 'Clear'|trans],
['button history', 'History'|trans],
['button options', 'Options'|trans],
cfg_bookmark is defined ? ['button bookmarks', 'Bookmarks'|trans] : null,
['button debug hide', 'Debug SQL'|trans]
]
} only %}
{# Console messages #}
<div class="content">
<div class="console_message_container">
<div class="message welcome">
<span id="instructions-0">
{% trans 'Press Ctrl+Enter to execute query' %}
</span>
<span class="hide" id="instructions-1">
{% trans 'Press Enter to execute query' %}
</span>
</div>
{% if sql_history is not empty %}
{% for record in sql_history|reverse %}
<div class="message history collapsed hide
{{- record['sqlquery'] matches '@^SELECT[[:space:]]+@i' ? ' select' }}"
targetdb="{{ record['db'] }}" targettable="{{ record['table'] }}">
{% include 'console/query_action.twig' with {
'parent_div_classes': 'action_content',
'content_array': [
['action collapse', 'Collapse'|trans],
['action expand', 'Expand'|trans],
['action requery', 'Requery'|trans],
['action edit', 'Edit'|trans],
['action explain', 'Explain'|trans],
['action profiling', 'Profiling'|trans],
cfg_bookmark is defined ? ['action bookmark', 'Bookmark'|trans] : null,
['text failed', 'Query failed'|trans],
{0: 'text targetdb', 1: 'Database'|trans, 'extraSpan': record['db']},
{
0: 'text query_time',
1: 'Queried time'|trans,
'extraSpan': record['timevalue'] is defined ?
record['timevalue'] : 'During current session'|trans
}
]
} only %}
<span class="query">{{ record['sqlquery'] }}</span>
</div>
{% endfor %}
{% endif %}
</div><!-- console_message_container -->
<div class="query_input">
<span class="console_query_input"></span>
</div>
</div><!-- message end -->
{# Drak the console with other cards over it #}
<div class="mid_layer"></div>
{# Debug SQL card #}
<div class="card" id="debug_console">
{% include 'console/toolbar.twig' with {
'parent_div_classes': '',
'content_array': [
['button order order_asc', 'ascending'|trans],
['button order order_desc', 'descending'|trans],
['text', 'Order:'|trans],
['switch_button', 'Debug SQL'|trans],
['button order_by sort_count', 'Count'|trans],
['button order_by sort_exec', 'Execution order'|trans],
['button order_by sort_time', 'Time taken'|trans],
['text', 'Order by:'|trans],
['button group_queries', 'Group queries'|trans],
['button ungroup_queries', 'Ungroup queries'|trans]
]
} only %}
<div class="content debug">
<div class="message welcome"></div>
<div class="debugLog"></div>
</div> <!-- Content -->
<div class="templates">
{% include 'console/query_action.twig' with {
'parent_div_classes': 'debug_query action_content',
'content_array': [
['action collapse', 'Collapse'|trans],
['action expand', 'Expand'|trans],
['action dbg_show_trace', 'Show trace'|trans],
['action dbg_hide_trace', 'Hide trace'|trans],
['text count hide', 'Count'|trans],
['text time', 'Time taken'|trans]
]
} only %}
</div> <!-- Template -->
</div> <!-- Debug SQL card -->
{% if cfg_bookmark %}
<div class="card" id="pma_bookmarks">
{% include 'console/toolbar.twig' with {
'parent_div_classes': '',
'content_array': [
['switch_button', 'Bookmarks'|trans],
['button refresh', 'Refresh'|trans],
['button add', 'Add'|trans]
]
} only %}
<div class="content bookmark">
{{ bookmark_content|raw }}
</div>
<div class="mid_layer"></div>
<div class="card add">
{% include 'console/toolbar.twig' with {
'parent_div_classes': '',
'content_array': [
['switch_button', 'Add bookmark'|trans]
]
} only %}
<div class="content add_bookmark">
<div class="options">
<label>
{% trans 'Label' %}: <input type="text" name="label">
</label>
<label>
{% trans 'Target database' %}: <input type="text" name="targetdb">
</label>
<label>
<input type="checkbox" name="shared">{% trans 'Share this bookmark' %}
</label>
<button type="submit" name="submit">{% trans 'OK' %}</button>
</div> <!-- options -->
<div class="query_input">
<span class="bookmark_add_input"></span>
</div>
</div>
</div> <!-- Add bookmark card -->
</div> <!-- Bookmarks card -->
{% endif %}
{# Options card #}
<div class="card" id="pma_console_options">
{% include 'console/toolbar.twig' with {
'parent_div_classes': '',
'content_array': [
['switch_button', 'Options'|trans],
['button default', 'Set default'|trans]
]
} only %}
<div class="content">
<label>
<input type="checkbox" name="always_expand">{% trans 'Always expand query messages' %}
</label>
<br>
<label>
<input type="checkbox" name="start_history">{% trans 'Show query history at start' %}
</label>
<br>
<label>
<input type="checkbox" name="current_query">{% trans 'Show current browsing query' %}
</label>
<br>
<label>
<input type="checkbox" name="enter_executes">
{% trans %}
Execute queries on Enter and insert new line with Shift + Enter. To make this permanent, view settings.
{% endtrans %}
</label>
<br>
<label>
<input type="checkbox" name="dark_theme">{% trans 'Switch to dark theme' %}
</label>
<br>
</div>
</div> <!-- Options card -->
<div class="templates">
{# Templates for console message actions #}
{% include 'console/query_action.twig' with {
'parent_div_classes': 'query_actions',
'content_array': [
['action collapse', 'Collapse'|trans],
['action expand', 'Expand'|trans],
['action requery', 'Requery'|trans],
['action edit', 'Edit'|trans],
['action explain', 'Explain'|trans],
['action profiling', 'Profiling'|trans],
cfg_bookmark is defined ? ['action bookmark', 'Bookmark'|trans] : null,
['text failed', 'Query failed'|trans],
{0: 'text targetdb', 1: 'Database'|trans, 'extraSpan': ''},
{0: 'text query_time', 1: 'Queried time'|trans, 'extraSpan': ''}
]
} only %}
</div>
</div> <!-- #console end -->
</div> <!-- #console_container end -->

View File

@@ -0,0 +1,12 @@
<div class="{{ parent_div_classes }}">
{% for content in content_array %}
{% if content is defined %}
<span class="{{ content[0] }}">
{{ content[1] }}
{% if content['extraSpan'] is defined %}
: <span>{{ content['extraSpan'] }}</span>
{% endif %}
</span>
{% endif %}
{% endfor %}
</div>

View File

@@ -0,0 +1,10 @@
<div class="toolbar {{ parent_div_classes }}">
{% for content in content_array %}
{% if content is defined %}
<div class="{{ content[0] }}">
{{ content['image'] is defined ? content['image']|raw }}
<span>{{ content[1] }}</span>
</div>
{% endif %}
{% endfor %}
</div>

View File

@@ -0,0 +1,19 @@
<table class="central_columns_add_column" class="navigation nospacing nopadding">
<tr>
<td class="navigation_separator largescreenonly"></td>
<td class="central_columns_navigation">
{{ icon|raw }}
<form id="add_column" action="db_central_columns.php" method="post">
{{ Url_getHiddenInputs(db)}}
<input type="hidden" name="add_column" value="add">
<input type="hidden" name="pos" value="{{ pos }}" />
<input type="hidden" name="total_rows" value="{{ total_rows }}"/>
{{ table_drop_down|raw }}
<select name="column-select" id="column-select">
<option value="" selected="selected">{% trans 'Select a column.' %}</option>
</select>
</form>
</td>
<td class="navigation_separator largescreenonly"></td>
</tr>
</table>

View File

@@ -0,0 +1,9 @@
<table id="table_columns" class="noclick">
<caption class="tblHeaders">{% trans 'Structure' %}</caption>
<thead>
<tr>
{% for header in headers %}
<th>{{ header }}</th>
{% endfor %}
</tr>
</thead>

View File

@@ -0,0 +1,42 @@
<table style="display:inline-block;max-width:49%" class="navigation nospacing nopadding">
<tr>
<td class="navigation_separator"></td>
{% if pos - max_rows >= 0 %}
<td>
<form action="db_central_columns.php" method="post">
{{ Url_getHiddenInputs(db) }}
<input type="hidden" name="pos" value="{{ pos - max_rows }}" />
<input type="hidden" name="total_rows" value="{{ total_rows }}"/>
<input type="submit" name="navig" class="ajax" value="&lt" />
</form>
</td>
{% endif %}
{% if nb_total_page > 1 %}
<td>
<form action="db_central_columns.php" method="post">
{{ Url_getHiddenInputs(db) }}
<input type="hidden" name="total_rows" value="{{ total_rows }}"/>
{{ page_selector|raw }}
</form>
</td>
{% endif %}
{% if pos + max_rows < total_rows %}
<td>
<form action="db_central_columns.php" method="post">
{{ Url_getHiddenInputs(db) }}
<input type="hidden" name="pos" value="{{ pos + max_rows }}"/>
<input type="hidden" name="total_rows" value="{{ total_rows }}"/>
<input type="submit" name="navig" class="ajax" value="&gt" />
</form>
</td>
{% endif %}
</form>
</td>
<td class="navigation_separator"></td>
<td>
<span>{% trans 'Filter rows' %}:</span>
<input type="text" class="filter_rows" placeholder="{% trans 'Search this table' %}">
</td>
<td class="navigation_separator"></td>
</tr>
</table>

View File

@@ -0,0 +1,23 @@
<form id="create_table_form_minimal" method="post" action="tbl_create.php" class="lock-page">
<fieldset>
<legend>
{% if Util_showIcons('ActionLinksMode') -%}
{{ Util_getImage('b_table_add') }}
{%- endif %}
{% trans "Create table" %}
</legend>
{{ Url_getHiddenInputs(db) }}
<div class="formelement">
{% trans "Name" %}:
<input type="text" name="table" maxlength="64" size="30" required="required" />
</div>
<div class="formelement">
{% trans "Number of columns" %}:
<input type="number" min="1" name="num_fields" value="4" required="required" />
</div>
<div class="clearfloat"></div>
</fieldset>
<fieldset class="tblFooters">
<input type="submit" value="{% trans "Go" %}" />
</fieldset>
</form>

View File

@@ -0,0 +1,84 @@
<table id="query_Aggregate" class="hide" width="5%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="frams1" width="10px">
</td>
<td class="frams5" width="99%" >
</td>
<td class="frams2" width="10px">
<div class="bor">
</div>
</td>
</tr>
<tr>
<td class="frams8">
</td>
<td class="input_tab">
<table width="168" class="center" cellpadding="2" cellspacing="0">
<thead>
<tr>
<td colspan="2" class="center nowrap">
<strong>
{% trans 'Aggregate' %}
</strong>
</td>
</tr>
</thead>
<tbody>
<tr>
<td width="58" class="nowrap">
{% trans 'Operator' %}
</td>
<td width="102">
<select name="operator" id="e_operator">
<option value="---" selected="selected">
---
</option>
<option value="sum" >
SUM
</option>
<option value="min">
MIN
</option>
<option value="max">
MAX
</option>
<option value="avg">
AVG
</option>
<option value="count">
COUNT
</option>
</select>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2" class="center nowrap">
<input type="button" id="ok_edit_Aggr" class="butt"
name="Button" value="{% trans 'OK' %}" />
<input id="query_Aggregate_Button" type="button"
class="butt"
name="Button"
value="{% trans 'Cancel' %}" />
</td>
</tr>
</tbody>
</table>
</td>
<td class="frams6">
</td>
</tr>
<tr>
<td class="frams4">
<div class="bor">
</div>
</td>
<td class="frams7">
</td>
<td class="frams3">
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,3 @@
<div id="osn_tab">
<canvas class="designer" id="canvas" width="100" height="100"></canvas>
</div>

View File

@@ -0,0 +1,138 @@
{% for designerTable in tables %}
{% set i = loop.index0 %}
{% set t_n_url = designerTable.getDbTableString()|escape('url') %}
{% set db = designerTable.getDatabaseName() %}
{% set db_url = db|escape('url') %}
{% set t_n = designerTable.getDbTableString() %}
{% set table_name = designerTable.getTableName()|escape('html') %}
<input name="t_x[{{ t_n_url }}]" type="hidden" id="t_x_{{ t_n_url }}_" />
<input name="t_y[{{ t_n_url }}]" type="hidden" id="t_y_{{ t_n_url }}_" />
<input name="t_v[{{ t_n_url }}]" type="hidden" id="t_v_{{ t_n_url }}_" />
<input name="t_h[{{ t_n_url }}]" type="hidden" id="t_h_{{ t_n_url }}_" />
<table id="{{ t_n_url }}"
db_url="{{ designerTable.getDatabaseName()|escape('url') }}"
table_name_url="{{ designerTable.getTableName()|escape('url') }}"
cellpadding="0"
cellspacing="0"
class="designer_tab"
style="position:absolute; left:
{{- tab_pos[t_n] is defined ? tab_pos[t_n]['X'] : random(range(20, 700)) }}px; top:
{{- tab_pos[t_n] is defined ? tab_pos[t_n]['Y'] : random(range(20, 550)) }}px; display:
{{- tab_pos[t_n] is defined or display_page == -1 ? 'block' : 'none' }}; z-index: 1;">
<thead>
<tr class="header">
{% if has_query %}
<td class="select_all">
<input class="select_all_1"
type="checkbox"
style="margin: 0;"
value="select_all_{{ t_n_url }}"
id="select_all_{{ i }}"
title="{% trans 'Select all' %}"
table_name="{{ table_name }}"
db_name="{{ db }}">
</td>
{% endif %}
<td class="small_tab"
title="{% trans 'Show/hide columns' %}"
id="id_hide_tbody_{{ t_n_url }}"
table_name="{{ t_n_url }}">{{ tab_pos[t_n] is not defined or tab_pos[t_n]['V'] is not empty ? 'v' : '&gt;' }}</td>
<td class="small_tab_pref small_tab_pref_1"
db="{{ designerTable.getDatabaseName() }}"
db_url="{{ designerTable.getDatabaseName()|escape('url') }}"
table_name="{{ designerTable.getTableName() }}"
table_name_url="{{ designerTable.getTableName()|escape('url') }}">
<img src="{{ theme.getImgPath('designer/exec_small.png') }}"
title="{% trans 'See table structure' %}" />
</td>
<td id="id_zag_{{ t_n_url }}"
class="tab_zag nowrap tab_zag_noquery"
table_name="{{ t_n_url }}"
query_set="{{ has_query ? 1 : 0 }}">
<span class="owner">{{ designerTable.getDatabaseName() }}</span>
{{ designerTable.getTableName() }}
</td>
{% if has_query %}
<td class="tab_zag tab_zag_query"
id="id_zag_{{ t_n_url }}_2"
table_name="{{ t_n_url }}">
</td>
{% endif %}
</tr>
</thead>
<tbody id="id_tbody_{{ t_n_url }}"
{{- tab_pos[t_n] is defined and tab_pos[t_n]['V'] is empty ? ' style="display: none"' }}>
{% set display_field = designerTable.getDisplayField() %}
{% for j in 0..tab_column[t_n]['COLUMN_ID']|length - 1 %}
{% set col_name = tab_column[t_n]['COLUMN_NAME'][j] %}
{% set tmp_column = t_n ~ '.' ~ tab_column[t_n]['COLUMN_NAME'][j] %}
{% set click_field_param = [
designerTable.getTableName()|escape('url'),
tab_column[t_n]['COLUMN_NAME'][j]|url_encode
] %}
{% if not designerTable.supportsForeignkeys() %}
{% set click_field_param = click_field_param|merge([tables_pk_or_unique_keys[tmp_column] is defined ? 1 : 0]) %}
{% else %}
{# if foreign keys are supported, it's not necessary that the
index is a primary key #}
{% set click_field_param = click_field_param|merge([tables_all_keys[tmp_column] is defined ? 1 : 0]) %}
{% endif %}
{% set click_field_param = click_field_param|merge([db]) %}
<tr id="id_tr_{{ designerTable.getTableName()|escape('url') }}.{{ tab_column[t_n]['COLUMN_NAME'][j] }}" class="tab_field
{{- display_field == tab_column[t_n]['COLUMN_NAME'][j] ? '_3' }}" click_field_param="
{{- click_field_param|join(',') }}">
{% if has_query %}
<td class="select_all">
<input class="select_all_store_col"
value="{{ t_n_url }}{{ tab_column[t_n]['COLUMN_NAME'][j]|url_encode }}"
type="checkbox"
id="select_{{ t_n_url }}._{{ tab_column[t_n]['COLUMN_NAME'][j]|url_encode }}"
style="margin: 0;"
title="{{ 'Select "%s"'|trans|format(col_name) }}"
id_check_all="select_all_{{ i }}"
db_name="{{ db }}"
table_name="{{ table_name }}"
col_name="{{ col_name }}">
</td>
{% endif %}
<td width="10px" colspan="3" id="{{ t_n_url }}.
{{- tab_column[t_n]['COLUMN_NAME'][j]|url_encode }}">
<div class="nowrap">
{% if tables_pk_or_unique_keys[t_n ~ '.' ~ tab_column[t_n]['COLUMN_NAME'][j]] is defined %}
<img src="{{ theme.getImgPath('designer/FieldKey_small.png') }}" alt="*" />
{% else %}
{% set type = 'designer/Field_small' %}
{% if strstr(tab_column[t_n]['TYPE'][j], 'char')
or strstr(tab_column[t_n]['TYPE'][j], 'text') %}
{% set type = type ~ '_char' %}
{% elseif strstr(tab_column[t_n]['TYPE'][j], 'int')
or strstr(tab_column[t_n]['TYPE'][j], 'float')
or strstr(tab_column[t_n]['TYPE'][j], 'double')
or strstr(tab_column[t_n]['TYPE'][j], 'decimal') %}
{% set type = type ~ '_int' %}
{% elseif strstr(tab_column[t_n]['TYPE'][j], 'date')
or strstr(tab_column[t_n]['TYPE'][j], 'time')
or strstr(tab_column[t_n]['TYPE'][j], 'year') %}
{% set type = type ~ '_date' %}
{% endif %}
<img src="{{ theme.getImgPath(type) }}.png" alt="*" />
{% endif %}
{{ tab_column[t_n]['COLUMN_NAME'][j] }} : {{ tab_column[t_n]['TYPE'][j] }}
</div>
</td>
{% if has_query %}
<td class="small_tab_pref small_tab_pref_click_opt"
{# Escaped 2 times to be able to use it in innerHtml #}
option_col_name_modal="<strong>{{ 'Add an option for column "%s".'|trans|format(col_name)|escape('html')|escape('html') }}</strong>"
db_name="{{ db }}"
table_name="{{ table_name }}"
col_name="{{ col_name }}"
db_table_name_url="{{ t_n_url }}">
<img src="{{ theme.getImgPath('designer/exec_small.png') }}" title="{% trans 'Options' %}" />
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}

View File

@@ -0,0 +1,49 @@
<table id="layer_upd_relation" class="hide" width="5%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="frams1" width="10px">
</td>
<td class="frams5" width="99%">
</td>
<td class="frams2" width="10px">
<div class="bor">
</div>
</td>
</tr>
<tr>
<td class="frams8">
</td>
<td class="input_tab">
<table width="100%" class="center" cellpadding="2" cellspacing="0">
<tr>
<td colspan="3" class="center nowrap">
<strong>
{% trans 'Delete relationship' %}
</strong>
</td>
</tr>
<tr>
<td colspan="3" class="center nowrap">
<input id="del_button" name="Button" type="button"
class="butt" value="{% trans 'Delete' %}" />
<input id="cancel_button" type="button" class="butt"
name="Button" value="{% trans 'Cancel' %}" />
</td>
</tr>
</table>
</td>
<td class="frams6">
</td>
</tr>
<tr>
<td class="frams4">
<div class="bor">
</div>
</td>
<td class="frams7">
</td>
<td class="frams3">
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,13 @@
<form action="db_designer.php" method="post" name="edit_delete_pages" id="edit_delete_pages" class="ajax">
{{ Url_getHiddenInputs(db) }}
<fieldset id="page_edit_delete_options">
<input type="hidden" name="operation" value="{{ operation }}" />
<label for="selected_page">
{{ operation == 'editPage' ? 'Page to open'|trans : 'Page to delete'|trans }}:
</label>
{% include 'database/designer/page_selector.twig' with {
'pdfwork': pdfwork,
'pages': pages
} only %}
</fieldset>
</form>

View File

@@ -0,0 +1,138 @@
<table id="query_having" class="hide" width="5%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="frams1" width="10px">
</td>
<td class="frams5" width="99%" >
</td>
<td class="frams2" width="10px">
<div class="bor">
</div>
</td>
</tr>
<tr>
<td class="frams8">
</td>
<td class="input_tab">
<table width="168" class="center" cellpadding="2" cellspacing="0">
<thead>
<tr>
<td colspan="2" class="center nowrap">
<strong>
HAVING
</strong>
</td>
</tr>
</thead>
<tbody id="rename_to">
<tr>
<td width="58" class="nowrap">
{% trans 'Operator' %}
</td>
<td width="102">
<select name="hoperator" id="hoperator">
<option value="---" selected="selected">
---
</option>
<option value="None" >
None
</option>
<option value="sum" >
SUM
</option>
<option value="min">
MIN
</option>
<option value="max">
MAX
</option>
<option value="avg">
AVG
</option>
<option value="count">
COUNT
</option>
</select>
</td>
</tr>
<tr>
<tr>
<td width="58" class="nowrap">
{% trans 'Operator' %}
</td>
<td width="102">
<select name="hrel_opt" id="hrel_opt">
<option value="--" selected="selected">
--
</option>
<option value="=">
=
</option>
<option value="&gt;">
&gt;
</option>
<option value="&lt;">
&lt;
</option>
<option value="&gt;=">
&gt;=
</option>
<option value="&lt;=">
&lt;=
</option>
<option value="NOT">
NOT
</option>
<option value="IN">
IN
</option>
<option value="EXCEPT">
{% trans 'Except' %}
</option>
<option value="NOT IN">
NOT IN
</option>
</select>
</td>
</tr>
<tr>
<td class="nowrap">
{% trans 'Value' %}
<br />
{% trans 'subquery' %}
</td>
<td>
<textarea id="hQuery" cols="18">
</textarea>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2" class="center nowrap">
<input type="button" id="ok_edit_having" class="butt"
name="Button" value="{% trans 'OK' %}" />
<input id="query_having_button" type="button"
class="butt"
name="Button"
value="{% trans 'Cancel' %}" />
</td>
</tr>
</tbody>
</table>
</td>
<td class="frams6">
</td>
</tr>
<tr>
<td class="frams4">
<div class="bor">
</div>
</td>
<td class="frams7">
</td>
<td class="frams3">
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,6 @@
{# Invisible characters will make javascript crash #}
{% apply spaceless %}
<script type="text/javascript">
var designer_config = {{ designer_config | raw }};
</script>
{% endapply %}

View File

@@ -0,0 +1,110 @@
<table id="layer_new_relation" class="hide" width="5%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="frams1" width="10px">
</td>
<td class="frams5" width="99%" >
</td>
<td class="frams2" width="10px">
<div class="bor">
</div>
</td>
</tr>
<tr>
<td class="frams8">
</td>
<td class="input_tab">
<table width="168" class="center" cellpadding="2" cellspacing="0">
<thead>
<tr>
<td colspan="2" class="center nowrap">
<strong>
{% trans 'Create relationship' %}
</strong>
</td>
</tr>
</thead>
<tbody id="foreign_relation">
<tr>
<td colspan="2" class="center nowrap">
<strong>
FOREIGN KEY
</strong>
</td>
</tr>
<tr>
<td width="58" class="nowrap">
on delete
</td>
<td width="102">
<select name="on_delete" id="on_delete">
<option value="nix" selected="selected">
--
</option>
<option value="CASCADE">
CASCADE
</option>
<option value="SET NULL">
SET NULL
</option>
<option value="NO ACTION">
NO ACTION
</option>
<option value="RESTRICT">
RESTRICT
</option>
</select>
</td>
</tr>
<tr>
<td class="nowrap">
on update
</td>
<td>
<select name="on_update" id="on_update">
<option value="nix" selected="selected">
--
</option>
<option value="CASCADE">
CASCADE
</option>
<option value="SET NULL">
SET NULL
</option>
<option value="NO ACTION">
NO ACTION
</option>
<option value="RESTRICT">
RESTRICT
</option>
</select>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2" class="center nowrap">
<input type="button" id="ok_new_rel_panel" class="butt"
name="Button" value="{% trans 'OK' %}" />
<input type="button" id="cancel_new_rel_panel"
class="butt" name="Button" value="{% trans 'Cancel' %}" />
</td>
</tr>
</tbody>
</table>
</td>
<td class="frams6">
</td>
</tr>
<tr>
<td class="frams4">
<div class="bor">
</div>
</td>
<td class="frams7">
</td>
<td class="frams3">
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,277 @@
<table id="designer_optionse" class="hide" width="5%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="frams1" width="10px">
</td>
<td class="frams5" width="99%" >
</td>
<td class="frams2" width="10px">
<div class="bor">
</div>
</td>
</tr>
<tr>
<td class="frams8">
</td>
<td class="input_tab">
<table width="168" class="center" cellpadding="2" cellspacing="0">
<thead>
<tr>
<td colspan="2" rowspan="2" id="option_col_name" class="center nowrap">
</td>
</tr>
</thead>
<tbody id="where">
<tr>
<td class="center nowrap">
<b>
WHERE
</b>
</td>
</tr>
<tr>
<td width="58" class="nowrap">
{% trans 'Relationship operator' %}
</td>
<td width="102">
<select name="rel_opt" id="rel_opt">
<option value="--" selected="selected">
--
</option>
<option value="=">
=
</option>
<option value="&gt;">
&gt;
</option>
<option value="&lt;">
&lt;
</option>
<option value="&gt;=">
&gt;=
</option>
<option value="&lt;=">
&lt;=
</option>
<option value="NOT">
NOT
</option>
<option value="IN">
IN
</option>
<option value="EXCEPT">
{% trans 'Except' %}
</option>
<option value="NOT IN">
NOT IN
</option>
</select>
</td>
</tr>
<tr>
<td class="nowrap">
{% trans 'Value' %}
<br />
{% trans 'subquery' %}
</td>
<td>
<textarea id="Query" cols="18"></textarea>
</td>
</tr>
<tr>
<td class="center nowrap">
<b>
{% trans 'Rename to' %}
</b>
</td>
</tr>
<tr>
<td width="58" class="nowrap">
{% trans 'New name' %}
</td>
<td width="102">
<input type="text" id="new_name"/>
</td>
</tr>
<tr>
<td class="center nowrap">
<b>
{% trans 'Aggregate' %}
</b>
</td>
</tr>
<tr>
<td width="58" class="nowrap">
{% trans 'Operator' %}
</td>
<td width="102">
<select name="operator" id="operator">
<option value="---" selected="selected">
---
</option>
<option value="sum" >
SUM
</option>
<option value="min">
MIN
</option>
<option value="max">
MAX
</option>
<option value="avg">
AVG
</option>
<option value="count">
COUNT
</option>
</select>
</td>
</tr>
<tr>
<td width="58" class="center nowrap">
<b>
GROUP BY
</b>
</td>
<td>
<input type="checkbox" value="groupby" id="groupby"/>
</td>
</tr>
<tr>
<td width="58" class="center nowrap">
<b>
ORDER BY
</b>
</td>
<td>
<select name="orderby" id="orderby">
<option value="---" selected="selected">
---
</option>
<option value="ASC" >
ASC
</option>
<option value="DESC">
DESC
</option>
</select>
</td>
</tr>
<tr>
<td class="center nowrap">
<b>
HAVING
</b>
</td>
</tr>
<tr>
<td width="58" class="nowrap">
{% trans 'Operator' %}
</td>
<td width="102">
<select name="h_operator" id="h_operator">
<option value="---" selected="selected">
---
</option>
<option value="None" >
{% trans 'None' %}
</option>
<option value="sum" >
SUM
</option>
<option value="min">
MIN
</option>
<option value="max">
MAX
</option>
<option value="avg">
AVG
</option>
<option value="count">
COUNT
</option>
</select>
</td>
</tr>
<tr>
<td width="58" class="nowrap">
{% trans 'Relationship operator' %}
</td>
<td width="102">
<select name="h_rel_opt" id="h_rel_opt">
<option value="--" selected="selected">
--
</option>
<option value="=">
=
</option>
<option value="&gt;">
&gt;
</option>
<option value="&lt;">
&lt;
</option>
<option value="&gt;=">
&gt;=
</option>
<option value="&lt;=">
&lt;=
</option>
<option value="NOT">
NOT
</option>
<option value="IN">
IN
</option>
<option value="EXCEPT">
{% trans 'Except' %}
</option>
<option value="NOT IN">
NOT IN
</option>
</select>
</td>
</tr>
<tr>
<td width="58" class="nowrap">
{% trans 'Value' %}
<br/>
{% trans 'subquery' %}
</td>
<td width="102">
<textarea id="having" cols="18"></textarea>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2" class="center nowrap">
<input type="hidden" id="ok_add_object_db_and_table_name_url" />
<input type="hidden" id="ok_add_object_db_name" />
<input type="hidden" id="ok_add_object_table_name" />
<input type="hidden" id="ok_add_object_col_name" />
<input type="button" id="ok_add_object" class="butt"
name="Button" value="{% trans 'OK' %}" />
<input type="button" id="cancel_close_option" class="butt"
name="Button" value="{% trans 'Cancel' %}" />
</td>
</tr>
</tbody>
</table>
</td>
<td class="frams6">
</td>
</tr>
<tr>
<td class="frams4">
<div class="bor">
</div>
</td>
<td class="frams7">
</td>
<td class="frams3">
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,37 @@
<form action="db_designer.php" method="post" name="save_as_pages" id="save_as_pages" class="ajax">
{{ Url_getHiddenInputs(db) }}
<fieldset id="page_save_as_options">
<table>
<tbody>
<tr>
<td>
<input type="hidden" name="operation" value="savePage" />
{% include 'database/designer/page_selector.twig' with {
'pdfwork': pdfwork,
'pages': pages
} only %}
</td>
</tr>
<tr>
<td>
{{ Util_getRadioFields(
'save_page',
{
'same': 'Save to selected page'|trans,
'new': 'Create a page and save to it'|trans
},
'same',
true
) }}
</td>
</tr>
<tr>
<td>
<label for="selected_value">{% trans 'New page name' %}</label>
<input type="text" name="selected_value" id="selected_value" />
</td>
</tr>
</tbody>
</table>
</fieldset>
</form>

View File

@@ -0,0 +1,10 @@
<select name="selected_page" id="selected_page">
<option value="0">-- {% trans 'Select page' %} --</option>
{% if pdfwork %}
{% for nr, desc in pages %}
<option value="{{ nr }}">
{{ desc }}
</option>
{% endfor %}
{% endif %}
</select>

View File

@@ -0,0 +1,13 @@
<div class="panel">
<div class="clearfloat"></div>
<div id="ab"></div>
<div class="clearfloat"></div>
</div>
<a class="trigger" href="#">{% trans 'Active options' %}</a>
<div id="box">
<form method="post" action="db_qbe.php" id="vqb_form">
<textarea cols="80" name="sql_query" id="textSqlquery" rows="15"></textarea>
<input type="hidden" name="submit_sql" value="true">
{{ Url_getHiddenInputs(db) }}
</form>
</div>

View File

@@ -0,0 +1,65 @@
<table id="query_rename_to" class="hide" width="5%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="frams1" width="10px">
</td>
<td class="frams5" width="99%" >
</td>
<td class="frams2" width="10px">
<div class="bor">
</div>
</td>
</tr>
<tr>
<td class="frams8">
</td>
<td class="input_tab">
<table width="168" class="center" cellpadding="2" cellspacing="0">
<thead>
<tr>
<td colspan="2" class="center nowrap">
<strong>
{% trans 'Rename to' %}
</strong>
</td>
</tr>
</thead>
<tbody id="rename_to">
<tr>
<td width="58" class="nowrap">
{% trans 'New name' %}
</td>
<td width="102">
<input type="text" id="e_rename"/>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2" class="center nowrap">
<input type="button" id="ok_edit_rename" class="butt"
name="Button" value="{% trans 'OK' %}" />
<input id="query_rename_to_button" type="button"
class="butt"
name="Button"
value="{% trans 'Cancel' %}" />
</td>
</tr>
</tbody>
</table>
</td>
<td class="frams6">
</td>
</tr>
<tr>
<td class="frams4">
<div class="bor">
</div>
</td>
<td class="frams7">
</td>
<td class="frams3">
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,9 @@
<form method="post" action="schema_export.php" class="disableAjax" id="id_export_pages">
<fieldset>
{{ Url_getHiddenInputs(db) }}
<label>{% trans 'Select Export Relational Type' %}</label>
{{ Plugins_getChoice('Schema', 'export_type', export_list, 'format') }}
<input type="hidden" name="page_number" value="{{ page }}" />
{{ Plugins_getOptions('Schema', export_list) }}
</fieldset>
</form>

View File

@@ -0,0 +1,189 @@
{% if not visual_builder %}
<div id="name-panel">
<span id="page_name">
{{ selected_page == null ? 'Untitled'|trans : selected_page }}
</span>
<span id="saved_state">
{{ selected_page == null ? '*' : '' }}
</span>
</div>
{% endif %}
<div class="designer_header side-menu" id="side_menu">
<a class="M_butt" id="key_Show_left_menu" href="#">
<img title="{% trans 'Show/Hide tables list' %}"
alt="v"
src="{{ theme.getImgPath('designer/downarrow2_m.png') }}"
data-down="{{ theme.getImgPath('designer/downarrow2_m.png') }}"
data-up="{{ theme.getImgPath('designer/uparrow2_m.png') }}" />
<span class="hide hidable">
{% trans 'Show/Hide tables list' %}
</span>
</a>
<a href="#" id="toggleFullscreen" class="M_butt">
<img title="{% trans 'View in fullscreen' %}"
src="{{ theme.getImgPath('designer/viewInFullscreen.png') }}"
data-enter="{{ theme.getImgPath('designer/viewInFullscreen.png') }}"
data-exit="{{ theme.getImgPath('designer/exitFullscreen.png') }}" />
<span class="hide hidable"
data-exit="{% trans 'Exit fullscreen' %}"
data-enter="{% trans 'View in fullscreen' %}">
{% trans 'View in fullscreen' %}
</span>
</a>
<a href="#" id="addOtherDbTables" class="M_butt">
<img title="{% trans 'Add tables from other databases' %}"
src="{{ theme.getImgPath('designer/other_table.png') }}"/>
<span class="hide hidable">
{% trans 'Add tables from other databases' %}
</span>
</a>
{% if not visual_builder %}
<a id="newPage" href="#" class="M_butt">
<img title="{% trans 'New page' %}"
alt=""
src="{{ theme.getImgPath('designer/page_add.png') }}" />
<span class="hide hidable">
{% trans 'New page' %}
</span>
</a>
<a href="#" id="editPage" class="M_butt ajax">
<img title="{% trans 'Open page' %}"
src="{{ theme.getImgPath('designer/page_edit.png') }}" />
<span class="hide hidable">
{% trans 'Open page' %}
</span>
</a>
<a href="#" id="savePos" class="M_butt">
<img title="{% trans 'Save page' %}"
src="{{ theme.getImgPath('designer/save.png') }}" />
<span class="hide hidable">
{% trans 'Save page' %}
</span>
</a>
<a href="#" id="SaveAs" class="M_butt ajax">
<img title="{% trans 'Save page as' %}"
src="{{ theme.getImgPath('designer/save_as.png') }}" />
<span class="hide hidable">
{% trans 'Save page as' %}
</span>
</a>
<a href="#" id="delPages" class="M_butt ajax">
<img title="{% trans 'Delete pages' %}"
src="{{ theme.getImgPath('designer/page_delete.png') }}" />
<span class="hide hidable">
{% trans 'Delete pages' %}
</span>
</a>
<a href="#" id="StartTableNew" class="M_butt">
<img title="{% trans 'Create table' %}"
src="{{ theme.getImgPath('designer/table.png') }}" />
<span class="hide hidable">
{% trans 'Create table' %}
</span>
</a>
<a href="#" class="M_butt" id="rel_button">
<img title="{% trans 'Create relationship' %}"
src="{{ theme.getImgPath('designer/relation.png') }}" />
<span class="hide hidable">
{% trans 'Create relationship' %}
</span>
</a>
<a href="#" class="M_butt" id="display_field_button">
<img title="{% trans 'Choose column to display' %}"
src="{{ theme.getImgPath('designer/display_field.png') }}" />
<span class="hide hidable">
{% trans 'Choose column to display' %}
</span>
</a>
<a href="#" id="reloadPage" class="M_butt">
<img title="{% trans 'Reload' %}"
src="{{ theme.getImgPath('designer/reload.png') }}" />
<span class="hide hidable">
{% trans 'Reload' %}
</span>
</a>
<a href="{{ Util_getDocuLink('faq', 'faq6-31') }}"
target="documentation"
class="M_butt">
<img title="{% trans 'Help' %}"
src="{{ theme.getImgPath('designer/help.png') }}" />
<span class="hide hidable">
{% trans 'Help' %}
</span>
</a>
{% endif %}
<a href="#" class="{{ params_array['angular_direct'] }}" id="angular_direct_button">
<img title="{% trans 'Angular links' %} / {% trans 'Direct links' %}"
src="{{ theme.getImgPath('designer/ang_direct.png') }}" />
<span class="hide hidable">
{% trans 'Angular links' %} / {% trans 'Direct links' %}
</span>
</a>
<a href="#" class="{{ params_array['snap_to_grid'] }}" id="grid_button">
<img title="{% trans 'Snap to grid' %}" src="{{ theme.getImgPath('designer/grid.png') }}" />
<span class="hide hidable">
{% trans 'Snap to grid' %}
</span>
</a>
<a href="#" class="{{ params_array['small_big_all'] }}" id="key_SB_all">
<img title="{% trans 'Small/Big All' %}"
alt="v"
src="{{ theme.getImgPath('designer/downarrow1.png') }}"
data-down="{{ theme.getImgPath('designer/downarrow1.png') }}"
data-right="{{ theme.getImgPath('designer/rightarrow1.png') }}" />
<span class="hide hidable">
{% trans 'Small/Big All' %}
</span>
</a>
<a href="#" id="SmallTabInvert" class="M_butt">
<img title="{% trans 'Toggle small/big' %}"
src="{{ theme.getImgPath('designer/bottom.png') }}" />
<span class="hide hidable">
{% trans 'Toggle small/big' %}
</span>
</a>
<a href="#" id="relLineInvert" class="{{ params_array['relation_lines'] }}" >
<img title="{% trans 'Toggle relationship lines' %}"
src="{{ theme.getImgPath('designer/toggle_lines.png') }}" />
<span class="hide hidable">
{% trans 'Toggle relationship lines' %}
</span>
</a>
{% if not visual_builder %}
<a href="#" id="exportPages" class="M_butt" >
<img title="{% trans 'Export schema' %}"
src="{{ theme.getImgPath('designer/export.png') }}" />
<span class="hide hidable">
{% trans 'Export schema' %}
</span>
</a>
{% else %}
<a id="build_query_button"
class="M_butt"
href="#"
class="M_butt">
<img title="{% trans 'Build Query' %}"
src="{{ theme.getImgPath('designer/query_builder.png') }}" />
<span class="hide hidable">
{% trans 'Build Query' %}
</span>
</a>
{% endif %}
<a href="#" class="{{ params_array['side_menu'] }}" id="key_Left_Right">
<img title="{% trans 'Move Menu' %}" alt=">"
data-right="{{ theme.getImgPath('designer/2leftarrow_m.png') }}"
src="{{ theme.getImgPath('designer/2rightarrow_m.png') }}" />
<span class="hide hidable">
{% trans 'Move Menu' %}
</span>
</a>
<a href="#" class="{{ params_array['pin_text'] }}" id="pin_Text">
<img title="{% trans 'Pin text' %}"
alt=">"
data-right="{{ theme.getImgPath('designer/anchor.png') }}"
src="{{ theme.getImgPath('designer/anchor.png') }}" />
<span class="hide hidable">
{% trans 'Pin text' %}
</span>
</a>
</div>

View File

@@ -0,0 +1,35 @@
<div id="layer_menu" class="hide">
<div class="center">
<a href="#" class="M_butt" target="_self" >
<img title="{% trans 'Hide/Show all' %}"
alt="v"
id="key_HS_all"
src="{{ theme.getImgPath('designer/downarrow1.png') }}"
data-down="{{ theme.getImgPath('designer/downarrow1.png') }}"
data-right="{{ theme.getImgPath('designer/rightarrow1.png') }}" />
</a>
<a href="#" class="M_butt" target="_self" >
<img alt="v"
id="key_HS"
title="{% trans 'Hide/Show tables with no relationship' %}"
src="{{ theme.getImgPath('designer/downarrow2.png') }}"
data-down="{{ theme.getImgPath('designer/downarrow2.png') }}"
data-right="{{ theme.getImgPath('designer/rightarrow2.png') }}" />
</a>
</div>
<div id="id_scroll_tab" class="scroll_tab">
<table width="100%" style="padding-left: 3px;"></table>
</div>
{# end id_scroll_tab #}
<div class="center">
{% trans 'Number of tables:' %} <span id="tables_counter">0</span>
</div>
<div id="layer_menu_sizer">
<div class="floatleft">
<img class="icon"
data-right="{{ theme.getImgPath('designer/resizeright.png') }}"
src="{{ theme.getImgPath('designer/resize.png') }}"/>
</div>
</div>
</div>
{# end layer_menu #}

View File

@@ -0,0 +1,105 @@
<table id="query_where" class="hide" width="5%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="frams1" width="10px">
</td>
<td class="frams5" width="99%" >
</td>
<td class="frams2" width="10px">
<div class="bor">
</div>
</td>
</tr>
<tr>
<td class="frams8">
</td>
<td class="input_tab">
<table width="168" class="center" cellpadding="2" cellspacing="0">
<thead>
<tr>
<td colspan="2" class="center nowrap">
<strong>
WHERE
</strong>
</td>
</tr>
</thead>
<tbody id="rename_to">
<tr>
<td width="58" class="nowrap">
{% trans 'Operator' %}
</td>
<td width="102">
<select name="erel_opt" id="erel_opt">
<option value="--" selected="selected">
--
</option>
<option value="=" >
=
</option>
<option value="&gt;">
&gt;
</option>
<option value="&lt;">
&lt;
</option>
<option value="&gt;=">
&gt;=
</option>
<option value="&lt;=">
&lt;=
</option>
<option value="NOT">
NOT
</option>
<option value="IN">
IN
</option>
<option value="EXCEPT">
{% trans 'Except' %}
</option>
<option value="NOT IN">
NOT IN
</option>
</select>
</td>
</tr>
<tr>
<td class="nowrap">
{% trans 'Value' %}
<br />
{% trans 'subquery' %}
</td>
<td>
<textarea id="eQuery" cols="18">
</textarea>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2" class="center nowrap">
<input type="button" id="ok_edit_where" class="butt"
name="Button" value="{% trans 'OK' %}" />
<input id="query_where_button" type="button" class="butt" name="Button"
value="{% trans 'Cancel' %}" />
</td>
</tr>
</tbody>
</table>
</td>
<td class="frams6">
</td>
</tr>
<tr>
<td class="frams4">
<div class="bor">
</div>
</td>
<td class="frams7">
</td>
<td class="frams3">
</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,180 @@
{% include 'secondary_tabs.twig' with {
'url_params': {
'db': db
},
'sub_tabs': [
{
'link': 'db_multi_table_query.php',
'text': 'Multi-table query'|trans
},
{
'link': 'db_qbe.php',
'text': 'Query by example'|trans
}
]
} only %}
{{ Util_getDivForSliderEffect('query_div', 'Query window'|trans, 'open') }}
<form action="" id="query_form">
<input type="hidden" id="db_name" value="{{ db }}">
<fieldset>
{% for table in tables %}
<div style="display:none" id="{{ table.hash }}">
<option value="*">*</option>
{% for column in table.columns %}
<option value="{{ column }}">{{ column }}</option>
{% endfor %}
</div>
{% endfor %}
{% for id in 0..default_no_of_columns %}
{% if id == 0 %}<div style="display:none" id="new_column_layout">{% endif %}
<fieldset style="display:inline" class="column_details">
<select style="display:inline" class="tableNameSelect">
<option value="">{% trans 'select table' %}</option>
{% for table in tables|keys %}
<option value="{{ table }}">{{ table }}</option>
{% endfor %}
</select>
<span>.</span>
<select style="display:inline" class="columnNameSelect">
<option value="">{% trans 'select column' %}</option>
</select>
<br>
<input type="checkbox" checked="checked" class="show_col">
<span>{% trans 'Show' %}</span>
<br>
<input type="text" placeholder="{% trans 'Table alias' %}" class="table_alias">
<input type="text" placeholder="{% trans 'Column alias' %}" class="col_alias">
<br>
<input type="checkbox"
title="{% trans 'Use this column in criteria' %}"
class="criteria_col">
{% include 'div_for_slider_effect.twig' with {
'id': 'criteria_div' ~ id,
'initial_sliders_state': 'closed',
'message': 'criteria'|trans
} %}
<div>
<table>
<tr class="sort_order" style="background:none">
<td>{% trans 'Sort' %}</td>
<td><input type="radio" name="sort[{{ id }}]">{% trans 'Ascending' %}</td>
<td><input type="radio" name="sort[{{ id }}]">{% trans 'Descending' %}</td>
</tr>
<tr class="logical_operator" style="background:none;display:none">
<td>{% trans 'Add as' %}</td>
<td>
<input type="radio"
name="logical_op[{{ id }}]"
value="AND"
class="logical_op"
checked="checked">
AND
</td>
<td>
<input type="radio"
name="logical_op[{{ id }}]"
value="OR"
class="logical_op">
OR
</td>
</tr>
<tr style="background:none">
<td>Op </td>
<td>
<select class="criteria_op">
<option value="=">=</option>
<option value=">">&gt;</option>
<option value=">=">&gt;=</option>
<option value="<">&lt;</option>
<option value="<=">&lt;=</option>
<option value="!=">!=</option>
<option value="LIKE">LIKE</option>
<option value="LIKE %...%">LIKE %...%</option>
<option value="NOT LIKE">NOT LIKE</option>
<option value="IN (...)">IN (...)</option>
<option value="NOT IN (...)">NOT IN (...)</option>
<option value="BETWEEN">BETWEEN</option>
<option value="NOT BETWEEN">NOT BETWEEN</option>
<option value="IS NULL">IS NULL</option>
<option value="IS NOT NULL">IS NOT NULL</option>
<option value="REGEXP">REGEXP</option>
<option value="REGEXP ^...$">REGEXP ^...$</option>
<option value="NOT REGEXP">NOT REGEXP</option>
</select>
</td>
<td>
<select class="criteria_rhs">
<option value="text">{% trans 'Text' %}</option>
<option value="anotherColumn">{% trans 'Another column' %}</option>
</select>
</td>
</tr>
<tr class="rhs_table" style="display:none;background:none">
<td></td>
<td>
<select class="tableNameSelect">
<option value="">{% trans 'select table' %}</option>
{% for table in tables|keys %}
<option value="{{ table }}">{{ table }}</option>
{% endfor %}
</select><span>.</span>
</td>
<td>
<select style="display:inline" class="columnNameSelect">
<option value="">{% trans 'select column' %}</option>
</select>
</td>
</tr>
<tr style="background:none" class="rhs_text">
<td></td>
<td colspan="2">
<input type="text"
style="width:91%"
class="rhs_text_val"
placeholder="{% trans 'Enter criteria as free text' %}">
</td>
</tr>
</table>
</div>
</div>
<a href="#"
title="{% trans 'Remove this column' %}"
style="float:right;color:red"
class="removeColumn">
X
</a>
</fieldset>
{% if id == 0 %}</div>{% endif %}
{% endfor %}
<fieldset style="display:inline">
<input type="button" value="{% trans '+ Add column' %}" id="add_column_button">
</fieldset>
<fieldset>
{% apply spaceless %}
<textarea id="MultiSqlquery"
cols="80"
rows="4"
style="float:left"
name="sql_query"
dir="ltr">
</textarea>
{% endapply %}
</fieldset>
</fieldset>
<fieldset class="tblFooters">
<input type="button" id="update_query_button" value="{% trans 'Update query' %}">
<input type="button" id="submit_query" value="{% trans 'Submit query' %}">
</fieldset>
</form>
</div>{# Slider div #}
<div id="sql_results"></div>

View File

@@ -0,0 +1,11 @@
<td class="center">
<select name="criteriaColumn[{{ column_number }}]" size="1">
<option value="">&nbsp;</option>
{% for column in column_names %}
<option value="{{ column }}"
{%- if column is same as(selected) %} selected="selected"{% endif %}>
{{ column|e|replace({' ': '&nbsp;'}) }}
</option>
{% endfor %}
</select>
</td>

View File

@@ -0,0 +1,16 @@
<div class="floatleft">
{% if type == 'row' %}
{% trans 'Add/Delete criteria rows' %}:
{% else %}
{% trans 'Add/Delete columns' %}:
{% endif %}
<select size="1" name="{{ type == 'row' ? 'criteriaRowAdd' : 'criteriaColumnAdd' }}">
<option value="-3">-3</option>
<option value="-2">-2</option>
<option value="-1">-1</option>
<option value="0" selected="selected">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</div>

View File

@@ -0,0 +1,10 @@
<td class="center">
<select name="criteriaSortOrder[{{ column_number }}]">
<option value="1000">&nbsp;</option>
{% for i in 1..total_column_count %}
<option value="{{ i }}"{{ i == sort_order ? ' selected="selected"' }}>
{{ i }}
</option>
{% endfor %}
</select>
</td>

View File

@@ -0,0 +1,9 @@
<td class="center">
<select style="width:{{ real_width }}" name="criteriaSort[{{ column_number }}]" size="1">
<option value="">&nbsp;</option>
<option value="ASC"
{{- selected == 'ASC' ? ' selected="selected"' }}>{% trans 'Ascending' %}</option>
<option value="DESC"
{{- selected == 'DESC' ? ' selected="selected"' }}>{% trans 'Descending' %}</option>
</select>
</td>

View File

@@ -0,0 +1,13 @@
{# These two table-image and table-link elements display the table name in browse search results #}
<div id="table-info">
<a id="table-link" class="item"></a>
</div>
{# Div for browsing results #}
<div id="browse-results">
{# This browse-results div is used to load the browse and delete results in the db search #}
</div>
<div id="sqlqueryform" class="clearfloat">
{# This sqlqueryform div is used to load the delete form in the db search #}
</div>
{# Toggle query box link #}
<a id="togglequerybox"></a>

View File

@@ -0,0 +1,62 @@
<table class="data">
<caption class="tblHeaders">
{{ 'Search results for "<em>%s</em>" %s:'|format(
criteria_search_string,
search_type_description
)|raw }}
</caption>
{% for row in rows %}
<tr class="noclick">
<td>
{% set result_message %}
{% trans %}
%1$s match in <strong>%2$s</strong>
{% plural row.result_count %}
%1$s matches in <strong>%2$s</strong>
{% endtrans %}
{% endset %}
{{ result_message|format(row.result_count, row.table)|raw }}
</td>
{% if row.result_count > 0 %}
{% set url_params = {
'db': db,
'table': row.table,
'goto': 'db_sql.php',
'pos': 0,
'is_js_confirmed': 0
} %}
<td>
<a name="browse_search"
class="ajax browse_results"
href="sql.php{{ Url_getCommon(url_params) }}"
data-browse-sql="{{ row.new_search_sqls.select_columns }}"
data-table-name="{{ row.table }}">
{% trans 'Browse' %}
</a>
</td>
<td>
<a name="delete_search"
class="ajax delete_results"
href="sql.php{{ Url_getCommon(url_params) }}"
data-delete-sql="{{ row.new_search_sqls.delete }}"
data-table-name="{{ row.table }}">
{% trans 'Delete' %}
</a>
</td>
{% else %}
<td></td>
<td></td>
{% endif %}
</tr>
{% endfor %}
</table>
{% if criteria_tables|length > 1 %}
<p>
{% trans %}
<strong>Total:</strong> <em>{{ count }}</em> match
{% plural result_total %}
<strong>Total:</strong> <em>{{ count }}</em> matches
{% endtrans %}
</p>
{% endif %}

View File

@@ -0,0 +1,63 @@
<a id="db_search"></a>
<form id="db_search_form" method="post" action="db_search.php" name="db_search" class="ajax lock-page">
{{ Url_getHiddenInputs(db) }}
<fieldset>
<legend>{% trans 'Search in database' %}</legend>
<p>
<label for="criteriaSearchString" class="displayblock">
{% trans 'Words or values to search for (wildcard: "%"):' %}
</label>
<input id="criteriaSearchString" name="criteriaSearchString" class="all85" type="text" value="
{{- criteria_search_string }}">
</p>
<fieldset>
<legend>{% trans 'Find:' %}</legend>
{# 4th parameter set to true to add line breaks #}
{# 5th parameter set to false to avoid htmlspecialchars() escaping
in the label since we have some HTML in some labels #}
{{ Util_getRadioFields(
'criteriaSearchType',
choices,
criteria_search_type,
true,
false
) }}
</fieldset>
<fieldset>
<legend>{% trans 'Inside tables:' %}</legend>
<p>
<a href="#" onclick="setSelectOptions('db_search', 'criteriaTables[]', true); return false;">
{% trans 'Select all' %}
</a> /
<a href="#" onclick="setSelectOptions('db_search', 'criteriaTables[]', false); return false;">
{% trans 'Unselect all' %}
</a>
</p>
<select name="criteriaTables[]" multiple>
{% for each_table in tables_names_only %}
<option value="{{ each_table }}"
{{- each_table in criteria_tables ? ' selected' }}>
{{ each_table }}
</option>
{% endfor %}
</select>
</fieldset>
<p>
{# Inputbox for column name entry #}
<label for="criteriaColumnName" class="displayblock">
{% trans 'Inside column:' %}
</label>
<input id="criteriaColumnName" type="text" name="criteriaColumnName" class="all85" value="
{{- criteria_column_name is not empty ? criteria_column_name }}">
</p>
</fieldset>
<fieldset class="tblFooters">
<input type="submit" name="submit_search" value="{% trans 'Go' %}" id="buttonGo">
</fieldset>
</form>
<div id="togglesearchformdiv">
<a id="togglesearchformlink"></a>
</div>

View File

@@ -0,0 +1,95 @@
<tbody id="tbl_summary_row">
<tr>
<th class="print_ignore"></th>
<th class="tbl_num nowrap">
{% set num_tables_trans -%}
{% trans %}%s table{% plural num_tables %}%s tables{% endtrans %}
{%- endset %}
{{ num_tables_trans|format(Util_formatNumber(num_tables, 0)) }}
</th>
{% if server_slave_status %}
<th>{% trans 'Replication' %}</th>
{% endif %}
{% set sum_colspan = db_is_system_schema ? 4 : 7 %}
{% if num_favorite_tables == 0 %}
{% set sum_colspan = sum_colspan - 1 %}
{% endif %}
<th colspan="{{ sum_colspan }}" class="print_ignore">{% trans 'Sum' %}</th>
{% set row_count_sum = Util_formatNumber(sum_entries, 0) %}
{# If a table shows approximate rows count, display update-all-real-count anchor. #}
{% set row_sum_url = [] %}
{% if approx_rows is defined %}
{% set row_sum_url = {
'ajax_request': true,
'db': db,
'real_row_count': 'true',
'real_row_count_all': 'true'
} %}
{% endif %}
{% if approx_rows %}
{% set cell_text -%}
<a href="db_structure.php
{{- Url_getCommon(row_sum_url) }}" class="ajax row_count_sum">~
{{- row_count_sum -}}
</a>
{%- endset %}
{% else %}
{% set cell_text = row_count_sum %}
{% endif %}
<th class="value tbl_rows">{{ cell_text }}</th>
{% if not (properties_num_columns > 1) %}
{# MySQL <= 5.5.2 #}
{% set default_engine = dbi.fetchValue('SELECT @@storage_engine;') %}
{% if default_engine is empty %}
{# MySQL >= 5.5.3 #}
{% set default_engine = dbi.fetchValue('SELECT @@default_storage_engine;') %}
{% endif %}
<th class="center">
<dfn title="{{ '%s is the default storage engine on this MySQL server.'|trans|format(default_engine) }}">
{{ default_engine }}
</dfn>
</th>
<th>
{% if db_collation is not empty %}
<dfn title="{{ Charsets_getCollationDescr(db_collation) }} ({% trans 'Default' %})">
{{ db_collation }}
</dfn>
{% endif %}
</th>
{% endif %}
{% if is_show_stats %}
{% set sum = Util_formatByteDown(sum_size, 3, 1) %}
{% set sum_formatted = sum[0] %}
{% set sum_unit = sum[1] %}
<th class="value tbl_size">{{ sum_formatted }} {{ sum_unit }}</th>
{% set overhead = Util_formatByteDown(overhead_size, 3, 1) %}
{% set overhead_formatted = overhead[0] %}
{% set overhead_unit = overhead[1] %}
<th class="value tbl_overhead">{{ overhead_formatted }} {{ overhead_unit }}</th>
{% endif %}
{% if show_charset %}
<th>{{ db_charset }}</th>
{% endif %}
{% if show_comment %}
<th></th>
{% endif %}
{% if show_creation %}
<th class="value tbl_creation">
{{ create_time_all ? Util_localisedDate(strtotime(create_time_all)) : '-' }}
</th>
{% endif %}
{% if show_last_update %}
<th class="value tbl_last_update">
{{ update_time_all ? Util_localisedDate(strtotime(update_time_all)) : '-' }}
</th>
{% endif %}
{% if show_last_check %}
<th class="value tbl_last_check">
{{ check_time_all ? Util_localisedDate(strtotime(check_time_all)) : '-' }}
</th>
{% endif %}
</tr>
</tbody>

View File

@@ -0,0 +1,3 @@
<a href="sql.php{{ tbl_url_query|raw }}&amp;pos=0">
{{ title|raw }}
</a>

View File

@@ -0,0 +1,3 @@
<a href="sql.php{{ tbl_url_query|raw }}&amp;pos=0" title="{{ title }}">
{{ truename }}
</a>

View File

@@ -0,0 +1,40 @@
<div class="clearfloat print_ignore">
<img class="selectallarrow" src="{{ pma_theme_image }}arrow_{{ text_dir }}.png" width="38" height="22" alt="{% trans 'With selected:' %}" />
<input type="checkbox" id="tablesForm_checkall" class="checkall_box" title="{% trans 'Check all' %}" />
<label for="tablesForm_checkall">{% trans 'Check all' %}</label>
{% if overhead_check != '' %}
/ <a href="#" class="checkall-filter" data-checkall-selector=".tbl-overhead">{% trans 'Check tables having overhead' %}</a>
{% endif %}
<select name="submit_mult" style="margin: 0 3em 0 3em;">
<option value="{% trans 'With selected:' %}" selected="selected">{% trans 'With selected:' %}</option>
<option value="copy_tbl">{% trans 'Copy table' %}</option>
<option value="show_create">{% trans 'Show create' %}</option>
<option value="export">{% trans 'Export' %}</option>
{% if not db_is_system_schema and not disable_multi_table %}
<optgroup label="{% trans 'Delete data or table' %}">
<option value="empty_tbl">{% trans 'Empty' %}</option>
<option value="drop_tbl">{% trans 'Drop' %}</option>
</optgroup>
<optgroup label="{% trans 'Table maintenance' %}">
<option value="analyze_tbl">{% trans 'Analyze table' %}</option>
<option value="check_tbl">{% trans 'Check table' %}</option>
<option value="checksum_tbl">{% trans 'Checksum table' %}</option>
<option value="optimize_tbl">{% trans 'Optimize table' %}</option>
<option value="repair_tbl">{% trans 'Repair table' %}</option>
</optgroup>
<optgroup label="{% trans 'Prefix' %}">
<option value="add_prefix_tbl">{% trans 'Add prefix to table' %}</option>
<option value="replace_prefix_tbl">{% trans 'Replace table prefix' %}</option>
<option value="copy_tbl_change_prefix">{% trans 'Copy table with prefix' %}</option>
</optgroup>
{% endif %}
{% if central_columns_work is defined and central_columns_work %}
<optgroup label="{% trans 'Central columns' %}">
<option value="sync_unique_columns_central_list">{% trans 'Add columns to central list' %}</option>
<option value="delete_unique_columns_central_list">{% trans 'Remove columns from central list' %}</option>
<option value="make_consistent_with_central_list">{% trans 'Make consistent with central list' %}</option>
</optgroup>
{% endif %}
</select>
{{ hidden_fields|join('\n')|raw }}
</div>

View File

@@ -0,0 +1,4 @@
<a class="truncate_table_anchor ajax" href="sql.php" data-post="{{ tbl_url_query|raw }}&amp;sql_query=
{{- sql_query }}&amp;message_to_show={{ message_to_show }}">
{{ title|raw }}
</a>

View File

@@ -0,0 +1,7 @@
<a id="{{ table_name_hash }}_favorite_anchor"
class="ajax favorite_table_anchor"
href="db_structure.php{{ Url_getCommon(fav_params) }}"
title="{{ already_favorite ? 'Remove from Favorites'|trans : 'Add to Favorites'|trans }}"
data-favtargets="{{ db_table_name_hash }}" >
{{ already_favorite ? titles['Favorite']|raw : titles['NoFavorite']|raw }}
</a>

View File

@@ -0,0 +1,8 @@
<p class="print_ignore">
<a href="#" id="printView">
{{ Util_getIcon('b_print', 'Print'|trans, true) }}
</a>
<a href="db_datadict.php{{ url_query }}" target="print_view">
{{ Util_getIcon('b_tblanalyse', 'Data dictionary'|trans, true) }}
</a>
</p>

View File

@@ -0,0 +1,3 @@
<a href="tbl_select.php{{ tbl_url_query|raw }}">
{{ title|raw }}
</a>

View File

@@ -0,0 +1,31 @@
<div class="show_create_results">
<h2>{% trans 'Showing create queries' %}</h2>
{% set views = [] %}
{% set tables = [] %}
{% for object in db_objects %}
{% if dbi.getTable(db, object).isView() %}
{% set views = views|merge([object]) %}
{% else %}
{% set tables = tables|merge([object]) %}
{% endif %}
{% endfor %}
{% if tables is not empty %}
{% include 'database/structure/show_create_row.twig' with {
'db': db,
'title': 'Tables'|trans,
'raw_title': 'Table',
'db_objects': tables,
'dbi': dbi
} only %}
{% endif %}
{% if views is not empty %}
{% include 'database/structure/show_create_row.twig' with {
'db': db,
'title': 'Views'|trans,
'raw_title': 'View',
'db_objects': views,
'dbi': dbi
} only %}
{% endif %}
</div>

View File

@@ -0,0 +1,19 @@
<fieldset>
<legend>{{ title }}</legend>
<table class="show_create">
<thead>
<tr>
<th>{{ raw_title }}</th>
<th>{{ 'Create %s'|trans|format(raw_title) }}</th>
</tr>
</thead>
<tbody>
{% for object in db_objects %}
<tr>
<td><strong>{{ Core_mimeDefaultFunction(object) }}</strong></td>
<td>{{ Core_mimeDefaultFunction(dbi.getTable(db, object).showCreate()) }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</fieldset>

View File

@@ -0,0 +1,225 @@
<tr id="row_tbl_{{ curr }}"{{ table_is_view ? ' class="is_view"' }} data-filter-row="{{ current_table['TABLE_NAME']|upper }}">
<td class="center print_ignore">
<input type="checkbox"
name="selected_tbl[]"
class="{{ input_class }}"
value="{{ current_table['TABLE_NAME'] }}"
id="checkbox_tbl_{{ curr }}" />
</td>
<th>
{{ browse_table_label|raw }}
{{ tracking_icon|raw }}
</th>
{% if server_slave_status %}
<td class="center">
{{ ignored ? Util_getImage('s_cancel', 'Not replicated'|trans) }}
{{ do ? Util_getImage('s_success', 'Replicated'|trans) }}
</td>
{% endif %}
{# Favorite table anchor #}
{% if num_favorite_tables > 0 %}
<td class="center print_ignore">
{# Check if current table is already in favorite list #}
{% set fav_params = {
'db': db,
'ajax_request': true,
'favorite_table': current_table['TABLE_NAME'],
((already_favorite ? 'remove' : 'add') ~ '_favorite'): true
} %}
{% include 'database/structure/favorite_anchor.twig' with {
'table_name_hash': md5(current_table['TABLE_NAME']),
'db_table_name_hash': md5(db ~ '.' ~ current_table['TABLE_NAME']),
'fav_params': fav_params,
'already_favorite': already_favorite,
'titles': titles
} only %}
</td>
{% endif %}
<td class="center print_ignore">
{{ browse_table|raw }}
</td>
<td class="center print_ignore">
<a href="tbl_structure.php{{ tbl_url_query|raw }}">
{{ titles['Structure']|raw }}
</a>
</td>
<td class="center print_ignore">
{{ search_table|raw }}
</td>
{% if not db_is_system_schema %}
<td class="insert_table center print_ignore">
<a href="tbl_change.php{{ tbl_url_query|raw }}">{{ titles['Insert']|raw }}</a>
</td>
<td class="center print_ignore">{{ empty_table|raw }}</td>
<td class="center print_ignore">
<a class="ajax drop_table_anchor
{{- table_is_view or current_table['ENGINE'] == null ? ' view' }}"
href="sql.php" data-post="{{ tbl_url_query|raw }}&amp;reload=1&amp;purge=1&amp;sql_query=
{{- drop_query|url_encode }}&amp;message_to_show={{ drop_message|url_encode }}">
{{ titles['Drop']|raw }}
</a>
</td>
{% endif %}
{% if current_table['TABLE_ROWS'] is defined
and (current_table['ENGINE'] != null or table_is_view) %}
{# Get the row count #}
{% set row_count = Util_formatNumber(current_table['TABLE_ROWS'], 0) %}
{# Content to be appended into 'tbl_rows' cell.
If row count is approximate, display it as an anchor to get real count. #}
<td class="value tbl_rows"
data-table="{{ current_table['TABLE_NAME'] }}">
{% if approx_rows %}
<a href="db_structure.php{{ Url_getCommon({
'ajax_request': true,
'db': db,
'table': current_table['TABLE_NAME'],
'real_row_count': 'true'
}) }}" class="ajax real_row_count">
<bdi>
~{{ row_count }}
</bdi>
</a>
{% else %}
{{ row_count }}
{% endif %}
{{ show_superscript|raw }}
</td>
{% if not (properties_num_columns > 1) %}
<td class="nowrap">
{% if current_table['ENGINE'] is not empty %}
{{ current_table['ENGINE'] }}
{% elseif table_is_view %}
{% trans 'View' %}
{% endif %}
</td>
{% if collation|length > 0 %}
<td class="nowrap">
{{ collation|raw }}
</td>
{% endif %}
{% endif %}
{% if is_show_stats %}
<td class="value tbl_size">
<a href="tbl_structure.php{{ tbl_url_query|raw }}#showusage">
<span>{{ formatted_size }}</span>
<span class="unit">{{ unit }}</span>
</a>
</td>
<td class="value tbl_overhead">
{{ overhead|raw }}
</td>
{% endif %}
{% if not (show_charset > 1) %}
{% if charset|length > 0 %}
<td class="nowrap">
{{ charset|raw }}
</td>
{% endif %}
{% endif %}
{% if show_comment %}
{% set comment = current_table['Comment'] %}
<td>
{% if comment|length > limit_chars %}
<abbr title="{{ comment }}">
{{ comment|slice(0, limit_chars) }}
...
</abbr>
{% else %}
{{ comment }}
{% endif %}
</td>
{% endif %}
{% if show_creation %}
<td class="value tbl_creation">
{{ create_time ? Util_localisedDate(strtotime(create_time)) : '-' }}
</td>
{% endif %}
{% if show_last_update %}
<td class="value tbl_last_update">
{{ update_time ? Util_localisedDate(strtotime(update_time)) : '-'}}
</td>
{% endif %}
{% if show_last_check %}
<td class="value tbl_last_check">
{{ check_time ? Util_localisedDate(strtotime(check_time)) : '-' }}
</td>
{% endif %}
{% elseif table_is_view %}
<td class="value tbl_rows">-</td>
<td class="nowrap">
{% trans 'View' %}
</td>
<td class="nowrap">---</td>
{% if is_show_stats %}
<td class="value tbl_size">-</td>
<td class="value tbl_overhead">-</td>
{% endif %}
{% if show_charset %}
<td></td>
{% endif %}
{% if show_comment %}
<td></td>
{% endif %}
{% if show_creation %}
<td class="value tbl_creation">-</td>
{% endif %}
{% if show_last_update %}
<td class="value tbl_last_update">-</td>
{% endif %}
{% if show_last_check %}
<td class="value tbl_last_check">-</td>
{% endif %}
{% else %}
{% set count = 0 %}
{% if properties_num_columns %}
{% set count = count + 2 %}
{% endif %}
{% if is_show_stats %}
{% set count = count + 2 %}
{% endif %}
{% if show_charset %}
{% set count = count + 1 %}
{% endif %}
{% if show_comment %}
{% set count = count + 1 %}
{% endif %}
{% if show_creation %}
{% set count = count + 1 %}
{% endif %}
{% if show_last_update %}
{% set count = count + 1 %}
{% endif %}
{% if show_last_check %}
{% set count = count + 1 %}
{% endif %}
{% if db_is_system_schema %}
{% set action_colspan = 3 %}
{% else %}
{% set action_colspan = 6 %}
{% endif %}
{% if num_favorite_tables > 0 %}
{% set action_colspan = action_colspan + 1 %}
{% endif %}
{% set colspan_for_structure = action_colspan + 3 %}
<td colspan="{{ colspan_for_structure - db_is_system_schema ? 6 : 9 }}"
class="center">
{% trans 'in use' %}
</td>
{% endif %}
</tr>

View File

@@ -0,0 +1,80 @@
<form method="post" action="db_structure.php" name="tablesForm" id="tablesForm">
{{ Url_getHiddenInputs(db) }}
<div class="responsivetable">
<table id="structureTable" class="data">
<thead>
<tr>
<th class="print_ignore"></th>
<th>{{ Util_sortableTableHeader('Table'|trans, 'table') }}</th>
{% if replication %}
<th>{% trans 'Replication' %}</th>
{% endif %}
{% if db_is_system_schema %}
{% set action_colspan = 3 %}
{% else %}
{% set action_colspan = 6 %}
{% endif %}
{% if num_favorite_tables > 0 %}
{% set action_colspan = action_colspan + 1 %}
{% endif %}
<th colspan="{{ action_colspan }}" class="print_ignore">
{% trans 'Action' %}
</th>
{# larger values are more interesting so default sort order is DESC #}
<th>
{{ Util_sortableTableHeader('Rows'|trans, 'records', 'DESC') }}
{{ Util_showHint(Sanitize_sanitize(
'May be approximate. Click on the number to get the exact count. See [doc@faq3-11]FAQ 3.11[/doc].'|trans
)) }}
</th>
{% if not (properties_num_columns > 1) %}
<th>{{ Util_sortableTableHeader('Type'|trans, 'type') }}</th>
<th>{{ Util_sortableTableHeader('Collation'|trans, 'collation') }}</th>
{% endif %}
{% if is_show_stats %}
{# larger values are more interesting so default sort order is DESC #}
<th>{{ Util_sortableTableHeader('Size'|trans, 'size', 'DESC') }}</th>
{# larger values are more interesting so default sort order is DESC #}
<th>{{ Util_sortableTableHeader('Overhead'|trans, 'overhead', 'DESC') }}</th>
{% endif %}
{% if show_charset %}
<th>{{ Util_sortableTableHeader('Charset'|trans, 'charset') }}</th>
{% endif %}
{% if show_comment %}
<th>{{ Util_sortableTableHeader('Comment'|trans, 'comment') }}</th>
{% endif %}
{% if show_creation %}
{# newer values are more interesting so default sort order is DESC #}
<th>{{ Util_sortableTableHeader('Creation'|trans, 'creation', 'DESC') }}</th>
{% endif %}
{% if show_last_update %}
{# newer values are more interesting so default sort order is DESC #}
<th>{{ Util_sortableTableHeader('Last update'|trans, 'last_update', 'DESC') }}</th>
{% endif %}
{% if show_last_check %}
{# newer values are more interesting so default sort order is DESC #}
<th>{{ Util_sortableTableHeader('Last check'|trans, 'last_check', 'DESC') }}</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for structure_table_row in structure_table_rows %}
{% include 'database/structure/structure_table_row.twig' with structure_table_row only %}
{% endfor %}
</tbody>
{% if body_for_table_summary %}
{% include 'database/structure/body_for_table_summary.twig' with body_for_table_summary only %}
{% endif %}
</table>
</div>
{% if check_all_tables %}
{% include 'database/structure/check_all_tables.twig' with check_all_tables only %}
{% endif %}
</form>

View File

@@ -0,0 +1,7 @@
<a href="tbl_tracking.php{{ Url_getCommon({'table': table, 'db': db}) }}">
{% if is_tracked -%}
{{ Util_getImage('eye', 'Tracking is active.'|trans) }}
{%- else -%}
{{ Util_getImage('eye_grey', 'Tracking is not active.'|trans) }}
{%- endif %}
</a>

View File

@@ -0,0 +1,107 @@
<div id="tracked_tables">
<h3>{% trans 'Tracked tables' %}</h3>
<form method="post" action="db_tracking.php" name="trackedForm"
id="trackedForm" class="ajax">
{{ Url_getHiddenInputs(db) }}
<table id="versions" class="data">
<thead>
<tr>
<th></th>
<th>{% trans 'Table' %}</th>
<th>{% trans 'Last version' %}</th>
<th>{% trans 'Created' %}</th>
<th>{% trans 'Updated' %}</th>
<th>{% trans 'Status' %}</th>
<th>{% trans 'Action' %}</th>
<th>{% trans 'Show' %}</th>
</tr>
</thead>
<tbody>
{% for version in versions %}
<tr>
<td class="center">
<input type="checkbox" name="selected_tbl[]"
class="checkall" id="selected_tbl_{{ version.table_name }}"
value="{{ version.table_name }}"/>
</td>
<th>
<label for="selected_tbl_{{ version.table_name }}">
{{ version.table_name }}
</label>
</th>
<td class="right">
{{ version.version }}
</td>
<td>
{{ version.date_created }}
</td>
<td>
{{ version.date_updated }}
</td>
<td>
{{ version.status_button|raw }}
</td>
<td>
<a class="delete_tracking_anchor ajax" href="db_tracking.php" data-post="
{{- Url_getCommon({
'db': db,
'goto': 'tbl_tracking.php',
'back': 'db_tracking.php',
'table': version.table_name,
'delete_tracking': true
}, '', false) }}">
{{ Util_getIcon('b_drop', 'Delete tracking'|trans) }}
</a>
</td>
<td>
<a href="tbl_tracking.php" data-post="
{{- Url_getCommon({
'db': db,
'goto': 'tbl_tracking.php',
'back': 'db_tracking.php',
'table': version.table_name
}, '', false) }}">
{{ Util_getIcon('b_versions', 'Versions'|trans) }}
</a>
<a href="tbl_tracking.php" data-post="
{{- Url_getCommon({
'db': db,
'goto': 'tbl_tracking.php',
'back': 'db_tracking.php',
'table': version.table_name,
'report': true,
'version': version.version
}, '', false) }}">
{{ Util_getIcon('b_report', 'Tracking report'|trans) }}
</a>
<a href="tbl_tracking.php" data-post="
{{- Url_getCommon({
'db': db,
'goto': 'tbl_tracking.php',
'back': 'db_tracking.php',
'table': version.table_name,
'snapshot': true,
'version': version.version
}, '', false) }}">
{{ Util_getIcon('b_props', 'Structure snapshot'|trans) }}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% include 'select_all.twig' with {
'pma_theme_image': pma_theme_image,
'text_dir': text_dir,
'form_name': 'trackedForm'
} only %}
{{ Util_getButtonOrImage(
'submit_mult',
'mult_submit',
'Delete tracking'|trans,
'b_drop',
'delete_tracking'
) }}
</form>
</div>

View File

@@ -0,0 +1,49 @@
<h3>{% trans 'Untracked tables' %}</h3>
<form method="post" action="db_tracking.php" name="untrackedForm"
id="untrackedForm" class="ajax">
{{ Url_getHiddenInputs(db) }}
<table id="noversions" class="data">
<thead>
<tr>
<th></th>
<th>{% trans 'Table' %}</th>
<th>{% trans 'Action' %}</th>
</tr>
</thead>
<tbody>
{% for table_name in untracked_tables %}
{% if Tracker_getVersion(db, table_name) == -1 %}
<tr>
<td class="center">
<input type="checkbox" name="selected_tbl[]"
class="checkall" id="selected_tbl_{{ table_name }}"
value="{{ table_name }}"/>
</td>
<th>
<label for="selected_tbl_{{ table_name }}">
{{ table_name }}
</label>
</th>
<td>
<a href="tbl_tracking.php{{ url_query|raw }}&amp;table={{ table_name }}">
{{ Util_getIcon('eye', 'Track table'|trans) }}
</a>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% include 'select_all.twig' with {
'pma_theme_image': pma_theme_image,
'text_dir': text_dir,
'form_name': 'untrackedForm'
} only %}
{{ Util_getButtonOrImage(
'submit_mult',
'mult_submit',
'Track table'|trans,
'eye',
'track'
) }}
</form>

View File

@@ -0,0 +1,4 @@
<div class="exportoptions" id="format">
<h3>{% trans 'Format:' %}</h3>
{{ dropdown|raw }}
</div>

View File

@@ -0,0 +1,23 @@
{% if export_type == 'server' %}
{{ Url_getHiddenInputs('', '', 1) }}
{% elseif export_type == 'database' %}
{{ Url_getHiddenInputs(db, '', 1) }}
{% else %}
{{ Url_getHiddenInputs(db, table, 1) }}
{% endif %}
{# Just to keep this value for possible next display of this form after saving on server #}
{% if single_table is not empty %}
<input type="hidden" name="single_table" value="TRUE">
{% endif %}
<input type="hidden" name="export_type" value="{{ export_type }}">
{# The export method (quick, custom or custom-no-form) #}
<input type="hidden" name="export_method" value="{{ export_method }}">
{% if sql_query is not empty %}
<input type="hidden" name="sql_query" value="{{ sql_query }}">
{% endif %}
<input type="hidden" name="template_id" value="{{ template_id }}">

View File

@@ -0,0 +1,22 @@
{% if export_method != 'custom-no-form' %}
<div class="exportoptions" id="quick_or_custom">
<h3>{% trans 'Export method:' %}</h3>
<ul>
<li>
<input type="radio" name="quick_or_custom" value="quick" id="radio_quick_export"
{{- export_method == 'quick' ? ' checked' }}>
<label for="radio_quick_export">
{% trans 'Quick - display only the minimal options' %}
</label>
</li>
<li>
<input type="radio" name="quick_or_custom" value="custom" id="radio_custom_export"
{{- export_method == 'custom' ? ' checked' }}>
<label for="radio_custom_export">
{% trans 'Custom - display all possible options' %}
</label>
</li>
</ul>
</div>
{% endif %}

View File

@@ -0,0 +1,12 @@
<div class="exportoptions" id="header">
<h2>
{{ Util_getImage('b_export', 'Export'|trans) }}
{% if export_type == 'server' %}
{% trans 'Exporting databases from the current server' %}
{% elseif export_type == 'database' %}
{{ 'Exporting tables from "%s" database'|trans|format(db) }}
{% else %}
{{ 'Exporting rows from "%s" table'|trans|format(table) }}
{% endif %}
</h2>
</div>

View File

@@ -0,0 +1,24 @@
<div class="exportoptions" id="format_specific_opts">
<h3>{% trans 'Format-specific options:' %}</h3>
<p class="no_js_msg" id="scroll_to_options_msg">
{% trans 'Scroll down to fill in the options for the selected format and ignore the options for other formats.' %}
</p>
{{ options|raw }}
</div>
{% if can_convert_kanji %}
{# Japanese encoding setting #}
<div class="exportoptions" id="kanji_encoding">
<h3>{% trans 'Encoding Conversion:' %}</h3>
{% include 'encoding/kanji_encoding_form.twig' %}
</div>
{% endif %}
<div class="exportoptions" id="submit">
<input type="submit" value="{% trans 'Go' %}" id="buttonGo"
{#- If the time limit set is zero, then time out won't occur so no need
to check for time out. -#}
{%- if exec_time_limit > 0 %}
onclick="check_time_out({{ exec_time_limit }})"
{%- endif %}>
</div>

View File

@@ -0,0 +1,54 @@
<div class="exportoptions" id="output">
<h3>{% trans 'Output:' %}</h3>
<ul id="ul_output">
<li>
<input type="checkbox" id="btn_alias_config"{{ has_aliases ? ' checked' }}>
<label for="btn_alias_config">
{% trans 'Rename exported databases/tables/columns' %}
</label>
</li>
{% if export_type != 'server' %}
<li>
<input type="checkbox" name="lock_tables"
value="something" id="checkbox_lock_tables"
{{- (not repopulate and is_checked_lock_tables) or lock_tables ? ' checked' }}>
<label for="checkbox_lock_tables">
{{ 'Use %s statement'|trans|format('<code>LOCK TABLES</code>')|raw }}
</label>
</li>
{% endif %}
<li>
<input type="radio" name="output_format" value="sendit" id="radio_dump_asfile"
{{- not repopulate and is_checked_asfile ? ' checked' }}>
<label for="radio_dump_asfile">
{% trans 'Save output to a file' %}
</label>
<ul id="ul_save_asfile">
{% if save_dir is not empty %}
{{ options_output_save_dir|raw }}
{% endif %}
{{ options_output_format|raw }}
{% if is_encoding_supported %}
{{ options_output_charset|raw }}
{% endif %}
{{ options_output_compression|raw }}
{% if export_type == 'server' or export_type == 'database' %}
{{ options_output_separate_files|raw }}
{% endif %}
</ul>
</li>
{{ options_output_radio|raw }}
</ul>
<label for="maxsize">
{{- 'Skip tables larger than %s MiB'|trans|format(
'</label><input type="text" id="maxsize" name="maxsize" size="4">'
)|raw }}
</div>

View File

@@ -0,0 +1,16 @@
<li>
<label for="select_charset" class="desc">
{% trans 'Character set of the file:' %}
</label>
<select id="select_charset" name="charset" size="1">
{% for charset in encodings %}
<option value="{{ charset }}"
{%- if (export_charset is empty and charset == 'utf-8')
or charset == export_charset %}
selected
{%- endif %}>
{{- charset -}}
</option>
{% endfor %}
</select>
</li>

View File

@@ -0,0 +1,24 @@
{% if is_zip or is_gzip %}
<li>
<label for="compression" class="desc">
{% trans 'Compression:' %}
</label>
<select id="compression" name="compression">
<option value="none">{% trans 'None' %}</option>
{% if is_zip %}
<option value="zip"
{{- selected_compression == 'zip' ? ' selected' }}>
{% trans 'zipped' %}
</option>
{% endif %}
{% if is_gzip %}
<option value="gzip"
{{- selected_compression == 'gzip' ? ' selected' }}>
{% trans 'gzipped' %}
</option>
{% endif %}
</select>
</li>
{% else %}
<input type="hidden" name="compression" value="{{ selected_compression }}">
{% endif %}

View File

@@ -0,0 +1,13 @@
<li>
<label for="filename_template" class="desc">
{% trans 'File name template:' %}
{{ Util_showHint(message) }}
</label>
<input type="text" name="filename_template" id="filename_template" value="
{{- filename_template }}">
<input type="checkbox" name="remember_template" id="checkbox_remember_template"
{{- is_checked ? ' checked' }}>
<label for="checkbox_remember_template">
{% trans 'use this for future exports' %}
</label>
</li>

View File

@@ -0,0 +1,7 @@
<li>
<input type="radio" id="radio_view_as_text" name="output_format" value="astext"
{{- has_repopulate or export_asfile == false ? ' checked' }}>
<label for="radio_view_as_text">
{% trans 'View output as text' %}
</label>
</li>

View File

@@ -0,0 +1,15 @@
<li>
<input type="checkbox" name="onserver" value="saveit"
id="checkbox_dump_onserver"{{ export_is_checked ? ' checked' }}>
<label for="checkbox_dump_onserver">
{{ 'Save on server in the directory <strong>%s</strong>'|trans|format(save_dir|e)|raw }}
</label>
</li>
<li>
<input type="checkbox" name="onserver_overwrite"
value="saveitover" id="checkbox_dump_onserver_overwrite"
{{- export_overwrite_is_checked ? ' checked' }}>
<label for="checkbox_dump_onserver_overwrite">
{% trans 'Overwrite existing file(s)' %}
</label>
</li>

View File

@@ -0,0 +1,12 @@
<li>
<input type="checkbox" id="checkbox_as_separate_files"
name="as_separate_files" value="{{ export_type }}"
{{- is_checked ? ' checked' }}>
<label for="checkbox_as_separate_files">
{% if export_type == 'server' %}
{% trans 'Export databases as separate files' %}
{% elseif export_type == 'database' %}
{% trans 'Export tables as separate files' %}
{% endif %}
</label>
</li>

View File

@@ -0,0 +1,20 @@
<div class="exportoptions" id="output_quick_export">
<h3>{% trans 'Output:' %}</h3>
<ul>
<li>
<input type="checkbox" name="quick_export_onserver" value="saveit"
id="checkbox_quick_dump_onserver"{{ export_is_checked ? ' checked' }}>
<label for="checkbox_quick_dump_onserver">
{{ 'Save on server in the directory <strong>%s</strong>'|trans|format(save_dir|e)|raw }}
</label>
</li>
<li>
<input type="checkbox" name="quick_export_onserver_overwrite"
value="saveitover" id="checkbox_quick_dump_onserver_overwrite"
{{- export_overwrite_is_checked ? ' checked' }}>
<label for="checkbox_quick_dump_onserver_overwrite">
{% trans 'Overwrite existing file(s)' %}
</label>
</li>
</ul>
</div>

View File

@@ -0,0 +1,35 @@
<div class="exportoptions" id="rows">
<h3>{% trans 'Rows:' %}</h3>
<ul>
<li>
<input type="radio" name="allrows" value="0" id="radio_allrows_0"
{{- allrows is not null and allrows == 0 ? ' checked' }}>
<label for="radio_allrows_0">{% trans 'Dump some row(s)' %}</label>
<ul>
<li>
<label for="limit_to">{% trans 'Number of rows:' %}</label>
<input type="text" id="limit_to" name="limit_to" size="5" value="
{%- apply spaceless %}
{% if limit_to is not null %}
{{ limit_to }}
{% elseif unlim_num_rows is not empty and unlim_num_rows != 0 %}
{{ unlim_num_rows }}
{% else %}
{{ number_of_rows }}
{% endif %}
{% endapply %}" onfocus="this.select()">
</li>
<li>
<label for="limit_from">{% trans 'Row to begin at:' %}</label>
<input type="text" id="limit_from" name="limit_from" size="5" value="
{{- limit_from is not null ? limit_from : 0 }}" onfocus="this.select()">
</li>
</ul>
</li>
<li>
<input type="radio" name="allrows" value="1" id="radio_allrows_1"
{{- allrows is null or allrows == 1 ? ' checked' }}>
<label for="radio_allrows_1">{% trans 'Dump all rows' %}</label>
</li>
</ul>
</div>

View File

@@ -0,0 +1,19 @@
<div>
<p>
<a href="#" onclick="setSelectOptions('dump', 'db_select[]', true); return false;">
{% trans 'Select all' %}
</a>
/
<a href="#" onclick="setSelectOptions('dump', 'db_select[]', false); return false;">
{% trans 'Unselect all' %}
</a>
</p>
<select name="db_select[]" id="db_select" size="10" multiple>
{% for database in databases %}
<option value="{{ database.name }}"{{ database.is_selected ? ' selected' }}>
{{ database.name }}
</option>
{% endfor %}
</select>
</div>

View File

@@ -0,0 +1,10 @@
<div class="exportoptions" id="databases_and_tables">
{% if export_type == 'server' %}
<h3>{% trans 'Databases:' %}</h3>
{% elseif export_type == 'database' %}
<h3>{% trans 'Tables:' %}</h3>
{% endif %}
{% if multi_values is not empty %}
{{ multi_values|raw }}
{% endif %}
</div>

View File

@@ -0,0 +1,27 @@
<div class="exportoptions" id="export_templates">
<h3>{% trans 'Export templates:' %}</h3>
<div class="floatleft">
<form method="post" action="tbl_export.php" id="newTemplateForm" class="ajax">
<h4>{% trans 'New template:' %}</h4>
<input type="text" name="templateName" id="templateName"
maxlength="64" placeholder="{% trans 'Template name' %}" required>
<input type="submit" name="createTemplate" id="createTemplate"
value="{% trans 'Create' %}">
</form>
</div>
<div class="floatleft" style="margin-left: 50px;">
<form method="post" action="tbl_export.php" id="existingTemplatesForm" class="ajax">
<h4>{% trans 'Existing templates:' %}</h4>
<label for="template">{% trans 'Template:' %}</label>
<select name="template" id="template" required>
{{ options|raw }}
</select>
<input type="submit" name="updateTemplate" id="updateTemplate" value="{% trans 'Update' %}">
<input type="submit" name="deleteTemplate" id="deleteTemplate" value="{% trans 'Delete' %}">
</form>
</div>
<div class="clearfloat"></div>
</div>

View File

@@ -0,0 +1,7 @@
<option value="">-- {% trans 'Select a template' %} --</option>
{% for template in templates %}
<option value="{{ template.id }}"{{ template.id == selected_template ? ' selected' }}>
{{ template.name }}
</option>
{% endfor %}

View File

@@ -0,0 +1,194 @@
<iframe id="import_upload_iframe" name="import_upload_iframe" width="1" height="1" class="hide"></iframe>
<div id="import_form_status" class="hide"></div>
<div id="importmain">
<img src="{{ pma_theme_image }}ajax_clock_small.gif" width="16" height="16" alt="ajax clock" class="hide" />
<script type="text/javascript">
//<![CDATA[
{% include 'display/import/javascript.twig' with {
'upload_id': upload_id,
'handler': handler,
'pma_theme_image': pma_theme_image
} only %}
//]]>
</script>
<form id="import_file_form"
action="import.php"
method="post"
enctype="multipart/form-data"
name="import"
class="ajax"
{%- if handler != 'PhpMyAdmin\\Plugins\\Import\\Upload\\UploadNoplugin' %}
target="import_upload_iframe"
{%- endif %}>
<input type="hidden" name="{{ id_key }}" value="{{ upload_id }}" />
{% if import_type == 'server' %}
{{ Url_getHiddenInputs('', '', 1) }}
{% elseif import_type == 'database' %}
{{ Url_getHiddenInputs(db, '', 1) }}
{% else %}
{{ Url_getHiddenInputs(db, table, 1) }}
{% endif %}
<input type="hidden" name="import_type" value="{{ import_type }}" />
<div class="exportoptions" id="header">
<h2>
{{ Util_getImage('b_import', 'Import'|trans) }}
{% if import_type == 'server' %}
{% trans 'Importing into the current server' %}
{% elseif import_type == 'database' %}
{{ 'Importing into the database "%s"'|trans|format(db) }}
{% else %}
{{ 'Importing into the table "%s"'|trans|format(table) }}
{% endif %}
</h2>
</div>
<div class="importoptions">
<h3>{% trans 'File to import:' %}</h3>
{# We don't have show anything about compression, when no supported #}
{% if compressions is not empty %}
<div class="formelementrow" id="compression_info">
<p>
{{ 'File may be compressed (%s) or uncompressed.'|trans|format(compressions|join(', ')) }}
<br>
{% trans 'A compressed file\'s name must end in <strong>.[format].[compression]</strong>. Example: <strong>.sql.zip</strong>' %}
</p>
</div>
{% endif %}
<div class="formelementrow" id="upload_form">
{% if is_upload and upload_dir is not empty %}
<ul>
<li>
<input type="radio" name="file_location" id="radio_import_file" required="required" />
{{ Util_getBrowseUploadFileBlock(max_upload_size) }}
{% trans 'You may also drag and drop a file on any page.' %}
</li>
<li>
<input type="radio" name="file_location" id="radio_local_import_file"
{%- if timeout_passed_global is not empty and local_import_file is not empty %}
checked="checked"
{%- endif %} />
{{ Util_getSelectUploadFileBlock(
import_list,
upload_dir
) }}
</li>
</ul>
{% elseif is_upload %}
{{ Util_getBrowseUploadFileBlock(max_upload_size) }}
<p>{% trans 'You may also drag and drop a file on any page.' %}</p>
{% elseif not is_upload %}
{{ Message_notice('File uploads are not allowed on this server.'|trans) }}
{% elseif upload_dir is not empty %}
{{ Util_getSelectUploadFileBlock(
import_list,
upload_dir
) }}
{% endif %}
</div>
<div class="formelementrow" id="charaset_of_file">
{# Charset of file #}
<label for="charset_of_file">{% trans 'Character set of the file:' %}</label>
{% if is_encoding_supported %}
<select id="charset_of_file" name="charset_of_file" size="1">
{% for charset in encodings %}
<option value="{{ charset }}"
{% if (import_charset is empty and charset == 'utf-8')
or charset == import_charset %}
selected="selected"
{% endif %}>
{{ charset }}
</option>
{% endfor %}
</select>
{% else %}
{{ Charsets_getCharsetDropdownBox(
dbi,
disable_is,
'charset_of_file',
'charset_of_file',
'utf8',
false
) }}
{% endif %}
</div>
</div>
<div class="importoptions">
<h3>{% trans 'Partial import:' %}</h3>
{% if timeout_passed is defined and timeout_passed %}
<div class="formelementrow">
<input type="hidden" name="skip" value="{{ offset }}" />
{{ 'Previous import timed out, after resubmitting will continue from position %d.'|trans|format(offset) }}
</div>
{% endif %}
<div class="formelementrow">
<input type="checkbox" name="allow_interrupt" value="yes" id="checkbox_allow_interrupt"
{{ Plugins_checkboxCheck('Import', 'allow_interrupt') }} />
<label for="checkbox_allow_interrupt">
{% 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>' %}
</label>
</div>
{% if not (timeout_passed is defined and timeout_passed) %}
<div class="formelementrow">
<label for="text_skip_queries">
{% trans 'Skip this number of queries (for SQL) starting from the first one:' %}
</label>
<input type="number" name="skip_queries" value="
{{- Plugins_getDefault('Import', 'skip_queries') -}}
" id="text_skip_queries" min="0" />
</div>
{% else %}
{# If timeout has passed,
do not show the Skip dialog to avoid the risk of someone
entering a value here that would interfere with "skip" #}
<input type="hidden" name="skip_queries" value="
{{- Plugins_getDefault('Import', 'skip_queries') -}}
" id="text_skip_queries" />
{% endif %}
</div>
<div class="importoptions">
<h3>{% trans 'Other options:' %}</h3>
<div class="formelementrow">
{{ Util_getFKCheckbox() }}
</div>
</div>
<div class="importoptions">
<h3>{% trans 'Format:' %}</h3>
{{ Plugins_getChoice('Import', 'format', import_list) }}
<div id="import_notification"></div>
</div>
<div class="importoptions" id="format_specific_opts">
<h3>{% trans 'Format-specific options:' %}</h3>
<p class="no_js_msg" id="scroll_to_options_msg">
{% trans 'Scroll down to fill in the options for the selected format and ignore the options for other formats.' %}
</p>
{{ Plugins_getOptions('Import', import_list) }}
</div>
<div class="clearfloat"></div>
{# Japanese encoding setting #}
{% if can_convert_kanji %}
<div class="importoptions" id="kanji_encoding">
<h3>{% trans 'Encoding Conversion:' %}</h3>
{% include 'encoding/kanji_encoding_form.twig' %}
</div>
{% endif %}
<div class="importoptions" id="submit">
<input type="submit" value="{% trans 'Go' %}" id="buttonGo" />
</div>
</form>
</div>

View File

@@ -0,0 +1,171 @@
$( function() {
{# Add event when user click on "Go" button #}
$("#buttonGo").bind("click", function() {
{# Hide form #}
$("#upload_form_form").css("display", "none");
{% if handler != 'PhpMyAdmin\\Plugins\\Import\\Upload\\UploadNoplugin' %}
{# Some variable for javascript #}
{% set ajax_url = 'import_status.php?id=' ~ upload_id ~ Url_getCommonRaw({
'import_status': 1
}, '&') %}
{% set promot_str = Sanitize_jsFormat(
'The file being uploaded is probably larger than the maximum allowed size or this is a known bug in webkit based (Safari, Google Chrome, Arora etc.) browsers.'|trans,
false
) %}
{% set statustext_str = Sanitize_escapeJsString('%s of %s'|trans) %}
{% set second_str = Sanitize_jsFormat('%s/sec.'|trans, false) %}
{% set remaining_min = Sanitize_jsFormat('About %MIN min. %SEC sec. remaining.'|trans, false) %}
{% set remaining_second = Sanitize_jsFormat('About %SEC sec. remaining.'|trans, false) %}
{% set processed_str = Sanitize_jsFormat(
'The file is being processed, please be patient.'|trans,
false
) %}
{% set import_url = Url_getCommonRaw({'import_status': 1}, '&') %}
{% set upload_html %}
{% apply spaceless %}
<div class="upload_progress">
<div class="upload_progress_bar_outer">
<div class="percentage"></div>
<div id="status" class="upload_progress_bar_inner">
<div class="percentage"></div>
</div>
</div>
<div>
<img src="{{ pma_theme_image }}ajax_clock_small.gif" width="16" height="16" alt="ajax clock" /> {{ Sanitize_jsFormat('Uploading your import file…'|trans, false) -}}
</div>
<div id="statustext"></div>
</div>
{% endapply %}
{% endset %}
{# Start output #}
var finished = false;
var percent = 0.0;
var total = 0;
var complete = 0;
var original_title = parent && parent.document ? parent.document.title : false;
var import_start;
var perform_upload = function () {
new $.getJSON(
"{{ ajax_url|raw }}",
{},
function(response) {
finished = response.finished;
percent = response.percent;
total = response.total;
complete = response.complete;
if (total==0 && complete==0 && percent==0) {
$("#upload_form_status_info").html('<img src="{{ pma_theme_image }}ajax_clock_small.gif" width="16" height="16" alt="ajax clock" /> {{ promot_str|raw }}');
$("#upload_form_status").css("display", "none");
} else {
var now = new Date();
now = Date.UTC(
now.getFullYear(),
now.getMonth(),
now.getDate(),
now.getHours(),
now.getMinutes(),
now.getSeconds())
+ now.getMilliseconds() - 1000;
var statustext = PMA_sprintf(
"{{ statustext_str|raw }}",
formatBytes(
complete, 1, PMA_messages.strDecimalSeparator
),
formatBytes(
total, 1, PMA_messages.strDecimalSeparator
)
);
if ($("#importmain").is(":visible")) {
{# Show progress UI #}
$("#importmain").hide();
$("#import_form_status")
.html('{{ upload_html|raw }}')
.show();
import_start = now;
}
else if (percent > 9 || complete > 2000000) {
{# Calculate estimated time #}
var used_time = now - import_start;
var seconds = parseInt(((total - complete) / complete) * used_time / 1000);
var speed = PMA_sprintf(
"{{ second_str|raw }}",
formatBytes(complete / used_time * 1000, 1, PMA_messages.strDecimalSeparator)
);
var minutes = parseInt(seconds / 60);
seconds %= 60;
var estimated_time;
if (minutes > 0) {
estimated_time = "{{ remaining_min|raw }}"
.replace("%MIN", minutes)
.replace("%SEC", seconds);
}
else {
estimated_time = "{{ remaining_second|raw }}"
.replace("%SEC", seconds);
}
statustext += "<br />" + speed + "<br /><br />" + estimated_time;
}
var percent_str = Math.round(percent) + "%";
$("#status").animate({width: percent_str}, 150);
$(".percentage").text(percent_str);
{# Show percent in window title #}
if (original_title !== false) {
parent.document.title
= percent_str + " - " + original_title;
}
else {
document.title
= percent_str + " - " + original_title;
}
$("#statustext").html(statustext);
}
if (finished == true) {
if (original_title !== false) {
parent.document.title = original_title;
}
else {
document.title = original_title;
}
$("#importmain").hide();
{# Loads the message, either success or mysql error #}
$("#import_form_status")
.html('<img src="{{ pma_theme_image }}ajax_clock_small.gif" width="16" height="16" alt="ajax clock" /> {{ processed_str|raw }}')
.show();
$("#import_form_status").load("import_status.php?message=true&{{ import_url|raw }}");
PMA_reloadNavigation();
{# If finished #}
}
else {
setTimeout(perform_upload, 1000);
}
});
};
setTimeout(perform_upload, 1000);
{% else %}
{# No plugin available #}
{% set image_tag -%}
<img src="{{ pma_theme_image -}}
ajax_clock_small.gif" width="16" height="16" alt="ajax clock" />
{{- Sanitize_jsFormat(
'Please be patient, the file is being uploaded. Details about the upload are not available.'|trans,
false
) -}}
{{- Util_showDocu('faq', 'faq2-9') -}}
{%- endset %}
$('#upload_form_status_info').html('{{ image_tag|raw }}');
$("#upload_form_status").css("display", "none");
{% endif %}
});
});

View File

@@ -0,0 +1,14 @@
<input type="hidden" name="sql_query" value="{{ sql_query|raw }}" />
<input type="hidden" name="goto" value="{{ goto }}" />
{# Do not change the position when changing the number of rows #}
<input type="hidden" name="pos" size="3" value="{{ pos }}" />
<input type="hidden" name="is_browse_distinct" value="{{ is_browse_distinct }}" />
{% trans 'Number of rows:' %}
{{ Util_getDropdown(
'session_max_rows',
number_of_rows_choices,
max_rows,
'',
'autosubmit',
number_of_rows_placeholder
) }}

View File

@@ -0,0 +1,10 @@
{% if comments_map[fields_meta.table] is defined
and comments_map[fields_meta.table][fields_meta.name] is defined %}
<span class="tblcomment" title="{{ comments_map[fields_meta.table][fields_meta.name] }}">
{% if comments_map[fields_meta.table][fields_meta.name]|length > limit_chars %}
{{ comments_map[fields_meta.table][fields_meta.name]|slice(0, limit_chars) }}
{% else %}
{{ comments_map[fields_meta.table][fields_meta.name] }}
{% endif %}
</span>
{% endif %}

View File

@@ -0,0 +1 @@
<td {{ align }} class="{{ classes }}"></td>

View File

@@ -0,0 +1,12 @@
{% if delete_link == delete_row or delete_link == kill_process %}
<form method="post"
action="tbl_row_action.php"
name="resultsForm"
id="resultsForm_{{ unique_id }}"
class="ajax">
{{ Url_getHiddenInputs(db, table, 1) }}
<input type="hidden" name="goto" value="sql.php" />
{% endif %}
<div class="responsivetable">
<table class="table_results data ajax" data-uniqueId="{{ unique_id }}">

Some files were not shown because too many files have changed in this diff Show More