Subversion Repositories wimsdev

Rev

Rev 15421 | Blame | Compare with Previous | Last modification | View Log | RSS feed

!if $abandon!=$empty
  job=fs
  !changeto $job.proc
!endif

c=!char 1 of $file
!if $c=/
  file=!char 2 to -1 of $file
!endif

!if $job2=download
  job2=
  fname=!translate internal / to , in $file
  fname=!item -1 of $fname
  !sh cd $wims_home\
   mkdir -p $wims_sesdir/getfile\
   rm -f $wims_sesdir/getfile/$fname\
   ln -s $wims_home/$file $wims_sesdir/getfile
  download=yes
!endif

!read dir-modifiable
modifok=no
!for d in $modifiable
  !if ../$d/ isin ../$file
    modifok=yes
    break
  !endif
!next d

ftype=!exec ftype $wims_home/$file
ext=!translate internal . to , in $file
ext=!item -1 of $ext
ext=!tolower $ext
!if $ext iswordof gif png mng jpg jpeg
  ftype=image
  !if ../public_html/ isin ../$file
    pubimg=!replace internal ../public_html/ by $ in ../$file
  !endif
!endif

!if $modifok=yes and $job2=eraseconfirm
  job2=
  !sh cd $wims_home; rm -f $file
  job=fs
  !changeto $job.proc
!endif

!if $modifok=yes and $save!=$empty
  !sh cd $wims_home\
   [ -f $wims_sesdir/user-deposit ] && cp $wims_sesdir/user-deposit $file
  job=fs
  !changeto $job.proc
!endif

fstat=!sh stat -c "%s,%y,%A" $wims_home/$file
!distribute item $fstat into flen,fdat,facc
fsec=!word 2 of $fdat
fsec=!replace \..* by in $fsec
fdat=!word 1 of $fdat

!if $modifok=yes and $job2=erase
  job2=
  erase=ask
  !exit
!endif