Rev 14939 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4383 | bpr | 1 | !!##parameter 1: name of the file with extension |
2 | !!##parameter 2: words on the link, by default, name of the file |
||
3 | |||
12586 | bpr | 4 | !if $parm1=$empty |
4383 | bpr | 5 | !exit |
12586 | bpr | 6 | !endif |
4597 | bpr | 7 | !set parm1=!slashsubst $parm1 |
4383 | bpr | 8 | !if $parm2=$empty |
9 | !set parm2=$parm1 |
||
4597 | bpr | 10 | !else |
11 | !set parm2=!slashsubst $parm2 |
||
4383 | bpr | 12 | !endif |
13 | |||
14942 | guerimand | 14 | |
4383 | bpr | 15 | !if $module_category=adm |
14942 | guerimand | 16 | !! !set ext_=!replace internal . by , in $parm1 |
17 | !! !set ext_=!item -1 of $ext_ |
||
18 | !! !set ext_=!lowercase $ext_ |
||
19 | !! !if $ext_ notwordof jpeg jpg png gif pdf tex txt mp3 flv avi ggb ods rtf tgz zip |
||
20 | !! !set ext_=cgi |
||
21 | !! !endif |
||
22 | !! !set ext_=cgi |
||
23 | !! <a target="wims_external" href="wims.$ext_?session=$wims_session&cmd=getfile&special_parm=doc/$parm1" download="$parm1">$parm2</a> |
||
24 | <a target="wims_external" href="wims.cgi?session=$wims_session&cmd=getfile&special_parm=doc/$parm1" download="$parm1">$parm2</a> |
||
4383 | bpr | 25 | !else |
14939 | bpr | 26 | <a target="wims_external" href="$m_filedir/$parm1" download="$parm1">$parm2</a> |
7681 | bpr | 27 | !endif |