File: userlist.proc

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (53 lines) | stat: -rw-r--r-- 1,660 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name_title=$wims_name_userlistliving
!let rd=!randint 111111,999999
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">


!if $ulist=$empty
  !exit
!endif

!! check if users is connected to his own living and make list of other living he is connected.
!! - tchatisopen  ($empty or 1) if individual tchat is open
!! - make list of connected user in different living living_connected_$living
tmp=!nospace tchatisopen_$ulist
tmp=!replace internal , by ,tchatisopen_ in $tmp
!reset nonempty_ind,nonempty_liv,$tmp
clscode=!replace internal / by ~ in $wims_class
dt=!record 0 of wimshome/tmp/whoconnect/$clscode
nb=!linecnt $dt
!for i=1 to $nb
  list_session=!item 4 to -1 of $(dt[$i;])
  nbs=!itemcnt $list_session
  !for k=1 to $nbs
    test=!defof wims_opentchat in wimshome/sessions/$(list_session[$k])/var.stat
    !if $test!=$empty
      !if $test=$(dt[$i;1])
        tchatisopen_$(dt[$i;1])=1
        nonempty_ind=1
      !else
        n=!text select 0123456789 in $test
        living_connected_$n=!append item $(dt[$i;1]) to $(living_connected_$n)
        nonempty_liv=1
      !endif
    !endif
  !next k
!next i

!! search living with last message not supervisor (only one ; not needed if nonempty_ind=1)
k=1
!while $nonempty_ind=$empty and $k<=$nbuser
  !readproc script/lastmsg.proc $(ulist[$k])
  !if $lastmsg!=$empty
    nonempty_ind=1
  !endif
  !increase k
!endwhile
k=0
!while $nonempty_liv=$empty and $k<=$nbliving
  !readproc script/lastmsg.proc .living$k
  !if $lastmsg!=$empty
    nonempty_liv=1
  !endif
  !increase k
!endwhile