From c263cd059a79fe116af8fa24d5b2e46bbae43a40 Mon Sep 17 00:00:00 2001 From: Nicolas Rannou Date: Fri, 2 Dec 2011 09:28:02 -0500 Subject: [PATCH] WIP: all ok? --- ajax.php | 8 -------- currentimage.php => ajax/currentimage.php | 0 currentimageupdate.php => ajax/currentimageupdate.php | 0 testcommand.php => ajax/testcommand.php | 5 +---- js/ajax.js | 6 +++--- 5 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 ajax.php rename currentimage.php => ajax/currentimage.php (100%) rename currentimageupdate.php => ajax/currentimageupdate.php (100%) rename testcommand.php => ajax/testcommand.php (79%) diff --git a/ajax.php b/ajax.php deleted file mode 100644 index 76f57ed..0000000 --- a/ajax.php +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/currentimage.php b/ajax/currentimage.php similarity index 100% rename from currentimage.php rename to ajax/currentimage.php diff --git a/currentimageupdate.php b/ajax/currentimageupdate.php similarity index 100% rename from currentimageupdate.php rename to ajax/currentimageupdate.php diff --git a/testcommand.php b/ajax/testcommand.php similarity index 79% rename from testcommand.php rename to ajax/testcommand.php index cfa3c91..8c07a81 100644 --- a/testcommand.php +++ b/ajax/testcommand.php @@ -12,12 +12,9 @@ $_SESSION["newimage"] = $newimage; $_SESSION["command"] = $command; - - - // In my case $HTTP_ENV_VARS['PATH'] = bin:usr/bin $env_vars = "/Users/nr52/INSTALL/ImageMagick-6.7.3/bin/"; - $fullcommand = $env_vars . $command . " " . $image . " " . $newimage; + $fullcommand = $env_vars . $command . " ../" . $image . " ../" . $newimage; system($fullcommand); diff --git a/js/ajax.js b/js/ajax.js index df8287d..beff7d0 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -43,7 +43,7 @@ function UpdateCurrentImage(filename) } - var im = "currentimage.php?var1="; + var im = "ajax/currentimage.php?var1="; var ag = im.concat(filename); xmlHttp.open("GET", ag, true); @@ -71,7 +71,7 @@ function RequestUpdateImageIfAny() } } - xmlHttp.open("GET", "currentimageupdate.php", true); + xmlHttp.open("GET", "ajax/currentimageupdate.php", true); xmlHttp.send(null); } @@ -105,7 +105,7 @@ function UpdateTestCommand(file) } } - var im = "testcommand.php?var1="; + var im = "ajax/testcommand.php?var1="; var ag = im.concat(file); xmlHttp.open("GET", ag, true);