# ------------------------------------------------------------------------------------------------
sub PageExam{
# ------------------------------------------------------------------------------------------------
my $elim;
my $stysql;
my $stysth;
my $stylist;
my $tempcount;
# Turn off headers and footers for page layout
$PageExample='pagexamp';
# Get data from table
$PRIFMESS=&create_prif('oindex.htm','<!-- COMMENCE HTML -->','<!-- START CONTENT BODY -->',"Menu Option",1);
my $xsql="SELECT * FROM $TABLE_NAME[7]";
my $xsth=$dbh->prepare($xsql);
$xsth->execute();
my $xrv=$xsth->rows;
my @examples;
# $PAGE_TEXT- Code inserted into place holders
my $PAGE_TEXT="We can enhance the text by using CSS Text control codes<br>";
# Removed in case there is some issue with inserting HTML codes
# $PAGE_TEXT.="<h1>h1 - text</h1><br>";
# $PAGE_TEXT.="<h2>h2 - text</h2><br>";
# $PAGE_TEXT.="<h3>h3 - text</h3><br>";
# $PAGE_TEXT.="<h4>h4 - text</h4><br>";
# $PAGE_TEXT.="<h5>h5 - text</h5><br>";
# $PAGE_TEXT.="<p>p - text</p><br>";
# Image code to insert into image placeholders
my $PAGE_IMAGE="<img border='0' src='bitims/hol2.jpg'>";
while(@examples=$xsth->fetchrow_array()){
print "<div class='exhead'>$examples[1]</div>";
for($elim=2; $elim<@examples; ++$elim){
chomp $examples[$elim];
if(substr($TEESTEM_TEXT[$elim],0,7) eq 'SEGTYPE'){
if($examples[$elim] ne '-------'){
$stysql="SELECT STYLE FROM $TABLE_NAME[6] WHERE NAME='$examples[$elim]'";
$stysth=$dbh->prepare($stysql);
$stysth->execute();
$stylist=$stysth->fetchrow_array();
# Remove substitutions and script works ok
# Leave them in and it just locks up
# Leave any single one in and it locks up
# Same result if the match statements are removed and just the substitutions left
# Replace Text
if($stylist=~ m/ZZTEXT1/){$stylist=~ s/ZZTEXT1/$PAGE_TEXT/gm}
if($stylist=~ m/ZZTEXT2/){$stylist=~ s/ZZTEXT2/$PAGE_TEXT/gm}
if($stylist=~ m/ZZTEXT3/){$stylist=~ s/ZZTEXT3/$PAGE_TEXT/gm}
if($stylist=~ m/ZZTEXT4/){$stylist=~ s/ZZTEXT4/$PAGE_TEXT/gm}
if($stylist=~ m/ZZTEXT5/){$stylist=~ s/ZZTEXT5/$PAGE_TEXT/gm}
#Replace Images
# if($stylist=~ m/ZZIMAGE1/){$stylist=~ s/ZZIMAGE1/$PAGE_TEXT/g}
# if($stylist=~ m/ZZIMAGE2/){$stylist=~ s/ZZIMAGE2/$PAGE_TEXT/g}
# if($stylist=~ m/ZZIMAGE3/){$stylist=~ s/ZZIMAGE3/$PAGE_TEXT/g}
# if($stylist=~ m/ZZIMAGE4/){$stylist=~ s/ZZIMAGE4/$PAGE_TEXT/g}
# if($stylist=~ m/ZZIMAGE5/){$stylist=~ s/ZZIMAGE5/$PAGE_TEXT/g}
# show explanations, hidden in template
$stylist=~ s/<!--/ /g;
$stylist=~ s/-->/ /g;
print "$stylist";
}
}
}
}
# Turn on headers and footers for page layout
$PageExample='';
$PRIFMESS=&create_prif('oindex.htm','<!-- END CONTENT BODY -->','<!-- FINISH HTML -->',"Menu Option",2);
exit;
}