home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
WinFiles.com 1998 June
/
WF0698_3.ISO
/
servers-websrv
/
websuite.exe
/
DIR.AP_
/
DIR.AP
Wrap
Text File
|
1998-04-01
|
4KB
|
137 lines
<[
// WINC - Directory
// (c) 1997-98 SmartDesk, Inc., All Rights Reserved
FUNCTION chatUserCount( session, channel )
local data, cnt, filename, basedir, i, line, id, j, k
basedir = webServerHome( session.websrvr ) + "\\chat"
filename = basedir + "\\chan" + channel + ".dat"
data = sessionDataGet( session.websrvr, -1, "CHATBUF." + filename )
cnt = chrcount( chr( 2 ), data )
j=0
users[1] = ""
for ( i=1; i<=cnt; i++ )
line = strextract( data, chr( 2 ), i )
id = strextract( line, chr( 1 ), 5 )
for ( k=1; k<=j; k++ )
if ( users[k] == id )
break
end
end
if ( k > j )
j++
users[j] = id
end
end
return( j )
END
// MAIN
websrvr = 0 + param( 1 )
sessionId = 0 + param( 2 )
session = new( "session", websrvr, sessionId )
ini = new( "iniFile", fileFixPath( webServerHome( websrvr ) + "\\chat\\channels.dat" ) )
if ( type( ini ) != "O" )
session.error( "Unable to locate CHANNELS data file.", "FFFFFF", "000000" )
return( 0 )
end
channel = 0 + session.var( "channel" )
if ( channel < 1 )
channel = 1
end
cmd = session.var( "cmd" )
id = session.var( "id" )
alias = session.var( "alias" )
]>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!5thGEN Active Pages, by www.smartdesk.com>
<HTML>
<HEAD>
<TITLE>Chat Directory</TITLE>
<META HTTP-EQUIV="REFRESH" CONTENT="120;" >
</HEAD>
<BODY BGCOLOR="#000000" LINK="#00FFFF" VLINK="#00FFFF" TEXT="#FFFFFF">
<CENTER>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=571 VSPACE=0>
<TR>
<TD WIDTH=571 VALIGN=top>
<IMG SRC="/chat/dirtop.jpg" WIDTH=571 HEIGHT=161 BORDER=0 ALT="Loading Chat directory..."><BR>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=571 VSPACE=0>
<TR>
<TD><IMG SRC="/chat/dirleft.jpg" WIDTH=99 HEIGHT=260 BORDER=0 ALT="<[ ! date( 'MMM DD, YYYY' ) ]>"></TD>
<TD WIDTH=377 VALIGN=top>
<CENTER>
<FONT SIZE=4>World-wide I-Net Chit-Chat (WINC) Lobby</FONT><BR>
<FONT SIZE=2>
<A HREF="events.htm">Events</A> |
<A HREF="sdchat.htm?channel=<[! channel ]>">User Logon</A> |
<A HREF="http://www.smartdesk.com/websuite.html">WebSuite</A> |
<A HREF="/index.htm">Home</A><BR>
</FONT>
<P><BR></P>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=280 VSPACE=0>
<[
data = ini.getitems( "channels" )
cnt = chrcount( ";", data ) + 1
for ( i=1; i<=cnt; i++ )
item = strextract( data, ";", i )
if ( strempty( item ) )
continue
end
line = ini.getstring( "channels", item, "" )
if ( strempty( line ) )
continue
end
! "<TR><TD WIDTH=100><A HREF=\"/chat/chat.htm?channel=" + item + "&id=" + id + "&alias=" + webEncodeUrl( alias ) + "\">CHANNEL " + item + "</A></TD><TD><A HREF=\"/chat/chat.htm?channel=" + item + "&id=" + id + "&alias=" + webEncodeUrl( alias ) + "\">" + strextract( line, "|", 1 ) + "</A></TD><TD><FONT COLOR=\"#00FFF\">" + chatUserCount( session, item ) + "</FONT></TD></TR>"
end
]>
</TR>
</TABLE>
</CENTER>
</TD>
<TD><IMG SRC="/chat/dirright.jpg" WIDTH=97 HEIGHT=260 BORDER=0 ALT="<[ ! timetostr( time( ), 0 ) + 'm' ]>"></TD>
</TR>
</TABLE>
<IMG SRC="/chat/dirbott.jpg" WIDTH=571 HEIGHT=67 BORDER=0><BR>
<CENTER>
<FONT SIZE=4>
<A HREF="events.htm">Events</A> |
<A HREF="sdchat.htm?channel=<[! channel ]>">User Logon</A> |
<A HREF="http://www.smartdesk.com/websuite.html">WebSuite</A> |
<A HREF="/index.htm">Home</A><BR>
</FONT>
<FONT SIZE=2 COLOR="#FFFFFF">©1997-98 SmartDesk, Inc., All Rights Reserved.<BR></FONT>
</CENTER>
</TD>
</TR>
</TABLE>
</CENTER>
<p><br></p>
<p><br></p>
<p><br></p>
<p><br></p>
<[! webFooter( )]>