1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-13 18:14:07 +02:00

Remove odd() from create

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@663 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-06-11 04:50:35 +00:00
parent 1fe2f33e32
commit a76c555bc1
4 changed files with 10 additions and 12 deletions

View File

@@ -175,8 +175,8 @@ if ($_COOKIE["lang"]) {
$file = preg_replace_callback("~lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])~s", 'lang_ids', $file); $file = preg_replace_callback("~lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])~s", 'lang_ids', $file);
} }
$replace = 'htmlspecialchars(preg_replace("~\\\\\\\\?.*~", "", $_SERVER["REQUEST_URI"])) . "?file=\\0&version=' . $VERSION; $replace = 'htmlspecialchars(preg_replace("~\\\\\\\\?.*~", "", $_SERVER["REQUEST_URI"])) . "?file=\\0&version=' . $VERSION;
$file = preg_replace('~default\\.css|functions\\.js|favicon\\.ico|(plus|cross)\\.gif~', '<?php echo ' . $replace . '"; ?>', $file); $file = preg_replace('~default\\.css|functions\\.js|favicon\\.ico~', '<?php echo ' . $replace . '"; ?>', $file);
$file = preg_replace('~(up|down|arrow)\\.gif~', '" . ' . $replace, $file); $file = preg_replace('~(plus|cross|up|down|arrow)\\.gif~', '" . ' . $replace, $file);
$file = str_replace('error_reporting(E_ALL & ~E_NOTICE);', 'error_reporting(E_ALL & ~E_NOTICE); $file = str_replace('error_reporting(E_ALL & ~E_NOTICE);', 'error_reporting(E_ALL & ~E_NOTICE);
if (isset($_GET["file"])) { if (isset($_GET["file"])) {
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 365*24*60*60) . " GMT"); header("Expires: " . gmdate("D, d M Y H:i:s", time() + 365*24*60*60) . " GMT");

View File

@@ -118,7 +118,6 @@ function editing_remove_row(button) {
var field = button.form[button.name.replace(/drop_col(.+)/, 'fields$1[field]')]; var field = button.form[button.name.replace(/drop_col(.+)/, 'fields$1[field]')];
field.parentNode.removeChild(field); field.parentNode.removeChild(field);
button.parentNode.parentNode.style.display = 'none'; button.parentNode.parentNode.style.display = 'none';
//! should change class="odd" of next rows
return true; return true;
} }

View File

@@ -142,7 +142,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0) {
$i++; $i++;
$display = (isset($_POST["add"][$i-1]) || (isset($field["field"]) && !$_POST["drop_col"][$i])); $display = (isset($_POST["add"][$i-1]) || (isset($field["field"]) && !$_POST["drop_col"][$i]));
?> ?>
<tr<?php echo ($display ? odd() : " style='display: none;'"); ?>> <tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
<?php if ($type == "PROCEDURE") { ?><td><select name="fields[<?php echo $i; ?>][inout]"><?php echo optionlist($inout, $field["inout"]); ?></select></td><?php } ?> <?php if ($type == "PROCEDURE") { ?><td><select name="fields[<?php echo $i; ?>][inout]"><?php echo optionlist($inout, $field["inout"]); ?></select></td><?php } ?>
<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo htmlspecialchars($field["field"]); ?>" maxlength="64" /><?php } ?><input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo htmlspecialchars($field[($_POST ? "orig" : "field")]); ?>" /></th> <th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo htmlspecialchars($field["field"]); ?>" maxlength="64" /><?php } ?><input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo htmlspecialchars($field[($_POST ? "orig" : "field")]); ?>" /></th>
<?php edit_type("fields[$i]", $field, $collations); ?> <?php edit_type("fields[$i]", $field, $collations); ?>
@@ -152,15 +152,12 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0) {
<td<?php echo ($column_comments ? "" : " class='hidden'"); ?>><input name="fields[<?php echo $i; ?>][comment]" value="<?php echo htmlspecialchars($field["comment"]); ?>" maxlength="255" /></td> <td<?php echo ($column_comments ? "" : " class='hidden'"); ?>><input name="fields[<?php echo $i; ?>][comment]" value="<?php echo htmlspecialchars($field["comment"]); ?>" maxlength="255" /></td>
<?php } ?> <?php } ?>
<td class="nowrap"> <td class="nowrap">
<input type="image" name="add[<?php echo $i; ?>]" src="plus.gif" alt="+" title="<?php echo lang('Add next'); ?>" onclick="return !editing_add_row(this, <?php echo $allowed; ?>);" />
<input type="image" name="drop_col[<?php echo $i; ?>]" src="cross.gif" alt="x" title="<?php echo lang('Remove'); ?>" onclick="return !editing_remove_row(this);" />
<?php
echo "<input type='image' name='up[$i]' src='up.gif' alt='^' title='" . lang('Move up') . "' />\n";
echo "<input type='image' name='down[$i]' src='down.gif' alt='v' title='" . lang('Move down') . "' />\n";
?>
</td>
</tr>
<?php <?php
echo "<input type='image' name='add[$i]' src='plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editing_add_row(this, $allowed);' />\n";
echo "<input type='image' name='drop_col[$i]' src='cross.gif' alt='x' title='" . lang('Remove') . "' onclick='return !editing_remove_row(this);' />\n";
echo "<input type='image' name='up[$i]' src='up.gif' alt='^' title='" . lang('Move up') . "' />\n";
echo "<input type='image' name='down[$i]' src='down.gif' alt='v' title='" . lang('Move down') . "' />\n";
echo "</td>\n</tr>\n";
} }
return $column_comments; return $column_comments;
} }

View File

@@ -8,6 +8,8 @@ Create view and routine options
Visualize SQL queries history Visualize SQL queries history
Function to fix database encoding - http://php.vrana.cz/prevod-kodovani-mysql.php Function to fix database encoding - http://php.vrana.cz/prevod-kodovani-mysql.php
Utilize information_schema.USER_PRIVILEGES in Privileges Utilize information_schema.USER_PRIVILEGES in Privileges
Highlight SQL textarea - may use external CodePress
Column and table names auto-completition in SQL textarea
? Save token also to cookie - for session expiration and login in other window ? Save token also to cookie - for session expiration and login in other window
? Save uploaded files after error to session variable instead of hidden field ? Save uploaded files after error to session variable instead of hidden field
? Aliasing of built-in functions can save 7 KB, substitution of $_GET and friends can save 2 KB, remove of base64_decode() + using chars 127-255 in minification can save 1 KB, JS packer can save 1 KB ? Aliasing of built-in functions can save 7 KB, substitution of $_GET and friends can save 2 KB, remove of base64_decode() + using chars 127-255 in minification can save 1 KB, JS packer can save 1 KB