Skip to content

Commit

Permalink
Admin page UI improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
dumitru committed Nov 23, 2015
1 parent 869bbe2 commit 5f2d8f3
Show file tree
Hide file tree
Showing 8 changed files with 311 additions and 283 deletions.
4 changes: 4 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ body {
.container .text-muted {
margin: 20px 0;
}

.margin-left-10px {
margin-left: 10px
}
8 changes: 4 additions & 4 deletions inc/session.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ function initialize_session() {
array('db_meta', $ptitle_strings['db_meta'], 'close')),

// panels on the Tables page
's_tables_panels' => array(array('tb_show', $ptitle_strings['tb_show'], 'close'),
's_tables_panels' => array(array('tb_show', $ptitle_strings['tb_show'], 'open'),
array('tb_create', $ptitle_strings['tb_create'], 'close'),
array('tb_modify', $ptitle_strings['tb_modify'], 'close'),
array('tb_delete', $ptitle_strings['tb_delete'], 'close')),
Expand All @@ -301,17 +301,17 @@ function initialize_session() {
array('tb_watch', $ptitle_strings['tb_watch'], 'close')),

// panels on the Data page
's_data_panels' => array(array('dt_enter', $ptitle_strings['dt_enter'], 'close'),
's_data_panels' => array(array('dt_enter', $ptitle_strings['dt_enter'], 'open'),
array('tb_watch', $ptitle_strings['tb_watch'], 'close'),
array('dt_export', $ptitle_strings['dt_export'], 'close'),
array('dt_import', $ptitle_strings['dt_import'], 'close')),
// panels on the User page
's_users_panels' => array(array('usr_user', $ptitle_strings['usr_user'], 'close'),
's_users_panels' => array(array('usr_user', $ptitle_strings['usr_user'], 'open'),
array('usr_role', $ptitle_strings['usr_role'], 'close'),
// array('usr_grant',$ptitle_strings['usr_grant'],'close')),
array('usr_cust', $ptitle_strings['usr_cust'], 'close')),
// panels on the Admin page
's_admin_panels' => array(array('adm_server',$ptitle_strings['adm_server'],'close'),
's_admin_panels' => array(array('adm_server',$ptitle_strings['adm_server'],'open'),
array('adm_dbstat',$ptitle_strings['adm_dbstat'],'close'),
array('adm_gfix', $ptitle_strings['adm_gfix'], 'close'),
array('adm_backup',$ptitle_strings['adm_backup'],'close'),
Expand Down
190 changes: 104 additions & 86 deletions panels/adm_backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,93 +8,111 @@

if ($s_connected == TRUE):

?>
<form method="post" action="<?php echo url_session($_SERVER['PHP_SELF']); ?>" name="adm_backup">
<?php

if ($s_login['user'] != 'SYSDBA') {
sysdba_pw_textfield($adm_strings['SysdbaPW'], $adm_strings['Required'], $s_sysdba_pw);
}

?>
<table class="table table-bordered">
<tr>
<th colspan="2" align="left"><?php echo $adm_strings['BTarget']; ?></th>
</tr>
<tr>
<td>
<?php echo $adm_strings['FDName']; ?>
</td>
<td>
<?php if (defined('BACKUP_DIR') && BACKUP_DIR !== '') echo BACKUP_DIR.'<br>'; ?>
<?php echo get_textfield('adm_bu_target', 50, 256, $s_backup['target']); ?>
</td>
</tr>
</table>

<table class="table table-bordered">
<tr>
<th colspan="2" align="left"><?php echo $adm_strings['Options']; ?></th>
</tr>
<tr>
<td>
<input type="checkbox" name="adm_bu_mdonly" value="1"<?php if ($s_backup['mdonly'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BMDOnly']; ?>&nbsp;
</td>
<td>
<input type="checkbox" name="adm_bu_nogc" value="1"<?php if ($s_backup['nogc'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BNoGC']; ?>&nbsp;
</td>
</tr>
<tr>
<td>
<input type="checkbox" name="adm_bu_mdoldstyle" value="1"<?php if ($s_backup['mdoldstyle'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BMDOStyle']; ?>&nbsp;
</td>
<td>
<input type="checkbox" name="adm_bu_ignorecs" value="1"<?php if ($s_backup['ignorecs'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BIgnoreCS']; ?>&nbsp;
</td>
</tr>
<tr>
<td>
<input type="checkbox" name="adm_bu_transport" value="1"<?php if ($s_backup['transport'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BTransport']; ?>&nbsp;
</td>
<td>
<input type="checkbox" name="adm_bu_ignorelt" value="1"<?php if ($s_backup['ignorelt'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BIgnoreLT']; ?>&nbsp;
</td>
</tr>
<tr>
<td>
<input type="checkbox" name="adm_bu_convert" value="1"<?php if ($s_backup['convert'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BConvert']; ?>&nbsp;
</td>
<td>
<input type="checkbox" name="adm_bu_verbose" value="1"<?php if ($s_backup['verbose'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['Verbose']; ?>&nbsp;
</td>
</tr>
</table>
<?php

if (isset($iframekey_backup)):
?>
?>
<form method="post" action="<?php echo url_session($_SERVER['PHP_SELF']); ?>" name="adm_backup" class="form-inline">
<?php

<br />
<div class="if">
<iframe src="<?php echo url_session('./iframe_content.php?key='.$iframekey_backup); ?>" width="98%" height="<?php echo $s_cust['iframeheight']; ?>" name="adm_backup_iframe"></iframe>
</div>
<br />
<?php
if ($s_login['user'] != 'SYSDBA') {
sysdba_pw_textfield($adm_strings['SysdbaPW'], $adm_strings['Required'], $s_sysdba_pw);
}

endif;
?>
<input type="submit" class="btn btn-default" name="adm_backup_doit" value="<?php echo $button_strings['Backup']; ?>">
</form>
<?php
?>
<table class="table table-bordered">
<tr>
<th align="left"><?php echo $adm_strings['BTarget']; ?></th>
</tr>
<tr>
<td>
<div class="form-group">
<label for="adm_bu_target"><?php echo $adm_strings['FDName']; ?></label>

endif;
<div class="input-group">
<?php if (defined('BACKUP_DIR') && BACKUP_DIR !== '') echo '<div class="input-group-addon">' . BACKUP_DIR . '</div>'; ?>
<?php echo get_textfield('adm_bu_target', 50, 256, $s_backup['target']); ?>
</div>
</div>
</td>
</tr>
</table>

?>
<table class="table table-bordered">
<tr>
<th colspan="2" align="left"><?php echo $adm_strings['Options']; ?></th>
</tr>
<tr>
<td>
<label class="radio-inline">
<input type="checkbox" name="adm_bu_mdonly"
value="1"<?php if ($s_backup['mdonly'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BMDOnly']; ?>
</label>
</td>
<td>
<label class="radio-inline">
<input type="checkbox" name="adm_bu_nogc"
value="1"<?php if ($s_backup['nogc'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BNoGC']; ?>
</label>
</td>
</tr>
<tr>
<td>
<label class="radio-inline">
<input type="checkbox" name="adm_bu_mdoldstyle"
value="1"<?php if ($s_backup['mdoldstyle'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BMDOStyle']; ?>
</label>
</td>
<td>
<label class="radio-inline">
<input type="checkbox" name="adm_bu_ignorecs"
value="1"<?php if ($s_backup['ignorecs'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BIgnoreCS']; ?>
</label>
</td>
</tr>
<tr>
<td>
<label class="radio-inline">
<input type="checkbox" name="adm_bu_transport"
value="1"<?php if ($s_backup['transport'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BTransport']; ?>
</label>
</td>
<td>
<label class="radio-inline">
<input type="checkbox" name="adm_bu_ignorelt"
value="1"<?php if ($s_backup['ignorelt'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BIgnoreLT']; ?>
</label>
</td>
</tr>
<tr>
<td>
<label class="radio-inline">
<input type="checkbox" name="adm_bu_convert"
value="1"<?php if ($s_backup['convert'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['BConvert']; ?>
</label>
</td>
<td>
<label class="radio-inline">
<input type="checkbox" name="adm_bu_verbose"
value="1"<?php if ($s_backup['verbose'] == TRUE) echo ' checked'; ?>>
<?php echo $adm_strings['Verbose']; ?>
</label>
</td>
</tr>
</table>
<?php if (isset($iframekey_backup)): ?>
<br/>
<div class="if">
<iframe src="<?php echo url_session('./iframe_content.php?key=' . $iframekey_backup); ?>" width="98%"
height="<?php echo $s_cust['iframeheight']; ?>" name="adm_backup_iframe"></iframe>
</div>
<br/>
<?php endif; ?>
<input type="submit" class="btn btn-default" name="adm_backup_doit"
value="<?php echo $button_strings['Backup']; ?>">
</form>
<?php endif; ?>
41 changes: 17 additions & 24 deletions panels/adm_dbstat.php
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
<?php

// File adm_dbstat.php / FirebirdWebAdmin
// Purpose displays the gstat output for the selected database
// Author Lutz Brueckner <[email protected]>
// Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005 by Lutz Brueckner,
// published under the terms of the GNU General Public Licence v.2,
// see file LICENCE for details

if ($s_connected):

?>
<form method="post" action="<?php echo url_session($_SERVER['PHP_SELF']); ?>" name="db_stat_form">
<table class="table table-bordered">
<tr>
<td>
<?php
echo '<b>'.$adm_strings['Analyze']."</b><br>\n";
if ($s_connected) { ?>
<form method="post" action="<?php echo url_session($_SERVER['PHP_SELF']); ?>" name="db_stat_form"
class="form-inline">
<div class="form-group">
<?php
echo '<label for="db_stat_option">' . $adm_strings['Analyze'] . "</label>";
echo get_indexed_selectlist('db_stat_option', database_statistic_options(), $s_dbstat_option); ?>
</td>
<td valign="bottom">
<input type="submit" class="btn btn-default" name="db_stat_select" value="<?php echo $button_strings['Select']; ?>">
</td>
</tr>
</table>
</form>
<div class="if">
<iframe src="<?php echo url_session('./iframe_content.php?key='.$iframekey_dbstat); ?>" width="98%" height="<?php echo $s_cust['iframeheight']; ?>" name="adm_dbstat_iframe"></iframe>
</div>
<?php

endif;

?>
</div>
<input type="submit" class="btn btn-default" name="db_stat_select"
value="<?php echo $button_strings['Select']; ?>">
</form>
<br/>
<div class="if">
<iframe src="<?php echo url_session('./iframe_content.php?key=' . $iframekey_dbstat); ?>" width="98%"
height="<?php echo $s_cust['iframeheight']; ?>" name="adm_dbstat_iframe"></iframe>
</div>
<?php } ?>
Loading

0 comments on commit 5f2d8f3

Please sign in to comment.