Rev 4389 | Rev 4597 | Go to most recent revision | 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 | |||
4 | !if $parm1=$empty |
||
5 | !exit |
||
6 | !endif |
||
7 | !if $parm2=$empty |
||
8 | !set parm2=$parm1 |
||
9 | !endif |
||
10 | |||
11 | !set ext_=!replace internal . by , in $parm1 |
||
12 | !set ext_=!item -1 of $ext_ |
||
13 | !set ext_=!lowercase $ext_ |
||
4392 | bpr | 14 | !if $ext_ notwordof jpeg jpg png gif pdf tex txt mp3 flv avi ggb |
4383 | bpr | 15 | !set ext_=cgi |
16 | !endif |
||
17 | |||
18 | !if $module_category=adm |
||
19 | <a target="wims_external" href="wims.$ext_?session=$wims_session&cmd=getfile&special_parm=doc/$parm1">$parm2</a> |
||
20 | !else |
||
21 | <a target="wims_external" href="$m_filedir/$parm1">$parm2</a> |
||
22 | !endif |