Transactions: Persistent page and search results on back.
This commit is contained in:
parent
3777ab50e2
commit
0f60e6f354
|
|
@ -45,6 +45,8 @@
|
||||||
//action add or update
|
//action add or update
|
||||||
if (is_uuid($_REQUEST["id"])) {
|
if (is_uuid($_REQUEST["id"])) {
|
||||||
$database_transaction_uuid = $_REQUEST["id"];
|
$database_transaction_uuid = $_REQUEST["id"];
|
||||||
|
$search = $_GET['search'];
|
||||||
|
$page = $_GET['page'];
|
||||||
}
|
}
|
||||||
|
|
||||||
//pre-populate the form
|
//pre-populate the form
|
||||||
|
|
@ -99,7 +101,7 @@
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
echo " <td align='left' width='20%' nowrap='nowrap' valign='top'><b>".$text['title-database_transaction']."</b><br><br></td>\n";
|
echo " <td align='left' width='20%' nowrap='nowrap' valign='top'><b>".$text['title-database_transaction']."</b><br><br></td>\n";
|
||||||
echo " <td width='80%' align='right' valign='top'>\n";
|
echo " <td width='80%' align='right' valign='top'>\n";
|
||||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='database_transactions.php'\" value='".$text['button-back']."'>";
|
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='database_transactions.php?".($search != '' ? "&search=".$search : null).($page != '' ? "&page=".urlencode($page) : null)."'\" value='".$text['button-back']."'>";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@
|
||||||
|
|
||||||
//prepare to page the results
|
//prepare to page the results
|
||||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||||
$param = "";
|
$param = "search=".$search;
|
||||||
$page = $_GET['page'];
|
$page = $_GET['page'];
|
||||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||||
|
|
@ -123,7 +123,7 @@
|
||||||
//echo th_order_by('transaction_old', $text['label-transaction_old'], $order_by, $order);
|
//echo th_order_by('transaction_old', $text['label-transaction_old'], $order_by, $order);
|
||||||
//echo th_order_by('transaction_new', $text['label-transaction_new'], $order_by, $order);
|
//echo th_order_by('transaction_new', $text['label-transaction_new'], $order_by, $order);
|
||||||
//echo th_order_by('transaction_result', $text['label-transaction_result'], $order_by, $order);
|
//echo th_order_by('transaction_result', $text['label-transaction_result'], $order_by, $order);
|
||||||
echo "<td class='list_control_icons'>";
|
echo "<td class='list_control_icon'>";
|
||||||
echo " \n";
|
echo " \n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
|
|
@ -131,7 +131,7 @@
|
||||||
if (is_array($result)) {
|
if (is_array($result)) {
|
||||||
foreach($result as $row) {
|
foreach($result as $row) {
|
||||||
if (permission_exists('database_transaction_edit')) {
|
if (permission_exists('database_transaction_edit')) {
|
||||||
$tr_link = "href='database_transaction_edit.php?id=".escape($row['database_transaction_uuid'])."'";
|
$tr_link = "href='database_transaction_edit.php?id=".urlencode($row['database_transaction_uuid']).($page != '' ? "&page=".urlencode($page) : null).($search != '' ? "&search=".urlencode($search) : null)."'";
|
||||||
}
|
}
|
||||||
echo "<tr ".$tr_link.">\n";
|
echo "<tr ".$tr_link.">\n";
|
||||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['domain_name'])." </td>\n";
|
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['domain_name'])." </td>\n";
|
||||||
|
|
@ -144,9 +144,9 @@
|
||||||
//echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['transaction_old']." </td>\n";
|
//echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['transaction_old']." </td>\n";
|
||||||
//echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['transaction_new']." </td>\n";
|
//echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['transaction_new']." </td>\n";
|
||||||
//echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['transaction_result']." </td>\n";
|
//echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['transaction_result']." </td>\n";
|
||||||
echo " <td class='list_control_icons'>";
|
echo " <td class='list_control_icon'>";
|
||||||
if (permission_exists('database_transaction_edit')) {
|
if (permission_exists('database_transaction_edit')) {
|
||||||
echo "<a href='database_transaction_edit.php?id=".escape($row['database_transaction_uuid'])."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
echo "<a href='database_transaction_edit.php?id=".urlencode($row['database_transaction_uuid']).($page != '' ? "&page=".urlencode($page) : null).($search != '' ? "&search=".urlencode($search) : null)."' alt='".$text['button-view']."'>$v_link_label_view</a>";
|
||||||
}
|
}
|
||||||
//if (permission_exists('database_transaction_delete')) {
|
//if (permission_exists('database_transaction_delete')) {
|
||||||
// echo "<a href='database_transaction_delete.php?id=".escape($row['database_transaction_uuid'])."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
// echo "<a href='database_transaction_delete.php?id=".escape($row['database_transaction_uuid'])."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue