| # Goto line # 51
if ($FORM{'url'} eq 'http://' || $FORM{'url'}
!~ /^(/spacer.gif)tp:\/\/\w+\.\w+/) {
&no_url;
}
if (!($FORM{'title'})) {
&no_title;
}
|
# Add the 'email' field
if ($FORM{'url'} eq 'http://' || $FORM{'url'}
!~ /^(/spacer.gif)tp:\/\/\w+\.\w+/) {
&no_url;
}
if (!($FORM{'title'})) {
&no_title;
}
if (!($FORM{'email'}))
{
&no_email;
}
|
| # Goto line 121
if ($database ne '') {
(DATABASE,">>$database");
print DATABASE "$FORM{'url'}\n";
close(DATABASE);
}
|
Revise the database to save the URL,
Title & E-mail address to a
delimited file. I used a "pipe" instead
of a "comma" because some Page titles have "commas" in them.
if ($database ne '') {
(DATABASE,">>$database");
print DATABASE "$FORM{'url'}";
print DATABASE
"|";
print DATABASE "$FORM{'title'}";
print DATABASE "|";
print DATABASE "$FORM{'email'}\n";
close(DATABASE);
}
|
# Goto line 127
sub no_url {
print "Content-type: text/html\n\n";
print "<html><head><title>ERROR:
No URL</title></head>\n";
print "<body bgcolor=#FFFFFF
text=#000000><center>";
print "<h1>No URL</h1></center>\n";
print "You forgot to enter
a url you wanted added to the Free for ";
print "all link page.
Another possible problem was that your link ";
print "was invalid.<p>\n";
print "<form method=POST
action=\"$linkscgi\">\n";
print "<input type=hidden
name=\"title\" value=\"$FORM{'title'}\">\n";
print "<input type=hidden
name=\"section\"";
print "value=\"$FORM{'section'}\">\n";
print "URL: <input
type=text name=\"url\" size=50><p>\n";
print "<input type=submit>
* <input type=reset>\n";
print "<hr>\n";
print "<a href=\"$linksurl\">$linkstitle</a>\n";
print "</form></body></html>\n";
exit;
}
sub no_title {
print "Content-type: text/html\n\n";
print "<html><head><title>ERROR:
No Title</title></head>\n";
print "<body bgcolor=#FFFFFF
text=#000000><center>";
print "<h1>No Title</h1></center>\n";
print "You forgot to enter
a title you wanted added to the Free for ";
print "all link page.
Another possible problem is that you title ";
print "contained illegal
characters.<p>\n";
print "<form method=POST
action=\"$linkscgi\">\n";
print "<input type=hidden
name=\"url\" value=\"$FORM{'url'}\">\n";
print "<input type=hidden
name=\"section\"";
print "value=\"$FORM{'section'}\">\n";
print "TITLE: <input
type=text name=\"title\" size=50><p>\n";
print "<input type=submit>
* <input type=reset>\n";
print "<hr>\n";
print "<a href=\"$linksurl\">$linkstitle</a>\n";
print "</form></body></html>\n";
exit;
}
|
revise the subroutines no_url &
no_title to include the addition of the 'email' variable.
Add a no_email subroutine.
sub no_url {
print "Content-type: text/html\n\n";
print "<html><head><title>ERROR:
No URL</title></head>\n";
print "<body bgcolor=#FFFFFF
text=#000000><center>";
print "<h1>No URL</h1></center>\n";
print "You forgot to enter
a url you wanted added to the Free for ";
print "all link page.
Another possible problem was that your link ";
print "was invalid.<p>\n";
print "<form method=POST
action=\"$linkscgi\">\n";
print "<input type=hidden
name=\"title\" value=\"$FORM{'title'}\">\n";
print "<input type=hidden name=\"email\" value=\"$FORM{'email'}\">\n";
print "<input type=hidden
name=\"section\"";
print "value=\"$FORM{'section'}\">\n";
print "URL: <input
type=text name=\"url\" size=50><p>\n";
print "<input type=submit>
* <input type=reset>\n";
print "<hr>\n";
print "<a href=\"$linksurl\">$linkstitle</a>\n";
print "</form></body></html>\n";
exit;
}
sub no_title {
print "Content-type: text/html\n\n";
print "<html><head><title>ERROR:
No Title</title></head>\n";
print "<body bgcolor=#FFFFFF
text=#000000><center>";
print "<h1>No Title</h1></center>\n";
print "You forgot to enter
a title you wanted added to the Free for ";
print "all link page.
Another possible problem is that you title ";
print "contained illegal
characters.<p>\n";
print "<form method=POST
action=\"$linkscgi\">\n";
print "<input type=hidden
name=\"url\" value=\"$FORM{'url'}\">\n";
print "<input type=hidden name=\"email\" value=\"$FORM{'email'}\">\n";
print "<input type=hidden
name=\"section\"";
print "value=\"$FORM{'section'}\">\n";
print "TITLE: <input
type=text name=\"title\" size=50><p>\n";
print "<input type=submit>
* <input type=reset>\n";
print "<hr>\n";
print "<a href=\"$linksurl\">$linkstitle</a>\n";
print "</form></body></html>\n";
exit;
}
sub no_email {
print "Content-type: text/html\n\n";
print "<html><head><title>ERROR: No E-mail</title></head>\n";
print "<body bgcolor=#FFFFFF text=#000000><center>";
print "<h1>No E-mail</h1></center>\n";
print "You forgot to enter your E-mail address. ";
print " Another possible problem is that you title ";
print "contained illegal characters.<p>\n";
print "<form method=POST action=\"$linkscgi\">\n";
print "<input type=hidden name=\"title\" value=\"$FORM{'title'}\">\n";
print "<input type=hidden name=\"url\" value=\"$FORM{'url'}\">\n";
print "<input type=hidden name=\"section\"";
print "value=\"$FORM{'section'}\">\n";
print "E-mail: <input type=text name=\"email\" size=50><p>\n";
print "<input type=submit> * <input type=reset>\n";
print "<hr>\n";
print "<a href=\"$linksurl\">$linkstitle</a>\n";
print "</form></body></html>\n";
exit;
}
|