1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-16 03:24:01 +02:00

Use images for editing buttons

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@399 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2008-05-07 13:51:10 +00:00
parent f616e11f05
commit 48f777eb30
6 changed files with 15 additions and 5 deletions

View File

@@ -82,8 +82,7 @@ if ($_COOKIE["lang"]) {
$file = str_replace("<?php switch_lang(); ?>\n", "", $file);
$file = str_replace('<?php echo $LANG; ?>', $_COOKIE["lang"], $file);
}
$file = str_replace("favicon.ico", '<?php echo preg_replace("~\\\\?.*~", "", $_SERVER["REQUEST_URI"]) . "?file=favicon.ico"; ?>', $file);
$file = str_replace("default.css", '<?php echo preg_replace("~\\\\?.*~", "", $_SERVER["REQUEST_URI"]) . "?file=default.css"; ?>', $file);
$file = preg_replace("~favicon\\.ico|default\\.css|(up|down|plus|minus)\\.gif~", '<?php echo preg_replace("~\\\\\\\\?.*~", "", $_SERVER["REQUEST_URI"]) . "?file=\\0"; ?>', $file);
$file = str_replace("arrow.gif", '" . preg_replace("~\\\\?.*~", "", $_SERVER["REQUEST_URI"]) . "?file=arrow.gif', $file);
$file = str_replace('error_reporting(E_ALL & ~E_NOTICE);', 'error_reporting(E_ALL & ~E_NOTICE);
if (isset($_GET["file"])) {
@@ -100,7 +99,13 @@ if (isset($_GET["file"])) {
?>' . file_get_contents("default.css") . '<?php
} else {
header("Content-Type: image/gif");
echo base64_decode("' . base64_encode(file_get_contents("arrow.gif")) . '");
switch ($_GET["file"]) {
case "arrow.gif": echo base64_decode("' . base64_encode(file_get_contents("arrow.gif")) . '"); break;
case "up.gif": echo base64_decode("' . base64_encode(file_get_contents("up.gif")) . '"); break;
case "down.gif": echo base64_decode("' . base64_encode(file_get_contents("down.gif")) . '"); break;
case "plus.gif": echo base64_decode("' . base64_encode(file_get_contents("plus.gif")) . '"); break;
case "minus.gif": echo base64_decode("' . base64_encode(file_get_contents("minus.gif")) . '"); break;
}
}
}
exit;

BIN
down.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

View File

@@ -94,7 +94,7 @@ function edit_fields($fields, $collations, $type = "TABLE") {
<td><input type="radio" name="auto_increment_col" value="" /><?php echo lang('Auto Increment'); ?></td>
<td><?php echo lang('Comment'); ?></td>
<?php } ?>
<td><input type="submit" name="add[0]" value="+" title="<?php echo lang('Add next'); ?>" /></td>
<td><input type="image" name="add[0]" src="plus.gif" title="<?php echo lang('Add next'); ?>" /></td>
</tr></thead>
<?php
$column_comments = false;
@@ -111,7 +111,12 @@ function edit_fields($fields, $collations, $type = "TABLE") {
<td><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked="checked"<?php } ?> /></td>
<td><input name="fields[<?php echo $i; ?>][comment]" value="<?php echo htmlspecialchars($field["comment"]); ?>" maxlength="255" /></td>
<?php } ?>
<td style="white-space: nowrap;"><input type="submit" name="add[<?php echo $i; ?>]" value="+" title="<?php echo lang('Add next'); ?>" onclick="return !add_row(this);" /> <input type="submit" name="drop_col[<?php echo $i; ?>]" value="-" title="<?php echo lang('Remove'); ?>" onclick="return !remove_row(this);" /> <input type="submit" name="up[<?php echo $i; ?>]" value="↑" title="<?php echo lang('Move up'); ?>" /> <input type="submit" name="down[<?php echo $i; ?>]" value="↓" title="<?php echo lang('Move down'); ?>" /></td>
<td style="white-space: nowrap;">
<input type="image" name="add[<?php echo $i; ?>]" src="plus.gif" title="<?php echo lang('Add next'); ?>" onclick="return !add_row(this);" />
<input type="image" name="drop_col[<?php echo $i; ?>]" src="minus.gif" title="<?php echo lang('Remove'); ?>" onclick="return !remove_row(this);" />
<input type="image" name="up[<?php echo $i; ?>]" src="up.gif" title="<?php echo lang('Move up'); ?>" />
<input type="image" name="down[<?php echo $i; ?>]" src="down.gif" title="<?php echo lang('Move down'); ?>" />
</td>
</tr>
<?php
if (strlen($field["comment"])) {

BIN
minus.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

BIN
plus.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

BIN
up.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B