Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
23 reyssat 1
!if $abandon!=$empty
15421 bpr 2
  job=fs
3
  !changeto $job.proc
23 reyssat 4
!endif
5
 
6
c=!char 1 of $file
7
!if $c=/
15421 bpr 8
  file=!char 2 to -1 of $file
23 reyssat 9
!endif
10
 
11
!if $job2=download
15421 bpr 12
  job2=
13
  fname=!translate internal / to , in $file
14
  fname=!item -1 of $fname
15
  !sh cd $wims_home\
16
   mkdir -p $wims_sesdir/getfile\
17
   rm -f $wims_sesdir/getfile/$fname\
18
   ln -s $wims_home/$file $wims_sesdir/getfile
19
  download=yes
23 reyssat 20
!endif
21
 
22
!read dir-modifiable
23
modifok=no
24
!for d in $modifiable
15421 bpr 25
  !if ../$d/ isin ../$file
26
    modifok=yes
27
    break
28
  !endif
23 reyssat 29
!next d
30
 
31
ftype=!exec ftype $wims_home/$file
32
ext=!translate internal . to , in $file
33
ext=!item -1 of $ext
34
ext=!tolower $ext
35
!if $ext iswordof gif png mng jpg jpeg
15421 bpr 36
  ftype=image
37
  !if ../public_html/ isin ../$file
38
    pubimg=!replace internal ../public_html/ by $ in ../$file
39
  !endif
23 reyssat 40
!endif
41
 
42
!if $modifok=yes and $job2=eraseconfirm
15421 bpr 43
  job2=
44
  !sh cd $wims_home; rm -f $file
45
  job=fs
46
  !changeto $job.proc
23 reyssat 47
!endif
48
 
49
!if $modifok=yes and $save!=$empty
15421 bpr 50
  !sh cd $wims_home\
51
   [ -f $wims_sesdir/user-deposit ] && cp $wims_sesdir/user-deposit $file
52
  job=fs
53
  !changeto $job.proc
23 reyssat 54
!endif
55
 
56
fstat=!sh stat -c "%s,%y,%A" $wims_home/$file
57
!distribute item $fstat into flen,fdat,facc
16231 reyssat 58
fsec=!word 2 of $fdat
59
fsec=!replace \..* by in $fsec
23 reyssat 60
fdat=!word 1 of $fdat
61
 
62
!if $modifok=yes and $job2=erase
15421 bpr 63
  job2=
64
  erase=ask
65
  !exit
23 reyssat 66
!endif