Rev 15047 | Rev 15117 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 15047 | Rev 15082 | ||
---|---|---|---|
Line 11... | Line 11... | ||
11 | !bound job2 within newmsg,$empty default $empty |
11 | !bound job2 within newmsg,$empty default $empty |
12 | !if $cf_preview!=$empty |
12 | !if $cf_preview!=$empty |
13 | job2=newmsg |
13 | job2=newmsg |
14 | !endif |
14 | !endif |
15 | 15 | ||
16 | !if $job2!=newmsg |
- | |
17 | !let rd=!randint 111111,999999 |
- | |
18 | 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"> |
- | |
19 | !endif |
16 | |
20 | 17 | ||
21 | ltfile=!sh cd $wims_home/log/classes/$wims_class/tchat; if [ -e $user.old1 ]; then ls $user.old*; fi; |
18 | ltfile=!sh cd $wims_home/log/classes/$wims_class/tchat; if [ -e $user.old1 ]; then ls $user.old*; fi; |
22 | nbfile=!linecnt $ltfile |
19 | nbfile=!linecnt $ltfile |
23 | 20 | ||
24 | !if $save!=$empty and $desc!=$empty and $cf_preview=$empty |
21 | !if $save!=$empty and $desc!=$empty and $cf_preview=$empty |
Line 31... | Line 28... | ||
31 | !sh mv $wims_home/log/classes/$wims_class/tchat/$user $wims_home/log/classes/$wims_class/tchat/$(user).old$nbfile; |
28 | !sh mv $wims_home/log/classes/$wims_class/tchat/$user $wims_home/log/classes/$wims_class/tchat/$(user).old$nbfile; |
32 | !endif |
29 | !endif |
33 | !appendfile wimshome/log/classes/$wims_class/tchat/$user :$wims_user $dt\ |
30 | !appendfile wimshome/log/classes/$wims_class/tchat/$user :$wims_user $dt\ |
34 | $desc |
31 | $desc |
35 | !reset job2 desc save |
32 | !reset job2 desc save |
36 | !endif |
33 | !endif |
37 | 34 | ||
38 | !if $nbfile=0 |
35 | !if $nbfile=0 |
39 | lastmsg=!recordcnt wimshome/log/classes/$wims_class/tchat/$user |
36 | lastmsg=!recordcnt wimshome/log/classes/$wims_class/tchat/$user |
40 | nbmsg=$[min($msg_numberlimit,$lastmsg)] |
37 | nbmsg=$[min($msg_numberlimit,$lastmsg)] |
41 | !else |
38 | !else |
42 | nbmsg=$msg_numberlimit |
39 | nbmsg=$msg_numberlimit |
43 | !endif |
40 | !endif |
44 | !if $wims_user=supervisor |
41 | !if $wims_user=supervisor |
45 | !if . isin $user |
42 | !if . isin $user |
46 | n=!text select 0123456789 in $user |
43 | n=!text select 0123456789 in $user |
47 | name_title=!nosubst $(livingname_$n) |
44 | name_title=!nosubst $(livingname_$n) |
48 | !else |
45 | !else |
49 | po=!positionof item $user in $ulist |
46 | po=!positionof item $user in $ulist |
50 | username=$(nlist[$po]) |
47 | username=$(nlist[$po]) |
51 | name_title=$name_tchatwith $username |
48 | name_title=$name_tchatwith $username |
52 | !endif |
49 | !endif |
Line 70... | Line 67... | ||
70 | !readproc script/getsession.proc $user |
67 | !readproc script/getsession.proc $user |
71 | !endif |
68 | !endif |
72 | 69 | ||
73 | !! ------ build of list of users |
70 | !! ------ build of list of users |
74 | !if . isin $user |
71 | !if . isin $user |
75 |
|
72 | living=!text select 0123456789 in $user |
76 | !if $(livingusers_$living)!=all |
73 | !if $(livingusers_$living)!=all |
77 | listnameusers=$empty |
74 | listnameusers=$empty |
78 | !for u in $(livingusers_$living) |
75 | !for u in $(livingusers_$living) |
79 | po=!positionof item $u in $ulist |
76 | po=!positionof item $u in $ulist |
80 | !if $u!=supervisor and $u!=$wims_user and $po!=$empty |
77 | !if $u!=supervisor and $u!=$wims_user and $po!=$empty |
Line 83... | Line 80... | ||
83 | !next u |
80 | !next u |
84 | !if $listnameusers!=$empty |
81 | !if $listnameusers!=$empty |
85 | listnameusers=, $name_yourself $name_and $listnameusers |
82 | listnameusers=, $name_yourself $name_and $listnameusers |
86 | !else |
83 | !else |
87 | listnameusers=$name_and $name_yourself |
84 | listnameusers=$name_and $name_yourself |
88 | !endif |
85 | !endif |
89 | !endif |
86 | !endif |
90 | !else |
87 | !else |
91 | !if $wims_user=supervisor |
88 | !if $wims_user=supervisor |
92 | po=!positionof item $user in $ulist |
89 | po=!positionof item $user in $ulist |
93 | listnameusers=$name_and $(nlist[$po]) |
90 | listnameusers=$name_and $(nlist[$po]) |
94 | !else |
91 | !else |
95 | listnameusers=$name_and $name_yourself |
92 | listnameusers=$name_and $name_yourself |
96 | !endif |
93 | !endif |
97 | !endif |
94 | !endif |
- | 95 | ||
98 | 96 | ||
- | 97 | !! ------- manage of autorefresh |
|
- | 98 | !if $job2!=newmsg |
|
- | 99 | !if $wims_user=supervisor |
|
- | 100 | autorefresh=yes |
|
- | 101 | !else |
|
- | 102 | lastauth=!record -1 of wimshome/log/classes/$wims_class/tchat/$user |
|
- | 103 | lastauth=!line 1 of $lastauth |
|
- | 104 | lastauth=!word 1 of $lastauth |
|
- | 105 | !if $lastauth=$wims_user or $user!=$wims_user |
|
- | 106 | autorefresh=yes |
|
- | 107 | !else |
|
- | 108 | !if $mautorefresh=1 |
|
- | 109 | autorefresh=yes |
|
- | 110 | !else |
|
- | 111 | autorefresh=no |
|
- | 112 | !endif |
|
- | 113 | !endif |
|
- | 114 | !endif |
|
- | 115 | !if $autorefresh=yes |
|
- | 116 | !let rd=!randint 111111,999999 |
|
- | 117 | 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"> |
|
- | 118 | !endif |
|
- | 119 | !endif |