#!/usr/bin/perl require "common_function.pl"; use DBI; use Digest::MD5 qw(md5 md5_hex md5_base64); ############# this is here to check their authentication - that line removed from this code, and the load still happens without it here print "Content-type: text/html \n\n"; $dbh = DBI->connect('DBI:mysql:name-of-db', 'NOT COPIED INTO HERE', 'NOT COPIED INTO HERE'); ######### this is the subroutine called from that common block, copied into here for clarity ########## $query = 'SELECT flag_value FROM server_flags WHERE flag_name = ?'; $sthcf2 = $dbh->prepare($query); $result=$sthcf2->execute("announcements_today"); ($currentnews) = $sthcf2->fetchrow(); $sthcf2->finish(); ################## if ($currentnews ne ""){ $currentnews=<<_MOOSE_;
$currentnews
_MOOSE_ $dbh->disconnect(); } print $currentnews; $dbh->disconnect();