From ef04c83592f8e83ff27c570a2bd295b9d49391c9 Mon Sep 17 00:00:00 2001
From: Hash Borgir Total cookies: You can disable ability to download files by setting
-the "enable_downloads" option to false in settings.json.
- Download file:
- phpdesktop.txt
-
- Cick the non-existing url below. If ["web_server"]["404_handler"]
- is set in settings.json file then clicking the link below
- will forward you to "/pretty-urls.php/foo.html". You can then
- access the "/foo.html" url using $_SERVER["PATH_INFO"] or
- $_SERVER["REQUEST_URI"].
- Try it:
-
");
-if (!extension_loaded("blenc")) {
- $link = "https://github.com/cztomczak/phpdesktop/wiki/" .
- "Source-code-protection#blenc-encoder";
- printf("ERROR: blenc extension not loaded.
- BLENC encoder is a PECL extension that permits to protect
- PHP source scripts.
- This extension is not distributed by default with
- phpdesktop binaries.
- See instructions on how to use BLENC encoder with
- phpdesktop on the SourceCodeProtection wiki page:
- %s", $link, $link);
- exit();
-}
-$source_code = file_get_contents("blenc_myscript.php");
-// The encoded source passed to blenc_encrypt() cannot contain
-// any php tags. We are removing php tags at the beginning and
-// end of file. Also checking that there are no other php tag
-// openings/closings.
-$source_code = preg_replace('#^<'.'\?php\s+#', '', $source_code);
-$source_code = preg_replace('#\s+\?'.'>\s*$#', '', $source_code);
-if (preg_match('#<'.'\?#', $source_code)
- || preg_match('#\?'.'>#', $source_code)) {
- print("Script to be encoded can only contain PHP code.");
- print(" Only a single php opening tag at the beginning of file");
- print(" and a single php closing tag at the end of file are allowed.");
- print(" This is a limitation as of BENC encoder 1.1.4b.");
- exit();
-}
-$redist_key = blenc_encrypt($source_code, "blenc_myscript_encoded.php",
- BLENC_ENCRYPTION_KEY);
-$key_file = ini_get('blenc.key_file');
-file_put_contents($key_file, $redist_key);
-print("DONE. See");
-print(" blenc_myscript_encoded.php");
-?>
\ No newline at end of file
diff --git a/blenc_myscript.php b/blenc_myscript.php
deleted file mode 100644
index 222f0ba..0000000
--- a/blenc_myscript.php
+++ /dev/null
@@ -1,5 +0,0 @@
-@import url("style.css");');
-print("Go back
");
-print("Printing a secret string: XuXuXaaa");
-?>
\ No newline at end of file
diff --git a/cookies.php b/cookies.php
deleted file mode 100644
index 74c43da..0000000
--- a/cookies.php
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-Go back to index
-| ">Refresh
-
-
-Cookies
-
-
-
-Download
-
-Environment variables
-
-
-
-
\ No newline at end of file
diff --git a/error-404.php b/error-404.php
deleted file mode 100644
index c3667c2..0000000
--- a/error-404.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Go back to index
-| ">Refresh
-
-Error 404
-
-
- Sent header: 500 Internal Server Error.
- If you're seeing this then all is OK.
-
-// Execution of commands may hang on Windows XP for some programs, -// wmic.exe is one of them. The solution is to use a command like -// this "echo | command...". See Issue 124: -// https://code.google.com/p/phpdesktop/issues/detail?id=124 - -$output = shell_exec("echo | {$_ENV['SYSTEMROOT']}\System32\wbem\wmic.exe path win32_computersystemproduct get uuid"); - -if ($output) { - echo "Command executed successfully.<br>"; - echo "Output: $output"; -} else { - echo "Command failed."; -} -- -"; - echo "Output: $output"; -} else { - echo "Command failed."; -} - -?> - diff --git a/forms.php b/forms.php deleted file mode 100644 index 067eafc..0000000 --- a/forms.php +++ /dev/null @@ -1,26 +0,0 @@ - -Go back to index -| ">Refresh - -
Use the "Back" option in the right mouse context menu -to go back to this page, after clicking on the links below.
- - -HTML 5 videoTo test whether a new option "Open frame in external browser" - appears when showing the mouse context menu.
- - diff --git a/javascript-api.php b/javascript-api.php deleted file mode 100644 index 38e7a5d..0000000 --- a/javascript-api.php +++ /dev/null @@ -1,24 +0,0 @@ - -Go back to index -| ">Refresh - -PHP Desktop exposes its API through the javascript "phpdesktop" -object that is binded to the window object.
- - - phpdesktop.GetVersion() - -Get the PHP Desktop version. This value is taken from the version -info embedded in the phpdesktop executable.
- - - phpdesktop.ToggleFullscreen() - -To go into fullscreen mode or exit fullscreen mode.
- - - phpdesktop.IsFullscreen() - -Whether in fullscreen mode.
diff --git a/loading-error.php b/loading-error.php deleted file mode 100644 index 25a6a47..0000000 --- a/loading-error.php +++ /dev/null @@ -1,19 +0,0 @@ - -Go back to index -| ">Refresh - - -- Try loading a non-existent url. This is an http protocol - so it will be handled by the web server: - non-existent.html -
- -
- A custom scheme loading error will be handled by Chrome:
- asd://non-existent.html
- In a popup window:
- asd://non-existent.html
-
This example uses PHP header() calls to set cache control.
- -Some random number: - - -- Go back and forward using mouse context menu to see if this number changed, - if so the cache was disabled successfully. -
- -- To avoid caching of static resources put some random query string - when including js/css files, see for example: -
- --<link href="css/style.css?r=<?php echo time(); ?>" rel="stylesheet" type="text/css" /> -\ No newline at end of file diff --git a/open-folder-in-explorer.php b/open-folder-in-explorer.php deleted file mode 100644 index 24b6c51..0000000 --- a/open-folder-in-explorer.php +++ /dev/null @@ -1,26 +0,0 @@ - - - -Go back to index -| ">Refresh - -
-$explorer = $_ENV["SYSTEMROOT"] . '\\explorer.exe'; -$folder_to_open = "C:\\Windows"; -// Using "system" function would cause a false/positive -// by Bkav antivirus on virustotal.com. Using shell_exec -// instead solves the issue. -shell_exec("$explorer /n,/e,$folder_to_open"); -diff --git a/php-error.php b/php-error.php deleted file mode 100644 index b35b615..0000000 --- a/php-error.php +++ /dev/null @@ -1,16 +0,0 @@ - -Go back to index -| ">Refresh - -
-<?php -echo $some; -?> -- - diff --git a/phpinfo.php b/phpinfo.php deleted file mode 100644 index ad20531..0000000 --- a/phpinfo.php +++ /dev/null @@ -1,6 +0,0 @@ - -Go back to index -| ">Refresh -
- When creating a window, the ["application"]["dpi_aware"] setting is taken - into account. If it's set to true, then application window will be resized - automatically using the current OS DPI settings. -
- -- - window.open('index.php', '', 'width=800,height=600') - -
- - diff --git a/pretty-urls.php b/pretty-urls.php deleted file mode 100644 index c11aa4f..0000000 --- a/pretty-urls.php +++ /dev/null @@ -1,96 +0,0 @@ - -Go back to index -| ">Refresh - -"; - print_r($url_vars); - print ""; -} -print_url_variables(); -?> - -
- Pretty urls can be handled by setting ["web_server"]["404_handler"] - option in settings.json file. This is how it works: -
- Test pretty urls: -
- - -- Test POST request to - -
- - - -- -- - -
- Other tests (these urls do not require 404_handler to be set): -
Request quota for HTML 5 persistent storage.
- - - - - DoRequestQuota() diff --git a/session.php b/session.php deleted file mode 100644 index 37746b2..0000000 --- a/session.php +++ /dev/null @@ -1,34 +0,0 @@ - - - -Go back to index -| ">Refresh - -Temp directory:
- --session_start(); -if (!isset($_SESSION['count'])) { - $_SESSION['count'] = 1; -} else { - $_SESSION['count']++; -} -- -
- -\ No newline at end of file diff --git a/speech-recognition.php b/speech-recognition.php deleted file mode 100644 index 384b283..0000000 --- a/speech-recognition.php +++ /dev/null @@ -1,20 +0,0 @@ - -Go back to index -| ">Refresh - - -
-"command_line_switches": { - "enable-speech-input": "" -}, -- -
After you've done that, restart application and visit this url:
- - - http://slides.html5rocks.com/#speech-input diff --git a/sqlite.php b/sqlite.php deleted file mode 100644 index 85c9d98..0000000 --- a/sqlite.php +++ /dev/null @@ -1,45 +0,0 @@ - -Go back to index -| ">Refresh - -"); -$queries = explode(";", $queries); -foreach ($queries as $query) { - $query = trim($query); - if (!$query) continue; - $stmt = @PDO_Execute($query); - if (!$stmt || ($stmt && $stmt->errorCode() != 0)) { - $error = PDO_ErrorInfo(); - print_r($error[2]); - break; - } - print($query."\n"); -} -print(""); - -print("
"); -$data = PDO_FetchAll("SELECT * FROM test"); -print_r($data); -print(""); - -?> \ No newline at end of file diff --git a/src/config.php b/src/config.php index 373cbca..c0970e3 100644 --- a/src/config.php +++ b/src/config.php @@ -3,8 +3,9 @@ if (!empty($_POST)) { // write the d2um.conf file and replace \ with \\ if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { - $path = str_replace('\\', '\\', $_POST['path']); - $path .= '\\data\\global\\excel\\'; + $path = rtrim($_POST['path'], "\\"); + $path = str_replace("\\", "\\\\", $path); + $path .= '\\\\data\\\\global\\\\excel\\\\'; file_put_contents("../d2um.conf", $path); } else { @@ -27,7 +28,7 @@ if (!empty($_POST)) {
Input path to D2 Mod Directory.
- -- - - - - -
-is_file() = - -is_readable() = - -is_writable() = -- -
- The uploaded file () was moved to - the www/ directory using the move_uploaded_file() function. - See the listing of files by going to index.php -
- -- move_uploaded_file() failed. -
- - - -