diff --git a/README.txt b/README.txt index 38272d5..3bd3acc 100644 --- a/README.txt +++ b/README.txt @@ -1,35 +1,45 @@ +# imagebank + +FEATURES: +-MAMP, javascipt and html +-easy setup +-admin secured area +-encrypted passwords in db +-php page requires login (if user not logged in an tries to access page, he is redirected to login page) +-secured against sql injection (TODO: check the command too) +-upload image +-can run any command from convert (maybe not enough restricted...?) +-for each user: 1 folder for original and 1 folder for processed images + + # Pre requiered MySQL Php Apache - ImageMagick -http://www.imagemagick.org/script/binary-releases.php -put location in script # Extract files 1-copy this folder to your websites directory # Create MySQL user 2-phpMyadmin: add user that we will use -2- check create table with same name +2-check create table with same name 3-update user and pass in admin/.my.conf +# Install image magick +5-http://www.imagemagick.org/script/binary-releases.php +6-update "$env_vars" in ajax/executecommand.php (mac issue?) + # Choose admin password -4-update admin password +7-get new username and passord http://www.addedbytes.com/lab/password-protect-a-directory-with-htaccess/#result +8- update admin/.htpasswd -FEATURES: --MAMP, javascipt and html --easy setup --admin secured area --encrypted passwords in db --php page requires login (if user not logged in an tries to access page, he is redirected to login page) --secured against sql injection (TODO: check the command too) --upload image --can run any command from convert (maybe not enough restricted...?) --for each user: 1 folder for original and 1 folder for processed images --if file already on server it's fine +# Create the tables +9- go to the website, to the admin section: imagebank/admin +10- enter your username, password then create DB + +# Everything is setup now! TODO: -preview not saved @@ -41,16 +51,11 @@ TODO: -login page refresh -upload/process update DB -2 images with same name..? - -user modifies password -admin modifies pass -admin can do more stuffs -> send emails to user, - -limit size max of image directory -some refresh issues, field are getting empty, etc. - -chmod 777 some files -images still visible after refresh - -command modified -check command input +-save images in db +-user modifies password +-admin modifies pass +-admin can do more stuffs -> send emails to user, +-limit size max of image directory +-some refresh issues, field are getting empty, etc. +-check valid emails, etc. +-check command input diff --git a/ajax/executecommand.php b/ajax/executecommand.php index 583f202..4a888e8 100644 --- a/ajax/executecommand.php +++ b/ajax/executecommand.php @@ -4,18 +4,20 @@ $image = $_SESSION["currentimage"]; - $test = split("\.", $image, 2); - $test2 = split("\/", $test[0], 4); + $imagenoextension = split("\.", $image, 2); + $location = split("\/", $imagenoextension[0], 4); $filter = split(" ", $command, 3); - $newimage = $test2[0] . "/" . $test2[1] . "/modified/" . $test2[3] . $filter[1] . "." . $test[1]; + $newimage = $location[0] . "/" . $location[1] . "/modified/" . $location[3] . $filter[1] . $filter[2] . "." . $imagenoextension[1]; + + # session variables $_SESSION["newimage"] = $newimage; $_SESSION["command"] = $command; $env_vars = "/Users/nr52/INSTALL/ImageMagick-6.7.3/bin/"; # clean the command - $fullcommand = $env_vars . escapeshellarg($command) . " ../" . $image . " ../" . $newimage; + $fullcommand = $env_vars . $command . " ../" . $image . " ../" . $newimage; system($fullcommand); diff --git a/bank/.DS_Store b/bank/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/bank/.DS_Store differ diff --git a/bank/original/25696c5.jpg b/bank/original/25696c5.jpg deleted file mode 100644 index 0e35b7b..0000000 Binary files a/bank/original/25696c5.jpg and /dev/null differ diff --git a/bank/rannou/modified/25696c5-flip-rotate.jpg b/bank/rannou/modified/25696c5-flip-rotate.jpg deleted file mode 100644 index dd4b032..0000000 Binary files a/bank/rannou/modified/25696c5-flip-rotate.jpg and /dev/null differ diff --git a/bank/rannou/modified/25696c5-flip.jpg b/bank/rannou/modified/25696c5-flip.jpg deleted file mode 100644 index 42f2b85..0000000 Binary files a/bank/rannou/modified/25696c5-flip.jpg and /dev/null differ diff --git a/bank/rannou/modified/25696c5-rotate.jpg b/bank/rannou/modified/25696c5-rotate.jpg deleted file mode 100644 index 5be96c7..0000000 Binary files a/bank/rannou/modified/25696c5-rotate.jpg and /dev/null differ diff --git a/bank/rannou/original/25696c5-flip.jpg b/bank/rannou/original/25696c5-flip.jpg deleted file mode 100644 index 42f2b85..0000000 Binary files a/bank/rannou/original/25696c5-flip.jpg and /dev/null differ diff --git a/bank/rannou/original/25696c5.jpg b/bank/rannou/original/25696c5.jpg deleted file mode 100644 index 0e35b7b..0000000 Binary files a/bank/rannou/original/25696c5.jpg and /dev/null differ diff --git a/bank/rannou/original/arrow_down.png b/bank/rannou/original/arrow_down.png deleted file mode 100644 index d7778d6..0000000 Binary files a/bank/rannou/original/arrow_down.png and /dev/null differ diff --git a/css/registeredarea.css b/css/registeredarea.css index 0eb48f2..7da748a 100644 --- a/css/registeredarea.css +++ b/css/registeredarea.css @@ -3,11 +3,6 @@ margin:0; padding:0 } -#slidedown_top { -height: 70px; -background-color:#666; -} - #slidedown_bottom { position: absolute; width: 100%; @@ -15,48 +10,9 @@ height:100%; background-color:#666; } -#slidedown_content { -position: absolute; -width: 100%; -height: 250px; -top: -205px; -text-align:center; -background:url(libs/bg.gif) repeat-x 0 bottom; -z-index:999; -} - -#slidedown_content .content { -margin:0 auto; -width:830px; -height:205px; -} - -/* Styles for content */ - -#slidedown_content .content .block { -float:left; -width:250px; -padding:0 4px 0 4px; -margin: 0 4px 0 4px; - -text-align:left; -font-family:georgia; -font-size:11px; -color:#ccc; -} - -#slidedown_content .footer { -height:40px; -} - -#slidedown_content .content li { -padding:0; -margin:4px 0 -} - .clear {clear:both} -.example { +.demo { float: left; margin: 15px; } diff --git a/register.php b/register.php index f8de717..22b2181 100644 --- a/register.php +++ b/register.php @@ -64,15 +64,15 @@ { ?> -
Enter account informations
- +Enter account informations
+ - + +