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,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>