home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
WinFiles.com 1998 June
/
WF0698_3.ISO
/
servers-websrv
/
websuite.exe
/
USERDIR.AP_
/
USERDIR.AP
Wrap
Text File
|
1998-04-01
|
4KB
|
151 lines
<[
// SmartDesk's Personal Web Desktop - Company Directory
// (c) 1997-98 SmartDesk, Inc., All Rights Reserved
FUNCTION webUsersOpen( path )
local dbname, dbindex, db
dbname = fileFixPath( path + '\userdir.db' )
if ( ! fileExists( dbname ) )
if ( ! webUserDirCreate( dbname ) )
return(0)
end
end
db = dbuse( dbname, "users", 1 )
if ( ! db )
return( 0 )
end
dbindex = fileFixPath( path + '\userdir.dx' )
if ( fileExists( dbindex ) )
users->dbOpenIndex( dbindex )
else
users->dbCreateIndex( dbindex, "upper( rtrim( field->LNAME ) + ' ' + left( field->FNAME, 15 ) )", 0 )
users->dbOpenIndex( dbindex )
end
users->dbOrder( 1 )
return( db )
END
FUNCTION webUserDirCreate( dbname )
local db_struct = {
{ "STATUS", "N", 2, 0 },
{ "FNAME", "C", 30 },
{ "MNAME", "C", 30 },
{ "LNAME", "C", 40 },
{ "STREET", "C", 80 },
{ "CITY", "C", 30 },
{ "STATE", "C", 30 },
{ "ZIP", "C", 20 },
{ "COUNTRY", "C", 35 },
{ "C_NAME", "C", 40 },
{ "C_TITLE", "C", 40 },
{ "PHONE1", "C", 40 },
{ "PHONE2", "C", 40 },
{ "PHONE3", "C", 40 },
{ "PHONE4", "C", 40 },
{ "EMAIL", "C", 80 },
{ "GOTO_URL", "C", 30 },
{ "MSG", "C", 128 },
{ "UNUSED", "C", 10 }
}
return( dbCreate( dbname, db_struct ) )
END
// Main Routine
_apGenerate( )
websrvr = 0 + param( 1 )
sessionId = 0 + param( 2 )
app_path = webServerBaseDir( websrvr )
dir_name = vnsTitle( websrvr )
if ( ! webUsersOpen( app_path ) )
return( 0 )
end
]>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!-- SmartDesk Active Page, www.smartdesk.com -->
<HTML>
<HEAD>
<TITLE>Virtual Name Server - <[ ! dir_name ]> Directory</TITLE>
</HEAD>
<BODY BGCOLOR="#000000" TEXT="#FFFFFF" LINK="#00FFFF" VLINK="#00FFFF" ALINK="#00FFFF">
<TABLE BORDER=0 WIDTH=600>
<TR>
<TD VALIGN="top" WIDTH=159>
<CENTER>
<FONT COLOR="#FFFF00"><B>User Directory</B></FONT><BR>
<A HREF="/index.htm"><IMG SRC="/image/ws.jpg" BORDER=0 WIDTH=159 HEIGHT=300></A><BR>
<FONT SIZE=2><A HREF="usersrch.htm">Search</A> | <A HREF="useradmn.htm">Administration</A><BR><A HREF="useronln.htm">Who's Online</A> | <A HREF="/index.htm">Home</A></FONT><BR>
<P><FONT COLOR="#FFFFFF" SIZE=1><A HREF="http://www.smartdesk.com">©Copyright 1997-98</A><BR>by SmartDesk, Inc.<BR>All Rights Reserved<BR></FONT></P>
</CENTER>
</TD>
<TD WIDTH=30>
<FONT SIZE=5 COLOR="#000000">.</FONT>
</TD>
<TD WIDTH=410 VALIGN="top">
<BR>
<CENTER>Welcome to the User Directory for:<BR>
<FONT SIZE=6 COLOR="#00FFFF"><[ ! dir_name ]></FONT><BR></CENTER>
<CENTER>
<TABLE BORDER=0 WIDTH=380>
<TR>
<TD WIDTH=160><FONT COLOR="#000000">.</FONT></A></TD>
<TD WIDTH=220><FONT COLOR="#000000">.</FONT></A></TD>
</TR>
<[
users->dbGoTop( )
while ( ! users->dbEOF( ) )
if ( ! users->dbIsDeleted( ) )
! " <TR>"
! " <TD><A HREF=\"contact.htm?" + ( users->recno( ) + 16384 ) + "\">" + rtrim( users->lname ) + ", " + rtrim( users->fname ) + "</A></TD>"
! " <TD><A HREF=\"contact.htm?" + ( users->recno( ) + 16384 ) + "\">" + rtrim( users->c_title ) + "</A></TD>"
! " </TR>"
end
users->dbSkip( )
end
users->dbClose( )
]>
</TABLE>
<P><BR></P>
<CENTER>
<FONT SIZE=2>
<A HREF="usersrch.htm">Search</A> |
<A HREF="useronln.htm">Who's Online?</A> |
<A HREF="useradmn.htm">Administration</A> |
<A HREF="/index.htm">Home</A>
</FONT><BR>
<BR>
</CENTER>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>