Gossamer Forum
Home : Products : DBMan : Customization :

Admin add records for users

Quote Reply
Admin add records for users
OK,
Maybe this is more clear:
I have some users, who will give me a list of records, they will add to the DB (by fax, post or Email). I, as the admin, must be able to add records with using the userid and pw of the person who ask me to add the record(s). Meanwhile, in the logfile, the added record must be regognizeble(??) that the admin has added that record.
Hope thats possible. I think about this myself also and when I thnk I have a solution, I'll ask you what you think of it. OK???

Thanks.
-------
Mart.
Quote Reply
Re: Admin add records for users In reply to
In db.cgi, sub add record, change

Code:
($auth_user_field >= 0) and ($in{$db_cols[$auth_user_field]} = $db_userid);

to

Code:
unless ($per_admin) {
($auth_user_field >= 0) and ($in{$db_cols[$auth_user_field]} = $db_userid);
}

Then you'll just enter the userid when you add a record.

If you want the log file to indicate who added the record, change

Code:
&auth_logging("added record: $in{$db_key}") if ($auth_logging);

to

Code:
&auth_logging("$db_userid added record: $in{$db_key}") if ($auth_logging);



------------------
JPD





Quote Reply
Re: Admin add records for users In reply to
YES, Smile
This was what I've looked for.
You must have every action of the script in your head, unbelieveble....

Thanks...
-------
Mart.
Quote Reply
Re: Admin add records for users In reply to
Well, my head is definitely filled with a lot of what most folks would consider useless information. Smile

Actually, though, it's just that I've become really familiar with the process the script goes through with just about every action. I know where to look, based on experience. (I also have a copy of all the scripts open in my text editor at all times when I'm answering questions on the forum. Smile ) The only thing I haven't worked out yet is the searches and the sorts. Most of sub query is a mystery to me.

Anyway, I'm glad I was able to help.


------------------
JPD