From: Banana Date: Fri, 20 Dec 2019 10:52:35 +0000 (+0100) Subject: wrong basics. Started documentation and client X-Git-Tag: v0.2-beta~13 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=7d28d178339efe50028e94572b572ea5ecc9892d;p=selfpaste.git wrong basics. Started documentation and client --- diff --git a/client/.gitignore b/client/.gitignore new file mode 100644 index 0000000..e29e588 --- /dev/null +++ b/client/.gitignore @@ -0,0 +1 @@ +selfpaste.sh diff --git a/client/selfpaste.default.sh b/client/selfpaste.default.sh new file mode 100644 index 0000000..b6696a7 --- /dev/null +++ b/client/selfpaste.default.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE +# You should have received a copy of the +# COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 +# along with this program. If not, see http://www.sun.com/cddl/cddl.html +# +# 2019 https://www.bananas-playground.net/projekt/selfpaste + +if [ $# -lt 1 ]; then + echo "You need to provide a file to paste"; + echo "selfpaste.sh /path/to/file"; + exit 2; +fi; + +FILENAME="$1"; +ENDPOINT=""; + +if [[ -r $FILENAME ]]; then + echo ""; +else + echo "Provided file is not accessable." + exit 3; +fi; \ No newline at end of file diff --git a/documentation/setup.txt b/documentation/setup.txt new file mode 100644 index 0000000..e3ba56a --- /dev/null +++ b/documentation/setup.txt @@ -0,0 +1,2 @@ +Change upload_max_filesize and php_value post_max_size in webroot/.htaccess +Change ENDPOINT variable in selfpaste.sh client file. \ No newline at end of file diff --git a/webroot/.htaccess b/webroot/.htaccess index 14bfbbf..a043516 100644 --- a/webroot/.htaccess +++ b/webroot/.htaccess @@ -12,4 +12,7 @@ AddDefaultCharset utf-8 RewriteEngine On RewriteRule ^(.*)$ index.php?s=$1 [QSA,L] - \ No newline at end of file + + +php_value upload_max_filesize 1M +php_value post_max_size 1M \ No newline at end of file diff --git a/webroot/android-chrome-192x192.png b/webroot/android-chrome-192x192.png deleted file mode 100644 index 2669eb3..0000000 Binary files a/webroot/android-chrome-192x192.png and /dev/null differ diff --git a/webroot/apple-touch-icon.png b/webroot/apple-touch-icon.png deleted file mode 100644 index cff31f8..0000000 Binary files a/webroot/apple-touch-icon.png and /dev/null differ diff --git a/webroot/browserconfig.xml b/webroot/browserconfig.xml deleted file mode 100644 index 20ef75a..0000000 --- a/webroot/browserconfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - #da532c - - - diff --git a/webroot/favicon-16x16.png b/webroot/favicon-16x16.png deleted file mode 100644 index 2a98da5..0000000 Binary files a/webroot/favicon-16x16.png and /dev/null differ diff --git a/webroot/favicon-32x32.png b/webroot/favicon-32x32.png deleted file mode 100644 index b4a668b..0000000 Binary files a/webroot/favicon-32x32.png and /dev/null differ diff --git a/webroot/favicon.ico b/webroot/favicon.ico deleted file mode 100644 index ff02932..0000000 Binary files a/webroot/favicon.ico and /dev/null differ diff --git a/webroot/index.php b/webroot/index.php index 1a07746..418fafb 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -47,6 +47,12 @@ if(isset($_GET['s']) && !empty($_GET['s'])) { $_short = Summoner::validate($_short,'nospace') ? $_short : false; } +$_create = false; +if(isset($_POST['c']) && !empty($_GET['s'])) { + $_create = trim($_GET['s']); + $_create = Summoner::validate($_short,'nospace') ? $_short : false; +} + $contentType = 'Content-type: text/html; charset=UTF-8'; $contentBody = 'welcome'; @@ -54,6 +60,10 @@ if(!empty($_short)) { } +var_dump($_POST); +var_dump($_FILES); +var_dump($_SERVER); + # header information header($contentType); if(file_exists('view/'.$contentBody.'.inc.php')) { diff --git a/webroot/mstile-150x150.png b/webroot/mstile-150x150.png deleted file mode 100644 index 7fba08e..0000000 Binary files a/webroot/mstile-150x150.png and /dev/null differ diff --git a/webroot/safari-pinned-tab.svg b/webroot/safari-pinned-tab.svg deleted file mode 100644 index 7e25951..0000000 --- a/webroot/safari-pinned-tab.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/webroot/site.webmanifest b/webroot/site.webmanifest deleted file mode 100644 index 7d4ec44..0000000 --- a/webroot/site.webmanifest +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Delta Labs", - "short_name": "Delta Labs", - "icons": [ - { - "src": "android-chrome-192x192.png", - "sizes": "192x192", - "type": "image/png" - } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" -} diff --git a/webroot/view/welcome.inc.php b/webroot/view/welcome.inc.php index 984f36a..6524cdd 100644 --- a/webroot/view/welcome.inc.php +++ b/webroot/view/welcome.inc.php @@ -14,16 +14,9 @@ - - - - - - - - + -

Well, hello there sweetie!
Thank you for using Delta Labs.

+

Well, hello there sweetie!
Thank you for using selfpaste.