WIMS TEMPLATE_KERNEL CBWEB noDEBUG 200402081819 # force webpage cache copy update check # revision 1 # M C X C B W E B # # # a WIMS-based Web Application # # (c) Copyright 2004 by mcxsoftware.com # # WIMS kernel source file (MCXO.wims) # update: 08.02.2004 # # codeversion 1 # # # an MC2LABS.com realtime production # # # Follows kernel source: # # -------------------------------------------------------------------------- interface # -------------------------------------------------------------------------- declare override .InitMaster declare override .Init declare override .Run declare variable string myuser declare variable string tval # WebTel cbweb channel community (mc2labs webtel license only) declare variable string cbweb0 root.wtdomains.MC2LABS security global # -------------------------------------------------------------------------- implementation # -------------------------------------------------------------------------- procedure InitMaster { } procedure Init { definechannel layer0 option=autojoin definechannel $cbweb0 preprotocol="streamtab(CONF,aonly,FREE,*,0,0,8,1,3,65,0,0)" option=autojoin device=service } procedure loginCheck { $myuser = client info getWIMSuser if [$myuser == none] { $tval = database wsysdb createGuest("webclub","guest","mc2g") capplet main setname } } # -------------------------------------------------------------------------- # MAIN # -------------------------------------------------------------------------- # procedure Applet.main.Run { caseCommand [APPLET,MAIN,OPEN] { streamchannel $cbweb0 device=mobj source=myself } caseCommand [APPLET,MAIN,CLOSE] { streamchannel $cbweb0 device=mobj source=none } caseCommand [APPLET,MAIN,SETNAME] { $tval = getCommand(4) database wsysdb resetUserName($tval) } } procedure Applets.Run { caseCommand [APPLET,MAIN] { call Applet.main.Run } } procedure Run { send seq ok cappletload cbwobj.swf main _root.objects [0,0] waitif capplet main start call loginCheck { waitif caseCommand [APPLET] { call Applets.Run } } looptill ifCommand [QUIT] } MC2LABS