Subversion Repositories wimsdev

Rev

Rev 14924 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
15072 bpr 1
name_title=$wims_name_userlistliving
14886 guerimand 2
!let rd=!randint 111111,999999
14903 guerimand 3
local_html_header=<META HTTP-EQUIV="Refresh" CONTENT="$(tchat_refreshtiming);wims.cgi?session=$wims_session&+module=adm/class/tchat&+serial=$rd&+job=$job&+user=$user">
14923 guerimand 4
 
5
 
6
!if $ulist=$empty
7
  !exit
8
!endif
9
 
10
!! check if users is connected to his own living and make list of other living he is connected.
11
!! - tchatisopen  ($empty or 1) if individual tchat is open
12
!! - make list of connected user in different living living_connected_$living
13
tmp=!nospace tchatisopen_$ulist
14
tmp=!replace internal , by ,tchatisopen_ in $tmp
14924 guerimand 15
!reset nonempty_ind,nonempty_liv,$tmp
14923 guerimand 16
clscode=!replace internal / by ~ in $wims_class
17
dt=!record 0 of wimshome/tmp/whoconnect/$clscode
18
nb=!linecnt $dt
19
!for i=1 to $nb
20
  list_session=!item 4 to -1 of $(dt[$i;])
21
  nbs=!itemcnt $list_session
22
  !for k=1 to $nbs
23
    test=!defof wims_opentchat in wimshome/sessions/$(list_session[$k])/var.stat
24
    !if $test!=$empty
25
      !if $test=$(dt[$i;1])
26
        tchatisopen_$(dt[$i;1])=1
14924 guerimand 27
        nonempty_ind=1
14923 guerimand 28
      !else
29
        n=!text select 0123456789 in $test
30
        living_connected_$n=!append item $(dt[$i;1]) to $(living_connected_$n)
14924 guerimand 31
        nonempty_liv=1
14923 guerimand 32
      !endif
33
    !endif
14924 guerimand 34
  !next k
14923 guerimand 35
!next i
14924 guerimand 36
 
37
!! search living with last message not supervisor (only one ; not needed if nonempty_ind=1)
38
k=1
39
!while $nonempty_ind=$empty and $k<=$nbuser
40
  !readproc script/lastmsg.proc $(ulist[$k])
41
  !if $lastmsg!=$empty
42
    nonempty_ind=1
43
  !endif
44
  !increase k
45
!endwhile
46
k=0
47
!while $nonempty_liv=$empty and $k<=$nbliving
48
  !readproc script/lastmsg.proc .living$k
49
  !if $lastmsg!=$empty
50
    nonempty_liv=1
51
  !endif
52
  !increase k
15072 bpr 53
!endwhile