Hi all,
i have two new tables accessed to my links admin:
First:
CREATE TABLE Access (
ID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
Name varchar(255) NOT NULL,
AccessURL varchar(255),
AccessText varchar(255),
PRIMARY KEY (ID),
KEY accndx (Name)
);
Second:
CREATE TABLE AccessAlternates (
AccessID int(10) unsigned DEFAULT '0' NOT NULL,
LinkID int(10) unsigned DEFAULT '0' NOT NULL,
KEY accndx (AccessID),
KEY relndx (LinkID)
);
to show like:
1. ID | Name | AccessURL | AccessText
2. AccessID | LinkID
I have rewrite all needed functions and vars in admin.cgi, admin_html and db_utils, so
this both tables behave like category and categoryalternates.
I could add/delete/modify the access table like categories
And i could choose for every link the value for field "Access" from a pulldown list (from Table Access) like
category and i could add/delete/modify alternate values for the field Access.
Everything is really fine so far.
Cause i use Links as a registry database with people instead of links, i have a new cgi named access.cgi doing
the following:
Get the input ID and Password (additional field to links-table), test if its ok (rexep),
then get the record for this ID and compare the input password with the recordīs password.
OK, too. BUT:
Now i know that this user has access, i have the record (with this the value of field access)
Now i need and havenīt it running till now:
1. Get the values for this ID from Table-AccessAlternates and put them together with the value of field access
in an array:
2. Then get the values from table Access for this values (1.)
3. Do a new HTML and print out:
a href="AccessURL" - Name - a
for every value-pair from the Access-Table.
My perl isnt enough to do this, so i would really hope you help me on this, knowing this would be only a few lines, but which :-)
Robert
i have two new tables accessed to my links admin:
First:
CREATE TABLE Access (
ID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
Name varchar(255) NOT NULL,
AccessURL varchar(255),
AccessText varchar(255),
PRIMARY KEY (ID),
KEY accndx (Name)
);
Second:
CREATE TABLE AccessAlternates (
AccessID int(10) unsigned DEFAULT '0' NOT NULL,
LinkID int(10) unsigned DEFAULT '0' NOT NULL,
KEY accndx (AccessID),
KEY relndx (LinkID)
);
to show like:
1. ID | Name | AccessURL | AccessText
2. AccessID | LinkID
I have rewrite all needed functions and vars in admin.cgi, admin_html and db_utils, so
this both tables behave like category and categoryalternates.
I could add/delete/modify the access table like categories
And i could choose for every link the value for field "Access" from a pulldown list (from Table Access) like
category and i could add/delete/modify alternate values for the field Access.
Everything is really fine so far.
Cause i use Links as a registry database with people instead of links, i have a new cgi named access.cgi doing
the following:
Get the input ID and Password (additional field to links-table), test if its ok (rexep),
then get the record for this ID and compare the input password with the recordīs password.
OK, too. BUT:
Now i know that this user has access, i have the record (with this the value of field access)
Now i need and havenīt it running till now:
1. Get the values for this ID from Table-AccessAlternates and put them together with the value of field access
in an array:
2. Then get the values from table Access for this values (1.)
3. Do a new HTML and print out:
a href="AccessURL" - Name - a
for every value-pair from the Access-Table.
My perl isnt enough to do this, so i would really hope you help me on this, knowing this would be only a few lines, but which :-)
Robert