home *** CD-ROM | disk | FTP | other *** search
/ WinFiles.com 1998 June / WF0698_3.ISO / servers-websrv / websuite.exe / COMMENTS.AP_ / COMMENTS.AP
Text File  |  1998-04-01  |  4KB  |  137 lines

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