Subversion Repositories wimsdev

Rev

Rev 2290 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed


!bound readtype within source,html default html

already_seen=!record 0 of $forumdir/.users/$forumuser
!if $r_msg notlineof $already_seen
  !appendfile $forumdir/.users/$forumuser $r_msg
!endif
!reset c_subject
m_=!translate / to , in $r_msg
!distribute item $m_ into a_,b_
msg=!record $b_ of $forumdir/$a_/.msglist
!distribute item $msg into r_month,r_day,r_time,r_ident,r_prec,r_sender,r_smail
r_subject=!item 8 to -1 of $msg
msg=$forumdir/$r_month/$r_ident
!read $msg header
!if $m_exists=erased
 erased=yes
 !goto next
!else
!if $m_exists!=yes
 error=bad_message
 !exit
!endif

:next
dlist=!record 0 of $forumdir/.newlist
dcnt=!linecnt $dlist
!if $r_ident>1
 dlast=$r_month/$[$r_ident-1]
!else
 p_=!positionof item $r_month in $archlist
 !if $p_>1
  m_=!item $p_-1 of $archlist
  n_=!recordcnt $forumdir/$m_/.msglist
  !if $n_>0
   dlast=$m_/$n_
  !endif
 !endif
!endif
n_=!recordcnt $forumdir/$r_month/.msglist
!if $r_ident<$n_
 dnext=$r_month/$[$r_ident+1]
!else
 p_=!positionof item $r_month in $archlist
 n_=!itemcnt $archlist
 !if $p_<$n_
  m_=!item $p_+1 of $archlist
  dnext=$m_/1
 !endif
!endif

p_=!translate O to , in $r_prec
!distribute item $p_ into r_prec,r_orig

!if $r_orig!=$empty
 l_thread=!translate / to _ in $r_orig
 tht=!record 0 of $forumdir/.threads/$l_thread
 thtcnt=!linecnt $tht
 c_=!positionof word $r_msg in $tht
 c_=!item 1 of $c_
 thcnt=$[($c_+1)/2]
 !if $c_=2
  tnext=!word 1 of $tht
 !else
  !if $c_>1
   tlast=!word $c_-2 of $tht
  !endif
  !if $c_=1
   tlast=!word 2 of $tht
  !endif
  !if $thcnt<$thtcnt
   tnext=!word $c_+2 of $tht
  !endif
 !endif
!else
 thtcnt=0
 thcnt=0
!endif

o_=!translate / to _ in $r_orig
r=!record 0 of $forumdir/.threads/$o_
n_=!linecnt $r
!reset r_rep
!for i=1 to $n_
 l_=!line $i of $r
 !distribute word $l_ into a_,b_
 !if $b_=$r_msg
  r_rep=$r_rep $a_
 !endif
!next i
repcnt=!wordcnt $r_rep
r_rep1=!word 1 of $r_rep