home *** CD-ROM | disk | FTP | other *** search
/ Image Master / L80.iso / Net / websuite / websuite.exe / COMMENTS.AP_ / COMMENTS.AP
Encoding:
Text File  |  1997-12-08  |  3.7 KB  |  129 lines

  1. <[
  2. // WINC - Comments.zp
  3. // (c) 1997 SmartDesk, Inc., All Rights Reserved
  4.  
  5. _apGenerate( )
  6.  
  7. websrvr = 0 + param( 1 )
  8. sessionId = 0 + param( 2 )
  9.  
  10. session  = new( "session", websrvr, sessionId )
  11.  
  12. name = session.data( "winc_name" )
  13. alias = session.data( "winc_alias" )
  14. email_addr = session.data( "winc_email_addr" )
  15. pword = session.data( "winc_pword" )
  16. if ( strempty( name ) || strempty( alias ) || strempty( email_addr ) || strempty( pword ) )
  17.     session.redir( "One Moment Please...", "logon.ap" )
  18.     return( 0 )
  19. end
  20.  
  21. channel  = session.data( "winc_channel" )
  22. channels = new( "iniFile", fileFixPath( webServerHome( websrvr ) + "\\chat\\channels.dat" ) )
  23. if ( type( channels ) != "O" )
  24.     session.error( "Unable to locate CHANNELS data file.", "FFFFFF", "000000" )
  25.     return( 0 )
  26. end
  27.  
  28. file = fileFixPath( webServerHome( websrvr ) + "\\chat\\chan" + channel + ".cfg" )
  29. if ( ! fileExists( file ) )
  30.     session.error( "Unable to locate CHANNEL data file.", "FFFFFF", "000000" )
  31.     return( 0 )
  32. end
  33. channelData = new( "iniFile", file )
  34. if ( type( channelData ) != "O" )
  35.     session.error( "Unable to locate CHANNEL CONFIG data file.", "FFFFFF", "000000" )
  36.     return( 0 )
  37. end
  38.  
  39. channelTitle = "<FONT COLOR=\"#FFFF00\">CHANNEL " + channel + "</FONT> " + strextract( channels.getstring( "channels", channel, "" ), "|", 1 )
  40.  
  41. ]>
  42. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  43. <!-- SmartDesk Active Page, www.smartdesk.com -->
  44. <HTML>
  45. <HEAD>
  46. <TITLE>WINC Chat</TITLE>
  47. </HEAD>
  48. <BODY BGCOLOR="#000000" TEXT="#FFFFFF" LINK="#00FFFF" VLINK="#00FFFF" ALINK="#00FFFF">
  49. <FONT SIZE=1>
  50. <FORM ACTION="chatcmd.ap" METHOD="GET" TARGET="winc_bottom">
  51.  
  52. <TABLE BORDER=0 WIDTH=600>
  53.  <TR>
  54.   <TD WIDTH=100 VALIGN="top">
  55.    <A HREF="index.ap"><IMG SRC="chathdr.jpg" WIDTH=100 HEIGHT=75 BORDER=0></A><BR>
  56.   </TD>
  57.   <TD WIDTH=500 VALIGN="top">
  58.  
  59.     <INPUT TYPE="hidden" NAME="channel" VALUE="<[ ! channel ]>">
  60.     <INPUT TYPE="hidden" NAME="cmd" VALUE="comment">
  61.  
  62.     <B><[ ! channelTitle ]> - Comments</B><BR>
  63.     <SELECT NAME="comment">
  64.      <OPTION SELECTED> ---------- Comments ----------
  65. <[
  66.         data = channelData.getItems( "Comments" )
  67.         cnt = chrcount( ";", data ) + 1
  68.         for ( i=1; i<=cnt; i++ )
  69.             item = strextract( data, ";", i )
  70.             if ( strempty( item ) )
  71.                 continue
  72.             end
  73.             ! "<OPTION> " + channelData.getString( "Comments", item )
  74.         end
  75. ]>
  76.     </SELECT>
  77.     <SELECT NAME="action">
  78.      <OPTION SELECTED> ---- Action ----
  79. <[
  80.         data = channelData.getItems( "Actions" )
  81.         cnt = chrcount( ";", data ) + 1
  82.         for ( i=1; i<=cnt; i++ )
  83.             item = strextract( data, ";", i )
  84.             if ( strempty( item ) )
  85.                 continue
  86.             end
  87.             ! "<OPTION> " + channelData.getString( "Actions", item )
  88.         end
  89. ]>
  90.     </SELECT>
  91.     <SELECT NAME="icon">
  92.      <OPTION SELECTED> - Emoticon -
  93. <[
  94.         data = channelData.getItems( "Emoticons" )
  95.         cnt = chrcount( ";", data ) + 1
  96.         for ( i=1; i<=cnt; i++ )
  97.             item = strextract( data, ";", i )
  98.             if ( strempty( item ) )
  99.                 continue
  100.             end
  101.             ! "<OPTION> " + channelData.getString( "Emoticons", item )
  102.         end
  103. ]>
  104.     </SELECT>
  105.     <INPUT TYPE="Submit" VALUE="  Send  " ><BR>
  106.  
  107.     <CENTER>
  108.     <FONT SIZE=2>
  109.     <B>
  110.     <A HREF="chat1.ap" TARGET="winc_top">Chat</A> | 
  111.     <A HREF="users.ap" TARGET="winc_bottom">Users</A> | 
  112.     <A HREF="links.ap" TARGET="winc_top">Links</A> | 
  113.     <A HREF="images.ap" TARGET="winc_top">Images</A> | 
  114.     <A HREF="sounds.ap" TARGET="winc_top">Sounds</A> |
  115.     <A HREF="prefer.ap" TARGET="winc_top">Preferences</A> | 
  116.     <A HREF="trans.ap" TARGET="winc_top">Transcript</A> |
  117.     <A HREF="chatcmd.ap?cmd=logoff" TARGET="_top">Leave</A>
  118.     </B>
  119.     </FONT>
  120.     </CENTER>
  121.   </TD>
  122.  </TR>
  123. </TABLE>
  124.  
  125. </FORM>
  126. </FONT>
  127. </BODY>
  128. </HTML>
  129.