]> git.joonet.de Git - adminer.git/commitdiff
Use images for editing buttons
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 7 May 2008 13:51:10 +0000 (13:51 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 7 May 2008 13:51:10 +0000 (13:51 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@399 7c3ca157-0c34-0410-bff1-cbf682f78f5c

_compile.php
down.gif [new file with mode: 0644]
editing.inc.php
minus.gif [new file with mode: 0644]
plus.gif [new file with mode: 0644]
up.gif [new file with mode: 0644]

index 412fb86dac7b341d24417fabd1bed6f8b93b3afc..8959437f9b55902da9f61e5fc6ec80f871b07876 100644 (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;
diff --git a/down.gif b/down.gif
new file mode 100644 (file)
index 0000000..66d1e98
Binary files /dev/null and b/down.gif differ
index e7f4d048975e0bfea2ee129451415ec3826b7e57..cd64dc9aa134499cec6fd9fc80547d505cae6cda 100644 (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"])) {
diff --git a/minus.gif b/minus.gif
new file mode 100644 (file)
index 0000000..c2a6bef
Binary files /dev/null and b/minus.gif differ
diff --git a/plus.gif b/plus.gif
new file mode 100644 (file)
index 0000000..fb80a20
Binary files /dev/null and b/plus.gif differ
diff --git a/up.gif b/up.gif
new file mode 100644 (file)
index 0000000..164b052
Binary files /dev/null and b/up.gif differ