Gossamer Forum
Home : Products : DBMan : Customization :

Send record question

Quote Reply
Send record question
After I added the mod and I log in as an admin, I get to the main menu screen and when I click on any of the links, I get a blank screen. No error message.

Any ideas?

Thanks.

Julian
Quote Reply
Re: Send record question In reply to
I would first look at the page source code using your browser to see what is actually on the page.

It sounds like you may be missing some HTML codes, such as ending table tags.

Viewing the source code of the page may help you to see what is happening and why you page is not displaying.

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Send record question In reply to
The problem only comes when I log in as an admin and does not arise when a user with no admin permission logs in. I don't know why.

Julian

Julian
Quote Reply
Re: Send record question In reply to
Forgot to give you the website to go: http://julianng.hypermart.net/cgi-bin/db.cgi Log in as problem/problem for admin access. The you will see the main menu. After which, if you click on the view link or the delete or any other links, the page then will be shown is blank.

However, if you log in as 982315X02/bioaries, you will still see the main menu and then if you click on any of the links, you can see the page.

Julian
Quote Reply
Re: Send record question In reply to
You are missing a </table> tag. You probably have an "admin-only" field for Validated and you did not include the closing tag.

If you look at the page using Internet Explorer, it works just fine -- well, sorta. Your table is below the footer. It is definitely a problem with not having a closing </table> tag.




JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Send record question In reply to
Opps... I looked at the source with netscape and couldn't find what was wrong...

Thanks.

Julian
Quote Reply
Re: Send record question In reply to
I can't show you where the problem is because you have deleted the "problem/problem" userid/password.

Copy your html.pl file to a web-accessible directory (one where you would place .html files) and rename it to html_pl.txt. Then come back here and tell me where I can pick it up. I'll find your problem for you.


JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Send record question In reply to
Hi! Actually, I found what was the problem already. Your last reply to me was most enlightening. But the problem now is that I can't get the send record mod to work. I dabble with the variables in the mod to try to achieve the following:

1)I want to set the mod to only be able to send the record to the person himself. He can't send it to other people.
2)I want to set the From: to the admin email address.

I think I got 2) working but I can't get 1) to work.

I'll copy the db.cgi, html.pl and db.cfg into text files. You can find them at: http://julianng.hypermart.net/xx.txt where xx stands for the 3 respective filenames above.

Thanks.

Julian
Quote Reply
Re: Send record question In reply to
I tried all of your file names, but I got a "file not found" for all of them.

Please change the name so that there's only one "dot" in the name -- db_cgi.txt. It's also a lot easier if I can just copy the whole URL into my browser instead of having to do it in several parts.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Send record question In reply to
http://julianng.hypermart.net/db.txt (db.cgi)
http://julianng.hpyermart.net/html.txt (html.pl)
http://julianng.phypermart.net/default.txt (default.cfg)

Thanks again.

Julian
Quote Reply
Re: Send record question In reply to
I see what you're doing. Not too bad, just a little fixing needed. Smile

In sub forward_email, you don't need

Code:

unless ($admin_email) { $message = "You must fill in the recipient's email address<BR>"; }
unless ($admin_email =~ /.+\@.+\..+/) { $message = "The recipient's email address is not in the correct format.<BR>"; }
Presumably you have already set this correctly in your .cfg file. If you haven't, the user couldn't do anything about it anyway. Smile

You can also eliminate

Code:

for ($i = 0; $i <= $#db_cols; $i++) {
if ($db_email_field eq $db_cols[$i]) {
$found = 1;
last;
}
}
if (!$found) {
$message .= "email field not found<BR>";
}
In its place, add

Code:

$in{$db_cols[$auth_user_field]} = $db_userid;
my ($status,@hits) = &query("view");
if ($status eq 'ok') {
%rec = &array_to_hash(0,@hits);
}
else {
$message .= "Your email address could not be found in the database.";
}
The rest is fine. (At least it seems so to me. Let me know if this works. Smile)


JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Send record question In reply to
Thanks. Well I got that to work but now when I try to search for my own record using the link "View", it gives an error message that says "no matching records".

However, if I use other links say modify or list all, the records will be shown including mine.

In addition, I realised that when I click on the link that is for sending the record to the owner of the record, I get a email with blank fields. However, when I say click on modify(which only allows modifying the owner's record) and then click on the link that sends the record to the owner, I get an email that has all the fields filled up.

Any ideas why?

Thanks. I kept the same files in the same directory in case you want to look at them again.

Julian
Quote Reply
Re: Send record question In reply to
I don't know. I'm really sorry, but I just can't figure it out right now.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Send record question In reply to
Okay, let me mistify the problem further. Actually, I have 4 databases, all of which uses the same db.cgi
I checked out the rest of the databases and found that only one of them allows me to search for records. The rest gives the same problem as the one that I said before. The only one that worked uses the same password file as the original one that did not work. The rest of the databases that I just checked uses different password files.

In addition, the database that is working now, uses different .cfg, .log, .count files.

I tried to figure what the problem is but I still don't get it.

Help, anyone? Would greatly appreciate.

Julian
Quote Reply
Re: Send record question In reply to
If it were me doing this, I would go back to a version of the script that did not include the email mod and make sure that everything is working first.

I don't know that the mod would have any effect on the problems you're having now. I think they existed before and the mod is muddying the waters.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Send record question In reply to
Thanks. I managed to get it working again by starting the files from scratch again. I guess somehow in the process one of the files was changed.

I was wondering whether it's possible to create separate files for new mods and link them to the database itself.

Julian
Quote Reply
Re: Send record question In reply to
Only the ones that have completely separate subroutines. The problem is that most of the mods require actual tinkering with the internal subroutines of db.cgi. It's pretty hard to put them in separate files.

JPD
http://www.jpdeni.com/dbman/