Rev 14734 | Rev 15130 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 14734 | Rev 14941 | ||
---|---|---|---|
Line 1079... | Line 1079... | ||
1079 | 1079 | ||
1080 | /* output a file. Aliases: |
1080 | /* output a file. Aliases: |
1081 | * getfile, outfile, fileout */ |
1081 | * getfile, outfile, fileout */ |
1082 | void exec_getfile(char *p) |
1082 | void exec_getfile(char *p) |
1083 | { |
1083 | { |
1084 | char *s, sti[128], stc[128], stt[128], *p1, url[MAX_LINELEN+1]; |
1084 | char *s, sti[128], stc[128], stt[128], sgf[128], *p1, url[MAX_LINELEN+1]; |
1085 | char *prompt; |
1085 | char *prompt; |
1086 | 1086 | ||
1087 | p=find_word_start(p); prompt=find_word_end(p); |
1087 | p=find_word_start(p); prompt=find_word_end(p); |
1088 | if(*prompt!=0) *prompt++=0; |
1088 | if(*prompt!=0) *prompt++=0; |
1089 | prompt=find_word_start(prompt); |
1089 | prompt=find_word_start(prompt); |
Line 1117... | Line 1117... | ||
1117 | if(s!=NULL && *s!=0 && !isspace(*s)) { |
1117 | if(s!=NULL && *s!=0 && !isspace(*s)) { |
1118 | snprintf(stt,sizeof(stt)," title=\"%s\"",s); |
1118 | snprintf(stt,sizeof(stt)," title=\"%s\"",s); |
1119 | } |
1119 | } |
1120 | else stt[0]=0; |
1120 | else stt[0]=0; |
1121 | 1121 | ||
- | 1122 | s=getvar("wims_getfile_fname"); |
|
- | 1123 | if(s!=NULL && *s!=0 && !isspace(*s)) { |
|
- | 1124 | snprintf(sgf,sizeof(sgf)," download=\"%s\"",s); |
|
- | 1125 | } |
|
- | 1126 | else sgf[0]=0; |
|
- | 1127 | ||
1122 | if(*prompt) output("<a href=\"%s\" %s %s %s>%s</a>\n" |
1128 | if(*prompt) output("<a href=\"%s\" %s %s %s %s>%s</a>\n", url,sti,stc,stt,sgf,prompt); |
1123 | else output("<a href=\"%s\" %s %s %s></a>",url,sti,stc,stt); |
1129 | else output("<a href=\"%s\" %s %s %s></a>",url,sti,stc,stt); |
1124 | 1130 | ||
1125 | setvar("wims_ref_id",""); |
1131 | setvar("wims_ref_id",""); |
1126 | setvar("wims_ref_class",""); |
1132 | setvar("wims_ref_class",""); |
1127 | setvar("wims_ref_title",""); |
1133 | setvar("wims_ref_title",""); |
- | 1134 | setvar("wims_getfile_fname",""); |
|
1128 | } |
1135 | } |
1129 | 1136 | ||
1130 | /* internal */ |
1137 | /* internal */ |
1131 | void count_insert(void) |
1138 | void count_insert(void) |
1132 | { |
1139 | { |