home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 September
/
CHIPCD_9_99.iso
/
software
/
serwery_www
/
websuite
/
websuite.exe
/
DIR.AP_
/
DIR.AP
Wrap
Text File
|
1999-01-12
|
4KB
|
128 lines
<[
// WINC - Directory
// (c) 1997-98 SmartDesk, Inc., All Rights Reserved
FUNCTION chatUserCount( session, channel )
local s, cnt
//println( "" + channel )
cnt = 0
s = sessionFindFirst( session.websrvr )
while ( s )
if ( ! sessionDataExpired( session.websrvr, sessionId( s ), "__chat_" + channel, 5 ) )
cnt++
// println( "cnt=" + cnt + ", channel=" + channel + ",s=" + s )
end
s = sessionFindNext( s )
end
return( cnt )
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( )]>