mirror of
https://github.com/vrana/adminer.git
synced 2025-08-17 20:01:25 +02:00
HTML instead of XHTML
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@937 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -165,7 +165,7 @@ class Adminer {
|
||||
if ($index["type"] == "FULLTEXT") {
|
||||
echo "(<i>" . implode("</i>, <i>", array_map('h', $index["columns"])) . "</i>) AGAINST";
|
||||
echo " <input name='fulltext[$i]' value='" . h($_GET["fulltext"][$i]) . "'>";
|
||||
echo "<label><input type='checkbox' name='boolean[$i]' value='1'" . (isset($_GET["boolean"][$i]) ? " checked='checked'" : "") . ">" . lang('BOOL') . "</label>";
|
||||
echo "<label><input type='checkbox' name='boolean[$i]' value='1'" . (isset($_GET["boolean"][$i]) ? " checked" : "") . ">" . lang('BOOL') . "</label>";
|
||||
echo "<br>\n";
|
||||
}
|
||||
}
|
||||
@@ -196,7 +196,7 @@ class Adminer {
|
||||
foreach ((array) $_GET["order"] as $key => $val) {
|
||||
if (isset($columns[$val])) {
|
||||
echo "<div><select name='order[$i]'><option>" . optionlist($columns, $val, true) . "</select>";
|
||||
echo "<label><input type='checkbox' name='desc[$i]' value='1'" . (isset($_GET["desc"][$key]) ? " checked='checked'" : "") . ">" . lang('descending') . "</label></div>\n";
|
||||
echo "<label><input type='checkbox' name='desc[$i]' value='1'" . (isset($_GET["desc"][$key]) ? " checked" : "") . ">" . lang('descending') . "</label></div>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
@@ -87,8 +87,8 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $forei
|
||||
<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" onchange="<?php echo (strlen($field["field"]) || count($fields) > 1 ? "" : "editing_add_row(this, $allowed); "); ?>editing_name_change(this);" maxlength="64"><?php } ?><input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($field[($_POST ? "orig" : "field")]); ?>">
|
||||
<?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
|
||||
<?php if ($type == "TABLE") { ?>
|
||||
<td><input type="checkbox" name="fields[<?php echo $i; ?>][null]" value="1"<?php if ($field["null"]) { ?> checked="checked"<?php } ?>>
|
||||
<td><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked="checked"<?php } ?>>
|
||||
<td><input type="checkbox" name="fields[<?php echo $i; ?>][null]" value="1"<?php if ($field["null"]) { ?> checked<?php } ?>>
|
||||
<td><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?>>
|
||||
<td<?php echo ($column_comments ? "" : " class='hidden'"); ?>><input name="fields[<?php echo $i; ?>][comment]" value="<?php echo h($field["comment"]); ?>" maxlength="255">
|
||||
<?php } ?>
|
||||
<?php
|
||||
|
@@ -36,7 +36,7 @@ function optionlist($options, $selected = null, $use_keys = false) {
|
||||
$return .= '<optgroup label="' . h($k) . '">';
|
||||
}
|
||||
foreach ((is_array($v) ? $v : array($k => $v)) as $key => $val) {
|
||||
$return .= '<option' . ($use_keys || is_string($key) ? ' value="' . h($key) . '"' : '') . (($use_keys || is_string($key) ? (string) $key : $val) === $selected ? ' selected="selected"' : '') . '>' . h($val);
|
||||
$return .= '<option' . ($use_keys || is_string($key) ? ' value="' . h($key) . '"' : '') . (($use_keys || is_string($key) ? (string) $key : $val) === $selected ? ' selected' : '') . '>' . h($val);
|
||||
}
|
||||
if (is_array($v)) {
|
||||
$return .= '</optgroup>';
|
||||
@@ -293,18 +293,18 @@ function input($field, $value, $function) {
|
||||
$name = h(bracket_escape($field["field"]));
|
||||
echo "<td class='function'>";
|
||||
if ($field["type"] == "enum") {
|
||||
echo " <td>" . (isset($_GET["select"]) ? " <label><input type='radio' name='fields[$name]' value='-1' checked='checked'><em>" . lang('original') . "</em></label>" : "");
|
||||
echo " <td>" . (isset($_GET["select"]) ? " <label><input type='radio' name='fields[$name]' value='-1' checked><em>" . lang('original') . "</em></label>" : "");
|
||||
if ($field["null"] || isset($_GET["default"])) {
|
||||
echo " <label><input type='radio' name='fields[$name]' value=''" . (($field["null"] ? isset($value) : strlen($value)) || isset($_GET["select"]) ? '' : ' checked="checked"') . '>' . ($field["null"] ? '<em>NULL</em>' : '') . '</label>';
|
||||
echo " <label><input type='radio' name='fields[$name]' value=''" . (($field["null"] ? isset($value) : strlen($value)) || isset($_GET["select"]) ? '' : ' checked') . '>' . ($field["null"] ? '<em>NULL</em>' : '') . '</label>';
|
||||
}
|
||||
if (!isset($_GET["default"])) {
|
||||
echo "<input type='radio' name='fields[$name]' value='0'" . ($value === 0 ? ' checked="checked"' : '') . '>';
|
||||
echo "<input type='radio' name='fields[$name]' value='0'" . ($value === 0 ? ' checked' : '') . '>';
|
||||
}
|
||||
preg_match_all("~'((?:[^']+|'')*)'~", $field["length"], $matches);
|
||||
foreach ($matches[1] as $i => $val) {
|
||||
$val = stripcslashes(str_replace("''", "'", $val));
|
||||
$checked = (is_int($value) ? $value == $i+1 : $value === $val);
|
||||
echo " <label><input type='radio' name='fields[$name]' value='" . (isset($_GET["default"]) ? (strlen($val) ? h($val) : " ") : $i+1) . "'" . ($checked ? ' checked="checked"' : '') . '>' . h($val) . '</label>';
|
||||
echo " <label><input type='radio' name='fields[$name]' value='" . (isset($_GET["default"]) ? (strlen($val) ? h($val) : " ") : $i+1) . "'" . ($checked ? ' checked' : '') . '>' . h($val) . '</label>';
|
||||
}
|
||||
} else {
|
||||
$functions = (isset($_GET["select"]) ? array("orig" => lang('original')) : array()) + $adminer->editFunctions($field);
|
||||
@@ -319,7 +319,7 @@ function input($field, $value, $function) {
|
||||
foreach ($matches[1] as $i => $val) {
|
||||
$val = stripcslashes(str_replace("''", "'", $val));
|
||||
$checked = (is_int($value) ? ($value >> $i) & 1 : in_array($val, explode(",", $value), true));
|
||||
echo " <label><input type='checkbox' name='fields[$name][$i]' value='" . (isset($_GET["default"]) ? h($val) : 1 << $i) . "'" . ($checked ? ' checked="checked"' : '') . "$onchange>" . h($val) . '</label>';
|
||||
echo " <label><input type='checkbox' name='fields[$name][$i]' value='" . (isset($_GET["default"]) ? h($val) : 1 << $i) . "'" . ($checked ? ' checked' : '') . "$onchange>" . h($val) . '</label>';
|
||||
}
|
||||
} elseif (strpos($field["type"], "text") !== false) {
|
||||
echo "<textarea name='fields[$name]' cols='50' rows='12'$onchange>" . h($value) . '</textarea>';
|
||||
|
@@ -33,7 +33,7 @@ function switch_lang() {
|
||||
hidden_fields($_GET, array('lang'));
|
||||
echo lang('Language') . ": <select name='lang' onchange='this.form.submit();'>";
|
||||
foreach ($langs as $lang => $val) {
|
||||
echo "<option value='$lang'" . ($LANG == $lang ? " selected='selected'" : "") . ">$val";
|
||||
echo "<option value='$lang'" . ($LANG == $lang ? " selected" : "") . ">$val";
|
||||
}
|
||||
echo "</select>\n<noscript><div style='display: inline;'><input type='submit' value='" . lang('Use') . "'></div></noscript>\n</div>\n</form>\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user