From acf7fa0e0f3ff82828c9a15668ae9e4512e36382 Mon Sep 17 00:00:00 2001 From: "Jehan-Guillaume (ioguix) de Rorthais" Date: Fri, 11 May 2012 12:10:32 +0200 Subject: [PATCH] Show line that will be deleted on the confirmation page --- display.php | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/display.php b/display.php index a33e7a43..f4d18d84 100644 --- a/display.php +++ b/display.php @@ -190,11 +190,36 @@ $misc->printTrail($_REQUEST['subject']); $misc->printTitle($lang['strdeleterow']); - echo "

{$lang['strconfdeleterow']}

\n"; - + $rs = $data->browseRow($_REQUEST['table'], $_REQUEST['key']); + echo "
\n"; - echo "\n"; echo $misc->form; + + if ($rs->recordCount() == 1) { + echo "

{$lang['strconfdeleterow']}

\n"; + + $fkinfo = array(); + echo ""; + printTableHeaderCells($rs, false, true); + echo ""; + echo "\n"; + printTableRowCells($rs, $fkinfo, true); + echo "\n"; + echo "
\n"; + echo "
\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + } + elseif ($rs->recordCount() != 1) { + echo "

{$lang['strrownotunique']}

\n"; + echo "\n"; + } + else { + echo "

{$lang['strinvalidparam']}

\n"; + echo "\n"; + } if (isset($_REQUEST['table'])) echo "\n"; if (isset($_REQUEST['subject'])) @@ -210,8 +235,6 @@ echo "\n"; echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; echo "
\n"; } else { -- 2.39.5