Initial commit

This commit is contained in:
2022-11-21 09:47:28 +01:00
commit 76cec83d26
11652 changed files with 1980467 additions and 0 deletions

View File

@ -0,0 +1,18 @@
<?php if ($privs_available) : ?>
<input name="field_adjust_privileges[<?= $columnNumber; ?>]"
id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>"
checked="checked"
type="checkbox"
value="NULL"
class="allow_null"/>
<?php else : ?>
<input name="field_adjust_privileges[<?= $columnNumber; ?>]"
id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>"
disabled
type="checkbox"
value="NULL"
class="allow_null"
title="<?= __('You don\'t have sufficient privileges to perform this '
. 'operation; Please refer to the documentation for more details');?>"/>
<?php endif; ?>

View File

@ -0,0 +1,28 @@
<?php
$attribute_types = $GLOBALS['PMA_Types']->getAttributes();
$cnt_attribute_types = count($attribute_types);
$attribute = '';
if (isset($submit_attribute) && $submit_attribute != false) {
$attribute = $submit_attribute;
} elseif (isset($columnMeta['Extra'])
&& $columnMeta['Extra'] == 'on update CURRENT_TIMESTAMP') {
$attribute = 'on update CURRENT_TIMESTAMP';
} elseif (isset($extracted_columnspec['attribute'])) {
$attribute = $extracted_columnspec['attribute'];
}
$attribute = mb_strtoupper($attribute);
?>
<select style="width: 7em;"
name="field_attribute[<?= $columnNumber; ?>]"
id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>">
<?php for ($j = 0; $j < $cnt_attribute_types; $j++): ?>
<option value="<?= $attribute_types[$j];?>"
<?php if ($attribute == mb_strtoupper($attribute_types[$j])): ?>
selected="selected"
<?php endif; ?>>
<?= $attribute_types[$j]; ?>
</option>
<?php endfor; ?>
</select>

View File

@ -0,0 +1,231 @@
<?php
// Cell index: If certain fields get left out, the counter shouldn't change.
$ci = 0;
// Every time a cell shall be left out the STRG-jumping feature, $ci_offset
// has to be incremented ($ci_offset++)
$ci_offset = -1;
?>
<td class="center">
<!-- column name -->
<?= PMA\libraries\Template::get('columns_definitions/column_name')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'columnMeta' => isset($columnMeta) ? $columnMeta : null,
'cfgRelation' => $cfgRelation
)); ?>
</td>
<td class="center">
<!-- column type -->
<?= PMA\libraries\Template::get('columns_definitions/column_type')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'type_upper' => $type_upper,
'columnMeta' => isset($columnMeta) ? $columnMeta : null
)); ?>
</td>
<td class="center">
<!-- column length -->
<?= PMA\libraries\Template::get('columns_definitions/column_length')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'length_values_input_size' => $length_values_input_size,
'length_to_display' => $length
)); ?>
</td>
<td class="center">
<!-- column default -->
<?= PMA\libraries\Template::get('columns_definitions/column_default')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'type_upper' => isset($type_upper) ? $type_upper : null,
'columnMeta' => isset($columnMeta) ? $columnMeta : null
)); ?>
</td>
<td class="center">
<!-- column collation -->
<?php $tmp_collation = empty($columnMeta['Collation']) ? null : $columnMeta['Collation']; ?>
<?= PMA_generateCharsetDropdownBox(
PMA_CSDROPDOWN_COLLATION,
'field_collation[' . $columnNumber . ']',
'field_' . $columnNumber . '_' . ($ci - $ci_offset),
$tmp_collation,
false
); ?>
</td>
<td class="center">
<!-- column attribute -->
<?= PMA\libraries\Template::get('columns_definitions/column_attribute')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'extracted_columnspec' => isset($extracted_columnspec) ? $extracted_columnspec : null,
'columnMeta' => isset($columnMeta) ? $columnMeta : null,
'submit_attribute' => isset($submit_attribute) ? $submit_attribute : null,
)); ?>
</td>
<td class="center">
<!-- column NULL -->
<?= PMA\libraries\Template::get('columns_definitions/column_null')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'columnMeta' => isset($columnMeta) ? $columnMeta : null
)); ?>
</td>
<?php if (isset($_REQUEST['change_column']) && !empty($_REQUEST['change_column'])): ?>
<!-- column Adjust privileges, Only for 'Edit' Column(s) -->
<td class="center">
<?php $privs_available = $GLOBALS['col_priv'] && $GLOBALS['is_reload_priv']; ?>
<?= PMA\libraries\Template::get('columns_definitions/column_adjust_privileges')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'privs_available' => $privs_available
)); ?>
</td>
<?php endif; ?>
<?php if (!$is_backup): ?>
<!-- column indexes, See my other comment about this 'if'. -->
<td class="center">
<?= PMA\libraries\Template::get('columns_definitions/column_indexes')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'columnMeta' => $columnMeta
)); ?>
</td>
<?php endif; ?>
<td class="center">
<!-- column auto_increment -->
<?= PMA\libraries\Template::get('columns_definitions/column_auto_increment')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'columnMeta' => $columnMeta
)); ?>
</td>
<td class="center">
<!-- column comments -->
<?= PMA\libraries\Template::get('columns_definitions/column_comment')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'columnMeta' => isset($columnMeta) ? $columnMeta : null,
'comments_map' => $comments_map
)); ?>
</td>
<!-- column virtuality -->
<?php if (PMA\libraries\Util::isVirtualColumnsSupported()): ?>
<td class="center">
<?= PMA\libraries\Template::get('columns_definitions/column_virtuality')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'columnMeta' => isset($columnMeta) ? $columnMeta : null
)); ?>
</td>
<?php endif; ?>
<!-- move column -->
<?php if (isset($fields_meta)): ?>
<?php $current_index = 0;
for ($mi = 0, $cols = count($move_columns); $mi < $cols; $mi++) {
if ($move_columns[$mi]->name == $columnMeta['Field']) {
$current_index = $mi;
break;
}
} ?>
<td class="center">
<?= PMA\libraries\Template::get('columns_definitions/move_column')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'columnMeta' => $columnMeta,
'move_columns' => $move_columns,
'current_index' => $current_index
)); ?>
</td>
<?php endif; ?>
<?php if ($cfgRelation['mimework'] && $GLOBALS['cfg']['BrowseMIME'] && $cfgRelation['commwork']): ?>
<td class="center">
<!-- Column Mime-type -->
<?= PMA\libraries\Template::get('columns_definitions/mime_type')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'available_mime' => $available_mime,
'columnMeta' => $columnMeta,
'mime_map' => $mime_map
)); ?>
</td>
<td class="center">
<!-- Column Browser transformation -->
<?= PMA\libraries\Template::get('columns_definitions/transformation')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'available_mime' => $available_mime,
'columnMeta' => $columnMeta,
'mime_map' => $mime_map,
'type' => 'transformation'
)); ?>
</td>
<td class="center">
<!-- column Transformation options -->
<?= PMA\libraries\Template::get('columns_definitions/transformation_option')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'columnMeta' => $columnMeta,
'mime_map' => $mime_map,
'type_prefix' => '',
)); ?>
</td>
<td class="center">
<!-- Column Input transformation -->
<?= PMA\libraries\Template::get('columns_definitions/transformation')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'available_mime' => $available_mime,
'columnMeta' => $columnMeta,
'mime_map' => $mime_map,
'type' => 'input_transformation'
)); ?>
</td>
<td class="center">
<!-- column Input transformation options -->
<?= PMA\libraries\Template::get('columns_definitions/transformation_option')
->render(array(
'columnNumber' => $columnNumber,
'ci' => $ci++,
'ci_offset' => $ci_offset,
'columnMeta' => $columnMeta,
'mime_map' => $mime_map,
'type_prefix' => 'input_',
)); ?>
</td>
<?php endif; ?>

View File

@ -0,0 +1,8 @@
<input name="field_extra[<?= $columnNumber; ?>]"
id="field_<?= $columnNumber?>_<?= ($ci - $ci_offset); ?>"
<?php if (isset($columnMeta['Extra'])
&& mb_strtolower($columnMeta['Extra']) == 'auto_increment'): ?>
checked="checked"
<?php endif; ?>
type="checkbox"
value="AUTO_INCREMENT" />

View File

@ -0,0 +1,10 @@
<input id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>"
type="text"
name="field_comments[<?= $columnNumber; ?>]"
size="12"
maxlength="<?= PMA_MYSQL_INT_VERSION >= 50503 ? 1024 : 255; ?>"
value="<?= (isset($columnMeta['Field']) && is_array($comments_map) && isset($comments_map[$columnMeta['Field']])) ?
htmlspecialchars($comments_map[$columnMeta['Field']])
: ''
?>"
class="textfield" />

View File

@ -0,0 +1,51 @@
<?php
// 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)
$default_options = array(
'NONE' => _pgettext('for default', 'None'),
'USER_DEFINED' => __('As defined:'),
'NULL' => 'NULL',
'CURRENT_TIMESTAMP' => 'CURRENT_TIMESTAMP',
);
// for a TIMESTAMP, do not show the string "CURRENT_TIMESTAMP" as a default
// value
$defaultValue = '';
if (isset($columnMeta['DefaultValue'])) {
$defaultValue = $columnMeta['DefaultValue'];
}
if ($type_upper == 'BIT') {
$defaultValue = PMA\libraries\Util::convertBitDefaultValue($columnMeta['DefaultValue']);
} elseif ($type_upper == 'BINARY' || $type_upper == 'VARBINARY') {
$defaultValue = bin2hex($columnMeta['DefaultValue']);
}
?>
<select name="field_default_type[<?= $columnNumber; ?>]"
id="field_<?= $columnNumber; ?>_<?=($ci - $ci_offset); ?>"
class="default_type">
<?php foreach ($default_options as $key => $value): ?>
<option value="<?= $key; ?>"
<?php if (isset($columnMeta['DefaultType']) && $columnMeta['DefaultType'] == $key): ?>
selected="selected"
<?php endif; ?>>
<?= $value; ?>
</option>
<?php endforeach; ?>
</select>
<br />
<?php if ($GLOBALS['cfg']['CharEditing'] == 'textarea'): ?>
<textarea name="field_default_value[<?= $columnNumber; ?>]"
cols="15"
class="textfield
default_value">
<?= htmlspecialchars($defaultValue); ?>
</textarea>
<?php else: ?>
<input type="text"
name="field_default_value[<?= $columnNumber; ?>]"
size="12"
value="<?= htmlspecialchars($defaultValue); ?>"
class="textfield default_value" />
<?php endif; ?>

View File

@ -0,0 +1,170 @@
<?php
use PMA\libraries\Partition;
use PMA\libraries\StorageEngine;
?>
<form method="post"
action="<?= $action; ?>"
class="<?= ($action == 'tbl_create.php' ? 'create_table' : 'append_fields'); ?>_form ajax lock-page">
<?= PMA_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="<?= (! empty($_REQUEST['primary_indexes'])) ?
htmlspecialchars($_REQUEST['primary_indexes'])
: '[]'
?>">
<input type="hidden"
name="unique_indexes"
value="<?= (! empty($_REQUEST['unique_indexes'])) ?
htmlspecialchars($_REQUEST['unique_indexes'])
: '[]'
?>">
<input type="hidden"
name="indexes"
value="<?= (! empty($_REQUEST['indexes'])) ?
htmlspecialchars($_REQUEST['indexes'])
: '[]'
?>">
<input type="hidden"
name="fulltext_indexes"
value="<?= (! empty($_REQUEST['fulltext_indexes'])) ?
htmlspecialchars($_REQUEST['fulltext_indexes'])
: '[]'
?>">
<input type="hidden"
name="spatial_indexes"
value="<?= (! empty($_REQUEST['spatial_indexes'])) ?
htmlspecialchars($_REQUEST['spatial_indexes'])
: '[]'
?>">
<?php if ($action == 'tbl_create.php'): ?>
<div id="table_name_col_no_outer">
<table id="table_name_col_no">
<tr class="vmiddle floatleft">
<td><?= __('Table name'); ?>:&nbsp;
<input type="text"
name="table"
size="40"
maxlength="64"
value="<?= (isset($_REQUEST['table']) ? htmlspecialchars($_REQUEST['table']) : '') ?>"
class="textfield" autofocus required />
</td>
<td>
<?= __('Add'); ?>
<input type="number"
id="added_fields"
name="added_fields"
size="2"
value="1"
min="1"
onfocus="this.select()" />
<?= __('column(s)'); ?>
<input type="button"
name="submit_num_fields"
value="<?= __('Go'); ?>" />
</td>
</tr>
</table>
</div>
<?php endif; ?>
<?php if (is_array($content_cells)): ?>
<?= PMA\libraries\Template::get(
'columns_definitions/table_fields_definitions'
)->render(array(
'is_backup' => $is_backup,
'fields_meta' => $fields_meta,
'mimework' => $mimework,
'content_cells' => $content_cells
)); ?>
<?php endif; ?>
<?php if ($action == 'tbl_create.php'): ?>
<table>
<tr class="vtop">
<th>
<?= __('Table comments:'); ?>
</th>
<td width="25">&nbsp;</td>
<th>
<?= __('Collation:'); ?>
</th>
<td width="25">&nbsp;</td>
<th>
<?= __('Storage Engine:'); ?>
<?= PMA\libraries\Util::showMySQLDocu('Storage_engines'); ?>
</th>
<td width="25">&nbsp;</td>
<th>
<?= __('Connection:'); ?>
<?= PMA\libraries\Util::showMySQLDocu('federated-create-connection'); ?>
</th>
</tr>
<tr>
<td>
<input type="text"
name="comment"
size="40"
maxlength="60"
value="<?= (isset($_REQUEST['comment']) ? htmlspecialchars($_REQUEST['comment']): ''); ?>"
class="textfield" />
</td>
<td width="25">&nbsp;</td>
<td>
<?= PMA_generateCharsetDropdownBox(
PMA_CSDROPDOWN_COLLATION,
'tbl_collation',
null,
isset($_REQUEST['tbl_collation']) ? $_REQUEST['tbl_collation'] : null,
false
); ?>
</td>
<td width="25">&nbsp;</td>
<td>
<?= StorageEngine::getHtmlSelect(
'tbl_storage_engine',
null,
(isset($_REQUEST['tbl_storage_engine']) ? $_REQUEST['tbl_storage_engine'] : null)
); ?>
</td>
<td width="25">&nbsp;</td>
<td>
<input type="text"
name="connection"
size="40"
value="<?= (isset($_REQUEST['connection']) ? htmlspecialchars($_REQUEST['connection']) : ''); ?>"
placeholder="scheme://user_name[:password]@host_name[:port_num]/db_name/tbl_name"
class="textfield"
required="required" />
</td>
</tr>
<?php if (Partition::havePartitioning()): ?>
<tr class="vtop">
<th colspan="5">
<?= __('PARTITION definition:'); ?>
&nbsp;
<?= PMA\libraries\Util::showMySQLDocu('Partitioning'); ?>
</th>
</tr>
<tr>
<td colspan="5">
<?php include 'libraries/tbl_partition_definition.inc.php'; ?>
</td>
</tr>
<?php endif; ?>
</table>
<br />
<?php endif; ?>
<fieldset class="tblFooters">
<input type="button"
class="preview_sql"
value="<?= __('Preview SQL') ?>" />
<input type="submit"
name="do_save_data"
value="<?= __('Save'); ?>" />
</fieldset>
<div id="properties_message">
</div>
</form>

View File

@ -0,0 +1,7 @@
<input name="col_extra[<?= $columnNumber;?>]"
id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>"
<?php if (! empty($columnMeta['Extra']) && $columnMeta['Extra'] == 'auto_increment'): ?>
checked="checked"
<?php endif; ?>
type="checkbox"
value="auto_increment" />

View File

@ -0,0 +1,30 @@
<select name="field_key[<?= $columnNumber;?>]"
id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset);?>"
data-index="">
<option value="none_<?= $columnNumber; ?>">---</option>
<option value="primary_<?= $columnNumber; ?>"
title="<?= __("Primary"); ?>"
<?= ((isset($columnMeta['Key']) && $columnMeta['Key'] == 'PRI') ? 'selected="selected"' : '');?>>
PRIMARY
</option>
<option value="unique_<?= $columnNumber; ?>"
title="<?= __("Unique"); ?>"
<?= ((isset($columnMeta['Key']) && $columnMeta['Key'] == 'UNI') ? 'selected="selected"' : '');?>>
UNIQUE
</option>
<option value="index_<?= $columnNumber; ?>"
title="<?= __("Index"); ?>"
<?= ((isset($columnMeta['Key']) && $columnMeta['Key'] == 'MUL') ? 'selected="selected"' : '');?>>
INDEX
</option>
<option value="fulltext_<?= $columnNumber; ?>"
title="<?= __("Fulltext"); ?>"
<?= ((isset($columnMeta['Key']) && $columnMeta['Key'] == 'FULLTEXT') ? 'selected="selected"' : '');?>>
FULLTEXT
</option>
<option value="spatial_<?= $columnNumber; ?>"
title="<?= __("Spatial"); ?>"
<?= ((isset($columnMeta['Key']) && $columnMeta['Key'] == 'SPATIAL') ? 'selected="selected"' : '');?>>
SPATIAL
</option>
</select>

View File

@ -0,0 +1,11 @@
<input id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>"
type="text"
name="field_length[<?= $columnNumber; ?>]"
size="<?= $length_values_input_size ?>"
value="<?= htmlspecialchars($length_to_display); ?>"
class="textfield" />
<p class="enum_notice" id="enum_notice_<?= $columnNumber ?>_<?= ($ci - $ci_offset); ?>">
<a href="#" class="open_enum_editor">
<?= __('Edit ENUM/SET values'); ?>
</a>
</p>

View File

@ -0,0 +1,46 @@
<?php
$title = '';
if (isset($columnMeta['column_status'])) {
if ($columnMeta['column_status']['isReferenced']) {
$title .= sprintf(
__('Referenced by %s.'),
implode(",", $columnMeta['column_status']['references'])
);
}
if ($columnMeta['column_status']['isForeignKey']) {
if (!empty($title)) {
$title .= "\n";
}
$title .= __('Is a foreign key.');
}
}
if (empty($title)) {
$title = __('Column');
}
?>
<input id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>"
<?php if (isset($columnMeta['column_status'])
&& !$columnMeta['column_status']['isEditable']): ?>
disabled="disabled"
<?php endif; ?>
type="text"
name="field_name[<?= $columnNumber; ?>]"
maxlength="64"
class="textfield"
title="<?= $title; ?>"
size="10"
value="<?= isset($columnMeta['Field'])? htmlspecialchars($columnMeta['Field']) : '' ?>" />
<?php if ($cfgRelation['centralcolumnswork']
&& !(isset($columnMeta['column_status'])
&& !$columnMeta['column_status']['isEditable'])
): ?>
<p style="font-size:80%;margin:5px 2px"
id="central_columns_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>">
<a data-maxrows="<?= intval($GLOBALS['cfg']['MaxRows']); ?>"
href="#"
class="central_columns_dialog">
<?= __('Pick from Central Columns'); ?>
</a>
</p>
<?php endif; ?>

View File

@ -0,0 +1,8 @@
<input name="field_null[<?= $columnNumber; ?>]"
id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>"
<?php if (! empty($columnMeta['Null']) && $columnMeta['Null'] != 'NO' && $columnMeta['Null'] != 'NOT NULL'): ?>
checked="checked"
<?php endif; ?>
type="checkbox"
value="NULL"
class="allow_null"/>

View File

@ -0,0 +1,8 @@
<select class="column_type"
name="field_type[<?= $columnNumber; ?>]"
id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>"
<?php if (isset($columnMeta['column_status']) && !$columnMeta['column_status']['isEditable']): ?>
disabled="disabled"
<?php endif; ?>>
<?= PMA\libraries\Util::getSupportedDatatypes(true, $type_upper); ?>
</select>

View File

@ -0,0 +1,48 @@
<?php
$options = array(
'' => '',
'VIRTUAL' => 'VIRTUAL',
);
$serverType = PMA\libraries\Util::getServerType();
if ($serverType == 'MariaDB') {
$options['PERSISTENT'] = 'PERSISTENT';
} else {
$options['STORED'] = 'STORED';
}
$expression = '';
if (isset($columnMeta['Expression'])) {
$expression = $columnMeta['Expression'];
}
?>
<select name="field_virtuality[<?= $columnNumber; ?>]"
id="field_<?= $columnNumber; ?>_<?=($ci - $ci_offset); ?>"
class="virtuality">
<?php foreach ($options as $key => $value): ?>
<option value="<?= $key; ?>"
<?php if (isset($columnMeta['Extra'])
&& $key != ''
&& strpos($columnMeta['Extra'], $key) === 0): ?>
selected="selected"
<?php endif; ?>>
<?= $value; ?>
</option>
<?php endforeach; ?>
</select>
<br />
<?php if ($GLOBALS['cfg']['CharEditing'] == 'textarea'): ?>
<textarea name="field_expression[<?= $columnNumber; ?>]"
cols="15"
class="textfield
expression">
<?= htmlspecialchars($expression); ?>
</textarea>
<?php else: ?>
<input type="text"
name="field_expression[<?= $columnNumber; ?>]"
size="12"
value="<?= htmlspecialchars($expression); ?>"
placeholder="<?= __('Expression'); ?>"
class="textfield expression" />
<?php endif; ?>

View File

@ -0,0 +1,17 @@
<select id="field_<?= $columnNumber;?>_<?=($ci - $ci_offset); ?>"
size="1"
name="field_mimetype[<?= $columnNumber; ?>]">
<option value="">&nbsp;</option>
<?php if (isset($available_mime['mimetype'])
&& is_array($available_mime['mimetype'])): ?>
<?php foreach ($available_mime['mimetype'] as $mimetype): ?>
<?php $checked = (isset($columnMeta['Field'])
&& isset($mime_map[$columnMeta['Field']]['mimetype'])
&& ($mime_map[$columnMeta['Field']]['mimetype'] == str_replace('/', '_', $mimetype))
? 'selected ' : '');?>
<option value="<?= str_replace('/', '_', $mimetype)?>" <?= $checked; ?>>
<?= htmlspecialchars(strtolower($mimetype)); ?>
</option>
<?php endforeach; ?>
<?php endif; ?>
</select>

View File

@ -0,0 +1,15 @@
<select id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>"
name="field_move_to[<?= $columnNumber; ?>]"
size="1"
width="5em">
<option value="" selected="selected">&nbsp;</option>
<option value="-first" <?= ($current_index == 0 ? ' disabled="disabled"' : ''); ?>>
<?= __('first'); ?>
</option>
<?php for ($mi = 0, $cols = count($move_columns); $mi < $cols; $mi++): ?>
<option value="<?= htmlspecialchars($move_columns[$mi]->name); ?>"
<?= (($current_index == $mi || $current_index == $mi + 1) ? ' disabled="disabled"' : '');?>>
<?= sprintf(__('after %s'), PMA\libraries\Util::backquote(htmlspecialchars($move_columns[$mi]->name))); ?>
</option>
<?php endfor; ?>
</select>

View File

@ -0,0 +1,174 @@
<?php
$partitionOptions = array('', 'HASH', 'LINEAR HASH', 'KEY', 'LINEAR KEY', 'RANGE', 'RANGE COLUMNS', 'LIST', 'LIST COLUMNS');
$subPartitionOptions = array('', 'HASH', 'LINEAR HASH', 'KEY', 'LINEAR KEY');
$valueTypeOptions = array('', 'LESS THAN', 'LESS THAN MAXVALUE', 'IN');
?>
<table id="partition_table">
<tr class="vmiddle">
<td><label for="partition_by"><?= __('Partition by:'); ?></label></td>
<td>
<select name="partition_by" id="partition_by">
<?php foreach ($partitionOptions as $option): ?>
<option value="<?= $option?>"
<?php if ($partitionDetails['partition_by'] == $option): ?>
selected="selected"
<?php endif; ?>
>
<?= $option; ?>
</option>
<?php endforeach; ?>
</select>
</td>
<td>(
<input name="partition_expr" type="text"
placeholder="<?= __('Expression or column list'); ?>"
value="<?= htmlspecialchars($partitionDetails['partition_expr']); ?>"/>
)</td>
</tr>
<tr class="vmiddle">
<td><label for="partition_count"><?= __('Partitions:'); ?></label></td>
<td>
<input name="partition_count" type="number" min="2"
value="<?= htmlspecialchars($partitionDetails['partition_count']); ?>" />
</td>
</tr>
<?php if ($partitionDetails['can_have_subpartitions']): ?>
<tr class="vmiddle">
<td><label for="subpartition_by"><?= __('Subpartition by:'); ?></label></td>
<td>
<select name="subpartition_by" id="subpartition_by">
<?php foreach ($subPartitionOptions as $option): ?>
<option value="<?= $option?>"
<?php if ($partitionDetails['subpartition_by'] == $option): ?>
selected="selected"
<?php endif; ?>
>
<?= $option; ?>
</option>
<?php endforeach; ?>
</select>
</td>
<td>(
<input name="subpartition_expr" type="text"
placeholder="<?= __('Expression or column list'); ?>"
value="<?= htmlspecialchars($partitionDetails['subpartition_expr']); ?>"/>
)</td>
</tr>
<tr class="vmiddle">
<td><label for="subpartition_count"><?= __('Subpartitions:'); ?></label></td>
<td>
<input name="subpartition_count" type="number" min="2"
value="<?= htmlspecialchars($partitionDetails['subpartition_count']); ?>" />
</td>
</tr>
<?php endif; ?>
</table>
<?php if ($partitionDetails['partition_count'] > 1): ?>
<table id="partition_definition_table">
<tr>
<th><?= __('Partition'); ?></th>
<?php if ($partitionDetails['value_enabled']): ?>
<th><?= __('Values'); ?></th>
<?php endif; ?>
<?php if ($partitionDetails['can_have_subpartitions'] && $partitionDetails['subpartition_count'] > 1): ?>
<th><?= __('Subpartition'); ?></th>
<?php endif; ?>
<th><?= __('Engine'); ?></th>
<th><?= __('Comment'); ?></th>
<th><?= __('Data directory'); ?></th>
<th><?= __('Index directory'); ?></th>
<th><?= __('Max rows'); ?></th>
<th><?= __('Min rows'); ?></th>
<th><?= __('Table space'); ?></th>
<th><?= __('Node group'); ?></th>
</tr>
<?php $odd = true; ?>
<?php foreach ($partitionDetails['partitions'] as $partition): ?>
<?php $rowspan = ! empty($partition['subpartition_count']) ? ($partition['subpartition_count'] + 1) : 2; ?>
<tr class="<?= ($odd ? 'odd' : 'even'); ?>">
<td rowspan="<?= $rowspan; ?>">
<input type="text" name="<?= $partition['prefix']; ?>[name]"
value="<?= htmlspecialchars($partition['name']); ?>" />
</td>
<?php if ($partitionDetails['value_enabled']): ?>
<td rowspan="<?= $rowspan; ?>" class="vmiddle">
<select class="partition_value"
name="<?= $partition['prefix']; ?>[value_type]">
<?php foreach ($valueTypeOptions as $option): ?>
<option value="<?= $option?>"
<?php if ($partition['value_type'] == $option): ?>
selected="selected"
<?php endif; ?>
>
<?= $option; ?>
</option>
<?php endforeach; ?>
</select>
<input type="text" class="partition_value"
name="<?= $partition['prefix']; ?>[value]"
value="<?= $partition['value']; ?>" />
</td>
<?php endif; ?>
</tr>
<?php
if (isset($partition['subpartitions'])):
$subpartitions = $partition['subpartitions'];
else:
$subpartitions = array($partition);
endif;
?>
<?php foreach ($subpartitions as $subpartition): ?>
<tr class="<?= ($odd ? 'odd' : 'even'); ?>">
<?php if ($partitionDetails['can_have_subpartitions'] && $partitionDetails['subpartition_count'] > 1): ?>
<td>
<input type="text" name="<?= $subpartition['prefix']; ?>[name]"
value="<?= htmlspecialchars($subpartition['name']); ?>" />
</td>
<?php endif; ?>
<td>
<?= PMA\libraries\StorageEngine::getHtmlSelect(
$subpartition['prefix'] . '[engine]',
null,
$subpartition['engine'],
false,
true
); ?>
</td>
<td>
<?php //Please keep this at one line to avoid extra spaces in textarea value. ?>
<textarea name="<?= $subpartition['prefix']; ?>[comment]"><?= htmlspecialchars($subpartition['comment']); ?></textarea>
</td>
<td>
<input type="text" name="<?= $subpartition['prefix']; ?>[data_directory]"
value="<?= htmlspecialchars($subpartition['data_directory']); ?>" />
</td>
<td>
<input type="text" name="<?= $subpartition['prefix']; ?>[index_directory]"
value="<?= htmlspecialchars($subpartition['index_directory']); ?>" />
</td>
<td>
<input type="number" name="<?= $subpartition['prefix']; ?>[max_rows]"
value="<?= htmlspecialchars($subpartition['max_rows']); ?>" />
</td>
<td>
<input type="number" min="0" name="<?= $subpartition['prefix']; ?>[min_rows]"
value="<?= htmlspecialchars($subpartition['min_rows']); ?>" />
</td>
<td>
<input type="text" min="0" name="<?= $subpartition['prefix']; ?>[tablespace]"
value="<?= htmlspecialchars($subpartition['tablespace']); ?>" />
</td>
<td>
<input type="text" name="<?= $subpartition['prefix']; ?>[node_group]"
value="<?= htmlspecialchars($subpartition['node_group']); ?>" />
</td>
</tr>
<?php endforeach; ?>
<?php $odd = !$odd; ?>
<?php endforeach; ?>
</table>
<?php endif; ?>

View File

@ -0,0 +1,133 @@
<table id="table_columns" class="noclick">
<caption class="tblHeaders">
<?= __('Structure'); ?>
<?= PMA\libraries\Util::showMySQLDocu('CREATE_TABLE'); ?>
</caption>
<tr>
<th>
<?= __('Name'); ?>
</th>
<th>
<?= __('Type') , PMA\libraries\Util::showMySQLDocu('data-types'); ?>
</th>
<th>
<?= __('Length/Values') , PMA\libraries\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\').'
)
); ?>
</th>
<th>
<?= __('Default') , PMA\libraries\Util::showHint(
__(
'For default values, please enter just a single value,'
. ' without backslash escaping or quotes, using this format: a'
)
); ?>
</th>
<th>
<?= __('Collation'); ?>
</th>
<th>
<?= __('Attributes'); ?>
</th>
<th>
<?= __('Null'); ?>
</th>
<!-- Only for 'Edit' Column(s) -->
<?php if (isset($_REQUEST['change_column'])
&& ! empty($_REQUEST['change_column'])
): ?>
<th>
<?= __('Adjust privileges') , PMA\libraries\Util::showDocu('faq', 'faq6-39'); ?>
</th>
<?php endif; ?>
<?php
// 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 (!$is_backup): ?>
<th>
<?= __('Index'); ?>
</th>
<?php endif; ?>
<th>
<abbr title="AUTO_INCREMENT">A_I</abbr>
</th>
<th>
<?= __('Comments'); ?>
</th>
<?php if (PMA\libraries\Util::isVirtualColumnsSupported()): ?>
<th>
<?= __('Virtuality'); ?>
</th>
<?php endif; ?>
<?php if (isset($fields_meta)): ?>
<th>
<?= __('Move column'); ?>
</th>
<?php endif; ?>
<?php if ($mimework && $GLOBALS['cfg']['BrowseMIME']): ?>
<th>
<?= __('MIME type'); ?>
</th>
<th>
<a href="transformation_overview.php<?= PMA_URL_getCommon(); ?>#transformation"
title="<?= __('List of available transformations and their options'); ?>"
target="_blank">
<?= __('Browser display transformation'); ?>
</a>
</th>
<th>
<?= __('Browser display transformation options'); ?>
<?= PMA\libraries\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\').'
)
); ?>
</th>
<th>
<a href="transformation_overview.php<?= PMA_URL_getCommon(); ?>#input_transformation"
title="<?= __('List of available transformations and their options'); ?>"
target="_blank">
<?= __('Input transformation'); ?>
</a>
</th>
<th>
<?= __('Input transformation options'); ?>
<?= PMA\libraries\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\').'
)
); ?>
</th>
<?php endif; ?>
</tr>
<?php $odd_row = true;?>
<?php foreach($content_cells as $content_row): ?>
<tr class="<?= ($odd_row ? 'odd' : 'even'); ?>">
<?php $odd_row = !$odd_row; ?>
<?= PMA\libraries\Template::get('columns_definitions/column_attributes')
->render($content_row); ?>
</tr>
<?php endforeach; ?>
</table>
<br />

View File

@ -0,0 +1,27 @@
<select id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>"
size="1"
name="field_<?= $type;?>[<?= $columnNumber;?>]">
<option value="" title="<?= __('None'); ?>"></option>
<?php if (isset($available_mime[$type]) && is_array($available_mime[$type])): ?>
<?php foreach ($available_mime[$type] as $mimekey => $transform): ?>
<?php
$checked = isset($columnMeta['Field'])
&& isset($mime_map[$columnMeta['Field']][$type])
&& preg_match('@' . preg_quote($available_mime[$type . '_file'][$mimekey], '@') . '3?@i',
$mime_map[$columnMeta['Field']][$type]) ? 'selected ' : '';
$tooltip = PMA_getTransformationDescription(
$available_mime[$type . '_file'][$mimekey]
);
$parts = explode(":", $transform);
$name = PMA_getTransformationName(
$available_mime[$type . '_file'][$mimekey]
) . ' (' . strtolower($parts[0]) . ":" . $parts[1] . ')';
?>
<option value="<?= $available_mime[$type . '_file'][$mimekey]; ?>"
<?= $checked; ?>
title="<?= htmlspecialchars($tooltip); ?>">
<?= htmlspecialchars($name); ?>
</option>
<?php endforeach; ?>
<?php endif; ?>
</select>

View File

@ -0,0 +1,9 @@
<?php $options_key = $type_prefix . 'transformation_options'; ?>
<input id="field_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>"
type="text"
name="field_<?= $options_key; ?>[<?= $columnNumber; ?>]"
size="16"
class="textfield"
value="<?= (isset($columnMeta['Field']) && isset($mime_map[$columnMeta['Field']][$options_key])) ?
htmlspecialchars($mime_map[$columnMeta['Field']][$options_key])
: '' ?>" />

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,23 @@
<form id="create_table_form_minimal" method="post" action="tbl_create.php" class="lock-page">
<fieldset>
<legend>
<?php if (PMA\libraries\Util::showIcons('ActionLinksMode')): ?>
<?= PMA\libraries\Util::getImage('b_table_add.png'); ?>&nbsp
<?php endif; ?>
<?= __('Create table'); ?>
</legend>
<?= PMA_URL_getHiddenInputs($db); ?>
<div class="formelement">
<?= __('Name'); ?>:
<input type="text" name="table" maxlength="64" size="30" required="required" />
</div>
<div class="formelement">
<?= __('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="<?= __('Go'); ?>" />
</fieldset>
</form>

View File

@ -0,0 +1,84 @@
<table id="query_Aggregate" style="display:none;"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>
<?= __('Aggregate'); ?>
</strong>
</td>
</tr>
</thead>
<tbody>
<tr>
<td width="58" class="nowrap">
<?= __('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="<?= __('OK'); ?>" />
<input type="button"
class="butt"
name="Button"
value="<?= __('Cancel'); ?>"
onclick="document.getElementById('query_Aggregate').style.display = 'none';" />
</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="pmd" id="canvas" width="100" height="100" ></canvas>
</div>

View File

@ -0,0 +1,140 @@
<?php for ($i = 0, $l = count($GLOBALS['PMD']["TABLE_NAME"]); $i < $l; $i++) :
$t_n = $GLOBALS['PMD']["TABLE_NAME"][$i];
$t_n_url = $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>
<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; ?>_" />
<!-- Why should we put styles here?! -->
<table id="<?= $t_n_url; ?>"
cellpadding="0"
cellspacing="0"
class="pmd_tab"
style="position:absolute; left:<?= (isset($tab_pos[$t_n]) ? $tab_pos[$t_n]["X"] : rand(20, 700)); ?>px; top:<?= (isset($tab_pos[$t_n]) ? $tab_pos[$t_n]["Y"] : rand(20, 550)); ?>px; display:<?= (isset($tab_pos[$t_n]) || $display_page == -1) ? 'block;' : 'none';?>; z-index: 1;">
<thead>
<tr class="header">
<?php if (isset($_REQUEST['query'])) : ?>
<td class="select_all">
<input class="select_all_1"
type="checkbox"
style="margin: 0;"
value="select_all_<?= htmlspecialchars($t_n_url); ?>"
id="select_all_<?= htmlspecialchars($t_n_url); ?>"
title="select all"
pmd_url_table_name="<?= htmlspecialchars($t_n_url); ?>"
pmd_out_owner="<?= htmlspecialchars($GLOBALS['PMD_OUT']['OWNER'][$i]); ?>">
</td>
<?php endif; ?>
<td class="small_tab"
title="<?= __('Show/hide columns'); ?>"
id="id_hide_tbody_<?= $t_n_url; ?>"
table_name="<?= htmlspecialchars($t_n_url); ?>"
onmouseover="this.className='small_tab2';"
onmouseout="this.className='small_tab';" ><?= (! isset($tab_pos[$t_n]) || ! empty($tab_pos[$t_n]["V"])) ? 'v' : '&gt;'; ?>
</td>
<td class="small_tab_pref small_tab_pref_1"
table_name_small="<?= $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]; ?>"
onmouseover="this.className='small_tab_pref2 small_tab_pref_1';"
onmouseout="this.className='small_tab_pref small_tab_pref_1';" >
<img src="<?= $_SESSION['PMA_Theme']->getImgPath('pmd/exec_small.png'); ?>"
title="<?= __('See table structure'); ?>" />
</td>
<td id="id_zag_<?= htmlspecialchars($t_n_url); ?>"
class="tab_zag nowrap tab_zag_noquery"
onmousedown="cur_click=document.getElementById('<?= $t_n_url; ?>');"
table_name="<?= htmlspecialchars($t_n_url); ?>"
query_set="<?= isset($_REQUEST['query']) ? 1 : 0 ; ?>" >
<span class="owner">
<?= $GLOBALS['PMD_OUT']["OWNER"][$i]; ?>
</span>
<?= $GLOBALS['PMD_OUT']['TABLE_NAME_SMALL'][$i]; ?>
</td>
<?php if (isset($_REQUEST['query'])) : ?>
<td class="tab_zag tab_zag_query"
id="id_zag_<?= htmlspecialchars($t_n_url); ?>_2"
table_name="<?= htmlspecialchars($t_n_url); ?>"
onmousedown="cur_click=document.getElementById('<?= htmlspecialchars($t_n_url); ?>');">
</td>
<?php endif; ?>
</tr>
</thead>
<tbody id="id_tbody_<?= $t_n_url; ?>" style="<?= (isset($tab_pos[$t_n]) && empty($tab_pos[$t_n]["V"])) ? 'display: none' : ''; ?>">
<?php $display_field = PMA_getDisplayField(
$_GET['db'],
$GLOBALS['PMD']["TABLE_NAME_SMALL"][$i]
);
for ($j = 0, $id_cnt = count($tab_column[$t_n]["COLUMN_ID"]); $j < $id_cnt; $j++) :
$tmpColumn = $t_n . "." . $tab_column[$t_n]["COLUMN_NAME"][$j];
$click_field_param = array(
$GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i],
urlencode($tab_column[$t_n]["COLUMN_NAME"][$j])
);
if (!PMA\libraries\Util::isForeignKeySupported($GLOBALS['PMD']['TABLE_TYPE'][$i])) {
$click_field_param[] = isset($tables_pk_or_unique_keys[$tmpColumn]) ? 1 : 0;
} else {
// if foreign keys are supported, it's not necessary that the
// index is a primary key
$click_field_param[] = isset($tables_all_keys[$tmpColumn]) ? 1 : 0;
}
?>
<tr id="id_tr_<?= $GLOBALS['PMD_URL']["TABLE_NAME_SMALL"][$i]; ?>.<?= urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]); ?>"
<?= ($display_field == $tab_column[$t_n]["COLUMN_NAME"][$j]) ? 'class="tab_field_3"' : 'class="tab_field"'; ?>
onmouseover="old_class = this.className; this.className = 'tab_field_2';"
onmouseout="this.className = old_class;"
click_field_param="<?= implode($click_field_param, ','); ?>">
<?php if (isset($_REQUEST['query'])) : ?>
<td class="select_all">
<input class="select_all_store_col"
value="<?= htmlspecialchars($t_n_url) , urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]); ?>"
type="checkbox"
id="select_<?= htmlspecialchars($t_n_url); ?>._<?= urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]); ?>"
style="margin: 0;"
title="select_<?= urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]); ?>"
store_column_param="<?= urlencode($GLOBALS['PMD_OUT']["TABLE_NAME_SMALL"][$i]); ?>,<?= htmlspecialchars($GLOBALS['PMD_OUT']["OWNER"][$i]); ?>,<?= urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]); ?>">
</td>
<?php endif; ?>
<td width="10px" colspan="3" id="<?= $t_n_url; ?>.<?= urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]); ?>">
<div class="nowrap">
<?php if (isset($tables_pk_or_unique_keys[$t_n . "." . $tab_column[$t_n]["COLUMN_NAME"][$j]])) : ?>
<img src="<?= $_SESSION['PMA_Theme']->getImgPath('pmd/FieldKey_small.png'); ?>" alt="*" />
<?php else :
$type = 'pmd/Field_small';
if (strstr($tab_column[$t_n]["TYPE"][$j], 'char')
|| strstr($tab_column[$t_n]["TYPE"][$j], 'text')
) {
$type .= '_char';
} elseif (strstr($tab_column[$t_n]["TYPE"][$j], 'int')
|| strstr($tab_column[$t_n]["TYPE"][$j], 'float')
|| strstr($tab_column[$t_n]["TYPE"][$j], 'double')
|| strstr($tab_column[$t_n]["TYPE"][$j], 'decimal')
) {
$type .= '_int';
} elseif (strstr($tab_column[$t_n]["TYPE"][$j], 'date')
|| strstr($tab_column[$t_n]["TYPE"][$j], 'time')
|| strstr($tab_column[$t_n]["TYPE"][$j], 'year')
) {
$type .= '_date';
}
?>
<img src="<?= $_SESSION['PMA_Theme']->getImgPath($type); ?>.png" alt="*" />
<?php endif; ?>
<?= htmlspecialchars(
$tab_column[$t_n]["COLUMN_NAME"][$j] . " : "
. $tab_column[$t_n]["TYPE"][$j],
ENT_QUOTES
); ?>
</div>
</td>
<?php if (isset($_REQUEST['query'])) : ?>
<td class="small_tab_pref small_tab_pref_click_opt"
onmouseover="this.className='small_tab_pref2 small_tab_pref_click_opt'"
onmouseout="this.className='small_tab_pref small_tab_pref_click_opt'"
Click_option_param="pmd_optionse,<?= urlencode($tab_column[$t_n]['COLUMN_NAME'][$j]); ?>,<?= $GLOBALS['PMD_OUT']['TABLE_NAME_SMALL'][$i]; ?>" >
<img src="<?= $_SESSION['PMA_Theme']->getImgPath('pmd/exec_small.png'); ?>" title="options" />
</td>
<?php endif; ?>
</tr>
<?php endfor; ?>
</tbody>
</table>
<?php endfor; ?>

View File

@ -0,0 +1,47 @@
<table id="layer_upd_relation" style="display:none;" 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>
<?= __('Delete relation'); ?>
</strong>
</td>
</tr>
<tr>
<td colspan="3" class="center nowrap">
<input id="del_button" name="Button" type="button" class="butt" value="<?= __('Delete'); ?>" />
<input id="cancel_button" type="button" class="butt" name="Button" value="<?= __('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,11 @@
<?php $cfgRelation = PMA_getRelationsParam(); ?>
<form action="db_designer.php" method="post" name="edit_delete_pages" id="edit_delete_pages" class="ajax">
<?= PMA_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") : __("Page to delete"); ?>:
</label>
<?= PMA_getHtmlForPageSelector($cfgRelation, $db); ?>
</fieldset>
</form>

View File

@ -0,0 +1,138 @@
<table id="query_having" style="display:none;" 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">
<?= __('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">
<?= __('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">
<?= __('Except'); ?>
</option>
<option value="NOT IN">
NOT IN
</option>
</select>
</td>
</tr>
<tr>
<td class="nowrap">
<?= __('Value'); ?>
<br />
<?= __('subquery'); ?>
</td>
<td>
<textarea id="hQuery" value="" 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="<?= __('OK'); ?>" />
<input type="button"
class="butt"
name="Button"
value="<?= __('Cancel'); ?>"
onclick="document.getElementById('query_having').style.display = 'none';" />
</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,10 @@
<?php $cfgRelation = PMA_getRelationsParam(); ?>
<!-- Do not expand HTML here, invisible characters will make javascript crash -->
<div id="script_server" class="hide"><?= htmlspecialchars($GLOBALS['server']); ?></div>
<div id="script_db" class="hide"><?= htmlspecialchars($_GET['db']); ?></div>
<div id="script_token" class="hide"><?= htmlspecialchars($_GET['token']); ?></div>
<div id="script_tables" class="hide"><?= htmlspecialchars(json_encode($script_tables)); ?></div>
<div id="script_contr" class="hide"><?= htmlspecialchars(json_encode($script_contr)); ?></div>
<div id="script_display_field" class="hide"><?= htmlspecialchars(json_encode($script_display_field)); ?></div>
<div id="script_display_page" class="hide"><?= htmlspecialchars($display_page); ?></div>
<div id="pmd_tables_enabled" class="hide"><?= htmlspecialchars($cfgRelation['pdfwork']); ?></div>

View File

@ -0,0 +1,108 @@
<table id="layer_new_relation" style="display:none;" 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>
<?= __('Create relation'); ?>
</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="<?= __('OK'); ?>" />
<input type="button" id="cancel_new_rel_panel" class="butt" name="Button" value="<?= __('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,273 @@
<table id="pmd_optionse" style="display:none;" 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">
<?= __('Relation 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">
<?= __('Except'); ?>
</option>
<option value="NOT IN">
NOT IN
</option>
</select>
</td>
</tr>
<tr>
<td class="nowrap">
<?= __('Value'); ?>
<br />
<?= __('subquery'); ?>
</td>
<td>
<textarea id="Query" value="" cols="18">
</textarea>
</td>
</tr>
<tr>
<td class="center nowrap">
<b>
<?= __('Rename to'); ?>
</b>
</td>
</tr>
<tr>
<td width="58" class="nowrap">
<?= __('New name'); ?>
</td>
<td width="102">
<input type="text" value="" id="new_name"/>
</td>
</tr>
<tr>
<td class="center nowrap">
<b>
<?= __('Aggregate'); ?>
</b>
</td>
</tr>
<tr>
<td width="58" class="nowrap">
<?= __('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">
<?= __('Operator'); ?>
</td>
<td width="102">
<select name="h_operator" id="h_operator">
<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>
<td width="58" class="nowrap">
<?= __('Relation 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">
<?= __('Except'); ?>
</option>
<option value="NOT IN">
NOT IN
</option>
</select>
</td>
</tr>
<tr>
<td width="58" class="nowrap">
<?= __('Value'); ?>
<br/>
<?= __('subquery'); ?>
</td>
<td width="102">
<textarea id="having" value="" cols="18">
</textarea>
</td>
</tr>
</tbody>
<tbody>
<tr>
<td colspan="2" class="center nowrap">
<input type="button" id="ok_add_object" class="butt" name="Button" value="<?= __('OK'); ?>" />
<input type="button" id="cancel_close_option" class="butt" name="Button" value="<?= __('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,33 @@
<?php
$cfgRelation = PMA_getRelationsParam();
$choices = array(
'same' => __('Save to selected page'),
'new' => __('Create a page and save to it')
);
?>
<form action="db_designer.php" method="post" name="save_as_pages" id="save_as_pages" class="ajax">
<?= PMA_URL_getHiddenInputs($db); ?>
<fieldset id="page_save_as_options">
<table>
<tbody>
<tr>
<td>
<input type="hidden" name="operation" value="savePage" />
<?= PMA_getHtmlForPageSelector($cfgRelation, $db); ?>
</td>
</tr>
<tr>
<td>
<?= PMA\libraries\Util::getRadioFields('save_page', $choices, 'same', true); ?>
</td>
</tr>
<tr>
<td>
<label for="selected_value"><?= __('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">-- <?= __('Select page'); ?> --</option>
<?php if ($cfgRelation['pdfwork']) : $pages = PMA_getPageIdsAndNames($db); ?>
<?php foreach ($pages as $nr => $desc) : ?>
<option value="<?= $nr; ?>">
<?= htmlspecialchars($desc); ?>
</option>
<?php endforeach; ?>
<?php endif; ?>
</select>

View File

@ -0,0 +1,19 @@
<div class="panel">
<div style="clear:both;">
</div>
<div id="ab">
</div>
<div style="clear:both;">
</div>
</div>
<a class="trigger" href="#">
<?= __('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">
<?= PMA_URL_getHiddenInputs($_GET['db']); ?>
</form>
</div>

View File

@ -0,0 +1,66 @@
<table id="query_rename_to" style="display:none;" 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>
<?= __('Rename to'); ?>
</strong>
</td>
</tr>
</thead>
<tbody id="rename_to">
<tr>
<td width="58" class="nowrap">
<?= __('New name'); ?>
</td>
<td width="102">
<input type="text" value="" 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="<?= __('OK'); ?>" />
<input type="button"
class="butt"
name="Button"
value="<?= __('Cancel'); ?>"
onclick="document.getElementById('query_rename_to').style.display = 'none';" />
</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,11 @@
<form method="post" action="schema_export.php" class="disableAjax" id="id_export_pages">
<fieldset>
<?= PMA_URL_getHiddenInputs($db); ?>
<label><?= __('Select Export Relational Type'); ?></label><br/>
<?= PMA_pluginGetChoice(
'Schema', 'export_type', $export_list, 'format'
); ?>
<input type="hidden" name="page_number" value="<?= htmlspecialchars($page); ?>" />
<?= PMA_pluginGetOptions('Schema', $export_list); ?>
</fieldset>
</form>

View File

@ -0,0 +1,189 @@
<?php
function getImg($path)
{
return $_SESSION['PMA_Theme']->getImgPath($path);
}
?>
<?php if (!$visualBuilder) : ?>
<div id="name-panel" style="overflow:hidden">
<span id="page_name" style="border:none">
<?= $selected_page == null ? __("Untitled") : htmlspecialchars($selected_page); ?>
</span>
<span id="saved_state" style="border:none">
<?= $selected_page == null ? '*' : ''; ?>
</span>
</div>
<?php endif; ?>
<div class="pmd_header side-menu" id="side_menu">
<a class="M_butt" id="key_Show_left_menu" href="#">
<img title="<?= __('Show/Hide tables list'); ?>"
alt="v"
src="<?= getImg('pmd/downarrow2_m.png'); ?>"
data-down="<?= getImg('pmd/downarrow2_m.png'); ?>"
data-up="<?= getImg('pmd/uparrow2_m.png'); ?>" />
<span class="hide hidable">
<?= __('Show/Hide tables list'); ?>
</span>
</a>
<a href="#" id="toggleFullscreen" class="M_butt">
<img title="<?= __('View in fullscreen'); ?>"
src="<?= getImg('pmd/viewInFullscreen.png'); ?>"
data-enter="<?= getImg('pmd/viewInFullscreen.png'); ?>"
data-exit="<?= getImg('pmd/exitFullscreen.png'); ?>" />
<span class="hide hidable"
data-exit="<?= __('Exit fullscreen'); ?>"
data-enter="<?= __('View in fullscreen'); ?>">
<?= __('View in fullscreen'); ?>
</span>
</a>
<?php if (! $visualBuilder) : ?>
<a id="newPage" href="#" class="M_butt">
<img title="<?= __('New page'); ?>"
alt=""
src="<?= getImg('pmd/page_add.png'); ?>" />
<span class="hide hidable">
<?= __('New page'); ?>
</span>
</a>
<a href="#" id="editPage" class="M_butt ajax">
<img title="<?= __('Open page'); ?>"
src="<?= getImg('pmd/page_edit.png'); ?>" />
<span class="hide hidable">
<?= __('Open page'); ?>
</span>
</a>
<a href="#" id="savePos" class="M_butt">
<img title="<?= __('Save page'); ?>"
src="<?= getImg('pmd/save.png'); ?>" />
<span class="hide hidable">
<?= __('Save page'); ?>
</span>
</a>
<a href="#" id="SaveAs" class="M_butt ajax">
<img title="<?= __('Save page as'); ?>"
src="<?= getImg('pmd/save_as.png'); ?>" />
<span class="hide hidable">
<?= __('Save page as'); ?>
</span>
</a>
<a href="#" id="delPages" class="M_butt ajax">
<img title="<?= __('Delete pages'); ?>"
src="<?= getImg('pmd/page_delete.png'); ?>" />
<span class="hide hidable">
<?= __('Delete pages'); ?>
</span>
</a>
<a href="#" id="StartTableNew" class="M_butt">
<img title="<?= __('Create table'); ?>"
src="<?= getImg('pmd/table.png'); ?>" />
<span class="hide hidable">
<?= __('Create table'); ?>
</span>
</a>
<a href="#" class="M_butt" id="rel_button">
<img title="<?= __('Create relation'); ?>"
src="<?= getImg('pmd/relation.png'); ?>" />
<span class="hide hidable">
<?= __('Create relation'); ?>
</span>
</a>
<a href="#" class="M_butt" id="display_field_button">
<img title="<?= __('Choose column to display'); ?>"
src="<?= getImg('pmd/display_field.png'); ?>" />
<span class="hide hidable">
<?= __('Choose column to display'); ?>
</span>
</a>
<a href="#" id="reloadPage" class="M_butt">
<img title="<?= __('Reload'); ?>"
src="<?= getImg('pmd/reload.png'); ?>" />
<span class="hide hidable">
<?= __('Reload'); ?>
</span>
</a>
<a href="<?= PMA\libraries\Util::getDocuLink('faq', 'faq6-31'); ?>"
target="documentation"
class="M_butt">
<img title="<?= __('Help'); ?>"
src="<?= getImg('pmd/help.png'); ?>" />
<span class="hide hidable">
<?= __('Help'); ?>
</span>
</a>
<?php endif; ?>
<a href="#" class="<?= $params_array['angular_direct']; ?>" id="angular_direct_button">
<img title="<?= __('Angular links'); ?> / <?= __('Direct links'); ?>"
src="<?= getImg('pmd/ang_direct.png'); ?>" />
<span class="hide hidable">
<?= __('Angular links'); ?> / <?= __('Direct links'); ?>
</span>
</a>
<a href="#" class="<?= $params_array['snap_to_grid']; ?>" id="grid_button">
<img title="<?= __('Snap to grid'); ?>" src="<?= getImg('pmd/grid.png'); ?>" />
<span class="hide hidable">
<?= __('Snap to grid'); ?>
</span>
</a>
<a href="#" class="<?= $params_array['small_big_all']; ?>" id="key_SB_all">
<img title="<?= __('Small/Big All'); ?>"
alt="v"
src="<?= getImg('pmd/downarrow1.png'); ?>"
data-down="<?= getImg('pmd/downarrow1.png'); ?>"
data-right="<?= getImg('pmd/rightarrow1.png') ?>" />
<span class="hide hidable">
<?= __('Small/Big All'); ?>
</span>
</a>
<a href="#" id="SmallTabInvert" class="M_butt" >
<img title="<?= __('Toggle small/big'); ?>"
src="<?= getImg('pmd/bottom.png'); ?>" />
<span class="hide hidable">
<?= __('Toggle small/big'); ?>
</span>
</a>
<a href="#" id="relLineInvert" class="<?= $params_array['relation_lines']; ?>" >
<img title="<?= __('Toggle relation lines'); ?>"
src="<?= getImg('pmd/toggle_lines.png'); ?>" />
<span class="hide hidable">
<?= __('Toggle relation lines'); ?>
</span>
</a>
<?php if (! $visualBuilder) : ?>
<a href="#" id="exportPages" class="M_butt" >
<img title="<?= __('Export schema'); ?>"
src="<?= getImg('pmd/export.png'); ?>" />
<span class="hide hidable">
<?= __('Export schema'); ?>
</span>
</a>
<?php else: ?>
<a class="M_butt"
href="#"
onclick="build_query('SQL Query on Database', 0)"
onmousedown="return false;"
class="M_butt">
<img title="<?= __('Build Query'); ?>"
src="<?= getImg('pmd/query_builder.png'); ?>" />
<span class="hide hidable">
<?= __('Build Query'); ?>
</span>
</a>
<?php endif; ?>
<a href="#" class="<?= $params_array['side_menu']; ?>" id="key_Left_Right">
<img title="<?= __('Move Menu'); ?>" alt=">"
data-right="<?= getImg('pmd/2leftarrow_m.png'); ?>"
src="<?= getImg('pmd/2rightarrow_m.png'); ?>" />
<span class="hide hidable">
<?= __('Move Menu'); ?>
</span>
</a>
<a href="#" class="<?= $params_array['pin_text']; ?>" id="pin_Text">
<img title="<?= __('Pin text'); ?>"
alt=">"
data-right="<?= getImg('pmd/anchor.png'); ?>"
src="<?= getImg('pmd/anchor.png'); ?>" />
<span class="hide hidable">
<?= __('Pin text'); ?>
</span>
</a>
</div>

View File

@ -0,0 +1,69 @@
<div id="layer_menu" style="display:none;">
<div class="center">
<a href="#" class="M_butt" target="_self" >
<img title="<?= __('Hide/Show all'); ?>"
alt="v"
id="key_HS_all"
src="<?= $_SESSION['PMA_Theme']->getImgPath('pmd/downarrow1.png'); ?>"
data-down="<?= $_SESSION['PMA_Theme']->getImgPath('pmd/downarrow1.png'); ?>"
data-right="<?= $_SESSION['PMA_Theme']->getImgPath('pmd/rightarrow1.png'); ?>" />
</a>
<a href="#" class="M_butt" target="_self" >
<img alt="v"
id="key_HS"
title="<?= __('Hide/Show Tables with no relation'); ?>"
src="<?= $_SESSION['PMA_Theme']->getImgPath('pmd/downarrow2.png'); ?>"
data-down="<?= $_SESSION['PMA_Theme']->getImgPath('pmd/downarrow2.png'); ?>"
data-right="<?= $_SESSION['PMA_Theme']->getImgPath('pmd/rightarrow2.png'); ?>" />
</a>
</div>
<div id="id_scroll_tab" class="scroll_tab">
<table width="100%" style="padding-left: 3px;">
<?php $name_cnt = count($GLOBALS['PMD']['TABLE_NAME']);
for ($i = 0; $i < $name_cnt; $i++) :
$checked = (isset($tab_pos[$GLOBALS['PMD']["TABLE_NAME"][$i]])
&& $tab_pos[$GLOBALS['PMD']["TABLE_NAME"][$i]]["H"])
|| $display_page == -1; ?>
<tr>
<td title="<?= __('Structure'); ?>"
width="1px"
onmouseover="this.className='L_butt2_2'"
onmouseout="this.className='L_butt2_1'"
class="L_butt2_1">
<img alt=""
table_name="<?= $GLOBALS['PMD_URL']['TABLE_NAME_SMALL'][$i]; ?>"
class="scroll_tab_struct"
src="<?= $_SESSION['PMA_Theme']->getImgPath('pmd/exec.png'); ?>"/>
</td>
<td width="1px">
<input class="scroll_tab_checkbox"
title="<?= __('Hide'); ?>"
id="check_vis_<?= $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>"
style="margin:0;"
type="checkbox"
value="<?= $GLOBALS['PMD_URL']["TABLE_NAME"][$i]; ?>"
<?php if ($checked) : ?>checked="checked"<?php endif; ?> />
</td>
<td class="pmd_Tabs"
onmouseover="this.className='pmd_Tabs2'"
onmouseout="this.className='pmd_Tabs'"
pmd_url_table_name="<?= $GLOBALS['PMD_URL']['TABLE_NAME'][$i]; ?>">
<?= $GLOBALS['PMD_OUT']["TABLE_NAME"][$i]; ?>
</td>
</tr>
<?php endfor; ?>
</table>
</div>
<!-- end id_scroll_tab -->
<div class="center">
<?= __('Number of tables:'); ?> <?= $name_cnt; ?>
</div>
<div id="layer_menu_sizer" onmousedown="layer_menu_cur_click=1">
<div class="floatleft">
<img class="icon"
data-right="<?= $_SESSION['PMA_Theme']->getImgPath('pmd/resizeright.png'); ?>"
src="<?= $_SESSION['PMA_Theme']->getImgPath('pmd/resize.png'); ?>"/>
</div>
</div>
</div>
<!-- end layer_menu -->

View File

@ -0,0 +1,103 @@
<table id="query_where" style="display:none;"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">
<?= __('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">
<?= __('Except'); ?>
</option>
<option value="NOT IN">
NOT IN
</option>
</select>
</td>
</tr>
<tr>
<td class="nowrap">
<?= __('Value'); ?>
<br />
<?= __('subquery'); ?>
</td>
<td>
<textarea id="eQuery" value="" 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="<?= __('OK'); ?>" />
<input type="button" class="butt" name="Button" value="<?= __('Cancel'); ?>" onclick="document.getElementById('query_where').style.display = 'none'" />
</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,93 @@
<tbody id="tbl_summary_row">
<tr>
<th class="print_ignore"></th>
<th class="tbl_num nowrap">
<?php
printf(_ngettext('%s table', '%s tables', $num_tables),
PMA\libraries\Util::formatNumber($num_tables, 0)); ?>
</th>
<?php if ($server_slave_status): ?>
<th> <?= __('Replication'); ?> </th>
<?php endif; ?>
<?php
$sum_colspan = ($db_is_system_schema ? 4 : 7);
if ($GLOBALS['cfg']['NumFavoriteTables'] == 0) {
$sum_colspan--;
} ?>
<th colspan="<?= $sum_colspan; ?>" class="print_ignore" ><?= __('Sum'); ?></th>
<?php
$row_count_sum = PMA\libraries\Util::formatNumber($sum_entries, 0);
// If a table shows approximate rows count, display update-all-real-count anchor.
$row_sum_url = array();
if (isset($approx_rows)) {
$row_sum_url = array(
'ajax_request' => true,
'db' => $GLOBALS['db'],
'real_row_count' => 'true',
'real_row_count_all' => 'true'
);
}
$cell_text = ($approx_rows)
? '<a href="db_structure.php' . PMA_URL_getCommon($row_sum_url)
. '" class="ajax row_count_sum">' . '~' . $row_count_sum . '</a>'
: $row_count_sum;
?>
<th class="value tbl_rows"><?= $cell_text; ?></th>
<?php if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)): ?>
<?php
// MySQL <= 5.5.2
$default_engine = $GLOBALS['dbi']->fetchValue(
"SELECT @@storage_engine;"
);
if (empty($default_engine)) {
// MySQL >= 5.5.3
$default_engine = $GLOBALS['dbi']->fetchValue(
"SELECT @@default_storage_engine;"
);
}
?>
<th class="center">
<dfn title="<?php printf(__('%s is the default storage engine on this MySQL server.'),
$default_engine); ?>"><?= $default_engine; ?></dfn>
</th>
<th>
<?php if (! empty($db_collation)): ?>
<dfn title="<?= PMA_getCollationDescr($db_collation) , ' (' , __('Default') , ')'; ?>">
<?= $db_collation; ?>
</dfn>
<?php endif; ?>
</th>
<?php endif; ?>
<?php if ($is_show_stats): ?>
<?php
list($sum_formatted, $unit) = PMA\libraries\Util::formatByteDown(
$sum_size, 3, 1
);
list($overhead_formatted, $overhead_unit)
= PMA\libraries\Util::formatByteDown($overhead_size, 3, 1);
?>
<th class="value tbl_size"><?= $sum_formatted , ' ' , $unit; ?></th>
<th class="value tbl_overhead"><?= $overhead_formatted , ' ' , $overhead_unit; ?></th>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureComment']): ?>
<th></th>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureCreation']): ?>
<th class="value tbl_creation">
<?= ($create_time_all
? PMA\libraries\Util::localisedDate(strtotime($create_time_all))
: '-'); ?>
</th>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']): ?>
<th class="value tbl_last_update"><?= ($update_time_all
? PMA\libraries\Util::localisedDate(strtotime($update_time_all))
: '-'); ?></th>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureLastCheck']): ?>
<th class="value tbl_last_check"><?= ($check_time_all
? PMA\libraries\Util::localisedDate(strtotime($check_time_all))
: '-');?></th>
<?php endif; ?>
</tr>
</tbody>

View File

@ -0,0 +1,3 @@
<a href="sql.php<?= $tbl_url_query; ?>&amp;pos=0">
<?= $title; ?>
</a>

View File

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

View File

@ -0,0 +1,42 @@
<div class="clearfloat print_ignore">
<img class="selectallarrow" src="<?= $pmaThemeImage , 'arrow_' , $text_dir , '.png'; ?>" width="38" height="22" alt="<?php __('With selected:'); ?>" />
<input type="checkbox" id="tablesForm_checkall" class="checkall_box" title="<?= __('Check all'); ?>" />
<label for="tablesForm_checkall"><?= __('Check all'); ?></label>
<?php if ($overhead_check != ''): ?>
/ <a href="#" onclick="unMarkAllRows('tablesForm'); <?= $overhead_check; ?> return false;"><?= __('Check tables having overhead'); ?></a>
<?php endif; ?>
<select name="submit_mult" style="margin: 0 3em 0 3em;">
<option value="<?= __('With selected:'); ?>" selected="selected"><?= __('With selected:'); ?></option>
<option value="copy_tbl"><?= __('Copy table')?></option>
<option value="show_create" ><?= __('Show create'); ?></option>
<option value="export" ><?= __('Export'); ?></option>
<?php if (!$db_is_system_schema
&& !$GLOBALS['cfg']['DisableMultiTableMaintenance']): ?>
<optgroup label="<?= __('Delete data or table'); ?>">
<option value="empty_tbl" ><?= __('Empty'); ?></option>
<option value="drop_tbl" ><?= __('Drop'); ?></option>
</optgroup>
<optgroup label="<?= __('Table maintenance'); ?>">
<option value="analyze_tbl" ><?= __('Analyze table'); ?></option>
<option value="check_tbl" ><?= __('Check table'); ?></option>
<option value="checksum_tbl" ><?= __('Checksum table'); ?></option>
<option value="optimize_tbl" ><?= __('Optimize table'); ?></option>
<option value="repair_tbl" ><?= __('Repair table'); ?></option>
</optgroup>
<optgroup label="<?= __('Prefix'); ?>">
<option value="add_prefix_tbl" ><?= __('Add prefix to table'); ?></option>
<option value="replace_prefix_tbl" ><?= __('Replace table prefix'); ?></option>
<option value="copy_tbl_change_prefix" ><?= __('Copy table with prefix'); ?></option>
</optgroup>
<?php endif; ?>
<?php if (isset($GLOBALS['cfgRelation']['centralcolumnswork'])
&& $GLOBALS['cfgRelation']['centralcolumnswork']): ?>
<optgroup label="<?= __('Central columns'); ?>">
<option value="sync_unique_columns_central_list" ><?= __('Add columns to central list'); ?></option>
<option value="delete_unique_columns_central_list" ><?= __('Remove columns from central list'); ?></option>
<option value="make_consistent_with_central_list" ><?= __('Make consistent with central list'); ?></option>
</optgroup>
<?php endif; ?>
</select>
<?= implode("\n", $hidden_fields); ?>
</div>

View File

@ -0,0 +1,3 @@
<a class="truncate_table_anchor ajax" href="sql.php<?= $tbl_url_query; ?>&amp;sql_query=<?= $sql_query; ?>&amp;message_to_show=<?= $message_to_show; ?>">
<?= $title; ?>
</a>

View File

@ -0,0 +1,15 @@
<?php
// Check if current table is already in favorite list.
$fav_params = array('db' => $db,
'ajax_request' => true,
'favorite_table' => $current_table['TABLE_NAME'],
(($already_favorite ? 'remove' : 'add') . '_favorite') => true
);
?>
<a id="<?= md5($current_table['TABLE_NAME']); ?>_favorite_anchor"
class="ajax favorite_table_anchor"
href="<?= 'db_structure.php' , PMA_URL_getCommon($fav_params); ?>"
title="<?= $already_favorite ? __("Remove from Favorites") : __("Add to Favorites"); ?>"
data-favtargets="<?= md5($db . "." . $current_table['TABLE_NAME']); ?>" >
<?= !$already_favorite ? $titles['NoFavorite'] : $titles['Favorite']; ?>
</a>

View File

@ -0,0 +1,7 @@
<p class="print_ignore">
<a href="#" id="printView">
<?= PMA\libraries\Util::getIcon('b_print.png', __('Print'), true); ?>
</a>
<a href="db_datadict.php<?= $url_query; ?>" target="print_view">
<?= PMA\libraries\Util::getIcon('b_tblanalyse.png', __('Data dictionary'), true); ?></a>
</p>

View File

@ -0,0 +1,3 @@
<a href="tbl_select.php<?= $tbl_url_query; ?>">
<?= $title; ?>
</a>

View File

@ -0,0 +1,35 @@
<div class="show_create_results">
<h2><?= __('Showing create queries'); ?></h2>
<?php
$views = array();
$tables = array();
foreach ($db_objects as $object) {
if ($GLOBALS['dbi']->getTable($db, $object)->isView()) {
$views [] = $object;
} else {
$tables [] = $object;
}
}
?>
<?php if (! empty($tables)): ?>
<?= PMA\libraries\Template::get('database/structure/show_create_row')->render(
array(
'db' => $db,
'title' => __('Tables'),
'raw_title' => 'Table',
'db_objects' => $tables
)
) ?>
<?php endif; ?>
<?php if (! empty($views)): ?>
<?= PMA\libraries\Template::get('database/structure/show_create_row')->render(
array(
'db' => $db,
'title' => __('Views'),
'raw_title' => 'View',
'db_objects' => $views
)
) ?>
<?php endif; ?>
</div>

View File

@ -0,0 +1,22 @@
<fieldset>
<legend><?= $title; ?></legend>
<table class="show_create">
<thead>
<tr>
<th><?= $raw_title; ?></th>
<th>Create <?= $raw_title; ?></th>
</tr>
</thead>
<tbody>
<?php $odd = true; ?>
<?php foreach ($db_objects as $object): ?>
<?php $row_class = ($odd) ? 'odd' : 'even'; ?>
<tr class="<?= $row_class; ?>">
<td><strong><?= PMA_mimeDefaultFunction($object); ?></strong></td>
<td><?= PMA_mimeDefaultFunction($GLOBALS['dbi']->getTable($db, $object)->showCreate()); ?></td>
</tr>
<?php $odd = ! $odd; ?>
<?php endforeach; ?>
</tbody>
</table>
</fieldset>

View File

@ -0,0 +1,70 @@
<?php
$requested_sort = 'table';
$requested_sort_order = $future_sort_order = $initial_sort_order;
// If the user requested a sort
if (isset($_REQUEST['sort'])) {
$requested_sort = $_REQUEST['sort'];
if (isset($_REQUEST['sort_order'])) {
$requested_sort_order = $_REQUEST['sort_order'];
}
}
$order_img = '';
$order_link_params = array();
$order_link_params['title'] = __('Sort');
// If this column was requested to be sorted.
if ($requested_sort == $sort) {
if ($requested_sort_order == 'ASC') {
$future_sort_order = 'DESC';
// current sort order is ASC
$order_img = ' ' . PMA\libraries\Util::getImage(
's_asc.png',
__('Ascending'),
array('class' => 'sort_arrow', 'title' => '')
);
$order_img .= ' ' . PMA\libraries\Util::getImage(
's_desc.png',
__('Descending'),
array('class' => 'sort_arrow hide', 'title' => '')
);
// but on mouse over, show the reverse order (DESC)
$order_link_params['onmouseover'] = "$('.sort_arrow').toggle();";
// on mouse out, show current sort order (ASC)
$order_link_params['onmouseout'] = "$('.sort_arrow').toggle();";
} else {
$future_sort_order = 'ASC';
// current sort order is DESC
$order_img = ' ' . PMA\libraries\Util::getImage(
's_asc.png',
__('Ascending'),
array('class' => 'sort_arrow hide', 'title' => '')
);
$order_img .= ' ' . PMA\libraries\Util::getImage(
's_desc.png',
__('Descending'),
array('class' => 'sort_arrow', 'title' => '')
);
// but on mouse over, show the reverse order (ASC)
$order_link_params['onmouseover'] = "$('.sort_arrow').toggle();";
// on mouse out, show current sort order (DESC)
$order_link_params['onmouseout'] = "$('.sort_arrow').toggle();";
}
}
$_url_params = array(
'db' => $_REQUEST['db'],
'pos' => 0, // We set the position back to 0 every time they sort.
'sort' => $sort,
'sort_order' => $future_sort_order,
);
if (PMA_isValid($_REQUEST['tbl_type'], array('view', 'table'))) {
$_url_params['tbl_type'] = $_REQUEST['tbl_type'];
}
if (! empty($_REQUEST['tbl_group'])) {
$_url_params['tbl_group'] = $_REQUEST['tbl_group'];
}
$url = 'db_structure.php' . PMA_URL_getCommon($_url_params);
echo PMA\libraries\Util::linkOrButton(
$url, $title . $order_img, $order_link_params
);

View File

@ -0,0 +1,187 @@
<tr class="<?= ($odd_row ? 'odd' : 'even') , ($table_is_view ? ' is_view' : '') ?>"
id="row_tbl_<?= $curr; ?>">
<td class="center print_ignore">
<input type="checkbox"
name="selected_tbl[]"
class="checkall"
value="<?= htmlspecialchars($current_table['TABLE_NAME']); ?>"
id="checkbox_tbl_<?= $curr; ?>" />
</td>
<th>
<?= $browse_table_label , $tracking_icon; ?>
</th>
<?php if ($server_slave_status): ?>
<td class="center">
<?= ($ignored ? PMA\libraries\Util::getImage('s_cancel.png', __('Not replicated')) : ''); ?>
<?= ($do ? PMA\libraries\Util::getImage('s_success.png', __('Replicated')) : ''); ?>
</td>
<?php endif; ?>
<?php
//Favorite table anchor.
?>
<?php if ($GLOBALS['cfg']['NumFavoriteTables'] > 0): ?>
<td class="center print_ignore">
<?= PMA\libraries\Template::get('database/structure/favorite_anchor')->render(
array(
'db' => $db,
'current_table' => $current_table,
'titles' => $titles,
'already_favorite' => $already_favorite
)
); ?>
</td>
<?php endif; ?>
<td class="center print_ignore">
<?= $browse_table; ?>
</td>
<td class="center print_ignore">
<a href="tbl_structure.php<?= $tbl_url_query; ?>">
<?= $titles['Structure']; ?>
</a>
</td>
<td class="center print_ignore">
<?= $search_table; ?>
</td>
<?php if (!$db_is_system_schema): ?>
<td class="insert_table center print_ignore">
<a href="tbl_change.php<?= $tbl_url_query; ?>"><?= $titles['Insert']; ?></a>
</td>
<td class="center print_ignore"><?= $empty_table; ?></td>
<td class="center print_ignore">
<a class="ajax drop_table_anchor <?= ($table_is_view || $current_table['ENGINE'] == null) ? ' view' : '' ?>"
href="sql.php<?= $tbl_url_query; ?>&amp;reload=1&amp;purge=1&amp;sql_query=<?= urlencode($drop_query); ?>&amp;message_to_show=<?= urlencode($drop_message); ?>" >
<?= $titles['Drop']; ?>
</a>
</td>
<?php endif; ?>
<?php if (isset($current_table['TABLE_ROWS']) &&
($current_table['ENGINE'] != null || $table_is_view)): ?>
<?php
// Get the row count.
$row_count = PMA\libraries\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="<?= htmlspecialchars($current_table['TABLE_NAME']); ?>">
<?php if ($approx_rows): ?>
<a href="db_structure.php<?= PMA_URL_getCommon(
array(
'ajax_request' => true,
'db' => $GLOBALS['db'],
'table' => $current_table['TABLE_NAME'],
'real_row_count' => 'true'
)
); ?>" class="ajax real_row_count">
<bdi>
~<?= $row_count; ?>
</bdi>
</a>
<?php else: ?>
<?= $row_count; ?>
<?php endif; ?>
<?= $show_superscript; ?>
</td>
<?php if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)): ?>
<td class="nowrap">
<?php if (!empty($current_table['ENGINE'])): ?>
<?= $current_table['ENGINE']; ?>
<?php elseif ($table_is_view): ?>
<?= __('View'); ?>
<?php endif; ?>
</td>
<?php if (mb_strlen($collation)): ?>
<td class="nowrap">
<?= $collation; ?>
</td>
<?php endif; ?>
<?php endif; ?>
<?php if ($is_show_stats): ?>
<td class="value tbl_size">
<a href="tbl_structure.php<?= $tbl_url_query ?>#showusage">
<span><?= $formatted_size; ?></span>
<span class="unit"><?= $unit; ?></span>
</a>
</td>
<td class="value tbl_overhead">
<?= $overhead; ?>
</td>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureComment']): ?>
<?php $comment = $current_table['Comment']; ?>
<td>
<?php if (mb_strlen($comment) > $GLOBALS['cfg']['LimitChars']): ?>
<abbr title="<?= htmlspecialchars($comment); ?>">
<?= htmlspecialchars(
mb_substr(
$comment, 0, $GLOBALS['cfg']['LimitChars']
)
); ?>
...
</abbr>
<?php else: ?>
<?= htmlspecialchars($comment); ?>
<?php endif; ?>
</td>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureCreation']): ?>
<td class="value tbl_creation">
<?= $create_time ? PMA\libraries\Util::localisedDate(strtotime($create_time)) : '-'; ?>
</td>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']): ?>
<td class="value tbl_last_update">
<?= $update_time ? PMA\libraries\Util::localisedDate(strtotime($update_time)) : '-'; ?>
</td>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureLastCheck']): ?>
<td class="value tbl_last_check">
<?= $check_time ? PMA\libraries\Util::localisedDate(strtotime($check_time)) : '-'; ?>
</td>
<?php endif; ?>
<?php elseif ($table_is_view): ?>
<td class="value tbl_rows">-</td>
<td class="nowrap">
<?= __('View'); ?>
</td>
<td class="nowrap">---</td>
<?php if ($is_show_stats): ?>
<td class="value tbl_size">-</td>
<td class="value tbl_overhead">-</td>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureComment']): ?>
<td></td>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureCreation']): ?>
<td class="value tbl_creation">-</td>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']): ?>
<td class="value tbl_last_update">-</td>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureLastCheck']): ?>
<td class="value tbl_last_check">-</td>
<?php endif; ?>
<?php else: ?>
<td colspan="<?= $colspan_for_structure - ($db_is_system_schema ? 6 : 9); ?>"
class="center">
<?= __('in use'); ?>
</td>
<?php endif; ?>
</tr>

View File

@ -0,0 +1,126 @@
<?php
$cnt = 0; // Let's count the columns...
if ($db_is_system_schema) {
$action_colspan = 3;
} else {
$action_colspan = 6;
}
if ($GLOBALS['cfg']['NumFavoriteTables'] > 0) {
$action_colspan++;
}
?>
<form method="post" action="db_structure.php" name="tablesForm" id="tablesForm">
<?= PMA_URL_getHiddenInputs($db); ?>
<table class="data">
<thead>
<tr>
<th class="print_ignore"></th>
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
array(
'title' => __('Table'),
'sort' => 'table',
'initial_sort_order' => 'ASC'
)
); ?></th>
<?php if ($replication): ?>
<th><?= __('Replication'); ?></th>
<?php endif; ?>
<th colspan="<?= $action_colspan; ?>" class="print_ignore">
<?= __('Action'); ?>
</th>
<!-- larger values are more interesting so default sort order is DESC-->
<th>
<?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
array(
'title' => __('Rows'),
'sort' => 'records',
'initial_sort_order' => 'DESC'
)
); ?>
<?= PMA\libraries\Util::showHint(PMA_sanitize(
__('May be approximate. Click on the number to get the exact'
. ' count. See [doc@faq3-11]FAQ 3.11[/doc].'))); ?>
</th>
<?php if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)): ?>
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
array(
'title' => __('Type'),
'sort' => 'type',
'initial_sort_order' => 'ASC'
)
); $cnt++; ?></th>
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
array(
'title' => __('Collation'),
'sort' => 'collation',
'initial_sort_order' => 'ASC'
)
); $cnt++; ?></th>
<?php endif; ?>
<?php if ($GLOBALS['is_show_stats']): ?>
<!-- larger values are more interesting so default sort order is DESC -->
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
array(
'title' => __('Size'),
'sort' => 'size',
'initial_sort_order' => 'DESC'
)
); $cnt++; ?></th>
<!-- larger values are more interesting so default sort order is DESC -->
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
array(
'title' => __('Overhead'),
'sort' => 'overhead',
'initial_sort_order' => 'DESC'
)
); $cnt++; ?></th>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureComment']): ?>
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
array(
'title' => __('Comment'),
'sort' => 'comment',
'initial_sort_order' => 'ASC'
)
); $cnt++; ?></th>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureCreation']): ?>
<!-- newer values are more interesting so default sort order is DESC -->
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
array(
'title' => __('Creation'),
'sort' => 'creation',
'initial_sort_order' => 'DESC'
)
); $cnt++; ?></th>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureLastUpdate']): ?>
<!-- newer values are more interesting so default sort order is DESC -->
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
array(
'title' => __('Last update'),
'sort' => 'last_update',
'initial_sort_order' => 'DESC'
)
); $cnt++; ?></th>
<?php endif; ?>
<?php if ($GLOBALS['cfg']['ShowDbStructureLastCheck']): ?>
<!-- newer values are more interesting so default sort order is DESC -->
<th><?= PMA\libraries\Template::get('database/structure/sortable_header')->render(
array(
'title' => __('Last check'),
'sort' => 'last_check',
'initial_sort_order' => 'DESC'
)
); $cnt++; ?></th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<?php $GLOBALS['colspan_for_structure'] = $cnt + $action_colspan + 3; ?>

View File

@ -0,0 +1,11 @@
<a href="tbl_tracking.php<?= $url_query; ?>&amp;table=<?= $truename; ?>">
<?php if ($is_tracked): ?>
<?= PMA\libraries\Util::getImage(
'eye.png', __('Tracking is active.')
); ?>
<?php else: ?>
<?= PMA\libraries\Util::getImage(
'eye_grey.png', __('Tracking is not active.')
); ?>
<?php endif; ?>
</a>

View File

@ -0,0 +1,34 @@
<form action="error_report.php" method="post" name="report_frm" id="report_frm"
class="ajax">
<fieldset style="padding-top:0">
<p>
<?= __(
'This report automatically includes data about the error and'
. ' information about relevant configuration settings.'
. ' It will be sent to the phpMyAdmin team for debugging the error.'
) ?>
</p>
<div class="label"><label><strong>
<?= __('Can you tell us the steps leading to this error? It decisively helps in debugging:') ?>
</strong></label>
</div>
<textarea class="report-description" name="description"
id="report_description"></textarea>
<div class="label"><label><p>
<?= __('You may examine the data in the error report:') ?>
</p></label></div>
<pre class="report-data"><?= htmlspecialchars($report_data) ?></pre>
<input type="checkbox" name="always_send" id="always_send_checkbox" />
<label for="always_send_checkbox">
<?= __('Automatically send report next time') ?>
</label>
</fieldset>
<?= $hidden_inputs ?>
<?= $hidden_fields ?>
</form>

View File

@ -0,0 +1,32 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Manage HTML redirection
*
* @package PhpMyAdmin-template
*
* @param string $uri Redirection location
*/
$uri = isset($uri) ? $uri : null;
?>
<html>
<head>
<title>- - -</title>
<meta http-equiv="expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Refresh" content="0;url=<?= htmlspecialchars($uri) ?>">
<script type="text/javascript">
//<![CDATA[
setTimeout("window.location = decodeURI('<?= PMA_escapeJsString($uri) ?>')", 2000);
//]]>
</script>
</head>
<body>
<script type="text/javascript">
//<![CDATA[
document.write('<p><a href="<?= PMA_escapeJsString(htmlspecialchars($uri)) ?>"><?php echo __('Go') ?></a></p>');
//]]>
</script>
</body>
</html>

View File

@ -0,0 +1,7 @@
<script type="text/javascript">
if (typeof configInlineParams === "undefined" || !Array.isArray(configInlineParams)) configInlineParams = [];
configInlineParams.push(function() {
<?= implode(";\n", $js_array); ?>;
});
if (typeof configScriptLoaded !== "undefined" && configInlineParams) loadInlineConfig();
</script>

View File

@ -0,0 +1,45 @@
<?php
/**
* Display item of a list.
*
* $content - mandatory string - Content to display
* $id - optional string - Contains the id of li tag
* $class - optional string - Contains the class name(s) of li tag
* $mysql_help_page - optional string - Related help page
* $url - optional array: - href - optional string - Destination page or anchor
* - target - optional string - Target of link
* - class - optional string - Class of link
* - title - optional string - Title of link
*/
?>
<li <?= !empty($id) ? ' id="' . $id . '"' : null ?>
<?= !empty($class) ? ' class="' . $class . '"' : null ?>>
<?php if (isset($url) && is_array($url) && array_filter($url)) : ?>
<a<?= !empty($url['href']) ? ' href="' . $url['href'] . '"' : null ?>
<?= !empty($url['target'])
? ' target="' . $url['target'] . '"'
: null;
?>
<?= !empty($url['target']) && $url['target'] == '_blank'
? ' rel="noopener noreferrer"'
: null;
?>
<?= !empty($url['id']) ? ' id="' . $url['id'] . '"' : null; ?>
<?= !empty($url['class'])
? ' class="' . $url['class'] . '"'
: null;
?>
<?= !empty($url['title'])
? ' title="' . $url['title'] . '"'
: null;
?>>
<?php endif; ?>
<?= $content ?>
<?php if (isset($url) && is_array($url) && array_filter($url)) : ?>
</a>
<?php endif; ?>
<?php if (!empty($mysql_help_page)): ?>
<?= PMA\libraries\Util::showMySQLDocu($mysql_help_page) ?>
<?php endif; ?>
</li>

View File

@ -0,0 +1,27 @@
<?php
/**
* Display unordered list.
*
* $class - optional string - Contains the class name(s) of ul tag
* $id - optional string - Contains the id of ul tag
* $item - mandatory string|array - If string, this is the content
* - Else, see templates/list/item.phtml
* $content - mandatory string - Content to display if $item is empty
*/
?>
<ul<?= !empty($class) ? ' class="' . $class . '"' : null ?>
<?= !empty($id) ? ' id="' . $id . '"' : null ?>>
<?php if (!empty($items)): ?>
<?php foreach ($items as $item): ?>
<?php if (!is_array($item)): ?>
<?php $item = array('content' => $item) ?>
<?php endif; ?>
<?= PMA\libraries\Template::get('list/item')
->render($item)
?>
<?php endforeach; ?>
<?php elseif (!empty($content)): ?>
<?= $content ?>
<?php endif; ?>
</ul>

View File

@ -0,0 +1,45 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Manage logo display
*
* @package PhpMyAdmin-template
*
* @param bool $displayLogo Display logo or not
* @param bool $useLogoLink Use link on logo or not
* @param string $logoLink Destination of link on logo
* @param string $linkAttribs Link's attributes
*/
$displayLogo = isset($displayLogo) ? $displayLogo : true;
$useLogoLink = isset($useLogoLink) ? $useLogoLink : false;
$logoLink = isset($logoLink) ? $logoLink : '#';
$linkAttribs = isset($linkAttribs) ? $linkAttribs : null;
if (!isset($logo)) {
$logo = null;
if (isset($GLOBALS['pmaThemeImage'])) {
$imgTag = '<img src="' . $GLOBALS['pmaThemeImage'] . '%s" '
. 'alt="phpMyAdmin" id="imgpmalogo" />';
if (@file_exists($GLOBALS['pmaThemeImage'] . 'logo_left.png')) {
$logo = sprintf($imgTag, 'logo_left.png');
} elseif (@file_exists($GLOBALS['pmaThemeImage'] . 'pma_logo2.png')) {
$logo = sprintf($imgTag, 'pma_logo2.png');
}
}
}
?>
<!-- LOGO START -->
<?php if (false === $displayLogo) : ?>
<!-- LOGO END -->
<?php return;
endif;
?>
<div id="pmalogo">
<?php if (true === $useLogoLink) : ?>
<a href="<?= $logoLink; ?>"<?= isset($linkAttribs) ? ' ' . $linkAttribs : null; ?>>
<?php endif; ?>
<?= $logo; ?>
<?php if (true === $useLogoLink) : ?>
</a>
<?php endif; ?>
</div>
<!-- LOGO END -->

View File

@ -0,0 +1,15 @@
<div id="prefs_autoload" class="notice print_ignore" style="display:none">
<form action="prefs_manage.php" method="post" class="disableAjax">
<?= $hiddenInputs; ?>
<input type="hidden" name="json" value="" />
<input type="hidden" name="submit_import" value="1" />
<input type="hidden" name="return_url" value="<?= $return_url ?>" />
<?= __(
'Your browser has phpMyAdmin configuration for this domain. '
. 'Would you like to import it for current session?'
) ?>
<br />
<a href="#yes"><?= __('Yes') ?></a>
/ <a href="#no"><?= __('No') ?></a>
</form>
</div>

View File

@ -0,0 +1,11 @@
<div class="preview_sql">
<?php if (empty($query_data)): ?>
<?= __('No change'); ?>
<?php elseif (is_array($query_data)): ?>
<?php foreach ($query_data as $query): ?>
<?= PMA\libraries\Util::formatSql($query); ?>
<?php endforeach; ?>
<?php else: ?>
<?= PMA\libraries\Util::formatSql($query_data); ?>
<?php endif; ?>
</div>

View File

@ -0,0 +1,16 @@
<?php use PMA\libraries\Util; ?>
<label for="text_dbname"><?= __('Add privileges on the following database(s):'); ?></label>
<?php if (! empty($databases)) : ?>
<select name="pred_dbname[]" multiple="multiple">
<?php foreach ($databases as $database) : ?>
<?php $escapedDatabase = Util::escapeMysqlWildcards($database); ?>
<option value="<?= htmlspecialchars($escapedDatabase); ?>">
<?= htmlspecialchars($database); ?>
</option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<input type="text" id="text_dbname" name="dbname" />
<?= Util::showHint(__('Wildcards % and _ should be escaped with a \ to use them literally.'))?>

View File

@ -0,0 +1,14 @@
<input type="hidden" name="dbname" value="<?= htmlspecialchars($database); ?>"/>
<label for="text_routinename"><?= __('Add privileges on the following routine:'); ?></label>
<?php if (! empty($routines)) : ?>
<select name="pred_routinename" class="autosubmit">
<option value="" selected="selected"><?= __('Use text field'); ?>:</option>
<?php foreach ($routines as $routine) : ?>
<option value="<?= htmlspecialchars($routine); ?>"><?= htmlspecialchars($routine); ?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<input type="text" id="text_routinename" name="routinename" />

View File

@ -0,0 +1,14 @@
<input type="hidden" name="dbname" value="<?= htmlspecialchars($database); ?>"/>
<label for="text_tablename"><?= __('Add privileges on the following table:'); ?></label>
<?php if (! empty($tables)) : ?>
<select name="pred_tablename" class="autosubmit">
<option value="" selected="selected"><?= __('Use text field'); ?>:</option>
<?php foreach ($tables as $table) : ?>
<option value="<?= htmlspecialchars($table); ?>"><?= htmlspecialchars($table); ?></option>
<?php endforeach; ?>
</select>
<?php endif; ?>
<input type="text" id="text_tablename" name="tablename" />

View File

@ -0,0 +1,26 @@
<div id="edit_user_dialog">
<?= $header; ?>
<form class="submenu-item" name="usersForm" id="addUsersForm" action="server_privileges.php" method="post">
<?= PMA_URL_getHiddenInputs(); ?>
<input type="hidden" name="username" value="<?= htmlspecialchars($username); ?>">
<input type="hidden" name="hostname" value="<?= htmlspecialchars($hostname); ?>">
<input type="hidden" name="dbname" value="<?= htmlspecialchars($database); ?>">
<input type="hidden" name="routinename" value="<?= htmlspecialchars($routine); ?>">
<input type="hidden" name="grant_count" value="<?= $grantCount; ?>">
<fieldset id="fieldset_user_global_rights">
<legend data-submenu-label="<?= __('Routine')?>">
<?= __('Routine-specific privileges'); ?>
</legend>
<p>
<small>
<i><?= __('Note: MySQL privilege names are expressed in English.'); ?></i>
</small>
</p>
<?= $privCheckboxes; ?>
</fieldset>
<fieldset id="fieldset_user_privtable_footer" class="tblFooters">
<input type="hidden" name="update_privs" value="1">
<input type="submit" value="<?= __('Go')?>">
</fieldset>
</form>
</div>

View File

@ -0,0 +1,68 @@
<?php use PMA\libraries\Template; ?>
<form class="submenu-item" action="server_privileges.php" id="<?= $formId; ?>" method="post">
<?= PMA_URL_getHiddenInputs(); ?>
<input type="hidden" name="username" value="<?= htmlspecialchars($userName); ?>" />
<input type="hidden" name="hostname" value="<?= htmlspecialchars($hostName); ?>" />
<fieldset>
<legend data-submenu-label="<?= $subMenuLabel; ?>">
<?= $legend; ?>
</legend>
<table class="data">
<thead>
<tr>
<th><?= $typeLabel; ?></th>
<th><?= __('Privileges'); ?></th>
<th><?= __('Grant'); ?></th>
<?php if ($type == 'database') : ?>
<th><?= __('Table-specific privileges'); ?></th>
<?php elseif ($type == 'table') : ?>
<th><?= __('Column-specific privileges'); ?></th>
<?php endif; ?>
<th colspan="2"><?= __('Action'); ?></th>
</tr>
</thead>
<tbody>
<?php if (count($privileges) == 0) : ?>
<?php $colspan = ($type == 'database' ? 7 : ($type == 'table' ? 6 : 5)); ?>
<tr class="odd">
<td colspan="<?= $colspan; ?>"><center><i><?= __('None') ?></i></center></td>
</tr>
<?php else : ?>
<?php $odd = true; ?>
<?php foreach ($privileges as $privilege) : ?>
<?= Template::get('privileges/privileges_summary_row')
->render(
array_merge(
$privilege,
array(
'odd' => $odd,
'type' => $type,
)
)
); ?>
<?php $odd = !$odd; ?>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
<?php if ($type == 'database') : ?>
<?= Template::get('privileges/add_privileges_database')
->render(array('databases' => $databases)); ?>
<?php elseif ($type == 'table') : ?>
<?= Template::get('privileges/add_privileges_table')
->render(array('database' => $database, 'tables' => $tables)); ?>
<?php else: // routine ?>
<?= Template::get('privileges/add_privileges_routine')
->render(array('database' => $database, 'routines' => $routines)); ?>
<?php endif; ?>
</fieldset>
<fieldset class="tblFooters">
<input type="submit" value="<?= __('Go'); ?>" />
</fieldset>
</form>

View File

@ -0,0 +1,14 @@
<tr class="<?= ($odd ? 'odd' : 'even'); ?>">
<td><?= htmlspecialchars($name); ?></td>
<td><code><?= $privileges; ?></code></td>
<td><?= ($grant ? __('Yes') : __('No')); ?></td>
<?php if ($type == 'database') : ?>
<td><?= ($tablePrivs ? __('Yes') : __('No')); ?></td>
<?php elseif ($type == 'table') : ?>
<td><?= ($columnPrivs ? __('Yes') : __('No')); ?></td>
<?php endif; ?>
<td><?= $editLink; ?></td>
<td><?= $revokeLink; ?></td>
</tr>

View File

@ -0,0 +1,6 @@
<ul id="topmenu2">
<?php foreach ($sub_tabs as $tab): ?>
<?= PMA\libraries\Util::getHtmlTab($tab, $url_params); ?>
<?php endforeach; ?>
</ul>
<div class="clearfloat"></div>

View File

@ -0,0 +1,8 @@
<tr class="noclick <?= ($odd_row ? 'odd' : 'even'); ?>">
<td><?= $value['Log_name']; ?></td>
<td class="right"><?= $value['Pos']; ?></td>
<td><?= $value['Event_type']; ?></td>
<td class="right"><?= $value['Server_id']; ?></td>
<td class="right"><?= (isset($value['Orig_log_pos']) ? $value['Orig_log_pos'] : $value['End_log_pos']); ?></td>
<td><?= \PMA\libraries\Util::formatSql($value['Info'], ! $dontlimitchars); ?></td>
</tr>

View File

@ -0,0 +1,27 @@
<form action="server_binlog.php" method="get">
<?= PMA_URL_getHiddenInputs($url_params); ?>
<fieldset>
<legend>
<?= __('Select binary log to view'); ?>
</legend>
<?php $full_size = 0; ?>
<select name="log">
<?php foreach ($binary_logs as $each_log): ?>
<option value="<?= htmlspecialchars($each_log['Log_name']); ?>"<?= ($each_log['Log_name'] == $_REQUEST['log'] ? ' selected="selected"' : ''); ?>>
<?= htmlspecialchars($each_log['Log_name']); ?>
<?php if (isset($each_log['File_size'])): ?>
(<?= implode(' ', \PMA\libraries\Util::formatByteDown($each_log['File_size'], 3, 2)); ?>)
<?php $full_size += $each_log['File_size']; ?>
<?php endif; ?>
</option>
<?php endforeach; ?>
</select>
<?= count($binary_logs) . ' ' . __('Files') . ', '; ?>
<?php if ($full_size > 0): ?>
<?= implode(' ', \PMA\libraries\Util::formatByteDown($full_size)); ?>
<?php endif; ?>
</fieldset>
<fieldset class="tblFooters">
<input type="submit" value="<?= __('Go'); ?>" />
</fieldset>
</form>

View File

@ -0,0 +1,30 @@
<div id="div_mysql_charset_collations">
<table class="data noclick">
<tr>
<th id="collationHeader"><?= __('Collation'); ?></th>
<th><?= __('Description'); ?></th>
</tr>
<?php foreach ($mysqlCharsets as $current_charset): ?>
<tr>
<th colspan="2" class="right">
<?= htmlspecialchars($current_charset); ?>
<?php if (! empty($mysqlCharsetsDesc[$current_charset])): ?>
(<i><?= htmlspecialchars($mysqlCharsetsDesc[$current_charset]); ?></i>)
<?php endif; ?>
</th>
</tr>
<?php $odd_row = true; ?>
<?php foreach ($mysqlCollations[$current_charset] as $current_collation): ?>
<tr class="
<?= ($odd_row ? 'odd' : 'even'); ?>
<?= ($mysqlDftCollations[$current_charset] == $current_collation ? ' marked' : ''); ?>
<?= ($mysqlCollAvailable[$current_collation] ? '' : ' disabled'); ?>
">
<td><?= htmlspecialchars($current_collation); ?></td>
<td><?= PMA_getCollationDescr($current_collation); ?></td>
</tr>
<?php $odd_row = ! $odd_row; ?>
<?php endforeach; ?>
<?php endforeach; ?>
</table>
</div>

View File

@ -0,0 +1,36 @@
<ul>
<li id="li_create_database" class="no_bullets">
<?php if ($GLOBALS['is_create_db_priv']): ?>
<form method="post" action="server_databases.php" id="create_database_form" class="ajax">
<strong>
<label for="text_create_db">
<?= \PMA\libraries\Util::getImage('b_newdb.png') , ' ' , __('Create database'); ?>
</label>&nbsp;<?= \PMA\libraries\Util::showMySQLDocu('CREATE_DATABASE'); ?>
</strong>
<br />
<?= PMA_URL_getHiddenInputs('', '', 5); ?>
<input type="hidden" name="reload" value="1" />
<?php if (! empty($dbstats)): ?>
<input type="hidden" name="dbstats" value="1" />
<?php endif; ?>
<input type="text" name="new_db" value="<?= htmlspecialchars($GLOBALS['db_to_create']); ?>"
maxlength="64" class="textfield" id="text_create_db" required
placeholder="<?= __('Database name'); ?>" />
<?= PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', null, null, true); ?>
<input type="submit" value="<?= __('Create'); ?>" id="buttonGo" />
</form>
<?php else: ?>
<!-- db creation no privileges message -->
<strong>
<?= \PMA\libraries\Util::getImage('b_newdb.png') , ' ' , __('Create database'); ?>&nbsp;<?= \PMA\libraries\Util::showMySQLDocu('CREATE_DATABASE'); ?>
</strong>
<br />
<span class="noPrivileges">
<?= \PMA\libraries\Util::getImage('s_error2.png', '', array('hspace' => 2, 'border' => 0, 'align' => 'middle')) , ' ' , __('No Privileges'); ?>
</span>
<?php endif; ?>
</li>
</ul>

View File

@ -0,0 +1,42 @@
<tfoot>
<tr>
<?php if ($GLOBALS['is_superuser'] || $GLOBALS['cfg']['AllowUserDropDatabase']): ?>
<th></th>
<?php endif; ?>
<th>
<?= __('Total'); ?>: <span id="databases_count"><?= $databaseCount; ?></span>
</th>
<?php foreach ($column_order as $stat_name => $stat):
if (! array_key_exists($stat_name, $first_database)) {
continue;
}
if ($stat['format'] === 'byte') {
list($value, $unit) = \PMA\libraries\Util::formatByteDown($stat['footer'], 3, 1);
} elseif ($stat['format'] === 'number') {
$value = \PMA\libraries\Util::formatNumber($stat['footer'], 0);
} else {
$value = htmlentities($stat['footer'], 0);
} ?>
<th class="value">
<?php if (isset($stat['description_function'])): ?>
<dfn title="<?= $stat['description_function']($stat['footer']); ?>">
<?= $value; ?>
</dfn>
<?php else: ?>
<?= $value; ?>
<?php endif; ?>
</th>
<?php if ($stat['format'] === 'byte'): ?>
<th class="unit"><?= $unit; ?></th>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($master_replication): ?>
<th></th>
<?php endif; ?>
<?php if ($slave_replication): ?>
<th></th>
<?php endif; ?>
<th></th>
</tr>
</tfoot>

View File

@ -0,0 +1,40 @@
<thead>
<tr>
<?php if ($GLOBALS['is_superuser'] || $GLOBALS['cfg']['AllowUserDropDatabase']): ?>
<th></th>
<?php endif; ?>
<th>
<a href="server_databases.php<?= PMA_URL_getCommon($_url_params); ?>">
<?= __('Database'); ?>
<?= ($sort_by == 'SCHEMA_NAME' ? \PMA\libraries\Util::getImage('s_' . $sort_order . '.png', $sort_order_text) : ''); ?>
</a>
</th>
<?php foreach ($column_order as $stat_name => $stat):
if (! array_key_exists($stat_name, $first_database)) {
continue;
}
$_url_params['sort_by'] = $stat_name;
$_url_params['sort_order'] = ($sort_by == $stat_name && $sort_order == 'desc') ? 'asc' : 'desc'; ?>
<th <?php if ($stat['format'] === 'byte'): ?>colspan="2"<?php endif; ?>>
<a href="server_databases.php<?= PMA_URL_getCommon($_url_params); ?>">
<?= $stat['disp_name']; ?>
<?= ($sort_by == $stat_name ? \PMA\libraries\Util::getImage('s_' . $sort_order . '.png', $sort_order_text) : ''); ?>
</a>
</th>
<?php endforeach; ?>
<?php if ($master_replication): ?>
<th>
<?= __('Master replication'); ?>
</th>
<?php endif; ?>
<?php if ($slave_replication): ?>
<th>
<?= __('Slave replication'); ?>
</th>
<?php endif; ?>
<th>
<?= __('Action'); ?>
</th>
</tr>
</thead>

View File

@ -0,0 +1,65 @@
<tr <?= $tr_class ? ('class="' . $tr_class . '"') : ''; ?>>
<?php if ($GLOBALS['is_superuser'] || $GLOBALS['cfg']['AllowUserDropDatabase']): ?>
<td class="tool">
<input type="checkbox" name="selected_dbs[]" class="checkall"
title="<?= htmlspecialchars($current['SCHEMA_NAME']); ?>"
value="<?= htmlspecialchars($current['SCHEMA_NAME']); ?>"
<?php if ($GLOBALS['dbi']->isSystemSchema($current['SCHEMA_NAME'], true)): ?>
disabled="disabled";
<?php endif; ?>
/>
</td>
<?php endif; ?>
<td class="name">
<a href="<?= \PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') , $url_query , '&amp;db=' , urlencode($current['SCHEMA_NAME']); ?>"
title="<?= sprintf(__('Jump to database'), htmlspecialchars($current['SCHEMA_NAME'])); ?>">
<?= htmlspecialchars($current['SCHEMA_NAME']); ?>
</a>
</td>
<?php foreach ($column_order as $stat_name => $stat):
if (! array_key_exists($stat_name, $current)) {
continue;
}
if ($stat['format'] === 'byte') {
list($value, $unit) = \PMA\libraries\Util::formatByteDown($current[$stat_name], 3, 1);
} elseif ($stat['format'] === 'number') {
$value = \PMA\libraries\Util::formatNumber($current[$stat_name], 0);
} else {
$value = htmlentities($current[$stat_name], 0);
} ?>
<td class="value">
<?php if (isset($stat['description_function'])): ?>
<dfn title="<?= $stat['description_function']($stat['footer']); ?>">
<?= $value; ?>
</dfn>
<?php else: ?>
<?= $value; ?>
<?php endif; ?>
</td>
<?php if ($stat['format'] === 'byte'): ?>
<td class="unit"><?= $unit; ?></td>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($master_replication_status): ?>
<td class="tool" style="text-align: center;">
<?= $master_replication; ?>
</td>
<?php endif; ?>
<?php if ($slave_replication_status): ?>
<td class="tool" style="text-align: center;">
<?= $slave_replication; ?>
</td>
<?php endif; ?>
<td class="tool">
<a onclick="PMA_commonActions.setDb('<?= PMA_jsFormat($current['SCHEMA_NAME']) ?>');"
href="server_privileges.php<?= $url_query; ?>&amp;db=<?= urlencode($current['SCHEMA_NAME']); ?>&amp;checkprivsdb=<?= urlencode($current['SCHEMA_NAME']); ?>"
title="<?= htmlspecialchars(sprintf(__('Check privileges for database "%s".'), $current['SCHEMA_NAME'])); ?>">
<?= \PMA\libraries\Util::getIcon('s_rights.png', __('Check privileges')); ?>
</a>
</td>
</tr>

View File

@ -0,0 +1,42 @@
<h2>
<?= \PMA\libraries\Util::getImage('b_engine.png'),
' ', htmlspecialchars($title),
' ', \PMA\libraries\Util::showMySQLDocu($helpPage); ?>
</h2>
<p>
<em>
<?= htmlspecialchars($comment); ?>
</em>
</p>
<?php if (! empty($infoPages) && is_array($infoPages)): ?>
<p>
<strong>[</strong>
<?php if (empty($_REQUEST['page'])): ?>
<strong><?= __('Variables'); ?></strong>
<?php else: ?>
<a href="server_engines.php<?= PMA_URL_getCommon(array('engine' => $_REQUEST['engine'])); ?>">
<?= __('Variables'); ?>
</a>
<?php endif; ?>
<?php foreach ($infoPages as $current => $label): ?>
<strong>|</strong>
<?php if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current): ?>
<strong><?= htmlspecialchars($label); ?></strong>
<?php else: ?>
<a href="server_engines.php<?= PMA_URL_getCommon(array('engine' => $_REQUEST['engine'], 'page' => $current)); ?>">
<?= htmlspecialchars($label); ?>
</a>
<?php endif; ?>
<?php endforeach; ?>
<strong>]</strong>
</p>
<?php endif; ?>
<?php if (! empty($pageOutput)): ?>
<?= $pageOutput; ?>
<?php else: ?>
<p>
<?= $support; ?>
</p>
<?= $variables; ?>
<?php endif; ?>

View File

@ -0,0 +1,25 @@
<table class="noclick">
<thead>
<tr>
<th><?= __('Storage Engine'); ?></th>
<th><?= __('Description'); ?></th>
</tr>
</thead>
<tbody>
<?php $odd_row = true; ?>
<?php foreach ($engines as $engine => $details): ?>
<tr class="
<?= $odd_row ? 'odd' : 'even'; ?>
<?= $details['Support'] == 'NO' || $details['Support'] == 'DISABLED' ? ' disabled' : ''; ?>
<?= $details['Support'] == 'DEFAULT' ? ' marked' : ''; ?>">
<td>
<a rel="newpage" href="server_engines.php<?= PMA_URL_getCommon(array('engine' => $engine)); ?>">
<?= htmlspecialchars($details['Engine']); ?>
</a>
</td>
<td><?= htmlspecialchars($details['Comment']); ?></td>
</tr>
<?php $odd_row = !$odd_row; ?>
<?php endforeach; ?>
</tbody>
</table>

View File

@ -0,0 +1,33 @@
<table class="data_full_width"
id="plugins-<?= preg_replace('/[^a-z]/', '', mb_strtolower($plugin_type)); ?>">
<caption class="tblHeaders">
<?= htmlspecialchars($plugin_type); ?>
</caption>
<thead>
<tr>
<th><?= __('Plugin'); ?></th>
<th><?= __('Description'); ?></th>
<th><?= __('Version'); ?></th>
<th><?= __('Author'); ?></th>
<th><?= __('License'); ?></th>
</tr>
</thead>
<tbody>
<?php $odd_row = true; ?>
<?php foreach ($plugin_list as $plugin): ?>
<tr class="noclick <?= ($odd_row ? 'odd' : 'even'); ?>">
<th>
<?= htmlspecialchars($plugin['plugin_name']); ?>
<?php if (! $plugin['is_active']): ?>
<small class="attention"><?= __('disabled'); ?></small>
<?php endif; ?>
</th>
<td><?= htmlspecialchars($plugin['plugin_description']); ?></td>
<td><?= htmlspecialchars($plugin['plugin_type_version']); ?></td>
<td><?= htmlspecialchars($plugin['plugin_author']); ?></td>
<td><?= htmlspecialchars($plugin['plugin_license']); ?></td>
</tr>
<?php $odd_row = !$odd_row; ?>
<?php endforeach; ?>
</tbody>
</table>

View File

@ -0,0 +1,8 @@
<div id="sectionlinks">
<?php foreach ($plugins as $plugin_type => $plugin_list): ?>
<a href="#plugins-<?= preg_replace('/[^a-z]/', '', mb_strtolower($plugin_type)); ?>">
<?= htmlspecialchars($plugin_type); ?>
</a>
<?php endforeach; ?>
</div>
<br />

View File

@ -0,0 +1,11 @@
<a style="display: none;" href="<?= $url; ?>" class="ajax saveLink">
<?= \PMA\libraries\Util::getIcon('b_save.png', __('Save')); ?>
</a>
<a style="display: none;" href="#" class="cancelLink">
<?= \PMA\libraries\Util::getIcon('b_close.png', __('Cancel')); ?>
</a>
<?= \PMA\libraries\Util::getImage(
'b_help.png',
__('Documentation'),
array('style' => 'display:none', 'id' => 'docImage')
) ?>

View File

@ -0,0 +1,5 @@
<tr class="var-row <?= $rowClass; ?>">
<td class="var-action"></td>
<td class="var-name session">(<?= __('Session value'); ?> )</td>
<td class="var-value value">&nbsp;<?= htmlspecialchars($value); ?></td>
</tr>

View File

@ -0,0 +1,9 @@
<fieldset id="tableFilter">
<legend><?= __('Filters'); ?></legend>
<div class="formelement">
<label for="filterText"><?= __('Containing the word:'); ?></label>
<input name="filterText" type="text" id="filterText"
style="vertical-align: baseline;"
value="<?= htmlspecialchars($filterValue); ?>" />
</div>
</fieldset>

View File

@ -0,0 +1,24 @@
<tr class="var-row <?= $rowClass; ?>">
<td class="var-action">
<?php if ($editable): ?>
<a href="#" data-variable="<?= htmlspecialchars($name) ?>" class="editLink"><?= \PMA\libraries\Util::getIcon('b_edit.png', __('Edit')) ?></a>
<?php else: ?>
<span title="<?= __('This is a read-only variable and can not be edited') ?>" class="read_only_var">
<?= \PMA\libraries\Util::getIcon('bd_edit.png', __('Edit')) ?>
</span>
<?php endif; ?>
</td>
<td class="var-name">
<?php if ($docLink != null): ?>
<span title="<?= htmlspecialchars(str_replace('_', ' ', $name)); ?>">
<?= \PMA\libraries\Util::showMySQLDocu($docLink[1], false, $docLink[2] . '_' . $docLink[0], true)
, htmlspecialchars(str_replace('_', ' ', $name))
, '</a>'
?>
</span>
<?php else: ?>
<?= htmlspecialchars(str_replace('_', ' ', $name)); ?>
<?php endif; ?>
</td>
<td class="var-value value <?= ($isSuperuser ? ' editable' : '') ?>">&nbsp;<?= htmlspecialchars($value); ?></td>
</tr>

View File

@ -0,0 +1,7 @@
<thead>
<tr class="var-header var-row">
<td class="var-action"><?= __('Action'); ?></td>
<td class="var-name"><?= __('Variable'); ?></td>
<td class="var-value"><?= __('Session value'); ?> / <?= __('Global value'); ?></td>
</tr>
</thead>

View File

@ -0,0 +1,20 @@
<fieldset>
<div>
<label for="pos"><?= __('Start row:'); ?></label>
<input type="number" name="pos" min="0" required="required"
<?php if ($unlim_num_rows > 0) : ?>
max="<?= ($unlim_num_rows - 1); ?>"
<?php endif; ?>
value="<?= htmlspecialchars($pos); ?>" />
<label for="session_max_rows"><?= __('Number of rows:'); ?></label>
<input type="number" name="session_max_rows" min="1"
value="<?= htmlspecialchars($rows); ?>" required="required" />
<input type="submit" name="submit" class="Go"
value="<?= __('Go'); ?>" />
<input type="hidden" name="sql_query"
value="<?= htmlspecialchars($sql_query); ?>" />
<input type="hidden" name="unlim_num_rows"
value="<?= htmlspecialchars($unlim_num_rows); ?>" />
</div>
</fieldset>

View File

@ -0,0 +1,162 @@
<?php require_once 'libraries/url_generating.lib.php'; ?>
<script type="text/javascript">
pma_token = '<?= $_SESSION[' PMA_token ']; ?>';
url_query = '<?= $url_query; ?>';
</script>
<!-- Display Chart options -->
<div id="div_view_options">
<form method="post" id="tblchartform" action="tbl_chart.php" class="ajax">
<?= PMA_URL_getHiddenInputs($url_params); ?>
<fieldset>
<legend>
<?= __('Display chart'); ?>
</legend>
<div class="chartOption">
<div class="formelement">
<input type="radio" name="chartType" value="bar" id="radio_bar" />
<label for ="radio_bar"><?= _pgettext('Chart type', 'Bar') ?></label>
</div>
<div class="formelement">
<input type="radio" name="chartType" value="column" id="radio_column" />
<label for ="radio_column"><?= _pgettext('Chart type', 'Column') ?></label>
</div>
<div class="formelement">
<input type="radio" name="chartType" value="line" id="radio_line" checked="checked" />
<label for ="radio_line"><?= _pgettext('Chart type', 'Line') ?></label>
</div>
<div class="formelement">
<input type="radio" name="chartType" value="spline" id="radio_spline" />
<label for ="radio_spline"><?= _pgettext('Chart type', 'Spline') ?></label>
</div>
<div class="formelement">
<input type="radio" name="chartType" value="area" id="radio_area" />
<label for ="radio_area"><?= _pgettext('Chart type', 'Area') ?></label>
</div>
<span class="span_pie" style="display:none;">
<input type="radio" name="chartType" value="pie" id="radio_pie" />
<label for ="radio_pie"><?= _pgettext('Chart type', 'Pie') ?></label>
</span>
<span class="span_timeline" style="display:none;">
<input type="radio" name="chartType" value="timeline" id="radio_timeline" />
<label for ="radio_timeline"><?= _pgettext('Chart type', 'Timeline') ?></label>
</span>
<span class="span_scatter" style="display:none;">
<input type="radio" name="chartType" value="scatter" id="radio_scatter" />
<label for ="radio_scatter"><?= _pgettext('Chart type', 'Scatter') ?></label>
</span>
<br /><br />
<span class="barStacked" style="display:none;">
<input type="checkbox" name="barStacked" value="1" id="checkbox_barStacked" />
<label for ="checkbox_barStacked"><?= __('Stacked') ?></label>
</span>
<br /><br />
<label for ="chartTitle"><?= __('Chart title:') ?></label>
<input type="text" name="chartTitle" id="chartTitle" />
</div>
<?php $xaxis = null; ?>
<div class="chartOption">
<label for="select_chartXAxis"><?= __('X-Axis:'); ?></label>
<select name="chartXAxis" id="select_chartXAxis">
<?php foreach ($keys as $idx => $key) : ?>
<?php if ($xaxis === null) : ?>
<?php $xaxis = $idx; ?>
<?php endif; ?>
<?php if ($xaxis === $idx) : ?>
<option value="<?= htmlspecialchars($idx); ?>" selected="selected"><?= htmlspecialchars($key); ?></option>
<?php else : ?>
<option value="<?= htmlspecialchars($idx); ?>"><?= htmlspecialchars($key); ?></option>
<?php endif; ?>
<?php endforeach; ?>
</select>
<br />
<label for="select_chartSeries">
<?= __('Series:'); ?>
</label>
<select name="chartSeries" id="select_chartSeries" multiple="multiple">
<?php foreach ($keys as $idx => $key) : ?>
<?php if (in_array($fields_meta[$idx]->type, $numeric_types)) : ?>
<?php if ($idx == $xaxis && $numeric_column_count > 1) : ?>
<option value="<?= htmlspecialchars($idx); ?>"><?= htmlspecialchars($key); ?></option>
<?php else : ?>
<option value="<?= htmlspecialchars($idx); ?>" selected="selected"><?= htmlspecialchars($key); ?></option>
<?php endif; ?>
<?php endif; ?>
<?php endforeach;?>
</select>
<input type="hidden" name="dateTimeCols" value="
<?php $date_time_types = array('date', 'datetime', 'timestamp'); ?>
<?php foreach ($keys as $idx => $key): ?>
<?php if (in_array($fields_meta[$idx]->type, $date_time_types)): ?>
<?= $idx , ' ' ?>
<?php endif; ?>
<?php endforeach; ?>"
/>
<input type="hidden" name="numericCols" value="
<?php foreach ($keys as $idx => $key): ?>
<?php if (in_array($fields_meta[$idx]->type, $numeric_types)): ?>
<?= $idx , ' ' ?>
<?php endif; ?>
<?php endforeach; ?>"
/>
</div>
<div class="chartOption">
<label for="xaxis_panel">
<?= __('X-Axis label:'); ?>
</label>
<input style="margin-top:0;" type="text" name="xaxis_label" id="xaxis_label" value="<?= (($xaxis == -1) ? __('X Values') : htmlspecialchars($keys[$xaxis])); ?>" />
<br />
<label for="yaxis_label">
<?= __('Y-Axis label:'); ?>
</label>
<input type="text" name="yaxis_label" id="yaxis_label" value="<?= __('Y Values'); ?>" />
<br />
</div>
<p style="clear:both;">&nbsp;</p>
<div>
<input type="checkbox" id="chkAlternative" name="chkAlternative" value="alternativeFormat" />
<label for="chkAlternative"><?= __('Series names are in a column'); ?></label>
<br />
<label for="select_seriesColumn">
<?= __('Series column:'); ?>
</label>
<select name="chartSeriesColumn" id="select_seriesColumn" disabled>
<?php foreach ($keys as $idx => $key) : ?>
<option value="<?= htmlspecialchars($idx) ?>"
<?php if ($idx == 1): ?>
selected="selected"
<?php endif; ?>
<?php $seriesColumn = $idx; ?>">
<?= htmlspecialchars($key); ?>
</option>
<?php endforeach; ?>
</select>
<label for="select_valueColumn">
<?= __('Value Column:'); ?>
</label>
<select name="chartValueColumn" id="select_valueColumn" disabled>
<?php $selected = false;
foreach ($keys as $idx => $key) : ?>
<?php if (in_array($fields_meta[$idx]->type, $numeric_types)) : ?>
<?php if (! $selected && $idx != $xaxis && $idx != $seriesColumn) : ?>
<option value="<?= htmlspecialchars($idx); ?>" selected="selected"><?= htmlspecialchars($key); $selected = true; ?></option>
<?php else: ?>
<option value="<?= htmlspecialchars($idx); ?>"><?= htmlspecialchars($key); ?></option>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
</select>
</div>
<?= PMA\libraries\Util::getStartAndNumberOfRowsPanel($sql_query); ?>
<p style="clear:both;">&nbsp;</p>
<div id="resizer" style="width:600px; height:400px;">
<div style="position: absolute; right: 10px; top: 10px; cursor: pointer; z-index: 1000;">
<a class="disableAjax" id="saveChart" href="#" download="chart.png">
<?= PMA\libraries\Util::getImage('b_saveimage', __('Save chart as image')); ?>
</a>
</div>
<div id="querychart" dir="ltr">
</div>
</div>
</fieldset>
</form>
</div>

View File

@ -0,0 +1,80 @@
<div id="div_view_options">
<fieldset>
<legend><?= __('Display GIS Visualization'); ?></legend>
<div id="gis_div" style="position:relative;">
<form method="post" action="tbl_gis_visualization.php">
<?= PMA_URL_getHiddenInputs($url_params); ?>
<label for="labelColumn">
<?= __("Label column"); ?>
</label>
<select name="visualizationSettings[labelColumn]" id="labelColumn" class="autosubmit">
<option value=""><?= __("-- None --"); ?></option>
<?php foreach ($labelCandidates as $value): ?>
<option value="<?= htmlspecialchars($value); ?>" <?= ($value == $visualizationSettings['labelColumn'] ? 'selected="selected"' : ''); ?>>
<?= htmlspecialchars($value); ?>
</option>
<?php endforeach; ?>
</select>
<label for="spatialColumn">
<?= __("Spatial column"); ?>
</label>
<select name="visualizationSettings[spatialColumn]" id="spatialColumn" class="autosubmit">
<?php foreach ($spatialCandidates as $value): ?>
<option value="<?= htmlspecialchars($value); ?>" <?= ($value == $visualizationSettings['spatialColumn'] ? 'selected="selected"' : ''); ?>>
<?= htmlspecialchars($value); ?>
</option>
<?php endforeach; ?>
</select>
<input type="hidden" name="displayVisualization" value="redraw">
<tr>
<td class="choice" colspan="2">
<input type="checkbox"
name="visualizationSettings[choice]"
id="choice" value="useBaseLayer"
<?php if (isset($visualizationSettings['choice'])): ?>
checked="checked"
<?php endif; ?>/>
<label for="choice" id="labelChoice">
<?= __("Use OpenStreetMaps as Base Layer"); ?>
</label>
</td>
</tr>
<?= PMA\libraries\Util::getStartAndNumberOfRowsPanel($sql_query); ?>
</form>
<div class="pma_quick_warp" style="width: 50px; position: absolute; right: 0; top: 0; cursor: pointer;">
<div class="drop_list">
<span class="drop_button" style="padding: 0; border: 0;">
<?= PMA\libraries\Util::getImage('b_saveimage', __('Save')); ?>
</span>
<ul>
<li class="warp_link">
<a href="<?= $downloadUrl , '&fileFormat=png'; ?>" class="disableAjax">PNG</a>
</li>
<li class="warp_link">
<a href="<?= $downloadUrl , '&fileFormat=pdf'; ?>" class="disableAjax">PDF</a>
</li>
<li class="warp_link">
<a href="<?= $downloadUrl , '&fileFormat=svg'; ?>" class="disableAjax">SVG</a>
</li>
</ul>
</div>
</div>
</div>
<div style="clear:both;">&nbsp;</div>
<div id="placeholder"
style="width:<?= htmlspecialchars($visualizationSettings['width']); ?>px;height:<?= htmlspecialchars($visualizationSettings['height']); ?>px;">
<?= $visualization; ?>
</div>
<div id="openlayersmap"></div>
<input type="hidden" id="pmaThemeImage" value="<?= $GLOBALS['pmaThemeImage']; ?>" />
<script language="javascript" type="text/javascript">
function drawOpenLayers()
{
<?= $drawOl; ?>
}
</script>
</fieldset>
</div>

View File

@ -0,0 +1,245 @@
<form action="tbl_indexes.php"
method="post"
name="index_frm"
id="index_frm"
class="ajax"
onsubmit="if (typeof(this.elements['index[Key_name]'].disabled) != 'undefined') this.elements['index[Key_name]'].disabled = false;">
<?= PMA_URL_getHiddenInputs($form_params); ?>
<fieldset id="index_edit_fields">
<div class="index_info">
<div>
<div class="label">
<strong>
<label for="input_index_name">
<?= __('Index name:') , PMA\libraries\Util::showHint(
PMA\libraries\Message::notice(
__(
'"PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!'
)
)
); ?>
</label>
</strong>
</div>
<input type="text"
name="index[Key_name]"
id="input_index_name"
size="25"
maxlength="64"
value="<?= htmlspecialchars($index->getName()); ?>"
onfocus="this.select()" />
</div>
<div>
<div class="label">
<strong>
<label for="select_index_choice">
<?= __('Index choice:') , PMA\libraries\Util::showMySQLDocu('ALTER_TABLE'); ?>
</label>
</strong>
</div>
<?= $index->generateIndexChoiceSelector(isset($_REQUEST['create_edit_table'])); ?>
</div>
<?= PMA\libraries\Util::getDivForSliderEffect(
'indexoptions', __('Options')
); ?>
<div>
<div class="label">
<strong>
<label for="input_key_block_size">
<?= __('Key block size:'); ?>
</label>
</strong>
</div>
<input type="text"
name="index[Key_block_size]"
id="input_key_block_size"
size="30"
value="<?= htmlspecialchars($index->getKeyBlockSize()) ?>" />
</div>
<div>
<div class="label">
<strong>
<label for="select_index_type">
<?= __('Index type:') , PMA\libraries\Util::showMySQLDocu('ALTER_TABLE'); ?>
</label>
</strong>
</div>
<?= $index->generateIndexTypeSelector(); ?>
</div>
<div>
<div class="label">
<strong>
<label for="input_parser">
<?= __('Parser:'); ?>
</label>
</strong>
</div>
<input type="text"
name="index[Parser]"
id="input_parse"
size="30"
value="<?= htmlspecialchars($index->getParser()) ?>" />
</div>
<div>
<div class="label">
<strong>
<label for="input_index_comment">
<?= __('Comment:'); ?>
</label>
</strong>
</div>
<input type="text"
name="index[Index_comment]"
id="input_index_comment"
size="30"
maxlength="1024"
value="<?= htmlspecialchars($index->getComment()) ?>" />
</div>
</div>
<!-- end of indexoptions div -->
<div class="clearfloat"></div>
<table id="index_columns">
<thead>
<tr>
<th></th>
<th>
<?= __('Column') ?>
</th>
<th>
<?= __('Size') ?>
</th>
</tr>
</thead>
<?php $odd_row = true;
$spatial_types = array(
'geometry',
'point',
'linestring',
'polygon',
'multipoint',
'multilinestring',
'multipolygon',
'geomtrycollection'
); ?>
<tbody>
<?php /* @var $column PMA\libraries\IndexColumn */
foreach ($index->getColumns() as $column): ?>
<tr class="<?= $odd_row ? 'odd' : 'even'; ?>noclick">
<td>
<span class="drag_icon" title="<?= __('Drag to reorder') ?>"></span>
</td>
<td>
<select name="index[columns][names][]">
<option value="">
-- <?= __('Ignore'); ?> --
</option>
<?php
foreach ($fields as $field_name => $field_type):
if (($index->getChoice() != 'FULLTEXT'
|| preg_match('/(char|text)/i', $field_type))
&& ($index->getChoice() != 'SPATIAL'
|| in_array($field_type, $spatial_types))): ?>
<option value="<?= htmlspecialchars($field_name) ?>"
<?php if ($field_name == $column->getName()): ?>
selected="selected"
<?php endif; ?>>
<?= htmlspecialchars($field_name); ?> [<?= htmlspecialchars($field_type); ?>]
</option>
<?php endif;
endforeach; ?>
</select>
</td>
<td>
<input type="text"
size="5"
onfocus="this.select()"name="index[columns][sub_parts][]"
value="<?= ($index->getChoice() != 'SPATIAL') ?
$column->getSubPart()
: ''
?>" />
</td>
</tr>
<?php
$odd_row = !$odd_row;
endforeach;
for ($i = 0; $i < $add_fields; $i++): ?>
<tr class="<?= $odd_row ? 'odd' : 'even'; ?>noclick">
<td>
<span class="drag_icon" title="<?= __('Drag to reorder') ?>"></span>
</td>
<td>
<select name="index[columns][names][]">
<option value="">-- <?= __('Ignore') ?> --</option>
<?php
$j = 0;
foreach ($fields as $field_name => $field_type):
if (isset($_REQUEST['create_edit_table'])) {
$col_index = $field_type[1];
$field_type = $field_type[0];
} ?>
<option value="<?= htmlspecialchars((isset($col_index)) ? $col_index : $field_name); ?>"
<?= ($j++ == $i ? ' selected="selected"' : ''); ?>>
<?= htmlspecialchars($field_name) ?> [<?= htmlspecialchars($field_type); ?>]
</option>
<?= "\n";
endforeach; ?>
</select>
</td>
<td>
<input type="text"
size="5"
onfocus="this.select()"
name="index[columns][sub_parts][]"
value="" />
</td>
</tr>
<?php
$odd_row = !$odd_row;
endfor; ?>
</tbody>
</table>
<div class="add_more">
<div class="slider"></div>
<div class="add_fields hide">
<input type="submit"
id="add_fields"
value="<?= sprintf(__('Add %s column(s) to index'), 1); ?>" />
</div>
</div>
</fieldset>
<fieldset class="tblFooters">
<button type="submit" id="preview_index_frm"><?= __('Preview SQL'); ?></button>
<input type="submit" id="save_index_frm" value="<?= __('Go'); ?>" />
</fieldset>
</form>

View File

@ -0,0 +1,138 @@
<form method="post" action="tbl_relation.php">
<?= PMA_URL_getHiddenInputs($db, $table); ?>
<!-- InnoDB -->
<?php if (PMA\libraries\Util::isForeignKeySupported($tbl_storage_engine)): ?>
<fieldset>
<legend><?= __('Foreign key constraints'); ?></legend>
<table id="foreign_keys" class="relationalTable">
<tr>
<th><?= __('Actions'); ?></th>
<th><?= __('Constraint properties'); ?></th>
<?php if (strtoupper($tbl_storage_engine) == 'INNODB'): ?>
<th><?= __('Column') , PMA\libraries\Util::showHint(__(
'Creating a foreign key over a non-indexed column would automatically create'
. ' an index on it. Alternatively, you can define an index below, before creating'
. ' the foreign key.'
)) ?>
</th>
<?php else: ?>
<th><?= __('Column') , PMA\libraries\Util::showHint(__(
'Only columns with index will be displayed. You can define an'
. ' index below.'
)) ?>
</th>
<?php endif; ?>
<th colspan="3">
<?= __('Foreign key constraint'); ?> (<?= $tbl_storage_engine; ?>)
</th>
</tr>
<tr>
<th></th>
<th></th>
<th></th>
<th><?= __('Database'); ?></th>
<th><?= __('Table'); ?></th>
<th><?= __('Column'); ?></th>
</tr>
<?php $odd_row = true; $i = 0; ?>
<?php if (! empty($existrel_foreign)): ?>
<?php foreach ($existrel_foreign as $key => $one_key): ?>
<?= PMA\libraries\Template::get('table/relation/foreign_key_row')->render(
array(
'one_key' => $one_key,
'odd_row' => $odd_row,
'columns' => $columns,
'i' => $i++,
'options_array' => $options_array,
'tbl_storage_engine' => $tbl_storage_engine,
'db' => $db
)
);
$odd_row = ! $odd_row;?>
<?php endforeach; ?>
<?php endif; ?>
<?= PMA\libraries\Template::get('table/relation/foreign_key_row')->render(
array(
'one_key' => array(),
'odd_row' => $odd_row,
'columns' => $columns,
'i' => $i++,
'options_array' => $options_array,
'tbl_storage_engine' => $tbl_storage_engine,
'db' => $db
)
); ?>
<tr>
<td colspan="5">
<a class="formelement clearfloat add_foreign_key" href="">
<?= __('+ Add constraint'); ?>
</td>
</tr>
</table>
</fieldset>
<?php endif; ?>
<?php if ($cfgRelation['relwork']): ?>
<?php if (PMA\libraries\Util::isForeignKeySupported($tbl_storage_engine)): ?>
<br/>
<?= PMA\libraries\Util::getDivForSliderEffect('ir_div', __('Internal relations')) ?>
<?php endif; ?>
<?php $save_row = array_values($columns);
$saved_row_cnt = count($save_row);?>
<fieldset>
<legend><?= __('Internal relations') , PMA\libraries\Util::showDocu('config', 'cfg_Servers_relation'); ?></legend>
<table id="internal_relations" class="relationalTable">
<tr>
<th><?= __('Column'); ?></th>
<th><?= __('Internal relation'); ?>
<?php if (PMA\libraries\Util::isForeignKeySupported($tbl_storage_engine)): ?>
<?= PMA\libraries\Util::showHint(__(
'An internal relation is not necessary when a corresponding'
. ' FOREIGN KEY relation exists.')); ?>
<?php endif; ?>
</th>
<?php $odd_row = true; ?>
<?php for ($i = 0; $i < $saved_row_cnt; $i++): ?>
<?= PMA\libraries\Template::get('table/relation/internal_relational_row')->render(
array(
'save_row' => $save_row,
'i' => $i,
'odd_row' => $odd_row,
'existrel' => $existrel,
'db' => $db
)
);
$odd_row = ! $odd_row; ?>
<?php endfor; ?>
</table>
</fieldset>
<?php if (PMA\libraries\Util::isForeignKeySupported($tbl_storage_engine)): ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($cfgRelation['displaywork']): ?>
<?php $save_row = array_values($columns);?>
<?php $disp = PMA_getDisplayField($db, $table); ?>
<fieldset>
<label><?= __('Choose column to display:'); ?></label>
<select name="display_field">
<option value="">---</option>
<?php foreach ($save_row as $row): ?>
<option value="<?= htmlspecialchars($row['Field']); ?>"
<?php if (isset($disp) && $row['Field'] == $disp): ?>
selected="selected"
<?php endif; ?>>
<?= htmlspecialchars($row['Field']); ?>
</option>
<?php endforeach; ?>
</select>
</fieldset>
<?php endif; ?>
<fieldset class="tblFooters">
<input type="button" class="preview_sql" value="<?= __('Preview SQL'); ?>" />
<input type="submit" value="<?= __('Save'); ?>" />
</fieldset>
</form>

View File

@ -0,0 +1,12 @@
<?= (! empty($dropdown_question)
? htmlspecialchars($dropdown_question) . '&nbsp;&nbsp;'
: ''); ?><select name="<?= htmlspecialchars($select_name); ?>">
<?php foreach ($choices as $one_value => $one_label): ?>
<option value="<?= htmlspecialchars($one_value); ?>"
<?php if ($selected_value == $one_value): ?>
selected="selected"
<?php endif; ?>>
<?= htmlspecialchars($one_label); ?>
</option>
<?php endforeach; ?>
</select>

View File

@ -0,0 +1,200 @@
<?php
use PMA\libraries\DatabaseInterface;
use PMA\libraries\Table;
use PMA\libraries\Util;
$js_msg = '';
$this_params = null;
if (isset($one_key['constraint'])) {
$drop_fk_query = 'ALTER TABLE ' . PMA\libraries\Util::backquote($GLOBALS['table'])
. ' DROP FOREIGN KEY '
. PMA\libraries\Util::backquote($one_key['constraint']) . ';';
$this_params = $GLOBALS['url_params'];
$this_params['goto'] = 'tbl_relation.php';
$this_params['back'] = 'tbl_relation.php';
$this_params['sql_query'] = $drop_fk_query;
$this_params['message_to_show'] = sprintf(
__('Foreign key constraint %s has been dropped'),
$one_key['constraint']
);
$js_msg = PMA_jsFormat(
'ALTER TABLE ' . $GLOBALS['table']
. ' DROP FOREIGN KEY '
. $one_key['constraint'] . ';'
);
}
// For ON DELETE and ON UPDATE, the default action
// is RESTRICT as per MySQL doc; however, a SHOW CREATE TABLE
// won't display the clause if it's set as RESTRICT.
$on_delete = isset($one_key['on_delete'])
? $one_key['on_delete'] : 'RESTRICT';
$on_update = isset($one_key['on_update'])
? $one_key['on_update'] : 'RESTRICT';
$column_array = array();
$column_array[''] = '';
foreach ($columns as $column) {
if (strtoupper($tbl_storage_engine) == 'INNODB'
|| ! empty($column['Key'])
) {
$column_array[$column['Field']] = $column['Field'];
}
}
$foreign_table = false;
// foreign database dropdown
$foreign_db = (isset($one_key['ref_db_name'])) ? $one_key['ref_db_name'] : $db;
$tables = array();
if ($foreign_db) {
$foreign_table = isset($one_key['ref_table_name'])
? $one_key['ref_table_name'] : '';
$tables_rs = $GLOBALS['dbi']->query(
'SHOW TABLE STATUS FROM ' . Util::backquote($foreign_db),
null,
DatabaseInterface::QUERY_STORE
);
while ($row = $GLOBALS['dbi']->fetchRow($tables_rs)) {
if (isset($row[1])
&& mb_strtoupper($row[1]) == $tbl_storage_engine
) {
$tables[] = $row[0];
}
}
}
?>
<tr class="<?= ($odd_row ? 'odd' : 'even'); ?>">
<!-- Drop key anchor -->
<td>
<?php if (isset($one_key['constraint'])): ?>
<input type="hidden"
class="drop_foreign_key_msg"
value="<?= $js_msg; ?>" />
<a class="drop_foreign_key_anchor ajax"
href="sql.php<?= PMA_URL_getCommon($this_params); ?>" >
<?= PMA\libraries\Util::getIcon('b_drop.png', __('Drop')); ?>
</a>
<?php endif; ?>
</td>
<td>
<span class="formelement clearfloat">
<input type="text" name="constraint_name[<?= $i; ?>]"
value="<?= (isset($one_key['constraint'])) ?
htmlspecialchars($one_key['constraint'])
: ''
?>"
placeholder="<?= __('Constraint name'); ?>"
maxlength="64" />
</span>
<div class="floatleft">
<span class="formelement">
<?= PMA\libraries\Template::get('table/relation/dropdown_generate')->render(
array(
'dropdown_question' => 'ON DELETE',
'select_name' => 'on_delete[' . $i . ']',
'choices' => $options_array,
'selected_value' => $on_delete
)
); ?>
</span>
<span class="formelement">
<?= PMA\libraries\Template::get('table/relation/dropdown_generate')->render(
array(
'dropdown_question' => 'ON UPDATE',
'select_name' => 'on_update[' . $i . ']',
'choices' => $options_array,
'selected_value' => $on_update
)
); ?>
</span>
</div>
</td>
<td>
<?php if (isset($one_key['index_list'])): ?>
<?php foreach ($one_key['index_list'] as $key => $column): ?>
<span class="formelement clearfloat">
<?= PMA\libraries\Template::get('table/relation/dropdown_generate')->render(
array(
'dropdown_question' => '',
'select_name' => 'foreign_key_fields_name[' . $i . '][]',
'choices' => $column_array,
'selected_value' => $column
)
); ?>
</span>
<?php endforeach; ?>
<?php else: ?>
<span class="formelement clearfloat">
<?= PMA\libraries\Template::get('table/relation/dropdown_generate')->render(
array(
'dropdown_question' => '',
'select_name' => 'foreign_key_fields_name[' . $i . '][]',
'choices' => $column_array,
'selected_value' => ''
)
); ?>
</span>
<?php endif; ?>
<a class="formelement clearfloat add_foreign_key_field"
href=""
data-index="<?= $i; ?>">
<?= __('+ Add column'); ?>
</a>
</td>
<td>
<span class="formelement clearfloat">
<?= PMA\libraries\Template::get('table/relation/relational_dropdown')->render(
array(
'name' => 'destination_foreign_db[' . $i . ']',
'title' => __('Database'),
'values' => $GLOBALS['dblist']->databases,
'foreign' => $foreign_db
)
); ?>
</td>
<td>
<span class="formelement clearfloat">
<?= PMA\libraries\Template::get('table/relation/relational_dropdown')->render(
array(
'name' => 'destination_foreign_table[' . $i . ']',
'title' => __('Table'),
'values' => $tables,
'foreign' => $foreign_table
)
); ?>
</span>
</td>
<td>
<?php if ($foreign_db && $foreign_table): ?>
<?php foreach ($one_key['ref_index_list'] as $foreign_column): ?>
<?php
$table_obj = new Table($foreign_table, $foreign_db);
$columns = $table_obj->getUniqueColumns(false, false);
?>
<span class="formelement clearfloat">
<?= PMA\libraries\Template::get('table/relation/relational_dropdown')->render(
array(
'name' => 'destination_foreign_column[' . $i . '][]',
'title' => __('Column'),
'values' => $columns,
'foreign' => $foreign_column
)
); ?>
</span>
<?php endforeach; ?>
<?php else: ?>
<span class="formelement clearfloat">
<?= PMA\libraries\Template::get('table/relation/relational_dropdown')->render(
array(
'name' => 'destination_foreign_column[' . $i . '][]',
'title' => __('Column'),
'values' => array(),
'foreign' => ''
)
); ?>
</span>
<?php endif; ?>
</td>
</tr>

View File

@ -0,0 +1,79 @@
<?php
use PMA\libraries\Table;
$myfield = $save_row[$i]['Field'];
// Use an md5 as array index to avoid having special characters
// in the name attribute (see bug #1746964 )
$myfield_md5 = md5($myfield);
$myfield_html = htmlspecialchars($myfield);
$foreign_table = false;
$foreign_column = false;
// database dropdown
if (isset($existrel[$myfield])) {
$foreign_db = $existrel[$myfield]['foreign_db'];
} else {
$foreign_db = $db;
}
// table dropdown
$tables = array();
if ($foreign_db) {
if (isset($existrel[$myfield])) {
$foreign_table = $existrel[$myfield]['foreign_table'];
}
$tables_rs = $GLOBALS['dbi']->query(
'SHOW TABLES FROM ' . PMA\libraries\Util::backquote($foreign_db),
null,
PMA\libraries\DatabaseInterface::QUERY_STORE
);
while ($row = $GLOBALS['dbi']->fetchRow($tables_rs)) {
$tables[] = $row[0];
}
}
// column dropdown
$columns = array();
if ($foreign_db && $foreign_table) {
if (isset($existrel[$myfield])) {
$foreign_column = $existrel[$myfield]['foreign_field'];
}
$table_obj = new Table($foreign_table, $foreign_db);
$columns = $table_obj->getUniqueColumns(false, false);
}
?>
<tr class="<?= ($odd_row ? 'odd' : 'even'); ?>">
<td class="vmiddle">
<strong><?= $myfield_html; ?></strong>
<input type="hidden" name="fields_name[<?= $myfield_md5; ?>]"
value="<?= $myfield_html; ?>"/>
</td>
<td>
<?= PMA\libraries\Template::get('table/relation/relational_dropdown')->render(
array(
'name' => 'destination_db[' . $myfield_md5 . ']',
'title' => __('Database'),
'values' => $GLOBALS['dblist']->databases,
'foreign' => $foreign_db
)
); ?>
<?= PMA\libraries\Template::get('table/relation/relational_dropdown')->render(
array(
'name' => 'destination_table[' . $myfield_md5 . ']',
'title' => __('Table'),
'values' => $tables,
'foreign' => $foreign_table
)
); ?>
<?= PMA\libraries\Template::get('table/relation/relational_dropdown')->render(
array(
'name' => 'destination_column[' . $myfield_md5 . ']',
'title' => __('Column'),
'values' => $columns,
'foreign' => $foreign_column
)
); ?>
</td>
</tr>

View File

@ -0,0 +1,18 @@
<select name="<?= $name; ?>" title="<?= $title; ?>">
<option value=""></option>
<?php $seen_key = false; ?>
<?php foreach ($values as $value): ?>
<option value="<?= htmlspecialchars($value); ?>"
<?php if ($foreign && $value == $foreign): ?>
selected="selected"
<?php $seen_key = true; ?>
<?php endif; ?>>
<?= htmlspecialchars($value); ?>
</option>
<?php endforeach; ?>
<?php if (is_string($foreign) && ! $seen_key): ?>
<option value="<?= htmlspecialchars($foreign); ?>" selected="selected">
<?= htmlspecialchars($foreign); ?>
</option>
<?php endif; ?>
</select>

View File

@ -0,0 +1,7 @@
<select name="criteriaColumnOperators[<?= $search_index; ?>]"
onchange="changeValueFieldType(this, <?= $search_index; ?>)">
<?= $GLOBALS['PMA_Types']->getTypeOperatorsHtml(
preg_replace('@\(.*@s', '', $columnTypes[$column_index]),
$columnNullFlags[$column_index], $selected_operator
); ?>
</select>

View File

@ -0,0 +1,26 @@
<table class="data" <?php if ($searchType == 'zoom'): ?>
id="tableFieldsId"
<?php endif; ?>>
<?= PMA\libraries\Template::get('table/search/table_header')
->render(array(
'geomColumnFlag' => $geomColumnFlag
)); ?>
<tbody>
<?php if ($searchType == 'zoom'): ?>
<?= PMA\libraries\Template::get('table/search/rows_zoom')
->render(array(
'self' => $self,
'columnNames' => $columnNames
)) ?>
<?php else: ?>
<?= PMA\libraries\Template::get('table/search/rows_normal')
->render(array(
'self' => $self,
'geomColumnFlag' => $geomColumnFlag,
'columnNames' => $columnNames,
'columnTypes' => $columnTypes,
'columnCollations' => $columnCollations
)) ?>
<?php endif; ?>
</tbody>
</table>

View File

@ -0,0 +1,22 @@
<?php
$scriptName = '';
$formId = '';
switch ($searchType) {
case 'normal' :
$scriptName = 'tbl_select.php';
$formId = 'tbl_search_form';
break;
case 'zoom' :
$scriptName = 'tbl_zoom_select.php';
$formId = 'zoom_search_form';
break;
case 'replace' :
$scriptName = 'tbl_find_replace.php';
$formId = 'find_replace_form';
break;
}
?>
<form method="post" action="<?= $scriptName; ?>" name="insertForm" id="<?= $formId; ?>" class="ajax lock-page">
<?= PMA_URL_getHiddenInputs($db, $table); ?>
<input type="hidden" name="goto" value="<?= $goto; ?>" />
<input type="hidden" name="back" value="<?= $scriptName; ?>" />

View File

@ -0,0 +1,39 @@
<!-- Displays 'Function' column if it is present -->
<td>
<?php
$geom_types = PMA\libraries\Util::getGISDatatypes();
?>
<?php
/**
* if a geometry column is present
*/
if (in_array($columnTypes[$column_index], $geom_types)): ?>
<select class="geom_func"
name="geom_func[<?= $column_index; ?>]">
<?php
// get the relevant list of GIS functions
$funcs = PMA\libraries\Util::getGISFunctions(
$columnTypes[$column_index], true, true
);
?>
<?php
/**
* For each function in the list of functions,
* add an option to select list
*/
foreach ($funcs as $func_name => $func): ?>
<?php $name = htmlspecialchars(
isset($func['display']) ? $func['display'] : $func_name
); ?>
<option value="<?= $name; ?>">
<?= $name; ?>
</option>
<?php endforeach; ?>
</select>
<?php else: ?>
&nbsp;
<?php endif; ?>
</td>

View File

@ -0,0 +1,132 @@
<?php
// Get inputbox based on different column types
// (Foreign key, geometrical, enum)
if ($_foreigners
&& PMA_searchColumnInForeigners($_foreigners, $column_name)): ?>
<?php if (is_array($foreignData['disp_row'])): ?>
<select name="criteriaValues[<?= $column_index; ?>]"
id="<?= $column_id , $column_index ?>">
<?= PMA_foreignDropdown(
$foreignData['disp_row'], $foreignData['foreign_field'],
$foreignData['foreign_display'], '', $foreignMaxLimit
) ?>
</select>
<?php elseif ($foreignData['foreign_link'] == true): ?>
<input type="text"
id="<?= $column_id , $column_index; ?>"
name="criteriaValues[<?= $column_index; ?>]"
id="field_<?= md5($column_name); ?>[<?= $column_index; ?>]"
class="textfield"
<?php if (isset($criteriaValues[$column_index])
&& is_string($criteriaValues[$column_index])
): ?>
value="<?= htmlspecialchars($criteriaValues[$column_index]); ?>"
<?php endif; ?> />
<a class="ajax browse_foreign"
href="<?= ('browse_foreigners.php') , PMA_URL_getCommon(array('db' => $db, 'table' => $table))
, ('&amp;field=') , urlencode($column_name)
, ('&amp;fieldkey=') , $column_index
, ('&amp;fromsearch=1')
?>">
<?= str_replace("'", "\\'", $titles['Browse']); ?>
</a>
<?php endif; ?>
<?php elseif (in_array($column_type, PMA\libraries\Util::getGISDatatypes())): ?>
<input type="text"
name="criteriaValues[<?= $column_index; ?>]"
size="40"
class="textfield"
id="field_<?= $column_index; ?>" />
<?php if ($in_fbs): ?>
<?php
$edit_url = 'gis_data_editor.php' . PMA_URL_getCommon();
$edit_str = PMA\libraries\Util::getIcon('b_edit.png', __('Edit/Insert'));
?>
<span class="open_search_gis_editor">
<?= PMA\libraries\Util::linkOrButton(
$edit_url, $edit_str, array(), false, false, '_blank'
); ?>
</span>
<?php endif; ?>
<?php elseif (strncasecmp($column_type, 'enum', 4) == 0
|| (strncasecmp($column_type, 'set', 3) == 0
&& $in_zoom_search_edit)
): ?>
<?php
$in_zoom_search_edit = false;
$column_type = htmlspecialchars($column_type);
$value = explode(', ', str_replace("'", '', mb_substr($column_type, 5, -1)));
$cnt_value = count($value);
/*
* Enum in edit mode --> dropdown
* Enum in search mode --> multiselect
* Set in edit mode --> multiselect
* Set in search mode --> input (skipped here, so the 'else'
* section would handle it)
*/
?>
<?php if ((strncasecmp($column_type, 'enum', 4) && ! $in_zoom_search_edit)
|| (strncasecmp($column_type, 'set', 3) && $in_zoom_search_edit)
): ?>
<select name="criteriaValues[<?= $column_index; ?>]"
id="<?= $column_id , $column_index; ?>">
<?php else: ?>
<select name="criteriaValues[<?= $column_index; ?>]"
id="<?= $column_id , $column_index; ?>"
multiple="multiple"
size="<?= min(3, $cnt_value); ?>">
<?php endif; ?>
<!-- Add select options-->
<?php for ($j = 0; $j < $cnt_value; $j++): ?>
<?php if (isset($criteriaValues[$column_index])
&& is_array($criteriaValues[$column_index])
&& in_array($value[$j], $criteriaValues[$column_index])
): ?>
<option value="<?= htmlspecialchars($value[$j]); ?>"
selected>
<?php echo htmlspecialchars($value[$j]); ?>
</option>
<?php else: ?>
<option value="<?= htmlspecialchars($value[$j]); ?>">
<?php echo htmlspecialchars($value[$j]); ?>
</option>
<?php endif; ?>
<?php endfor; ?>
</select>
<?php else: ?>
<!-- other cases-->
<?php
$the_class = 'textfield';
if ($column_type == 'date') {
$the_class .= ' datefield';
} elseif ($column_type == 'datetime'
|| substr($column_type, 0, 9) == 'timestamp'
) {
$the_class .= ' datetimefield';
} elseif (substr($column_type, 0, 3) == 'bit') {
$the_class .= ' bit';
}
?>
<input type="text"
name="criteriaValues[<?= $column_index; ?>]"
size="40"
class="<?= $the_class; ?>"
id="<?= $column_id , $column_index; ?>"
<?php if (isset($criteriaValues[$column_index])
&& is_string($criteriaValues[$column_index])
): ?>
value="<?= htmlspecialchars($criteriaValues[$column_index]); ?>"
<?php endif; ?>/>
<?php endif; ?>

View File

@ -0,0 +1,78 @@
<?= PMA\libraries\Util::getDivForSliderEffect(
'searchoptions', __('Options')
); ?>
<!-- Displays columns select list for selecting distinct columns in the search -->
<fieldset id="fieldset_select_fields">
<legend>
<?= __('Select columns (at least one):'); ?>
</legend>
<select name="columnsToDisplay[]"
size="<?= min(count($columnNames), 10); ?>"
multiple="multiple">
<?php
/**
* Displays the list of the fields
*/
foreach ($columnNames as $each_field): ?>
<option value="<?= htmlspecialchars($each_field); ?>"
selected="selected">
<?= htmlspecialchars($each_field); ?>
</option>
<?php endforeach; ?>
</select>
<input type="checkbox"
name="distinct"
value="DISTINCT"
id="oDistinct" />
<label for="oDistinct">
DISTINCT
</label>
</fieldset>
<!-- Displays input box for custom 'Where' clause to be used in the search -->
<fieldset id="fieldset_search_conditions">
<legend>
<em><?= __('Or'); ?></em>
<?= __('Add search conditions (body of the "where" clause):'); ?>
</legend>
<?= PMA\libraries\Util::showMySQLDocu('Functions'); ?>
<input type="text" name="customWhereClause" class="textfield" size="64" />
</fieldset>
<!-- Displays option of changing default number of rows displayed per page -->
<fieldset id="fieldset_limit_rows">
<legend><?= __('Number of rows per page'); ?></legend>
<input type="number"
name="session_max_rows"
required="required"
min="1"
value="<?= intval($GLOBALS['cfg']['MaxRows']); ?>"
class="textfield" />
</fieldset>
<!-- Displays option for ordering search results by a column value (Asc or Desc) -->
<fieldset id="fieldset_display_order">
<legend><?= __('Display order:'); ?></legend>
<select name="orderByColumn"><option value="--nil--"></option>
<?php foreach ($columnNames as $each_field): ?>
<option value="<?= htmlspecialchars($each_field); ?>">
<?= htmlspecialchars($each_field); ?>
</option>
<?php endforeach; ?>
</select>
<?= PMA\libraries\Util::getRadioFields(
'order',
array(
'ASC' => __('Ascending'),
'DESC' => __('Descending')
),
'ASC',
false,
true,
"formelement"
); ?>
</fieldset>
<br style="clear: both;" />

View File

@ -0,0 +1,48 @@
<table class="data">
<!-- Select options for data label -->
<tr>
<td>
<label for="dataLabel">
<?= __("Use this column to label each point"); ?>
</label>
</td>
<td>
<select name="dataLabel" id="dataLabel" >
<option value = "">
<?= __('None'); ?>
</option>
<?php for ($j = 0, $nb = count($columnNames); $j < $nb; $j++): ?>
<?php if (isset($dataLabel)
&& $dataLabel == htmlspecialchars($columnNames[$j])
): ?>
<option value="<?= htmlspecialchars($columnNames[$j]); ?>"
selected="selected">
<?= htmlspecialchars($columnNames[$j]); ?>
</option>
<?php else: ?>
<option value="<?= htmlspecialchars($columnNames[$j]); ?>" >
<?= htmlspecialchars($columnNames[$j]); ?>
</option>
<?php endif; ?>
<?php endfor; ?>
</select>
</td>
</tr>
<!-- Inputbox for changing default maximum rows to plot -->
<tr>
<td>
<label for="maxRowPlotLimit">
<?= __("Maximum rows to plot"); ?>
</label>
</td>
<td>
<input type="number"
name="maxPlotLimit"
id="maxRowPlotLimit"
required="required"
value="<?= ((! empty($_POST['maxPlotLimit']))
? intval($_POST['maxPlotLimit'])
: intval($GLOBALS['cfg']['maxRowPlotLimit'])); ?>" />
</td>
</tr>
</table>

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