Database Transactions - Edit: Button updates.

This commit is contained in:
Nate 2020-02-10 21:48:33 -07:00
parent 30aaddac16
commit 436cd69b5b
1 changed files with 30 additions and 30 deletions

View File

@ -109,23 +109,24 @@
} }
} }
//show the header //include the header
$document['title'] = $text['title-database_transaction']; $document['title'] = $text['title-database_transaction'];
require_once "resources/header.php"; require_once "resources/header.php";
//show the content //show the content
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<div class='action_bar' id='action_bar'>\n";
echo " <tr>\n"; echo " <div class='heading'><b>".$text['title-database_transaction']."</b></div>\n";
echo " <td align='left' width='20%' nowrap='nowrap' valign='top'><b>".$text['title-database_transaction']."</b><br><br></td>\n"; echo " <div class='actions'>\n";
echo " <td width='80%' align='right' valign='top'>\n"; echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'link'=>'database_transactions.php?'.($search != '' ? "&search=".urlencode($search) : null).(is_numeric($page) ? "&page=".urlencode($page) : null)]);
echo " <a href='database_transactions.php?".($search != '' ? "&search=".urlencode($search) : null).($page != '' ? "&page=".urlencode($page) : null)."'><button type='button' class='btn btn-default' style='margin-right: 15px;' alt='".$text['button-back']."'>".$text['button-back']."</button></a>";
if ($transaction_type == 'delete' || $transaction_type == 'update') { if ($transaction_type == 'delete' || $transaction_type == 'update') {
echo " <a href='database_transaction_edit.php?id=".urlencode($database_transaction_uuid)."&action=undo".($search != '' ? "&search=".urlencode($search) : null).($page != '' ? "&page=".urlencode($page) : null)."'><button type='button' class='btn btn-default' alt='".$text['button-undo']."'>".$text['button-undo']."</button></a>"; echo button::create(['type'=>'button','label'=>$text['button-undo'],'icon'=>'undo-alt','style'=>'margin-left: 15px;','link'=>'database_transaction_edit.php?id='.urlencode($database_transaction_uuid).'&action=undo'.($search != '' ? "&search=".urlencode($search) : null).(is_numeric($page) ? "&page=".urlencode($page) : null)]);
} }
echo " </td>\n"; echo " </div>\n";
echo " </tr>\n"; echo " <div style='clear: both;'></div>\n";
echo "</table>\n"; echo "</div>\n";
echo "<table width='400' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<table width='400' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<td valign='top'>\n"; echo "<td valign='top'>\n";
echo " <table>\n"; echo " <table>\n";
echo " <tr>\n"; echo " <tr>\n";
@ -193,13 +194,13 @@
echo "</table>\n"; echo "</table>\n";
if ($_REQUEST["debug"] == "true") { if ($_REQUEST["debug"] == "true") {
echo "<table width='350px' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<table width='50%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<th valign='top' align='left' nowrap='nowrap'>\n"; echo "<th valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-transaction_old']."\n"; echo " ".$text['label-transaction_old']."\n";
echo "</th>\n"; echo "</th>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <textarea name='transaction_old' style='width: 265px; height: 80px;'>".escape($transaction_old)."</textarea>\n"; echo " <textarea name='transaction_old' style='width: 100%; height: 80px;'>".escape($transaction_old)."</textarea>\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
@ -208,7 +209,7 @@
echo " ".$text['label-transaction_new']."\n"; echo " ".$text['label-transaction_new']."\n";
echo "</th>\n"; echo "</th>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <textarea name='transaction_new' style='width: 265px; height: 80px;'>".escape($transaction_new)."</textarea>\n"; echo " <textarea name='transaction_new' style='width: 100%; height: 80px;'>".escape($transaction_new)."</textarea>\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
@ -217,7 +218,7 @@
echo " ".$text['label-transaction_result']."\n"; echo " ".$text['label-transaction_result']."\n";
echo "</th>\n"; echo "</th>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <textarea name='transaction_result' style='width: 265px; height: 80px;'>".escape($transaction_result)."</textarea>\n"; echo " <textarea name='transaction_result' style='width: 100%; height: 80px;'>".escape($transaction_result)."</textarea>\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "</table>"; echo "</table>";
@ -342,7 +343,7 @@
} }
} }
echo "<br />\n"; echo "<br />\n";
echo "<table border='0'>\n"; echo "<table width='100%'>\n";
if (is_array($array)) { if (is_array($array)) {
foreach ($array as $row) { foreach ($array as $row) {
if ($row['schema'] !== $previous_schema || $row['row'] !== $previous_row) { if ($row['schema'] !== $previous_schema || $row['row'] !== $previous_row) {
@ -398,7 +399,7 @@
//show the difference //show the difference
echo "<br />\n"; echo "<br />\n";
echo "<table border='0'>\n"; echo "<table width='100%'>\n";
show_difference($array); show_difference($array);
echo "</table>\n"; echo "</table>\n";
} }
@ -407,7 +408,7 @@
//show the delete //show the delete
if ($transaction_type == "delete") { if ($transaction_type == "delete") {
echo "<br /><br />\n"; echo "<br /><br />\n";
echo "<table>\n"; echo "<table width='100%'>\n";
foreach ($before as $table_name => $rows) { foreach ($before as $table_name => $rows) {
echo " <tr>\n"; echo " <tr>\n";
echo " <th>".escape($table_name)."</th><th>&nbsp;</th>\n"; echo " <th>".escape($table_name)."</th><th>&nbsp;</th>\n";
@ -427,8 +428,7 @@
echo "</table>\n"; echo "</table>\n";
//add a few lines at the end //add a few lines at the end
echo "<br />\n"; echo "<br /><br />\n";
echo "<br />\n";
//include the footer //include the footer
require_once "resources/footer.php"; require_once "resources/footer.php";