#!/usr/bin/perl ############################################################################## ############################################################################## # StellarStuff.com # # News Manager # # Copyright 2000 StellarStuff.com # # Created 1/1/2000 # # Available at http://www.stellarstuff.com # ############################################################################## # COPYRIGHT NOTICE # # Copyright 2000 StellarStuff.com All Rights Reserved. # # # # This script can be used\modified as long as you have paid for a registered # # version. To order, go to http://www.stellarstuff.com # # By using this script you agree to indemnifyme from any liability that # # might arise from its use. # # # # Redistributing\selling the code for this program without prior written # # consent is expressly forbidden. # ############################################################################## require "newsmanager.cfg"; ############################################################################## print "Content-type: text/html\n\n"; ########### Put the posted data into variables ############################### if ($ENV{"REQUEST_METHOD"} eq 'GET') { $buffer = $ENV{'QUERY_STRING'}; } else { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } ################ open(DATA, "$FORM{'article'}.txt"); @data = ; close(DATA); if (@data < 1) { print "News does not Exist at this time."; } else { $x = 1; foreach $data(@data) { if ($x == 1) { $sub = "$data"; } if ($x == 2) { $art = "$data"; } $x = $x + 1; } ################# DO HEADER ###################### open(HEAD, "newsheader.txt"); @head = ; close(HEAD); foreach $head(@head) { print "$head \n"; } #################################################### print " \n"; print " \n"; print " \n"; print "
$myfont$sub
$myfont$art
 
\n"; print "
\n"; ################# DO FOOTER ###################### open(FOOT, "newsfooter.txt"); @foot = ; close(FOOT); foreach $foot(@foot) { print "$foot \n"; } #################################################### }