Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Adriaenssens <ruleant@users.sourceforge.net>2013-01-22 00:55:31 +0400
committerDieter Adriaenssens <ruleant@users.sourceforge.net>2013-01-22 00:55:31 +0400
commitdd8cdd3958806830c925033131a8be5d92ad28d1 (patch)
tree27be6e4f5559aaccb7929be7c506374594963e0b
parentc5dce8788d2ee540c8a5b669546cb1fbc4d20824 (diff)
improve coding style : remove mixed php and htmlRELEASE_4_0_0ALPHA1
-rw-r--r--view_create.php176
1 files changed, 89 insertions, 87 deletions
diff --git a/view_create.php b/view_create.php
index 90fe555edb..d8781295d8 100644
--- a/view_create.php
+++ b/view_create.php
@@ -72,7 +72,7 @@ if (isset($_REQUEST['createview'])) {
$view_columns = explode(',', $_REQUEST['view']['column_names']);
}
- $column_map = PMA_getColumnMap($_REQUEST['view']['as'], $view_columns);
+ $column_map = PMA_getColumnMap($_REQUEST['view']['as'], $view_columns);
$pma_tranformation_data = PMA_getExistingTranformationData($GLOBALS['db']);
if ($pma_tranformation_data !== false) {
@@ -143,90 +143,92 @@ $url_params['reload'] = 1;
/**
* Displays the page
*/
-?>
-<!-- CREATE VIEW options -->
-<div id="div_view_options">
-<form method="post" action="view_create.php">
-<?php echo PMA_generate_common_hidden_inputs($url_params); ?>
-<fieldset>
- <legend><?php echo __('Create view') . PMA_Util::showMySQLDocu('SQL-Syntax', 'CREATE_VIEW'); ?></legend>
- <table class="rte_table">
- <tr><td><label for="or_replace">OR REPLACE</label></td>
- <td><input type="checkbox" name="view[or_replace]" id="or_replace"
- <?php if ($view['or_replace']) { ?>
- checked="checked"
- <?php } ?>
- value="1" />
- </td>
- </tr>
- <tr>
- <td><label for="algorithm">ALGORITHM</label></td>
- <td><select name="view[algorithm]" id="algorithm">
- <?php
- foreach ($view_algorithm_options as $option) {
- echo '<option value="' . htmlspecialchars($option) . '"';
- if ($view['algorithm'] === $option) {
- echo 'selected="selected"';
- }
- echo '>' . htmlspecialchars($option) . '</option>';
- }
- ?>
- </select>
- </td>
- </tr>
- <tr><td><?php echo __('VIEW name'); ?></td>
- <td><input type="text" size="20" name="view[name]" onfocus="this.select()"
- value="<?php echo htmlspecialchars($view['name']); ?>" />
- </td>
- </tr>
- <tr><td><?php echo __('Column names'); ?></td>
- <td><input type="text" maxlength="100" size="50" name="view[column_names]"
- onfocus="this.select()"
- value="<?php echo htmlspecialchars($view['column_names']); ?>" />
- </td>
- </tr>
- <tr><td>AS</td>
- <td>
- <textarea name="view[as]" rows="<?php echo $cfg['TextareaRows']; ?>"
- cols="<?php echo $cfg['TextareaCols']; ?>"
- dir="<?php echo $text_dir; ?>"<?php
- if ($GLOBALS['cfg']['TextareaAutoSelect'] || true) {
- echo ' onclick="selectContent(this, sql_box_locked, true)"';
- }
- ?>><?php echo htmlspecialchars($view['as']); ?></textarea>
- </td>
- </tr>
- <tr><td>WITH</td>
- <td>
- <?php
- foreach ($view_with_options as $option) {
- echo '<input type="checkbox" name="view[with][]"';
- if (in_array($option, $view['with'])) {
- echo ' checked="checked"';
- }
- echo ' id="view_with_' . str_replace(' ', '_', htmlspecialchars($option)) . '"';
- echo ' value="' . htmlspecialchars($option) . '" />';
- echo '<label for="view_with_' . str_replace(' ', '_', htmlspecialchars($option)) . '">&nbsp;';
- echo htmlspecialchars($option) . '</label><br />';
- }
- ?>
- </td>
- </tr>
- </table>
-</fieldset>
-<?php
- if ($GLOBALS['is_ajax_request'] != true) {
-?>
-<fieldset class="tblFooters">
- <input type="submit" name="createview" value="<?php echo __('Go'); ?>" />
-</fieldset>
-<?php
- } else {
-?>
- <input type="hidden" name="createview" value="1" />
- <input type="hidden" name="ajax_request" value="1" />
-<?php
+$htmlString = '<!-- CREATE VIEW options -->'
+ . '<div id="div_view_options">'
+ . '<form method="post" action="view_create.php">'
+ . PMA_generate_common_hidden_inputs($url_params)
+ . '<fieldset>'
+ . '<legend>' . __('Create view')
+ . PMA_Util::showMySQLDocu('SQL-Syntax', 'CREATE_VIEW') . '</legend>'
+ . '<table class="rte_table">'
+ . '<tr><td><label for="or_replace">OR REPLACE</label></td>'
+ . '<td><input type="checkbox" name="view[or_replace]" id="or_replace"';
+if ($view['or_replace']) {
+ $htmlString .= ' checked="checked"';
+}
+$htmlString .= ' value="1" />'
+ . '</td>'
+ . '</tr>'
+ . '<tr>'
+ . '<td><label for="algorithm">ALGORITHM</label></td>'
+ . '<td><select name="view[algorithm]" id="algorithm">';
+
+foreach ($view_algorithm_options as $option) {
+ $htmlString .= '<option value="' . htmlspecialchars($option) . '"';
+ if ($view['algorithm'] === $option) {
+ $htmlString .= ' selected="selected"';
+ }
+ $htmlString .= '>' . htmlspecialchars($option) . '</option>';
+}
+
+$htmlString .= '</select>'
+ . '</td>'
+ . '</tr>'
+ . '<tr><td>' . __('VIEW name') . '</td>'
+ . '<td><input type="text" size="20" name="view[name]" onfocus="this.select()"'
+ . ' value="' . htmlspecialchars($view['name']) . '" />'
+ . '</td>'
+ . '</tr>'
+ . '<tr><td>' . __('Column names') . '</td>'
+ . '<td><input type="text" maxlength="100" size="50" name="view[column_names]"'
+ . ' onfocus="this.select()"'
+ . ' value="' . htmlspecialchars($view['column_names']) . '" />'
+ . '</td>'
+ . '</tr>'
+ . '<tr><td>AS</td>'
+ . '<td>'
+ . '<textarea name="view[as]" rows="' . $cfg['TextareaRows'] . '"'
+ . ' cols="' . $cfg['TextareaCols'] . '"'
+ . ' dir="' . $text_dir . '"';
+
+if ($GLOBALS['cfg']['TextareaAutoSelect'] || true) {
+ $htmlString .= ' onclick="selectContent(this, sql_box_locked, true)"';
+}
+
+$htmlString .= '>' . htmlspecialchars($view['as']) . '</textarea>'
+ . '</td>'
+ . '</tr>'
+ . '<tr><td>WITH</td>'
+ . '<td>';
+
+foreach ($view_with_options as $option) {
+ $htmlString .= '<input type="checkbox" name="view[with][]"';
+ if (in_array($option, $view['with'])) {
+ $htmlString .= ' checked="checked"';
}
-?>
-</form>
-</div>
+ $htmlString .= ' id="view_with_'
+ . str_replace(' ', '_', htmlspecialchars($option)) . '"'
+ . ' value="' . htmlspecialchars($option) . '" />'
+ . '<label for="view_with_' . str_replace(' ', '_', htmlspecialchars($option))
+ . '">&nbsp;'
+ . htmlspecialchars($option) . '</label><br />';
+}
+
+$htmlString .= '</td>'
+ . '</tr>'
+ . '</table>'
+ . '</fieldset>';
+
+if ($GLOBALS['is_ajax_request'] != true) {
+ $htmlString .= '<fieldset class="tblFooters">'
+ . '<input type="submit" name="createview" value="' . __('Go') . '" />'
+ . '</fieldset>';
+} else {
+ $htmlString .= '<input type="hidden" name="createview" value="1" />'
+ . '<input type="hidden" name="ajax_request" value="1" />';
+}
+
+$htmlString .= '</form>'
+ . '</div>';
+
+echo $htmlString;