Results 1 to 2 of 2
Related
-
password protection Forum: Javascript Forum
Replies: 2 -
password protection help needed please Forum: Javascript Forum
Replies: 1 -
password protection Forum: Databases
Replies: 7 -
password protection? Forum: HTML Forum
Replies: 9 -
Password Protection Forum: Javascript Forum
Replies: 3
-
07-02-2004, 01:27 PM #1
Help with password protection adaptation (also about a great free utility)
Hello,
I am a new user of http://baseportal.com
It's a free database portal, great possibilities, 4MB database size limit, so I recommand it to anyone.
But it has no "helpdesk" type support.
I want to have password protection to my database:
for users to be able to modify and/or delete only their own entries, and only to read, search, and sort the other entries.
My problem is that I have no Perl knowledge, and I can not implement the solution given there (in the "Library" section at "baseportal.com") for the "Password protection".
The problem is when I want to adapt it... because for that I assume you must know Perl...
Here is the address of my trial database:
http://baseportal.com/cgi-bin/baseportal.pl?htx=/wnct/main
(Search can be done after 6 variables, and sorting can be done after 6 variables too)<p>
Here is the script I used for my trial database (I constructed it upon a template given in baseportal.com):
------------------------------------------------
<do action=all
localparams=+
db=main
range^=0,25
searchfields=Id,Country,Region,Location,DOB/G,Nr
listfields=Id,Country,Region,Location,DOB/G,Nr,Occupation
allfields=Id,Country,Region,Location,First\ Name,WNC\ ID,DOB/G,Nr,Occupation,Email,Website\ ,Date
formfields=Country,Region,Location,First\ Name,WNC\ ID,DOB/G,Nr,Occupation,Email,Website\ ,Date,Password
showsort=Id,Country,Region,Location,DOB/G,Nr
showamount=all
selectbrowse=top
buttonbrowse=top
pagebrowse=top
indexbrowse=top
convert_html=Password
border=1 spacing=1 padding=2
gridcolor=912400
datasize=2
datacolor=000000
databack=F0F0F0
databack2=E0E0E0
dataalign=middle
headface=Arial headsize=2 headcolor=DA2400 headback=FFDADA headalign=middle
textface=Arial textsize=2
textcolor=000000 listtype=list
language=en
detail=linktop
search=linktop
input=linktop>
--------------------------------------------------
Here is how looks the example given at "baseportal", what I want to adapt:
http://baseportal.com/baseportal/baseportal/lib/password2/phone_numbers
And here is the script given for it:
--------------------------------------
<perl>
put if %_put;
if($Id ne "")
{
get "Id==$Id";
if($xName)
{
if($Password eq $xPassword)
{
mod "Id==$Id", ["Name",$xName,"Phone number",$xPhone];
out "<b>Entry modified...</b>";
} else
{
out "<b>Wrong password!</b>";
}
} else
{
out <<EOF;
<h3>Modify Entry</h3>
<table>
<form action="/cgi-bin/baseportal.pl?htx=$htx&Id=$Id" method="post" enctype="multipart/form-data">
<input type=hidden name="htx=" value="$htx">
<input type=hidden name="Id=" value="$Id">
<tr><td>Name:</td><td><input type="text" name="xName=" value="$Name"></td></tr>
<tr><td>Phone number:</td><td><input type="text" name="xPhone=" value="$_loop{'Phone number'}"></td></tr>
<tr><td>Password:</td><td><input type="password" name="xPassword="></td></tr>
<tr><td></td><td><input type=submit value="Submit"> </td></tr>
</form></table>
EOF
}
out "<p><a href=\"$_link\">New entry</a>";
} else
{
out "<h3>New entry</h3>";
out "You can modify your entry with the chosen password later on.";
init; get;
list "add";
}
get;
out "<h3>List of all entries</h3>";
out "<table><tr><td>Name</td><td>Phone number</td></tr>";
while(get_next)
{
out "<tr><td><a href=\"$_link&Id=$_id\">$Name</a></td><td>$_loop{'Phone number'}</td></tr>";
}
out "</table>";
</perl>
-------------------------------------
What I have to change in this example script to adapt it, and what I have to change in my original code to keep all the initial output and all the previous functions intact (the searchability and sortability)?
And also what I have to introduce to prevent picture and HTML inputs?
-----------------------------------------------
Thanks for any possible help!!!<p>
Alex
Any other script suggestion welcome, since any Perl script is supported!
-
07-06-2004, 06:05 PM #2
Sorry, this is really something for Baseportal support.
Dave
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum