Gossamer Forum
Home : Products : DBMan : Customization :

Elliot - records.cgi - revisited

Quote Reply
Elliot - records.cgi - revisited
I decided to try it again since the correction had been made. Now I'm getting a whole new error.
Quote:
</home/httpd/virtual-domains/fishhoo/cgi-bin/team/reports/records.cgi
Undefined subroutine &main::get_date called at /home/httpd/virtual-domains/fishh
oo/cgi-bin/team/reports/reports.cfg line 58.

I have posted my records.cgi at http://www.fishhoo.com/recordscgi.txt and my reports.cfg at http://www.fishhoo.com/reportscfg.txt . The date routine is working perfectly in dbman.

Would appreciate your taking a look at this.


------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com
Quote Reply
Re: Elliot - records.cgi - revisited In reply to
1) Define $font and $smfont in your reports.cfg file, like the following:

Code:
$font = 'font face="Verdana" size="2"';
$smfont = 'font face="Verdana" size="1"';

- O R -

2) Delete the following tags in the records.cgi script:

Code:
<$font>
<$smfont>

Replace them with whatever font codes you want.

The first option is better.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. Smile
----------------------










[This message has been edited by Eliot (edited January 27, 2000).]
Quote Reply
Re: Elliot - records.cgi - revisited In reply to
OK, thanks, that worked. Now how can I wrap the list of states into columns? Once the database starts filling up, the list could get pretty long.

You the man, Elliot!

------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com
Quote Reply
Re: Elliot - records.cgi - revisited In reply to
I do not have time to work on this type of enhancement. May be some one else has some ideas.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Elliot - records.cgi - revisited In reply to
You done good, my boy. Maybe I'll post to the Perl forum and see if we can get some help there. I hope that everyone will be able to use your mod without errors now. It sure is a time saver when it works.

------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com
Quote Reply
Re: Elliot - records.cgi - revisited In reply to
Okay...the problem is that the &get_date reference in your date field is NOT FOUND due to the fact that you are not requiring or referencing the db.cgi directly.

Try this...and I hope this works for the last time!!!!!!!!!!

Replace the following codes:

Code:
require "/home/httpd/virtual-domains/fishhoo/cgi-bin/team/reports/reports.cfg";

With the following:

Code:
$db_file_name = 'records.db';

So, what you are basically doing is disregarding the .cfg file and defining the variables within the records.cgi file.

Get it? Got it? I hope.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Elliot - records.cgi - revisited In reply to
I was hoping too!
Now I get the error
Quote:
Error Message : No State field defined
Script Location : /home/httpd/virtual-domains/fishhoo/cgi-bin/team/reports/records.cgi
Perl Version : 5.00503
Setup File : reports.cfg
Session ID : default

The State field is what I was hoping to display the records by. I suppose some way it needs to be defined in records.cgi since we are not using reports.cfg any more. Should I include the %db_def = ( in records.cgi? If yes, where should I put it?
------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com


[This message has been edited by willdeb (edited January 27, 2000).]

[This message has been edited by willdeb (edited January 27, 2000).]
Quote Reply
Re: Elliot - records.cgi - revisited In reply to
Okay...Do this:

Keep the require line in there for the config file.

Then simply add the sub get_date routine from your db.cgi into the records.cgi file.

I have made the changes to the record.cgi Mod...Go here to download it:


This should do it...If not, I am completely done creating Mods for these scripts.

Wink

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Elliot - records.cgi - revisited In reply to
OK, tried the new script.
Error
Quote:
Error Message : unable to open /home/httpd/virtual-domains/fishhoo/cgi-bin/team/reports/reports.db. Reason: No such file or directory
Script Location : /home/httpd/virtual-domains/fishhoo/cgi-bin/team/reports/records.cgi
Perl Version : 5.00503
Setup File : reports.cfg
Session ID : default
Obviously there is a reports.db and the path is correct. Is it possible to define the database fields in records.cgi?

Don't get frustrated. Wink


------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com


[This message has been edited by willdeb (edited January 27, 2000).]
Quote Reply
Re: Elliot - records.cgi - revisited In reply to
No...It would not be wise to re-define the fields in the records.cgi file.

First of all, is the records.db set to 666 (rw-rw-rw-).

If it is, then replace the following codes:

Code:
open (DB, "<$db_script_path/$db_file_name") or &cgierr("unable to open $db_file_name. Reason: $!");

With the following codes:

Code:
open (DB, "$db_script_path/$db_file_name") or &cgierr("unable to open $db_file_name. Reason: $!");

If that doesn't work, replace the codes with the following codes:

Code:
open (DB, ">>$db_script_path/$db_file_name") or &cgierr("unable to open $db_file_name. Reason: $!");

If that doesn't work, then replace these codes with the following codes:

Code:
open (DB, ">$db_script_path/$db_file_name") or &cgierr("unable to open $db_file_name. Reason: $!");

Quote:
Don't get frustrated.

Thanks, Dad. Frown

Cheers,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Elliot - records.cgi - revisited In reply to
No Joy Frown

------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com
Quote Reply
Re: Elliot - records.cgi - revisited In reply to
Since nothing else seems to be working, I decided to define reports.db in records.cgi by copying the definations from reports.cfg to records.cgi. I got the same error.
Quote:
</home/httpd/virtual-domains/fishhoo/cgi-bin/team/reports/records.cgi
Undefined subroutine &main::get_date called at /home/httpd/virtual-domains/fishh
oo/cgi-bin/team/reports/records.cgi line 69.
I'm getting so many backup copies of records.cgi that I don't know which one is which any more.

------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com
Quote Reply
Re: Elliot - records.cgi - revisited In reply to
The final suggestion I have is the following...

Change the following codes:

Code:
open (DB, "$db_script_path/$db_file_name") or &cgierr("unable to open $db_file_name. Reason: $!");

to the following:

Code:
open (DB, "/home/httpd/virtual-domains/fishhoo/cgi-bin/team/reports/reports.db") or &cgierr("unable to open database file. Reason: $!");

Hope this works.

If not...I don't know what to tell ya.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Elliot - records.cgi - revisited In reply to
With your last error, it means that you are NOT using the latest file I posted, which include the sub get_date routine in the records.cgi file.

If you kept the require reports.cfg file, you should NOT have to copy the %db_def section of the configuration. That is just double data entry.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Elliot - records.cgi - revisited In reply to
Bless you young man. I think we're getting somewhere. Take a look at http://www.fishhoo.com/.../reports/records.cgi . Now tell me how to get rid of that <> and to display my states in colums.

------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com
Quote Reply
Re: Elliot - records.cgi - revisited In reply to
One suggestion is to look at the codes in the LINKS program located in the sub site_html_print_cat in the site_html_templates.pl file. I think that you can use the codes, but replace the category_clean links and sub-category link stuff with the $sfield link and codes.

I would recommend keeping this request in DBMAN Discussion Forum because it directly relates to DBMAN. But there are a bunch of great programmers that frequent the Perl/CGI Forum.
So whatever you choose is fine.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------