Hi
I hope I am posting this to the right area of the forum, I really don't understand cgi scripts at all and wanted to change the size of some numbers that appear on my website.
I have been told the numbers are in this piece of script.
Thankyou for any help.
sub display_frontpage
{
my %numbers = ();
my $output = "";
open (DATABASE, "$data_file_path" || &file_open_error
("$data_file_path", "Display Frontpage", __FILE__, __LINE__);
while (<DATABASE>)
{
$line = $_;
chop $line;
@fields = split (/\|/, $line);
if ($fields[$index_of_status] eq "ok" {
$category = $fields[$index_of_category];
$numbers{$category}++;
}
}
close (DATABASE);
print qq~
<p>
<table border=0 width=100% cellpadding=2 cellspacing=2>
<tr>~;
$end_of_row = "off";
open (DATA, "$category_file_path"
@categorylines = <DATA>;
close DATA;
foreach $categoryline (@categorylines) {
@categoryfields = split(/\|/,$categoryline);
if ($categoryfields[6]) {
$category_shortname = $categoryfields[0];
$category = $categoryfields[1];
$description = $categoryfields[2];
$image = $categoryfields[3];
$category_link = $category;
$category_link =~ s/\+/plussign/g;
$category_link =~ s/ /\+/g;
$category_link =~ s/&/ampersand/g;
$category_link =~ s/=/equalsign/g;
if ($numbers{$category} eq "" {
$numbers{$category} = 0;
}
print qq~
<td valign=top>
<a href="$script_url?session_key=$session_key&display_subcategories=on&category=$category_link"><img src="$graphics_dir/$image" border=0 alt="$category"></a></td> <td valign=top><font face=arial size=3><a href="$script_url?session_key=$session_key&display_subcategories=on&category=$category_link"><b>$category</b></a> <i>($numbers{$category})</i><br>
<font size=1>$description
</font></td>~;
if ($end_of_row eq "off" {
$end_of_row = "on";
}
else {
print qq~</tr>
<tr>~;
$end_of_row = "off";
}
}
}
if ($end_of_row eq "off" {
print qq~<td></td><td></td></tr>~;
}
print qq~
</table>
<P>
</form>
<P>~;
}
1;
I hope I am posting this to the right area of the forum, I really don't understand cgi scripts at all and wanted to change the size of some numbers that appear on my website.
I have been told the numbers are in this piece of script.
Thankyou for any help.
sub display_frontpage
{
my %numbers = ();
my $output = "";
open (DATABASE, "$data_file_path" || &file_open_error
("$data_file_path", "Display Frontpage", __FILE__, __LINE__);
while (<DATABASE>)
{
$line = $_;
chop $line;
@fields = split (/\|/, $line);
if ($fields[$index_of_status] eq "ok" {
$category = $fields[$index_of_category];
$numbers{$category}++;
}
}
close (DATABASE);
print qq~
<p>
<table border=0 width=100% cellpadding=2 cellspacing=2>
<tr>~;
$end_of_row = "off";
open (DATA, "$category_file_path"
@categorylines = <DATA>;
close DATA;
foreach $categoryline (@categorylines) {
@categoryfields = split(/\|/,$categoryline);
if ($categoryfields[6]) {
$category_shortname = $categoryfields[0];
$category = $categoryfields[1];
$description = $categoryfields[2];
$image = $categoryfields[3];
$category_link = $category;
$category_link =~ s/\+/plussign/g;
$category_link =~ s/ /\+/g;
$category_link =~ s/&/ampersand/g;
$category_link =~ s/=/equalsign/g;
if ($numbers{$category} eq "" {
$numbers{$category} = 0;
}
print qq~
<td valign=top>
<a href="$script_url?session_key=$session_key&display_subcategories=on&category=$category_link"><img src="$graphics_dir/$image" border=0 alt="$category"></a></td> <td valign=top><font face=arial size=3><a href="$script_url?session_key=$session_key&display_subcategories=on&category=$category_link"><b>$category</b></a> <i>($numbers{$category})</i><br>
<font size=1>$description
</font></td>~;
if ($end_of_row eq "off" {
$end_of_row = "on";
}
else {
print qq~</tr>
<tr>~;
$end_of_row = "off";
}
}
}
if ($end_of_row eq "off" {
print qq~<td></td><td></td></tr>~;
}
print qq~
</table>
<P>
</form>
<P>~;
}
1;