Page 2 of 2 <12
Topic Options
#177440 - 2007-07-02 09:29 AM Re: Again AUP [Re: Saleem]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Yes you should be able to read/write to a database during login with KiXtart.
Top
#177442 - 2007-07-02 10:15 AM Re: Again AUP [Re: NTDOC]
Saleem Offline
Hey THIS is FUN
*

Registered: 2001-04-11
Posts: 280
Loc: UAE
can you please explain more about this ?? read/ write means ??
_________________________
“I’ll not change you unless you don’t have intention to change yourself” --H:Quran

Top
#177469 - 2007-07-03 09:32 AM Re: Again AUP [Re: Saleem]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Pretty much what you asked. A database is similar to a file in that you can read and write to it (you just need to use a specific method to connect to a database and then specific code to read from it and write to it)

There is more information on the subject in the FAQ I think as well as some UDFs for using databases.

 Originally Posted By: saleem
One questian

Can I write the details to a database instead of INI file ?? can login script directly write to a Database



Top
#177499 - 2007-07-03 12:22 PM Re: Again AUP [Re: NTDOC]
Saleem Offline
Hey THIS is FUN
*

Registered: 2001-04-11
Posts: 280
Loc: UAE
OK
But to connect to a database we have to give ID and Password on clear text right ??
_________________________
“I’ll not change you unless you don’t have intention to change yourself” --H:Quran

Top
#177524 - 2007-07-03 08:14 PM Re: Again AUP [Re: Saleem]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Depending on the connection type and database type you could use base64 for the user name password.
Top
#177560 - 2007-07-04 12:19 PM Re: Again AUP [Re: NTDOC]
Saleem Offline
Hey THIS is FUN
*

Registered: 2001-04-11
Posts: 280
Loc: UAE
Thanx for your response NTDOC

I am really lost about encrypting ID and Password on Kix script, please give me a simple example how to do it.

My I idea is :-
1. Check user has signed all policies if not show first policy and get it signed
2. Second time login, read database check 1st policy exist. If so display only second policy and get it signed
3. 3rd time login read again database check for 1st and 2nd policy exists if so show only 3rd policy and sign
4. 4rth time login skip that complete part....

The connection ID and password must be encrypted

Please give me a n example if it is doable
_________________________
“I’ll not change you unless you don’t have intention to change yourself” --H:Quran

Top
#177561 - 2007-07-04 12:55 PM Re: Again AUP [Re: Saleem]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
it's doable alright but you shouldn't go there.
too complex setup for such a simple task, imo.
_________________________
!

download KiXnet

Top
#177562 - 2007-07-04 01:28 PM Re: Again AUP [Re: Lonkero]
Saleem Offline
Hey THIS is FUN
*

Registered: 2001-04-11
Posts: 280
Loc: UAE
Hi Jooel

Please suggest me better idea...
_________________________
“I’ll not change you unless you don’t have intention to change yourself” --H:Quran

Top
#177565 - 2007-07-04 02:41 PM Re: Again AUP [Re: Saleem]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
what's wrong with the ini-approach?

it's easy to write to and read from and collecting data into nice tables or graphs is easy as drinking coffee.
_________________________
!

download KiXnet

Top
#177582 - 2007-07-05 08:03 AM Re: Again AUP [Re: Lonkero]
Saleem Offline
Hey THIS is FUN
*

Registered: 2001-04-11
Posts: 280
Loc: UAE
ur right...

if we go for INI thing can I make it on single INI for all users ? how do i check user exist there and signed which policy and all on a single ini?

beacuse using single INI is more conveninat for consolodating the result.
_________________________
“I’ll not change you unless you don’t have intention to change yourself” --H:Quran

Top
#177588 - 2007-07-05 09:42 AM Re: Again AUP [Re: Saleem]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Your ini file could look something like this.

 Quote:

[user1]
AUP1=yes
AUP2=no
AUP3=no

[user2]
AUP1=no
AUP2=no
AUP3=no


So if you use readprofilestring and you get back no for a policy then just display it and set the value to yes with writeprofilestring if he/she accepts te policy. If a user does not exist readprofilestring will return nothing.


Edited by Mart (2007-07-05 09:44 AM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#177604 - 2007-07-05 12:23 PM Re: Again AUP [Re: Mart]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ya, that would work.
but instead of writing all users in the ini, make a blank ini and write only the "yes" ones there.

kixtart will automatically make the sections and thus you don't need to do any hand work with the ini.

on the next runs, you can check if there is "yes" check all the other ones.
_________________________
!

download KiXnet

Top
#178070 - 2007-07-19 06:04 AM Re: Again AUP [Re: Lonkero]
Saleem Offline
Hey THIS is FUN
*

Registered: 2001-04-11
Posts: 280
Loc: UAE
Guys...
This issue still burns…
Please give me an example of a database connectivity script with explicit permission for logon user... (I.e. non need to mention password on clear text)
_________________________
“I’ll not change you unless you don’t have intention to change yourself” --H:Quran

Top
#178101 - 2007-07-20 03:25 AM Re: Again AUP [Re: Saleem]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See the DBExecuteSQL() UDF. A selection of connection strings is available at http://www.connectionstrings.com
_________________________
There are two types of vessels, submarines and targets.

Top
Page 2 of 2 <12


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1574 anonymous users online.
Newest Members
BeeEm, min_seow, Audio, Hoschi, Comet
17882 Registered Users

Generated in 0.042 seconds in which 0.019 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org