Merge branch 'master' of github.com:phpmyadmin/phpmyadmin
This commit is contained in:
commit
dc84c463b8
@ -28,9 +28,13 @@ if (! isset($gis_data['gis_type'])) {
|
||||
}
|
||||
if (isset($_REQUEST['value']) && trim($_REQUEST['value']) != '') {
|
||||
$start = (substr($_REQUEST['value'], 0, 1) == "'") ? 1 : 0;
|
||||
$gis_data['gis_type'] = substr($_REQUEST['value'], $start, strpos($_REQUEST['value'], "(") - $start);
|
||||
$gis_data['gis_type'] = substr(
|
||||
$_REQUEST['value'], $start, strpos($_REQUEST['value'], "(") - $start
|
||||
);
|
||||
}
|
||||
if ((! isset($gis_data['gis_type'])) || (! in_array($gis_data['gis_type'], $gis_types))) {
|
||||
if ((! isset($gis_data['gis_type']))
|
||||
|| (! in_array($gis_data['gis_type'], $gis_types))
|
||||
) {
|
||||
$gis_data['gis_type'] = $gis_types[0];
|
||||
}
|
||||
}
|
||||
@ -39,20 +43,30 @@ $geom_type = $gis_data['gis_type'];
|
||||
// Generate parameters from value passed.
|
||||
$gis_obj = PMA_GIS_Factory::factory($geom_type);
|
||||
if (isset($_REQUEST['value'])) {
|
||||
$gis_data = array_merge($gis_data, $gis_obj->generateParams($_REQUEST['value']));
|
||||
$gis_data = array_merge(
|
||||
$gis_data, $gis_obj->generateParams($_REQUEST['value'])
|
||||
);
|
||||
}
|
||||
|
||||
// Generate Well Known Text
|
||||
$srid = (isset($gis_data['srid']) && $gis_data['srid'] != '') ? htmlspecialchars($gis_data['srid']) : 0;
|
||||
$srid = (isset($gis_data['srid']) && $gis_data['srid'] != '')
|
||||
? htmlspecialchars($gis_data['srid']) : 0;
|
||||
$wkt = $gis_obj->generateWkt($gis_data, 0);
|
||||
$wkt_with_zero = $gis_obj->generateWkt($gis_data, 0, '0');
|
||||
$result = "'" . $wkt . "'," . $srid;
|
||||
|
||||
// Generate PNG or SVG based visualization
|
||||
$format = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER <= 8) ? 'png' : 'svg';
|
||||
$visualizationSettings = array('width' => 450, 'height' => 300, 'spatialColumn' => 'wkt');
|
||||
$format = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER <= 8)
|
||||
? 'png' : 'svg';
|
||||
$visualizationSettings = array(
|
||||
'width' => 450,
|
||||
'height' => 300,
|
||||
'spatialColumn' => 'wkt'
|
||||
);
|
||||
$data = array(array('wkt' => $wkt_with_zero, 'srid' => $srid));
|
||||
$visualization = PMA_GIS_visualizationResults($data, $visualizationSettings, $format);
|
||||
$visualization = PMA_GIS_visualizationResults(
|
||||
$data, $visualizationSettings, $format
|
||||
);
|
||||
$open_layers = PMA_GIS_visualizationResults($data, $visualizationSettings, 'ol');
|
||||
|
||||
// If the call is to update the WKT and visualization make an AJAX response
|
||||
@ -72,34 +86,43 @@ ob_start();
|
||||
<form id="gis_data_editor_form" action="gis_data_editor.php" method="post">
|
||||
<input type="hidden" id="pmaThemeImage" value="<?php echo($GLOBALS['pmaThemeImage']); ?>" />
|
||||
<div id="gis_data_editor">
|
||||
<h3><?php printf(__('Value for the column "%s"'), htmlspecialchars($_REQUEST['field'])); ?></h3>
|
||||
|
||||
<?php echo('<input type="hidden" name="field" value="' . htmlspecialchars($_REQUEST['field']) . '" />');
|
||||
// The input field to which the final result should be added and corresponding null checkbox
|
||||
if (isset($_REQUEST['input_name'])) {
|
||||
echo('<input type="hidden" name="input_name" value="' . htmlspecialchars($_REQUEST['input_name']) . '" />');
|
||||
}
|
||||
echo PMA_generate_common_hidden_inputs();
|
||||
<h3>
|
||||
<?php
|
||||
printf(
|
||||
__('Value for the column "%s"'), htmlspecialchars($_REQUEST['field'])
|
||||
);
|
||||
echo '</h3>';
|
||||
echo '<input type="hidden" name="field" value="'
|
||||
. htmlspecialchars($_REQUEST['field']) . '" />';
|
||||
// The input field to which the final result should be added
|
||||
// and corresponding null checkbox
|
||||
if (isset($_REQUEST['input_name'])) {
|
||||
echo '<input type="hidden" name="input_name" value="'
|
||||
. htmlspecialchars($_REQUEST['input_name']) . '" />';
|
||||
}
|
||||
echo PMA_generate_common_hidden_inputs();
|
||||
?>
|
||||
<!-- Visualization section -->
|
||||
<div id="placeholder" style="width:450px;height:300px;
|
||||
<?php if ($srid != 0) {
|
||||
echo('display:none;');
|
||||
}
|
||||
?> ">
|
||||
<?php echo ($visualization);
|
||||
<?php
|
||||
if ($srid != 0) {
|
||||
echo 'display:none;';
|
||||
}
|
||||
echo '">' . $visualization;
|
||||
?> </div>
|
||||
<div id="openlayersmap" style="width:450px;height:300px;
|
||||
<?php if ($srid == 0) {
|
||||
echo('display:none;');
|
||||
}
|
||||
<?php
|
||||
if ($srid == 0) {
|
||||
echo 'display:none;';
|
||||
}
|
||||
?> ">
|
||||
</div>
|
||||
<div class="choice" style="float:right;clear:right;">
|
||||
<input type="checkbox" id="choice" value="useBaseLayer"
|
||||
<?php if ($srid != 0) {
|
||||
echo(' checked="checked"');
|
||||
}
|
||||
<?php
|
||||
if ($srid != 0) {
|
||||
echo ' checked="checked"';
|
||||
}
|
||||
?> />
|
||||
<label for="choice"><?php echo __("Use OpenStreetMaps as Base Layer"); ?></label>
|
||||
</div>
|
||||
@ -112,13 +135,13 @@ ob_start();
|
||||
<div id="gis_data_header">
|
||||
<select name="gis_data[gis_type]" class="gis_type">
|
||||
<?php
|
||||
foreach ($gis_types as $gis_type) {
|
||||
echo('<option value="' . $gis_type . '"');
|
||||
if ($geom_type == $gis_type) {
|
||||
echo(' selected="selected"');
|
||||
}
|
||||
echo('>' . $gis_type . '</option>');
|
||||
}
|
||||
foreach ($gis_types as $gis_type) {
|
||||
echo '<option value="' . $gis_type . '"';
|
||||
if ($geom_type == $gis_type) {
|
||||
echo ' selected="selected"';
|
||||
}
|
||||
echo '>' . $gis_type . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<label for="srid"><?php echo __("SRID"); ?>: </label>
|
||||
@ -128,185 +151,213 @@ ob_start();
|
||||
|
||||
<!-- Data section -->
|
||||
<div id="gis_data">
|
||||
<?php $geom_count = 1;
|
||||
if ($geom_type == 'GEOMETRYCOLLECTION') {
|
||||
$geom_count = (isset($gis_data[$geom_type]['geom_count'])) ? $gis_data[$geom_type]['geom_count'] : 1;
|
||||
if (isset($gis_data[$geom_type]['add_geom'])) {
|
||||
$geom_count++;
|
||||
}
|
||||
echo('<input type="hidden" name="gis_data[GEOMETRYCOLLECTION][geom_count]" value="' . $geom_count . '">');
|
||||
<?php
|
||||
$geom_count = 1;
|
||||
if ($geom_type == 'GEOMETRYCOLLECTION') {
|
||||
$geom_count = (isset($gis_data[$geom_type]['geom_count']))
|
||||
? $gis_data[$geom_type]['geom_count'] : 1;
|
||||
if (isset($gis_data[$geom_type]['add_geom'])) {
|
||||
$geom_count++;
|
||||
}
|
||||
echo '<input type="hidden" name="gis_data[GEOMETRYCOLLECTION][geom_count]"'
|
||||
. ' value="' . $geom_count . '">';
|
||||
}
|
||||
for ($a = 0; $a < $geom_count; $a++) {
|
||||
if ($geom_type == 'GEOMETRYCOLLECTION') {
|
||||
echo('<br/><br/>'); echo __("Geometry"); echo($a + 1 . ':<br/>');
|
||||
if (isset($gis_data[$a]['gis_type'])) {
|
||||
$type = $gis_data[$a]['gis_type'];
|
||||
} else {
|
||||
$type = $gis_types[0];
|
||||
}
|
||||
for ($a = 0; $a < $geom_count; $a++) {
|
||||
if ($geom_type == 'GEOMETRYCOLLECTION') {
|
||||
echo('<br/><br/>'); echo __("Geometry"); echo($a + 1 . ':<br/>');
|
||||
if (isset($gis_data[$a]['gis_type'])) {
|
||||
$type = $gis_data[$a]['gis_type'];
|
||||
} else {
|
||||
$type = $gis_types[0];
|
||||
}
|
||||
echo('<select name="gis_data[' . $a . '][gis_type]" class="gis_type">');
|
||||
foreach (array_slice($gis_types, 0, 6) as $gis_type) {
|
||||
echo('<option value="' . $gis_type . '"');
|
||||
if ($type == $gis_type) {
|
||||
echo(' selected="selected"');
|
||||
}
|
||||
echo('>' . $gis_type . '</option>');
|
||||
}
|
||||
echo('</select>');
|
||||
} else {
|
||||
$type = $geom_type;
|
||||
echo('<select name="gis_data[' . $a . '][gis_type]" class="gis_type">');
|
||||
foreach (array_slice($gis_types, 0, 6) as $gis_type) {
|
||||
echo('<option value="' . $gis_type . '"');
|
||||
if ($type == $gis_type) {
|
||||
echo(' selected="selected"');
|
||||
}
|
||||
echo('>' . $gis_type . '</option>');
|
||||
}
|
||||
echo('</select>');
|
||||
} else {
|
||||
$type = $geom_type;
|
||||
}
|
||||
|
||||
if ($type == 'POINT') {
|
||||
echo('<br/>'); echo __("Point"); echo(' :');
|
||||
if ($type == 'POINT') {
|
||||
echo('<br/>'); echo __("Point"); echo(' :');
|
||||
?> <label for="x"><?php echo __("X"); ?></label>
|
||||
<input name="gis_data[<?php echo($a); ?>][POINT][x]" type="text" value="<?php echo(isset($gis_data[$a]['POINT']['x']) ? htmlspecialchars($gis_data[$a]['POINT']['x']) : ''); ?>" />
|
||||
<label for="y"><?php echo __("Y"); ?></label>
|
||||
<input name="gis_data[<?php echo($a); ?>][POINT][y]" type="text" value="<?php echo(isset($gis_data[$a]['POINT']['y']) ? htmlspecialchars($gis_data[$a]['POINT']['y']) : ''); ?>" />
|
||||
<?php
|
||||
} elseif ($type == 'MULTIPOINT' || $type == 'LINESTRING') {
|
||||
} elseif ($type == 'MULTIPOINT' || $type == 'LINESTRING') {
|
||||
$no_of_points = isset($gis_data[$a][$type]['no_of_points'])
|
||||
? $gis_data[$a][$type]['no_of_points'] : 1;
|
||||
if ($type == 'LINESTRING' && $no_of_points < 2) {
|
||||
$no_of_points = 2;
|
||||
}
|
||||
if ($type == 'MULTIPOINT' && $no_of_points < 1) {
|
||||
$no_of_points = 1;
|
||||
}
|
||||
|
||||
$no_of_points = isset($gis_data[$a][$type]['no_of_points']) ? $gis_data[$a][$type]['no_of_points'] : 1;
|
||||
if ($type == 'LINESTRING' && $no_of_points < 2) {
|
||||
$no_of_points = 2;
|
||||
}
|
||||
if ($type == 'MULTIPOINT' && $no_of_points < 1) {
|
||||
$no_of_points = 1;
|
||||
}
|
||||
if (isset($gis_data[$a][$type]['add_point'])) {
|
||||
$no_of_points++;
|
||||
}
|
||||
echo('<input type="hidden" name="gis_data[' . $a . '][' . $type
|
||||
. '][no_of_points]" value="' . $no_of_points . '">');
|
||||
|
||||
if (isset($gis_data[$a][$type]['add_point'])) {
|
||||
$no_of_points++;
|
||||
}
|
||||
echo('<input type="hidden" name="gis_data[' . $a . '][' . $type . '][no_of_points]" value="' . $no_of_points . '">');
|
||||
|
||||
for ($i = 0; $i < $no_of_points; $i++) {
|
||||
echo('<br/>');
|
||||
printf(__('Point %d'), $i + 1);
|
||||
echo ':';
|
||||
for ($i = 0; $i < $no_of_points; $i++) {
|
||||
echo '<br/>';
|
||||
printf(__('Point %d'), $i + 1);
|
||||
echo ':';
|
||||
?> <label for="x"><?php echo __("X"); ?></label>
|
||||
<input type="text" name="gis_data[<?php echo($a); ?>][<?php echo($type); ?>][<?php echo($i); ?>][x]" value="<?php echo(isset($gis_data[$a][$type][$i]['x']) ? htmlspecialchars($gis_data[$a][$type][$i]['x']) : ''); ?>" />
|
||||
<label for="y"><?php echo __("Y"); ?></label>
|
||||
<input type="text" name="gis_data[<?php echo($a); ?>][<?php echo($type); ?>][<?php echo($i); ?>][y]" value="<?php echo(isset($gis_data[$a][$type][$i]['y']) ? htmlspecialchars($gis_data[$a][$type][$i]['y']) : ''); ?>" />
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<input type="submit" name="gis_data[<?php echo($a); ?>][<?php echo($type); ?>][add_point]" class="add addPoint" value="<?php echo __("Add a point"); ?>">
|
||||
<?php
|
||||
} elseif ($type == 'MULTILINESTRING' || $type == 'POLYGON') {
|
||||
} elseif ($type == 'MULTILINESTRING' || $type == 'POLYGON') {
|
||||
$no_of_lines = isset($gis_data[$a][$type]['no_of_lines'])
|
||||
? $gis_data[$a][$type]['no_of_lines'] : 1;
|
||||
if ($no_of_lines < 1) {
|
||||
$no_of_lines = 1;
|
||||
}
|
||||
if (isset($gis_data[$a][$type]['add_line'])) {
|
||||
$no_of_lines++;
|
||||
}
|
||||
echo '<input type="hidden" name="gis_data[' . $a . '][' . $type
|
||||
. '][no_of_lines]" value="' . $no_of_lines . '">';
|
||||
|
||||
$no_of_lines = isset($gis_data[$a][$type]['no_of_lines']) ? $gis_data[$a][$type]['no_of_lines'] : 1;
|
||||
if ($no_of_lines < 1) {
|
||||
$no_of_lines = 1;
|
||||
for ($i = 0; $i < $no_of_lines; $i++) {
|
||||
echo '<br/>';
|
||||
if ($type == 'MULTILINESTRING') {
|
||||
echo __("Linestring"); echo ($i + 1) . ':';
|
||||
} else {
|
||||
if ($i == 0) {
|
||||
echo __("Outer Ring") . ':';
|
||||
} else {
|
||||
echo __("Inner Ring"); echo $i . ':';
|
||||
}
|
||||
if (isset($gis_data[$a][$type]['add_line'])) {
|
||||
$no_of_lines++;
|
||||
}
|
||||
echo('<input type="hidden" name="gis_data[' . $a . '][' . $type . '][no_of_lines]" value="' . $no_of_lines . '">');
|
||||
}
|
||||
|
||||
for ($i = 0; $i < $no_of_lines; $i++) {
|
||||
echo('<br/>');
|
||||
if ($type == 'MULTILINESTRING') {
|
||||
echo __("Linestring"); echo($i + 1 . ':');
|
||||
} else {
|
||||
if ($i == 0) {
|
||||
echo __("Outer Ring") . ':';
|
||||
} else {
|
||||
echo __("Inner Ring"); echo($i . ':');
|
||||
}
|
||||
}
|
||||
$no_of_points = isset($gis_data[$a][$type][$i]['no_of_points'])
|
||||
? $gis_data[$a][$type][$i]['no_of_points'] : 2;
|
||||
if ($type == 'MULTILINESTRING' && $no_of_points < 2) {
|
||||
$no_of_points = 2;
|
||||
}
|
||||
if ($type == 'POLYGON' && $no_of_points < 4) {
|
||||
$no_of_points = 4;
|
||||
}
|
||||
if (isset($gis_data[$a][$type][$i]['add_point'])) {
|
||||
$no_of_points++;
|
||||
}
|
||||
echo '<input type="hidden" name="gis_data[' . $a . '][' . $type
|
||||
. '][' . $i . '][no_of_points]" value="' . $no_of_points . '">';
|
||||
|
||||
$no_of_points = isset($gis_data[$a][$type][$i]['no_of_points']) ? $gis_data[$a][$type][$i]['no_of_points'] : 2;
|
||||
if ($type == 'MULTILINESTRING' && $no_of_points < 2) {
|
||||
$no_of_points = 2;
|
||||
}
|
||||
if ($type == 'POLYGON' && $no_of_points < 4) {
|
||||
$no_of_points = 4;
|
||||
}
|
||||
if (isset($gis_data[$a][$type][$i]['add_point'])) {
|
||||
$no_of_points++;
|
||||
}
|
||||
echo('<input type="hidden" name="gis_data[' . $a . '][' . $type . '][' . $i . '][no_of_points]" value="' . $no_of_points . '">');
|
||||
|
||||
for ($j = 0; $j < $no_of_points; $j++) {
|
||||
echo('<br/>');
|
||||
printf(__('Point %d'), $j + 1);
|
||||
echo ':';
|
||||
for ($j = 0; $j < $no_of_points; $j++) {
|
||||
echo('<br/>');
|
||||
printf(__('Point %d'), $j + 1);
|
||||
echo ':';
|
||||
?> <label for="x"><?php echo __("X"); ?></label>
|
||||
<input type="text" name="gis_data[<?php echo($a); ?>][<?php echo($type); ?>][<?php echo($i); ?>][<?php echo($j); ?>][x]" value="<?php echo(isset($gis_data[$a][$type][$i][$j]['x']) ? htmlspecialchars($gis_data[$a][$type][$i][$j]['x']) : ''); ?>" />
|
||||
<label for="y"><?php echo __("Y"); ?></label>
|
||||
<input type="text" name="gis_data[<?php echo($a); ?>][<?php echo($type); ?>][<?php echo($i); ?>][<?php echo($j); ?>][y]" value="<?php echo(isset($gis_data[$a][$type][$i][$j]['x']) ? htmlspecialchars($gis_data[$a][$type][$i][$j]['y']) : ''); ?>" />
|
||||
<?php }
|
||||
<?php
|
||||
}
|
||||
?> <input type="submit" name="gis_data[<?php echo($a); ?>][<?php echo($type); ?>][<?php echo($i); ?>][add_point]" class="add addPoint" value="<?php echo __("Add a point"); ?>">
|
||||
<?php }
|
||||
$caption = ($type == 'MULTILINESTRING') ? __('Add a linestring') : __('Add an inner ring');
|
||||
<?php
|
||||
}
|
||||
$caption = ($type == 'MULTILINESTRING')
|
||||
? __('Add a linestring') : __('Add an inner ring');
|
||||
?> <br/><input type="submit" name="gis_data[<?php echo($a); ?>][<?php echo($type); ?>][add_line]" class="add addLine" value="<?php echo($caption); ?>">
|
||||
<?php
|
||||
} elseif ($type == 'MULTIPOLYGON') {
|
||||
$no_of_polygons = isset($gis_data[$a][$type]['no_of_polygons']) ? $gis_data[$a][$type]['no_of_polygons'] : 1;
|
||||
if ($no_of_polygons < 1) {
|
||||
$no_of_polygons = 1;
|
||||
} elseif ($type == 'MULTIPOLYGON') {
|
||||
$no_of_polygons = isset($gis_data[$a][$type]['no_of_polygons'])
|
||||
? $gis_data[$a][$type]['no_of_polygons'] : 1;
|
||||
if ($no_of_polygons < 1) {
|
||||
$no_of_polygons = 1;
|
||||
}
|
||||
if (isset($gis_data[$a][$type]['add_polygon'])) {
|
||||
$no_of_polygons++;
|
||||
}
|
||||
echo('<input type="hidden" name="gis_data[' . $a . '][' . $type
|
||||
. '][no_of_polygons]" value="' . $no_of_polygons . '">');
|
||||
|
||||
for ($k = 0; $k < $no_of_polygons; $k++) {
|
||||
echo('<br/>'); echo __("Polygon"); echo($k + 1 . ':');
|
||||
$no_of_lines = isset($gis_data[$a][$type][$k]['no_of_lines'])
|
||||
? $gis_data[$a][$type][$k]['no_of_lines'] : 1;
|
||||
if ($no_of_lines < 1) {
|
||||
$no_of_lines = 1;
|
||||
}
|
||||
if (isset($gis_data[$a][$type][$k]['add_line'])) {
|
||||
$no_of_lines++;
|
||||
}
|
||||
echo('<input type="hidden" name="gis_data[' . $a . '][' . $type
|
||||
. '][' . $k . '][no_of_lines]" value="' . $no_of_lines . '">');
|
||||
|
||||
for ($i = 0; $i < $no_of_lines; $i++) {
|
||||
echo('<br/><br/>');
|
||||
if ($i == 0) {
|
||||
echo __("Outer Ring") . ':';
|
||||
} else {
|
||||
echo __("Inner Ring"); echo($i . ':');
|
||||
}
|
||||
if (isset($gis_data[$a][$type]['add_polygon'])) {
|
||||
$no_of_polygons++;
|
||||
|
||||
$no_of_points = isset($gis_data[$a][$type][$k][$i]['no_of_points'])
|
||||
? $gis_data[$a][$type][$k][$i]['no_of_points'] : 4;
|
||||
if ($no_of_points < 4) {
|
||||
$no_of_points = 4;
|
||||
}
|
||||
echo('<input type="hidden" name="gis_data[' . $a . '][' . $type . '][no_of_polygons]" value="' . $no_of_polygons . '">');
|
||||
if (isset($gis_data[$a][$type][$k][$i]['add_point'])) {
|
||||
$no_of_points++;
|
||||
}
|
||||
echo('<input type="hidden" name="gis_data[' . $a . '][' . $type
|
||||
. '][' . $k . '][' . $i . '][no_of_points]" value="'
|
||||
. $no_of_points . '">');
|
||||
|
||||
for ($k = 0; $k < $no_of_polygons; $k++) {
|
||||
echo('<br/>'); echo __("Polygon"); echo($k + 1 . ':');
|
||||
$no_of_lines = isset($gis_data[$a][$type][$k]['no_of_lines']) ? $gis_data[$a][$type][$k]['no_of_lines'] : 1;
|
||||
if ($no_of_lines < 1) {
|
||||
$no_of_lines = 1;
|
||||
}
|
||||
if (isset($gis_data[$a][$type][$k]['add_line'])) {
|
||||
$no_of_lines++;
|
||||
}
|
||||
echo('<input type="hidden" name="gis_data[' . $a . '][' . $type . '][' . $k . '][no_of_lines]" value="' . $no_of_lines . '">');
|
||||
|
||||
for ($i = 0; $i < $no_of_lines; $i++) {
|
||||
echo('<br/><br/>');
|
||||
if ($i == 0) {
|
||||
echo __("Outer Ring") . ':';
|
||||
} else {
|
||||
echo __("Inner Ring"); echo($i . ':');
|
||||
}
|
||||
|
||||
$no_of_points = isset($gis_data[$a][$type][$k][$i]['no_of_points']) ? $gis_data[$a][$type][$k][$i]['no_of_points'] : 4;
|
||||
if ($no_of_points < 4) {
|
||||
$no_of_points = 4;
|
||||
}
|
||||
if (isset($gis_data[$a][$type][$k][$i]['add_point'])) {
|
||||
$no_of_points++;
|
||||
}
|
||||
echo('<input type="hidden" name="gis_data[' . $a . '][' . $type . '][' . $k . '][' . $i . '][no_of_points]" value="' . $no_of_points . '">');
|
||||
|
||||
for ($j = 0; $j < $no_of_points; $j++) {
|
||||
echo('<br/>');
|
||||
printf(__('Point %d'), $j + 1);
|
||||
echo ':';
|
||||
for ($j = 0; $j < $no_of_points; $j++) {
|
||||
echo('<br/>');
|
||||
printf(__('Point %d'), $j + 1);
|
||||
echo ':';
|
||||
?> <label for="x"><?php echo __("X"); ?></label>
|
||||
<input type="text" name="<?php echo("gis_data[" . $a . "][" . $type . "][" . $k . "][" . $i . "][" . $j . "][x]"); ?>" value="<?php echo(isset($gis_data[$a][$type][$k][$i][$j]['x']) ? htmlspecialchars($gis_data[$a][$type][$k][$i][$j]['x']) : ''); ?>" />
|
||||
<label for="y"><?php echo __("Y"); ?></label>
|
||||
<input type="text" name="<?php echo("gis_data[" . $a . "][" . $type . "][" . $k . "][" . $i . "][" . $j . "][y]"); ?>" value="<?php echo(isset($gis_data[$a][$type][$k][$i][$j]['y']) ? htmlspecialchars($gis_data[$a][$type][$k][$i][$j]['y']) : ''); ?>" />
|
||||
<?php }
|
||||
<?php
|
||||
}
|
||||
?> <input type="submit" name="<?php echo("gis_data[" . $a . "][" . $type . "][" . $k . "][" . $i . "][add_point]"); ?>" class="add addPoint" value="<?php echo __("Add a point"); ?>">
|
||||
<?php }
|
||||
<?php
|
||||
}
|
||||
?> <br/><input type="submit" name="<?php echo("gis_data[" . $a . "][" . $type . "][" . $k . "][add_line]"); ?>" class="add addLine" value="<?php echo __('Add an inner ring') ?>"><br/>
|
||||
<?php }
|
||||
?> <br/><input type="submit" name="<?php echo("gis_data[" . $a . "][" . $type . "][add_polygon]"); ?>" class="add addPolygon" value="<?php echo __('Add a polygon') ?>">
|
||||
<?php }
|
||||
<?php
|
||||
}
|
||||
if ($geom_type == 'GEOMETRYCOLLECTION') {
|
||||
?> <br/><br/><input type="submit" name="gis_data[GEOMETRYCOLLECTION][add_geom]" class="add addGeom" value="<?php echo __("Add geometry"); ?>" />
|
||||
<?php }
|
||||
?> <br/><input type="submit" name="<?php echo("gis_data[" . $a . "][" . $type . "][add_polygon]"); ?>" class="add addPolygon" value="<?php echo __('Add a polygon') ?>">
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if ($geom_type == 'GEOMETRYCOLLECTION') {
|
||||
?> <br/><br/><input type="submit" name="gis_data[GEOMETRYCOLLECTION][add_geom]" class="add addGeom" value="<?php echo __("Add geometry"); ?>" />
|
||||
<?php
|
||||
}
|
||||
?> </div>
|
||||
<!-- End of data section -->
|
||||
|
||||
<br/><input type="submit" name="gis_data[save]" value="<?php echo __('Go') ?>">
|
||||
<div id="gis_data_output">
|
||||
<h3><?php echo __('Output'); ?></h3>
|
||||
<p><?php echo __('Chose "GeomFromText" from the "Function" column and paste the below string into the "Value" field'); ?></p>
|
||||
<p><?php
|
||||
echo __(
|
||||
'Choose "GeomFromText" from the "Function" column and paste the'
|
||||
. ' string below into the "Value" field'
|
||||
);
|
||||
?></p>
|
||||
<textarea id="gis_data_textarea" cols="95" rows="5">
|
||||
<?php echo($result);
|
||||
<?php
|
||||
echo $result;
|
||||
?> </textarea>
|
||||
</div>
|
||||
</div>
|
||||
@ -315,5 +366,4 @@ ob_start();
|
||||
|
||||
PMA_Response::getInstance()->addJSON('gis_editor', ob_get_contents());
|
||||
ob_end_clean();
|
||||
|
||||
?>
|
||||
|
||||
@ -91,7 +91,11 @@ if (! empty($sql_query)) {
|
||||
// upload limit has been reached, let's assume the second possibility.
|
||||
;
|
||||
if ($_POST == array() && $_GET == array()) {
|
||||
$message = PMA_Message::error(__('You probably tried to upload too large file. Please refer to %sdocumentation%s for ways to workaround this limit.'));
|
||||
$message = PMA_Message::error(
|
||||
__('You probably tried to upload a file that is too large.'
|
||||
. ' Please refer to %sdocumentation%s for a workaround for this limit.'
|
||||
)
|
||||
);
|
||||
$message->addParam('[a@./Documentation.html#faq1_16@_blank]');
|
||||
$message->addParam('[/a]');
|
||||
|
||||
|
||||
@ -636,21 +636,24 @@ EOT;
|
||||
// if all column names were selected to display, we do a 'SELECT *'
|
||||
// (more efficient and this helps prevent a problem in IE
|
||||
// if one of the rows is edited and we come back to the Select results)
|
||||
if (isset($_POST['zoom_submit'])) {
|
||||
if (isset($_POST['zoom_submit']) || ! empty($_POST['displayAllColumns'])) {
|
||||
$sql_query .= '* ';
|
||||
} else {
|
||||
$sql_query .= ! empty($_POST['displayAllColumns'])
|
||||
? '* '
|
||||
: implode(', ', $this->getCommonFunctions()->backquote($_POST['columnsToDisplay']));
|
||||
$sql_query .= implode(
|
||||
', ',
|
||||
$this->getCommonFunctions()->backquote($_POST['columnsToDisplay'])
|
||||
);
|
||||
} // end if
|
||||
|
||||
$sql_query .= ' FROM ' . $this->getCommonFunctions()->backquote($_POST['table']);
|
||||
$sql_query .= ' FROM '
|
||||
. $this->getCommonFunctions()->backquote($_POST['table']);
|
||||
$whereClause = $this->_generateWhereClause();
|
||||
$sql_query .= $whereClause;
|
||||
|
||||
// if the search results are to be ordered
|
||||
if (isset($_POST['orderByColumn']) && $_POST['orderByColumn'] != '--nil--') {
|
||||
$sql_query .= ' ORDER BY ' . $this->getCommonFunctions()->backquote($_POST['orderByColumn'])
|
||||
$sql_query .= ' ORDER BY '
|
||||
. $this->getCommonFunctions()->backquote($_POST['orderByColumn'])
|
||||
. ' ' . $_POST['order'];
|
||||
} // end if
|
||||
return $sql_query;
|
||||
|
||||
@ -20,11 +20,14 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5 &&
|
||||
// Displays the form
|
||||
?>
|
||||
<form method="post" id="change_password_form" action="<?php echo $GLOBALS['PMA_PHP_SELF']; ?>" name="chgPassword" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'class="ajax" ' : ''); ?>>
|
||||
<?php echo PMA_generate_common_hidden_inputs();
|
||||
if (strpos($GLOBALS['PMA_PHP_SELF'], 'server_privileges') !== false) {
|
||||
echo '<input type="hidden" name="username" value="' . htmlspecialchars($username) . '" />' . "\n"
|
||||
. '<input type="hidden" name="hostname" value="' . htmlspecialchars($hostname) . '" />' . "\n";
|
||||
}?>
|
||||
<?php
|
||||
echo PMA_generate_common_hidden_inputs();
|
||||
if (strpos($GLOBALS['PMA_PHP_SELF'], 'server_privileges') !== false) {
|
||||
echo '<input type="hidden" name="username" value="'
|
||||
. htmlspecialchars($username) . '" />' . "\n"
|
||||
. '<input type="hidden" name="hostname" value="'
|
||||
. htmlspecialchars($hostname) . '" />' . "\n";
|
||||
}?>
|
||||
<fieldset id="fieldset_change_password">
|
||||
<legend><?php echo __('Change password'); ?></legend>
|
||||
<table class="data noclick">
|
||||
|
||||
@ -130,7 +130,9 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array detail pages
|
||||
* Get information pages
|
||||
*
|
||||
* @return array detail pages
|
||||
*/
|
||||
function getInfoPages()
|
||||
{
|
||||
@ -178,7 +180,10 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine
|
||||
. ' / '
|
||||
. join(
|
||||
' ',
|
||||
$common_functions->formatByteDown($status['Innodb_buffer_pool_pages_total'] * $status['Innodb_page_size'])
|
||||
$common_functions->formatByteDown(
|
||||
$status['Innodb_buffer_pool_pages_total']
|
||||
* $status['Innodb_page_size']
|
||||
)
|
||||
) . "\n"
|
||||
. ' </th>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
@ -225,75 +230,89 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>';
|
||||
|
||||
// not present at least since MySQL 5.1.40
|
||||
if (isset($status['Innodb_buffer_pool_pages_latched'])) {
|
||||
$output .= ' <tr class="even">'
|
||||
. ' <th>' . __('Latched pages') . '</th>'
|
||||
. ' <td class="value">'
|
||||
. $common_functions->formatNumber(
|
||||
$status['Innodb_buffer_pool_pages_latched'], 0
|
||||
)
|
||||
. '</td>'
|
||||
. ' </tr>';
|
||||
}
|
||||
// not present at least since MySQL 5.1.40
|
||||
if (isset($status['Innodb_buffer_pool_pages_latched'])) {
|
||||
$output .= ' <tr class="even">'
|
||||
. ' <th>' . __('Latched pages') . '</th>'
|
||||
. ' <td class="value">'
|
||||
. $common_functions->formatNumber(
|
||||
$status['Innodb_buffer_pool_pages_latched'], 0
|
||||
)
|
||||
. '</td>'
|
||||
. ' </tr>';
|
||||
}
|
||||
|
||||
$output .= ' </tbody>' . "\n"
|
||||
. '</table>' . "\n\n"
|
||||
. '<table class="data" id="table_innodb_bufferpool_activity">' . "\n"
|
||||
. ' <caption class="tblHeaders">' . "\n"
|
||||
. ' ' . __('Buffer Pool Activity') . "\n"
|
||||
. ' </caption>' . "\n"
|
||||
. ' <tbody>' . "\n"
|
||||
. ' <tr class="odd">' . "\n"
|
||||
. ' <th>' . __('Read requests') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. $common_functions->formatNumber(
|
||||
$status['Innodb_buffer_pool_read_requests'], 0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="even">' . "\n"
|
||||
. ' <th>' . __('Write requests') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. $common_functions->formatNumber(
|
||||
$status['Innodb_buffer_pool_write_requests'], 0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="odd">' . "\n"
|
||||
. ' <th>' . __('Read misses') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. $common_functions->formatNumber(
|
||||
$status['Innodb_buffer_pool_reads'], 0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="even">' . "\n"
|
||||
. ' <th>' . __('Write waits') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. $common_functions->formatNumber(
|
||||
$status['Innodb_buffer_pool_wait_free'], 0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="odd">' . "\n"
|
||||
. ' <th>' . __('Read misses in %') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. ($status['Innodb_buffer_pool_read_requests'] == 0
|
||||
? '---'
|
||||
: htmlspecialchars($common_functions->formatNumber($status['Innodb_buffer_pool_reads'] * 100 / $status['Innodb_buffer_pool_read_requests'], 3, 2)) . ' %') . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="even">' . "\n"
|
||||
. ' <th>' . __('Write waits in %') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. ($status['Innodb_buffer_pool_write_requests'] == 0
|
||||
? '---'
|
||||
: htmlspecialchars($common_functions->formatNumber($status['Innodb_buffer_pool_wait_free'] * 100 / $status['Innodb_buffer_pool_write_requests'], 3, 2)) . ' %') . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' </tbody>' . "\n"
|
||||
. '</table>' . "\n";
|
||||
$output .= ' </tbody>' . "\n"
|
||||
. '</table>' . "\n\n"
|
||||
. '<table class="data" id="table_innodb_bufferpool_activity">' . "\n"
|
||||
. ' <caption class="tblHeaders">' . "\n"
|
||||
. ' ' . __('Buffer Pool Activity') . "\n"
|
||||
. ' </caption>' . "\n"
|
||||
. ' <tbody>' . "\n"
|
||||
. ' <tr class="odd">' . "\n"
|
||||
. ' <th>' . __('Read requests') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. $common_functions->formatNumber(
|
||||
$status['Innodb_buffer_pool_read_requests'], 0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="even">' . "\n"
|
||||
. ' <th>' . __('Write requests') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. $common_functions->formatNumber(
|
||||
$status['Innodb_buffer_pool_write_requests'], 0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="odd">' . "\n"
|
||||
. ' <th>' . __('Read misses') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. $common_functions->formatNumber(
|
||||
$status['Innodb_buffer_pool_reads'], 0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="even">' . "\n"
|
||||
. ' <th>' . __('Write waits') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. $common_functions->formatNumber(
|
||||
$status['Innodb_buffer_pool_wait_free'], 0
|
||||
) . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="odd">' . "\n"
|
||||
. ' <th>' . __('Read misses in %') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. ($status['Innodb_buffer_pool_read_requests'] == 0
|
||||
? '---'
|
||||
: htmlspecialchars(
|
||||
$common_functions->formatNumber(
|
||||
$status['Innodb_buffer_pool_reads'] * 100
|
||||
/ $status['Innodb_buffer_pool_read_requests'],
|
||||
3,
|
||||
2
|
||||
)
|
||||
) . ' %') . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' <tr class="even">' . "\n"
|
||||
. ' <th>' . __('Write waits in %') . '</th>' . "\n"
|
||||
. ' <td class="value">'
|
||||
. ($status['Innodb_buffer_pool_write_requests'] == 0
|
||||
? '---'
|
||||
: htmlspecialchars(
|
||||
$common_functions->formatNumber(
|
||||
$status['Innodb_buffer_pool_wait_free'] * 100
|
||||
/ $status['Innodb_buffer_pool_write_requests'],
|
||||
3,
|
||||
2
|
||||
)
|
||||
) . ' %') . "\n"
|
||||
. '</td>' . "\n"
|
||||
. ' </tr>' . "\n"
|
||||
. ' </tbody>' . "\n"
|
||||
. '</table>' . "\n";
|
||||
return $output;
|
||||
}
|
||||
|
||||
@ -305,15 +324,18 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine
|
||||
function getPageStatus()
|
||||
{
|
||||
return '<pre id="pre_innodb_status">' . "\n"
|
||||
. htmlspecialchars(PMA_DBI_fetch_value('SHOW INNODB STATUS;', 0, 'Status')) . "\n"
|
||||
. htmlspecialchars(
|
||||
PMA_DBI_fetch_value('SHOW INNODB STATUS;', 0, 'Status')
|
||||
) . "\n"
|
||||
. '</pre>' . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* returns content for page $id
|
||||
* Returns content for page $id
|
||||
*
|
||||
* @param string $id page id
|
||||
* @return string html output
|
||||
* @param string $id page id
|
||||
*
|
||||
* @return string html output
|
||||
*/
|
||||
function getPage($id)
|
||||
{
|
||||
@ -338,8 +360,8 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the InnoDB plugin version number
|
||||
*
|
||||
* http://www.innodb.com/products/innodb_plugin
|
||||
* (do not confuse this with phpMyAdmin's storage engine plugins!)
|
||||
*
|
||||
@ -351,8 +373,8 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the InnoDB file format
|
||||
*
|
||||
* (works only for the InnoDB plugin)
|
||||
* http://www.innodb.com/products/innodb_plugin
|
||||
* (do not confuse this with phpMyAdmin's storage engine plugins!)
|
||||
@ -361,12 +383,14 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine
|
||||
*/
|
||||
function getInnodbFileFormat()
|
||||
{
|
||||
return PMA_DBI_fetch_value("SHOW GLOBAL VARIABLES LIKE 'innodb_file_format';", 0, 1);
|
||||
return PMA_DBI_fetch_value(
|
||||
"SHOW GLOBAL VARIABLES LIKE 'innodb_file_format';", 0, 1
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Verifies if this server supports the innodb_file_per_table feature
|
||||
*
|
||||
* (works only for the InnoDB plugin)
|
||||
* http://www.innodb.com/products/innodb_plugin
|
||||
* (do not confuse this with phpMyAdmin's storage engine plugins!)
|
||||
@ -375,7 +399,9 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine
|
||||
*/
|
||||
function supportsFilePerTable()
|
||||
{
|
||||
$innodb_file_per_table = PMA_DBI_fetch_value("SHOW GLOBAL VARIABLES LIKE 'innodb_file_per_table';", 0, 1);
|
||||
$innodb_file_per_table = PMA_DBI_fetch_value(
|
||||
"SHOW GLOBAL VARIABLES LIKE 'innodb_file_per_table';", 0, 1
|
||||
);
|
||||
if ($innodb_file_per_table == 'ON') {
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@ -95,9 +95,9 @@ $header->disableMenu();
|
||||
<br>
|
||||
<div>
|
||||
<?php
|
||||
if (! empty($message)) {
|
||||
$message->display();
|
||||
}
|
||||
if (! empty($message)) {
|
||||
$message->display();
|
||||
}
|
||||
?>
|
||||
<form name="form1" method="post" action="pmd_pdf.php">
|
||||
<?php
|
||||
|
||||
1712
po/be@latin.po
1712
po/be@latin.po
File diff suppressed because it is too large
Load Diff
2022
po/en_GB.po
2022
po/en_GB.po
File diff suppressed because it is too large
Load Diff
1692
po/phpmyadmin.pot
1692
po/phpmyadmin.pot
File diff suppressed because it is too large
Load Diff
2148
po/pt_BR.po
2148
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
1696
po/sr@latin.po
1696
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
1724
po/uz@latin.po
1724
po/uz@latin.po
File diff suppressed because it is too large
Load Diff
1700
po/zh_CN.po
1700
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
1692
po/zh_TW.po
1692
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user