home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
WinFiles.com 1998 June
/
WF0698_3.ISO
/
servers-websrv
/
websuite.exe
/
USERMOD2.AP_
/
USERMOD2.AP
Wrap
Text File
|
1998-04-01
|
3KB
|
100 lines
<[
// Virtual Name Server - Web Logon
// (c) 1997-98 SmartDesk, Inc., All Rights Reserved
FUNCTION webUserDirOpen( session, path )
local dbname, dbindex, db
dbname = fileFixPath( path + '\userdir.db' )
if ( ! fileExists( dbname ) )
session.error( "Unable to open " + dbname + " data file.", "FFFFFF", "000000" )
return(0)
end
db = dbuse( dbname, "users", 1 )
if ( ! db )
session.error( "Unable to open " + dbname + " data file.", "FFFFFF", "000000" )
return(0)
end
dbindex = fileFixPath( path + '\userdir.dx' )
if ( ! fileExists( dbindex ) )
users->dbClose( )
session.error( "Unable to open " + dbindex + " index file.", "FFFFFF", "000000" )
return(0)
end
users->dbOpenIndex( dbindex )
users->dbOrder( 1 )
return( db )
END
// Main code
_apGenerate( )
websrvr = 0 + param( 1 )
sessionId = 0 + param( 2 )
session = new( "session", websrvr, sessionId )
if ( ! session.secure( "UserDir.Admin" ) )
return( 0 )
end
data = session.var( "USERID" )
if ( strempty( data ) )
session.error( "No Record Provided!" )
return( 0 )
end
rec = ( 0 + data ) - 16384
if ( rec < 1 )
session.error( "Invalid Record Specified!" )
return( 0 )
end
if ( ! webUserDirOpen( session, webServerBaseDir( websrvr ) ) )
return( 0 )
end
if ( ! users->dbGoto( rec ) )
session.error( "Invalid Record Specified!" )
return( 0 )
end
endtime = seconds( ) + 3
while ( ! users->dbRLock( ) )
if ( seconds( ) > endtime )
session.error( "Unable to lock record, please try again." )
return( 0 )
end
end
users->fname = session.var( "fname" )
users->lname = session.var( "lname" )
users->mname = session.var( "mname" )
users->street = session.var( "street" )
users->city = session.var( "city" )
users->state = session.var( "state" )
users->zip = session.var( "zip" )
users->country = session.var( "country" )
users->c_name = session.var( "c_name" )
users->c_title = session.var( "c_title" )
users->phone1 = session.var( "phone1" )
users->phone2 = session.var( "phone2" )
users->phone3 = session.var( "phone3" )
users->phone4 = session.var( "phone4" )
users->email = session.var( "email" )
users->msg = session.var( "msg" )
users->dbUnlock( )
users->dbClose( )
session.response( "<H2>Record successfully updated.</H2><A HREF=\"useradmn.htm\">Continue</A>...", "FFFFFF", "000000", "00FFFF" )
// session.error( "Record successfully updated.</H2><A HREF=\"useradmn.htm\"> Continue</A>...<H2>", "FFFFFF", "000000", "00FFFF" )
return( 1 )
]>