From: wbudic Date: Sat, 25 Aug 2018 00:10:19 +0000 (+1000) Subject: Finished Confirmation Subroutine in remove.cgi and fixed display. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=81228c51f3b1ce21245b2460062d7fc9414df66a;p=LifeLog.git Finished Confirmation Subroutine in remove.cgi and fixed display. --- diff --git a/htdocs/cgi-bin/main.cgi b/htdocs/cgi-bin/main.cgi index 54f7f92..527ca71 100755 --- a/htdocs/cgi-bin/main.cgi +++ b/htdocs/cgi-bin/main.cgi @@ -134,8 +134,10 @@ if($rv < 0) { if($tbl_rc==1){ $tbl = $tbl . "Table is Empty!\n"; } - $tbl = $tbl . ""; - $tbl = $tbl . ""; + $tbl = $tbl . ' + + + '; my $frm = qq(
diff --git a/htdocs/cgi-bin/remove.cgi b/htdocs/cgi-bin/remove.cgi index 2e074a4..a68612b 100755 --- a/htdocs/cgi-bin/remove.cgi +++ b/htdocs/cgi-bin/remove.cgi @@ -49,7 +49,7 @@ my $tbl_rc =0; my $stmS = "SELECT rowid, ID_CAT, DATE, LOG from LOG WHERE"; my $stmE = " ORDER BY rowid DESC, DATE DESC;"; -my $tbl = ''; +my $tbl = '
DateTimeLogCategoryDel
'; my $confirmed = $q->param('confirmed'); if (!$confirmed){ &NotConfirmed; @@ -72,7 +72,6 @@ foreach my $prm ($q->param('chk')){ #rid=0 hack! ;) $stm = $stm . "rowid = '0' " . $stmE; -print $stm; # $sth = $dbh->prepare( $stm ); $rv = $sth->execute() or die or die "

Error->"& $DBI::errstri &"

"; @@ -88,17 +87,21 @@ if($rv < 0) { my $dt = DateTime::Format::SQLite->parse_datetime( $row[2] ); $tbl = $tbl . "" . - "" . "". - "\n"; - $tbl_rc +=1; + "" . "\n". + "\n"; } - if($tbl_rc==1){ - $tbl = $tbl . "\n"; - } - $tbl = $tbl . ""; - $tbl = $tbl . "
DateTimeLogCategory
". $dt->ymd . "" . $dt->hms . "" . $row[3] . "" . $ct . - "
" . $dt->hms . "" . $row[3] . "" . $ct. "
Table is Empty!
"; + $tbl = $tbl . ' +
+

Please Confirm You Want This Deleted!

+ (Or hit you Browsers Back Button!)
+ +
+ +
+ + +';