I have 6 .cfg and .db files and I want to use 1 html.pl file PER .cfg/.db
HOWEVER, in the footer and main index of the default .cfg (and a different version of each of the other 5 .cfg's) (And I really don't want to have to have 6 html.pl files for EACH client dataset!) I use
$db_script_url?db=demofa&uid=$db_uid">
which is specific to each DB --- How can I make this a variable for the DB like it is for the user id???
so it would be
$db_script_url?db=$db_fa&uid=$db_uid">
Where would I need to make changes?
Where would I need to define what $db_fa is equal to?
I'm assuming the definitions would be in the .cfg file
and that I need to add code to each html.pl file as well as db.cgi ???
Alternatively, could I have separate files for the footer and menu and call them from a single html.pl for each database? (That would still be six more files for each client, but it would be a LOT less information and less difficult to maintain!)
Just not sure how to proceed. Thanks for any help!
Lynette
PS This is an example of the Code that needs to change in the sub html_footer of each of my 6 html.pl files:
sub html_footer {
# --------------------------------------------------------
print qq!<P align=center><FONT FACE='Verdana, Arial, Helvetica' Size=1>!;
print qq!| <A HREF="$db_script_link_url">Main Menu</A> !;
print qq!| <A HREF="$db_script_url?db=demofa&uid=$db_uid">Fixed Assets (Inventory)</A> ! if ($per_fa_add);
print qq!| <A HREF="$db_script_url?db=demostruc&uid=$db_uid">Structures</A> |<BR>! if ($per_cap_add);
print qq!| <A HREF="$db_script_url?db=demoimp&uid=$db_uid">Improvements to Land</A> ! if ($per_imp_add);
print qq!| <A HREF="$db_script_url?db=demoland&uid=$db_uid">Land Parcels</A> |<br>! if ($per_lnd_add);
print qq!| <A HREF="$db_script_url?db=demorpt&uid=$db_uid">Reports</A> |<br>! if ($per_reports);
print qq!| <A HREF="$db_script_link_url&site_admin_display=1">User Admin</A> ! if ($per_siteadmin);
print qq!| <A HREF="$db_script_link_url&admin_display=1">AVS Admin</A> ! if ($per_avsadmin);
print qq!| <A HREF="$db_script_link_url&change_password_form=1">Change Password</A> ! unless ($db_userid eq "default");
print qq!| <A HREF="$db_script_link_url&change_email_form=1">Change Email</A> ! unless ($db_userid eq "default");
print qq!| <A HREF="$db_script_link_url&logoff=1">Log Off</A> !;
print qq!|</font></p>!;
}
Lynette
Hollister, Ca
HOWEVER, in the footer and main index of the default .cfg (and a different version of each of the other 5 .cfg's) (And I really don't want to have to have 6 html.pl files for EACH client dataset!) I use
$db_script_url?db=demofa&uid=$db_uid">
which is specific to each DB --- How can I make this a variable for the DB like it is for the user id???
so it would be
$db_script_url?db=$db_fa&uid=$db_uid">
Where would I need to make changes?
Where would I need to define what $db_fa is equal to?
I'm assuming the definitions would be in the .cfg file
and that I need to add code to each html.pl file as well as db.cgi ???
Alternatively, could I have separate files for the footer and menu and call them from a single html.pl for each database? (That would still be six more files for each client, but it would be a LOT less information and less difficult to maintain!)
Just not sure how to proceed. Thanks for any help!
Lynette
PS This is an example of the Code that needs to change in the sub html_footer of each of my 6 html.pl files:
sub html_footer {
# --------------------------------------------------------
print qq!<P align=center><FONT FACE='Verdana, Arial, Helvetica' Size=1>!;
print qq!| <A HREF="$db_script_link_url">Main Menu</A> !;
print qq!| <A HREF="$db_script_url?db=demofa&uid=$db_uid">Fixed Assets (Inventory)</A> ! if ($per_fa_add);
print qq!| <A HREF="$db_script_url?db=demostruc&uid=$db_uid">Structures</A> |<BR>! if ($per_cap_add);
print qq!| <A HREF="$db_script_url?db=demoimp&uid=$db_uid">Improvements to Land</A> ! if ($per_imp_add);
print qq!| <A HREF="$db_script_url?db=demoland&uid=$db_uid">Land Parcels</A> |<br>! if ($per_lnd_add);
print qq!| <A HREF="$db_script_url?db=demorpt&uid=$db_uid">Reports</A> |<br>! if ($per_reports);
print qq!| <A HREF="$db_script_link_url&site_admin_display=1">User Admin</A> ! if ($per_siteadmin);
print qq!| <A HREF="$db_script_link_url&admin_display=1">AVS Admin</A> ! if ($per_avsadmin);
print qq!| <A HREF="$db_script_link_url&change_password_form=1">Change Password</A> ! unless ($db_userid eq "default");
print qq!| <A HREF="$db_script_link_url&change_email_form=1">Change Email</A> ! unless ($db_userid eq "default");
print qq!| <A HREF="$db_script_link_url&logoff=1">Log Off</A> !;
print qq!|</font></p>!;
}
Lynette
Hollister, Ca

