Skip to content

Commit 3d8a78c

Browse files
committed
Adjust some alignments
- padding on the left and right to the body - set textarea to full width (including border-box) - don't use nested div's for a nicer alignment - remove some inline styles - remove non-breaking space
1 parent 069f7de commit 3d8a78c

File tree

1 file changed

+25
-20
lines changed

1 file changed

+25
-20
lines changed

phpminiadmin.php

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -181,25 +181,28 @@ function display_select($sth,$q){
181181
$w='';
182182
if ($is_sht || $is_shd) {$w='wa';
183183
$url='?'.$xurl."&db=$dbn";
184-
$sqldr.="<div class='dot'>
185-
&nbsp;MySQL Server:
186-
&nbsp;&#183;<a href='$url&q=".b64e("show variables")."'>Show Configuration Variables</a>
187-
&nbsp;&#183;<a href='$url&q=".b64e("show status")."'>Show Statistics</a>
188-
&nbsp;&#183;<a href='$url&q=".b64e("show processlist")."'>Show Processlist</a>";
189-
if ($is_shd) $sqldr.="&nbsp;&#183;<label>Create new database: <input type='text' name='new_db' placeholder='type db name here'></label> <input type='submit' name='crdb' value='Create'>";
184+
$sqldr.="<div class='dot'>";
185+
$sqldr.=" MySQL Server: ";
186+
$sqldr.=" &#183; <a href='$url&q=".b64e("show variables")."'>Show Configuration Variables</a> ";
187+
$sqldr.=" &#183; <a href='$url&q=".b64e("show status")."'>Show Statistics</a> ";
188+
$sqldr.=" &#183; <a href='$url&q=".b64e("show processlist")."'>Show Processlist</a> ";
189+
if ($is_shd) $sqldr.="&#183; <label>Create new database: <input type='text' name='new_db' placeholder='type db name here'></label> <input type='submit' name='crdb' value='Create'>";
190190
$sqldr.="<br>";
191-
if ($is_sht) $sqldr.="&nbsp;Database:&nbsp;&#183;<a href='$url&q=".b64e("show table status")."'>Show Table Status</a>";
191+
if ($is_sht) $sqldr.="Database: &#183; <a href='$url&q=".b64e("show table status")."'>Show Table Status</a>";
192192
$sqldr.="</div>";
193193
}
194194
if ($is_sht){
195-
$abtn="&nbsp;<input type='submit' value='Export' onclick=\"sht('exp')\">
196-
<input type='submit' value='Drop' onclick=\"if(ays()){sht('drop')}else{return false}\">
197-
<input type='submit' value='Truncate' onclick=\"if(ays()){sht('trunc')}else{return false}\">
198-
<input type='submit' value='Optimize' onclick=\"sht('opt')\">
199-
<b>selected tables</b>";
195+
$abtn="<div>";
196+
$abtn.=" <input type='submit' value='Export' onclick=\"sht('exp')\"> ";
197+
$abtn.=" <input type='submit' value='Drop' onclick=\"if(ays()){sht('drop')}else{return false}\"> ";
198+
$abtn.=" <input type='submit' value='Truncate' onclick=\"if(ays()){sht('trunc')}else{return false}\"> ";
199+
$abtn.=" <input type='submit' value='Optimize' onclick=\"sht('opt')\"> ";
200+
$abtn.=" <b>selected tables</b> ";
201+
$abtn.="</div>";
200202
$sqldr.=$abtn."<input type='hidden' name='dosht' value=''>";
201203
}
202204

205+
$sqldr.="<div>";
203206
$sqldr.="<table class='res $w'>";
204207
$headers="<tr class='h'>";
205208
if ($is_sht) $headers.="<td><input type='checkbox' name='cball' value='' onclick='chkall(this)'></td>";
@@ -259,7 +262,9 @@ function display_select($sth,$q){
259262
}
260263
$sqldr.="</tr>\n";
261264
}
262-
$sqldr.="</table>\n".$abtn;
265+
$sqldr.="</table>\n";
266+
$sqldr.="</div>\n";
267+
$sqldr.=$abtn;
263268
}
264269

265270
function print_header(){
@@ -271,12 +276,14 @@ function print_header(){
271276
<head><title>phpMiniAdmin</title>
272277
<meta charset="utf-8">
273278
<style type="text/css">
274-
body{font-family:Arial,sans-serif;font-size:80%;padding:0;margin:0}
279+
* {box-sizing:border-box;}
280+
body{font-family:Arial,sans-serif;font-size:80%;padding:0 1em;margin:0}
275281
div{padding:3px}
276282
pre{font-size:125%}
283+
textarea {width:100%;}
277284
.nav{text-align:center}
278285
.ft{text-align:right;margin-top:20px;font-size:smaller}
279-
.inv{background-color:#069;color:#FFF}
286+
.inv{margin:0 -1em;background-color:#069;color:#FFF}
280287
.inv a{color:#FFF}
281288
table{border-collapse:collapse;}
282289
table.res{width:100%;}
@@ -458,9 +465,9 @@ function print_screen(){
458465
print_header();
459466
?>
460467

461-
<div class="dot" style="padding:0 0 5px 20px">
468+
<div class="dot">
462469
<label for="qraw">SQL-query (or multiple queries separated by ";"):</label>&nbsp;<button type="button" class="qnav" onclick="q_prev()">&lt;</button><button type="button" class="qnav" onclick="q_next()">&gt;</button><br>
463-
<textarea id="qraw" cols="70" rows="10" style="width:98%"><?php eo($SQLq)?></textarea><br>
470+
<textarea id="qraw" cols="70" rows="10"><?php eo($SQLq)?></textarea><br>
464471
<input type="hidden" name="q" id="q" value="<?php b64e($SQLq);?>">
465472
<input type="submit" name="GoSQL" value="Go" style="width:100px">
466473
<input type="button" name="Clear" value=" Clear " onclick="$('qraw').value='';" style="width:100px">
@@ -472,13 +479,11 @@ function print_screen(){
472479
<br class="clear">
473480
<?php } ?>
474481
</div>
475-
<div class="dot" style="padding:5px 0 5px 20px">
482+
<div class="dot"">
476483
Records: <b><?php eo($reccount); if(!is_null($last_count) && $reccount<$last_count){eo(' out of '.$last_count);}?></b> in <b><?php eo($time_all)?></b> sec<br>
477484
<b><?php eo($out_message)?></b>
478485
</div>
479-
<div class="sqldr">
480486
<?php echo $nav.$sqldr.$nav; ?>
481-
</div>
482487
<?php
483488
print_footer();
484489
}

0 commit comments

Comments
 (0)