Enter a search term check the script type and click submit. To search for a general category for example to find all results for scripts working with text files or file manipulation enter file or curl. Same for directory, sql etc. Otherwise use specific terms.
Here is the script you requested.
cgiscripts/web-page-maker-post-form.txt: 2797 bytes
html webpage builder one page cgi script post content from form makes webpage
cgi cms webpage templa
te web page builder
#!/usr/bin/perl
#
use CGI qw(:standard);
$cgi = $ENV{'SCRIPT_NAME'};
print "
Content-type: text/html\n\n";
# Template file uploaded - generate form
# --------------------------
------------
if ($file = param('filename')) {
$tmpfile=tmpFileName($file);
while (<$file>) {
$template .= $_;
}
close $file;
print <<"END";
<HTML>
<HEAD><TITLE>Data Entry Form</TIT
LE></HEAD>
<BODY BGCOLOR=white>
<BR>
<CENTER>
<TABLE BORDER=1 BORDERCOLOR="#333333" CELLSPACING=0 CE
LLPADDING=3>
<TR>
<TD ALIGN=CENTER BGCOLOR="#000080"><FONT COLOR="white" SIZE="+1"><B>Data Entry Fo
rm</B></FONT></TD>
</TR>
<TR>
<TD BGCOLOR="#CCCCCC">
<FORM ACTION="$cgi" METHOD=POST>
<TABLE BO
RDER=1>
<TR><TH>Field Name</TH><TH>Value</TH></TR>
END
foreach ($template =~ /<%([^\%]+)%>/gs) {
$keys{$_}++;
}
foreach (sort keys %keys) {
print "<TR><TD ALIGN=RIGHT><B>$_</B></TD><TD
ALIGN=LEFT><TEXTAREA NAME=\"$_\" COLS=50 ROWS=3 WRAP=VIRTUAL></TEXTAREA></TD></TR>\n";
}
print
<<"END";
<TR><TD COLSPAN=2 ALIGN=CENTER><BR><INPUT TYPE="submit" VALUE="Submit"><BR><BR></TD></TR>
<TR><TD COLSPAN=2 ALIGN=CENTER><TEXTAREA NAME="template" ROWS=10 COLS=80>$template</TEXTAREA></TD
></TR>
</TABLE>
</FORM>
<HR>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
END
}
# Form submitted -
generate output
# --------------------------------
elsif (param('template')) {
$template = param('
template') || "No template";
foreach $key ( param() ) {
next if ($key eq "template");
$template
=~ s|<%$key%>|param($key)|egs;
}
print "$template";
}
# First load - prompt for template
# ---
-----------------------------
else {
print <<"END";
<HTML>
<HEAD><TITLE>HTML Replace Utility</TITLE
></HEAD>
<BODY BGCOLOR=white>
<BR>
<CENTER>
<TABLE BORDER=1 BORDERCOLOR="#333333" CELLSPACING=0 WIDT
H=400 CELLPADDING=3>
<TR>
<TD ALIGN=CENTER BGCOLOR="#000080"><FONT COLOR="white" SIZE="+1"><B>HTML
Replace Utility</B></FONT></TD>
</TR>
<TR>
<TD BGCOLOR="#CCCCCC">
<br>
Use this script to easily re
place an HTML template file with values you specify in a form.<P>
Specify your HTML template file he
re, click submit, and a form will be generated for you.<p>
<FORM ACTION="$cgi" METHOD="POST" ENCTYP
E="multipart/form-data">
<B> Template Filename: </B> <INPUT TYPE="FILE" NAME="filename" SIZE=30>
<
INPUT TYPE="SUBMIT" VALUE="submit">
</FORM>
<HR>
<table border=0 align=center>
<tr>
<td align=
center>
<FORM ACTION="" method="get">
<input type="submit" value="Give Feedback">
</FORM>
</
td>
<td align=center>
<FORM ACTION="" method="get">
<input type="submit" value="Script Suppor
t">
</FORM>
</td>
</tr>
</table>
</TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
END
}
Post a comment
No comments yet