Gossamer Forum
Home : Products : DBMan : Installation :

PLz hElp Me

(Page 1 of 2)
> >
Quote Reply
PLz hElp Me
I need your help, I wanted to add some fields in DBMAN I.e.

ID
Company Name
Status
Office
Phones
Fax
Email
Url
Authorized
Representative
Factory
Fax
Banker Name
Looms Installed
Type Of Looms
Products
Manufacturerd

And I also want some thing in which My member can modify thier own listing
by entering thier User name and password, but they cant modify Or delete any
other Records entered in the database, Hope you got My Point ! and I want
other members to search the database by City, ID, Company Name, And the
given in that database.. Can you please help me with that, I have tried that
but it wont work, I have modify html.pl file, plz help me


Plz reply ASAP,


Sohaib
Quote Reply
Re: PLz hElp Me In reply to
I think the best thing for you to do is to go, step by step, through the tutorial which starts at http://www.jpdeni.com/dbman/tutorial.html . If you have any problems or questions along the way, let me know how far you got in the tutorial and what the problems were.


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






Quote Reply
Re: PLz hElp Me In reply to
thanks of Ur quick reply, and thank you of ryour help, I am almost done with my script.

Plz chk at www.saasoh.com/cgi-bin/database/db.cgi

I am having some troubles in Viewing records, Whenever i view the records, on the ID fields it shows me some thing like admirs but its now showing me the Correct ID I mean its not showim me ID number which has to be 1 for record number 1,And one more thing in which My member can modify thier own listing by entering thier User name and password, but they cant modify Or delete any other Records entered in the database, Hope you got My Point ! and I want other members to search the database by City, ID, Company Name, And the given in that database. I have tried this but Its not working, member can also delete Others records, Plz reply ,me ASAP
Quote Reply
Re: PLz hElp Me In reply to
First of all, you have an error somewhere in your html.pl file. If you would like me to take a look at it, please copy the file to a web-accessible directory (one where you would place .html files) and rename it to html_pl.txt.

My guess is that your problem with your ID field has to do with the setting of your $auth_user_field in your .cfg file. If you'll also copy default.cfg and rename it to default_cfg.txt, I'll take a look at it too.


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






Quote Reply
Re: PLz hElp Me In reply to
thank you for your reply,

please visit the following

http://www.saasoh.com/html.pl.txt
http://www.saasoh.com/default.cfg.txt

And plz do let me know about the sign up process in which registered user only add thier record once,

thank u once again

Sohaib
Quote Reply
Re: PLz hElp Me In reply to
I don't understand what you want to do. Your .cfg file is very confusing.

You have

'ID' => [ 0, 'numer', 8, 255, 1, '', ''],

and

$db_key = 'ID';
$db_key_track = 1;

Which means that you will have a numeric key that is maintained by the database. But you also have

$auth_user_field = 0;

Which means that the userid will automatically be placed in that field.

You have

$auth_signup = 1;
@auth_signup_permissions = (1,0,0,1,0);

Which means that logged in users can view or modify records -- but not add them, and you have

$auth_modify_own = 1;

Which means that they can only modify the records they added. Except that they can't add any records.

First, delete everything in your default.db file. You will have to start from the beginning.

Then add another field to your .cfg file for the userid.

I think you should try going back to the Configurator again. Add another field for the userid. Allow users to Add records. If users will only have one record each, you will not need the ID field at all.


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






Quote Reply
Re: PLz hElp Me In reply to
OK, i did what u have said ?

now same thing is happend, can u plz help me . in making the default.cfg And Html.pl file I have tried so many times but same thing is happening with the ID field, and registered user - I want my registered user to add thier record once, I dont want them to add records 4 times using 4 different iDS,, hope u Got me ! plz make the default.cfg file so that it count the IDS, of my member plus I want that registered user thing.

I am very very gratefull to your kind favor, Plz help me in make that default.cfg ANd html.pl file as I required.

Thank YOU

Sohaib
Quote Reply
Re: PLz hElp Me In reply to
I think i am almost done with my script

Now the Member ID is working fine, I mean counting fine Smile

NOW , what I want next is to sign up users so that they can only modify thier oWn record I dont want them to add Or Delete, what they can do Is VIEW any records, MODIFY thier Own Records, by entering Thier Company Name plz tell me what to do next ?:
Quote Reply
Re: PLz hElp Me In reply to
All of the configurations you want can be accomplished by using the Configurator. Read it carefully and follow the instructions.

If you only want one record per user, you should set the $db_key to the userid field. That way they can only add one record each. There is no need to use a counter file.

Until you have your .cfg file set up correctly, there is no point in even thinking about the html.pl file.

I'll need you to put your default.cfg file up again if you want me to help you with it.


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






Quote Reply
Re: PLz hElp Me In reply to
I too am having some problems getting my customised html to work correctly. I have a database (csv) loaded and the whole programme works perfectly well with the default html. However, the html included in the perl script is not showing one of the fields. It is the URL field. I have checked my coding but cannot see a problem.
I have put html_pl.txt and brokers_db.txt at the following URL: www.afil.co.uk/dbman_files

I would be very grateful for any wisdom you can impart.

Thanks


------------------
David Olley
david@afil.co.uk
Quote Reply
Re: PLz hElp Me In reply to
David:

Your current line for this is:

<td ALIGN="right" VALIGN="middle" height="4" width="73"><$font_color>URL:</td>
<td height="4" width="319"> <$font>$rec{'URL'}</a></td>

I think if you change it to the following it may help. perhaps having the </A> in there without an opening <A HREF=" may be causing some problems ?

<td ALIGN="right" VALIGN="middle" height="4" width="73"><$font_color>URL:</font></td>
<td height="4" width="319"> <$font><A HREF="$rec{'URL'}">URL</a></font></td>

I also noticed when looking at your coding that you start a font tag but have no ending </font> within your table cells. You may want to change that also Smile

You would want to check your coding in both sub html_record_form and sub html_record for the missing </font> tags.

Hope this helps Smile
Quote Reply
Re: PLz hElp Me In reply to
sorry for the late response ...

here is the link for http://www.saasoh.com/default.cfg.txt

bye
Quote Reply
Re: PLz hElp Me In reply to
Sohaib, what problem are you having now? I don't know what to look for.


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






Quote Reply
Re: PLz hElp Me In reply to
OK, the problem is with members, i mean they cant check thier ID, i mean when ever I log in thru author, Or guest i have notice that in search I cant see that Member ID, i can only see that member id when ever I log in thru admin, and when I search thru admin it shows me that MEmber id , but thru author oR guest i dont know why
Quote Reply
Re: PLz hElp Me In reply to
You have the Userid set as an "admin-only" field.

Code:
'Userid' => [19, 'alpha', -2, 15, 0, '', ''],

The MemberID field is a counter field, not the userid.

Code:
'MemberID' => [ 0, 'numer', 5, 8, 1, 'Tma/', ''],

$db_key = 'MemberID';

$db_key_track = 1;

Do you want a field on your search form to be able to enter the userid and get the records that match? I'm still not sure what you want.


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






Quote Reply
Re: PLz hElp Me In reply to
what i want is, when ever my guest search my database they will see member Id first then other records like company name, phone number and u know MORE

but every listing must be start thru MEMBER ID i hope now u understand
Quote Reply
Re: PLz hElp Me In reply to
If you post your html.pl file, I'll rewrite the sub html_record_form and sub html_record subroutines so they will do what you want, as far as I can figure it out.

Save it like you saved your default.cfg file -- *except* that you must name the file

html_pl.txt

There should only be one "dot" in the name.


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






Quote Reply
Re: PLz hElp Me In reply to
Many thanks, Lois, for your helpful remarks concerning my html. I went through it diligently and found a number of missing closing font tags. Also one which was out of position. More importantly, though, I discovered some major inconsistencies in the field definitions and the config definitions. Having put these right, the html works well.
It turns out that most of my problems were, in fact, caused by my ISP. After discovering that the formmail script (supplied by the ISP) which I had previously modified to correct an inherent error left there by the ISP, had mysteriously been changed back again, I noticed that all the attributes of my files had also been changed on the server. A quick phone call to the ISP soon had them putting right some things that they had screwed up. They probably cost me a days work by messing around with the files and other permissions. I still do not know why they did this, but it is very worrying!

Thanks for your help.


------------------
David Olley
david@afil.co.uk
Quote Reply
Re: PLz hElp Me In reply to
Thanks

I have posted at

http://www.saasoh.com/html.pl.txt
Quote Reply
Re: PLz hElp Me In reply to
sohaib, when you used the Configurator, you obviously set the "MemberID" field to be "admin-only." That's the only way that you would get the code that you got for the html_record and html_record form.

In html_record_form, if you want the "MemberID" field to be visible, change

Code:
|;
if ($per_admin) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>MemberID:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="MemberID" SIZE="20" VALUE="$rec{'MemberID'}" MAXLENGTH="255"></TD></TR>
|;
}
else {
print qq|
<input type="hidden" NAME="MemberID" VALUE="$rec{'MemberID'}">
|;
}
print qq|

to

Code:
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>MemberID:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="MemberID" SIZE="20" VALUE="$rec{'MemberID'}" MAXLENGTH="255"></TD></TR>

This will allow people to search on the MemberID.

If you want the MemberID field to be visible in the results of searches, in html_record, change

Code:
|;
if ($per_admin) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>MemberID:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'MemberID'}</Font></TD></TR>
|;
}
print qq&#0124; &#0124;;

to

Code:
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>MemberID:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'MemberID'}</Font></TD></TR>
|;

Or you could go back to the Configurator and set up the fields as you really want them.


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






Quote Reply
Re: PLz hElp Me In reply to
JDPENI,

It was gving me some syntax error

could you please paste the html.pl.txt as modified by you on that thread

thank you

sohaib
Quote Reply
Re: PLz hElp Me In reply to
I have placed the subroutines in a text file for you. You can pick it up at http://www.jpdeni.com/dbman/Mods/sohaib.txt .


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






Quote Reply
Re: PLz hElp Me In reply to
HI ,

same problem

visit

http://www.saasoh.com/cgi-bin/database/db.cgi

can you please post the whole script of html.pl on your web site as .TXT so that I can easily operate my database script, I have paste that script from the starting of My rec, but I dont know what problem I am having now.

Quote Reply
Re: PLz hElp Me In reply to
Okay. The complete file is now at the location I posted earlier.


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






Quote Reply
Re: PLz hElp Me In reply to
JDPENI,

Thank you very much

really appreciate your help.

I have downloaded Fileman, can I able to use multi user on my fileman like if user1 login thu his user1 passwd can his able to go to his directory.

> >