aboutsummaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authortenox <as@tenoware.com>2016-08-21 02:11:47 -0700
committertenox <as@tenoware.com>2016-08-21 02:11:47 -0700
commit9ba4ccaa9c93f89ad4d1162498858798bf7247b7 (patch)
treee7f967a6fb2218f5db526e3ec51a993c90b1337e /dir.c
parentc888097fb6951d9db173105c2a75209396dccec5 (diff)
downloadwfm-9ba4ccaa9c93f89ad4d1162498858798bf7247b7.tar.gz
more JS dependency fixes
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/dir.c b/dir.c
index bcbe75e..cc67708 100644
--- a/dir.c
+++ b/dir.c
@@ -113,8 +113,9 @@ void dirlist(void) {
" else {\n"
" cbGroup.checked = checkAllState.checked;\n"
" }\n"
- "}\n"
- "\n"
+ "}\n");
+
+ if(js>=2) fprintf(cgiOut,
"function xmlhttpPost(strURL) {\n"
" var xmlHttpReq = false;\n"
" var self = this;\n"
@@ -140,12 +141,14 @@ void dirlist(void) {
"\n"
"function start() {\n"
" setInterval('xmlhttpPost(\"%s?ea=upstat&upload_id=%s\");', 250);\n"
- "}\n"
- "\n"
- "//-->\n"
- "</SCRIPT>\n",
+ "}\n",
cgiScriptName, "1234");
+ if(js) fprintf(cgiOut,
+ "//-->\n"
+ "</SCRIPT>\n");
+
+
fprintf(cgiOut,
"<STYLE TYPE=\"text/css\">\n"
"<!--\n"
@@ -167,7 +170,7 @@ void dirlist(void) {
"</HEAD>\n"
"<BODY BGCOLOR=\"#FFFFFF\">\n"
"<FORM ACTION=\"%s\" METHOD=\"POST\" ENCTYPE=\"multipart/form-data\" %s>\n",
- ICONSURL, FAVICON, cgiScriptName, (js) ? "onsubmit=\"start()\"" : "");
+ ICONSURL, FAVICON, cgiScriptName, (js>=2) ? "onsubmit=\"start()\"" : "");