koacamper has asked for the wisdom of the Perl Monks concerning the following question:
Thanks for any help! Happy New Year All!if ($command eq 'Remove') { &header('<title>Remove Unwanted Postings</title>'); print " $head $pageadmin $mid<center>\n"; print " <table border=0 width=100% cellspacing=0 cellpadding=1><tr>< +td bgcolor=#CCCCCC><b> Remove Outdated Entries</b></td></tr></ta +ble>\n"; print " Select entries you wish to remove an then click the <B>Proc +ess Information</B> button below.<br>\n"; print " </center>\n"; print " <form method=post action=\"$cgiUrl\">\n"; print " <input type=hidden name=action value=Remove>\n"; print " <input type=hidden name=USER value=\"$USER\">\n"; print " <input type=hidden name=PWD value=\"$PWD\">\n"; open(MESG,"$mesgFile") || &error(mesgFile); @lines = <MESG>; $size = @lines; close(MESG); @lines = sort(@lines); #This should sort the lines by alpha order #Number,IP,Name,URL,URL,Date,Comments $totalPage = int(($size-3)/10 + .95); $totalPage = 1 unless ($totalPage > 0); if ($page > $totalPage) { $page = 1; } $pageEntryMin = ($page-1)*10; $pageEntryMax = ($page*10)+1; $entry = -3; # Init to -3, since 3 starter lines print " <table width=\"100%\"><tr>\n"; print " <td width=\"25%\" align=center><hr noshade size=4></td>\n" +; $entryPlural = "Entr" . ($size-3 != 1 ? "ies" : "y"); $pagePlural = "Page" . ($totalPage != 1 ? "s" : ""); print " <td width=\"50%\" align=center>Info: ",$size-3," $entryPlu +ral on $totalPage $pagePlural · Current Page: $page</td>\n"; print " <td width=\"25%\" align=center><hr noshade size=4></td>\n" +; print " </tr></table><p>\n"; print " <table width=\"100%\">\n"; foreach $line (@lines) { $entry++; next if ($line =~ m/<!--Name\/Pwd: (.*):(.*)-->/); next if ($line =~ m/<!--Restrict IP: (.*)-->/); next if ($line =~ m/<!--Add Here: (\d+)-->/); next if (($entry<=$pageEntryMin) || ($entry>=$pageEntryMax)); @entry = split(/\cR/, $line); $EntryNumber{$line} = $entry[0]; $IP{$line} = $entry[1]; $Event_Date{$line} = $entry[2]; $Seminar_Topic{$line} = $entry[3]; $Seminar_Location{$line} = $entry[4]; print " <tr>\n"; print " <td align=center valign=top><input type=checkbox name=r +emove$EntryNumber{$line} value=$EntryNumber{$line}><br></td>\n"; print " <td> <font size=-1>\n"; print " <b>Event #:</b> $EntryNumber{$line}<br>\n"; print " <b>Event Date:</b> $Event_Date{$line}<br>\n"; print " <b>Seminar Topic:</b> $Seminar_Topic{$line} <br>\n"; print " <b>Seminar Location:</b> $Seminar_Location{$line} <br> +\n"; print " </blockquote><p><br><br>\n"; print " </td>\n"; print " </tr>\n"; push(@usedValues,$EntryNumber{$line}); } print " </table>\n"; print " <input type=hidden name=usedValues value=\"@usedValues\">\n +"; print " <center>\n"; print " <table width=\"100%\"><tr>\n"; if (($totalPage<=1) || ($page==1)) { print " <td>Previous Page</td>\n"; } else { print " <td>Previous Page<input type=radio name=prevNext value= +",$page-1,"></td>\n"; } print " <td align=center>\n"; print " <input type=submit value=\"Process Information\">\n"; print " <input type=reset value=\"Clear Form\">\n"; print " </td>\n"; if (($totalPage<=1) || ($page==$totalPage)) { print " <td align=right>Next Page</td>\n"; } else { print " <td align=right><input type=radio name=prevNext value=" +,$page+1,">Next Page</td>\n"; } print " </tr></table>\n"; print " </center>\n"; print " </form> $footer\n"; print "</body>\n"; print "</html>\n"; exit; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Editing Entries In A Flat Database
by dmmiller2k (Chaplain) on Dec 28, 2001 at 02:49 UTC | |
by impossiblerobot (Deacon) on Dec 28, 2001 at 20:33 UTC | |
by IlyaM (Parson) on Dec 28, 2001 at 23:08 UTC | |
by dmmiller2k (Chaplain) on Dec 28, 2001 at 20:58 UTC | |
by tilly (Archbishop) on Jan 05, 2002 at 19:31 UTC | |
by dmmiller2k (Chaplain) on Jan 06, 2002 at 08:44 UTC | |
|
Re: Editing Entries In A Flat Database
by chip (Curate) on Dec 28, 2001 at 01:01 UTC | |
|
Re: Editing Entries In A Flat Database
by chromatic (Archbishop) on Dec 28, 2001 at 05:54 UTC | |
|
Re: Editing Entries In A Flat Database
by simon.proctor (Vicar) on Dec 28, 2001 at 08:36 UTC | |
|
Re: Editing Entries In A Flat Database
by Ryszard (Priest) on Dec 28, 2001 at 17:31 UTC |