diff --git a/resources/php/open.php b/resources/php/open.php index 066dcbd..8c98cc9 100644 --- a/resources/php/open.php +++ b/resources/php/open.php @@ -10,13 +10,12 @@ function openFile($FILE) { shell_exec($IMGVIEWER . ' "' . $FILE . '" > /dev/null &'); } else if (preg_match('(psf|mp3|ogg|flac)', $EXTNSN) === 1) { shell_exec($MUSICPLAYER . ' "' . $FILE . '" > /dev/null &'); + } else if (preg_match('(odt|doc|docx|rtf)', $EXTNSN) === 1) { + shell_exec($OFFICEPROG . ' "' . $FILE . '" > /dev/null &'); } else if (preg_match('(txt)', $EXTNSN) === 1) { shell_exec($TEXTVIEWER . ' "' . $FILE . '" > /dev/null &'); } else if (preg_match('(pdf)', $EXTNSN) === 1) { shell_exec($PDFVIEWER . ' "' . $FILE . '" > /dev/null &'); - // Has to be below b/c pdf somehow regesters as an office app.... wtf.... - } else if (preg_match('(odt|doc|docx|rtf)', $EXTNSN) === 1) { - shell_exec($OFFICEPROG . ' "' . $FILE . '" > /dev/null &'); } } diff --git a/resources/php/process.php b/resources/php/process.php index 1112b48..996d503 100644 --- a/resources/php/process.php +++ b/resources/php/process.php @@ -1,5 +1,5 @@ " diff --git a/resources/php/sse.php b/resources/php/sse.php index c1efeb6..bd89cb7 100644 --- a/resources/php/sse.php +++ b/resources/php/sse.php @@ -1,14 +1,15 @@ diff --git a/resources/php/upload.php b/resources/php/upload.php index 8cccb20..93d2f52 100755 --- a/resources/php/upload.php +++ b/resources/php/upload.php @@ -1,4 +1,7 @@ " . "" @@ -56,11 +59,7 @@ function uploadFiles($targetDir) { } echo ""; - // Prompt an update clint side when sse checks that there is updateListing. - $myfile = fopen("resources/vars.txt", "w+"); - $txt = "updateListing"; - fwrite($myfile, $txt); - fclose($myfile); + $_SESSION["state"] = "updateListing"; } // Check access type. diff --git a/resources/vars.txt b/resources/vars.txt deleted file mode 100644 index e69de29..0000000