From: Banana Date: Fri, 20 Dec 2019 09:09:25 +0000 (+0100) Subject: added some basic web stuff X-Git-Tag: v0.2-beta~14 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=2b48472d6a2a3db5d17a95a6328bbec082598311;p=selfpaste.git added some basic web stuff --- diff --git a/README b/README index 78d1100..7c16ba7 100644 --- a/README +++ b/README @@ -1,3 +1,5 @@ selfpaste is a small self hosting paste service. -Link shortening inspired and some code used from: https://www.jwz.org/base64-shortlinks/ \ No newline at end of file +# Third party resources +Link shortening inspired and some code used from: https://www.jwz.org/base64-shortlinks/ +UAC image from: https://doomwiki.org/wiki/File:UAC_insignia.png \ No newline at end of file diff --git a/webroot/android-chrome-192x192.png b/webroot/android-chrome-192x192.png new file mode 100644 index 0000000..2669eb3 Binary files /dev/null and b/webroot/android-chrome-192x192.png differ diff --git a/webroot/apple-touch-icon.png b/webroot/apple-touch-icon.png new file mode 100644 index 0000000..cff31f8 Binary files /dev/null and b/webroot/apple-touch-icon.png differ diff --git a/webroot/browserconfig.xml b/webroot/browserconfig.xml new file mode 100644 index 0000000..20ef75a --- /dev/null +++ b/webroot/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #da532c + + + diff --git a/webroot/favicon-16x16.png b/webroot/favicon-16x16.png new file mode 100644 index 0000000..2a98da5 Binary files /dev/null and b/webroot/favicon-16x16.png differ diff --git a/webroot/favicon-32x32.png b/webroot/favicon-32x32.png new file mode 100644 index 0000000..b4a668b Binary files /dev/null and b/webroot/favicon-32x32.png differ diff --git a/webroot/favicon.ico b/webroot/favicon.ico new file mode 100644 index 0000000..ff02932 Binary files /dev/null and b/webroot/favicon.ico differ diff --git a/webroot/index.php b/webroot/index.php index c29702b..1a07746 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -24,7 +24,6 @@ date_default_timezone_set('Europe/Berlin'); # check request $_urlToParse = filter_var($_SERVER['QUERY_STRING'],FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW); if(!empty($_urlToParse)) { - # see http://de2.php.net/manual/en/regexp.reference.unicode.php if(preg_match('/[\p{C}\p{M}\p{Sc}\p{Sk}\p{So}\p{Zl}\p{Zp}]/u',$_urlToParse) === 1) { die('Malformed request. Make sure you know what you are doing.'); } @@ -42,12 +41,26 @@ else { # static helper class require 'lib/summoner.class.php'; +$_short = false; if(isset($_GET['s']) && !empty($_GET['s'])) { $_short = trim($_GET['s']); - $_short = Summoner::validate($_short,'nospace') ? $_short : ""; + $_short = Summoner::validate($_short,'nospace') ? $_short : false; } -# header information -header('Content-type: text/html; charset=UTF-8'); +$contentType = 'Content-type: text/html; charset=UTF-8'; +$contentBody = 'welcome'; + +if(!empty($_short)) { + +} -var_dump($_SERVER); \ No newline at end of file +# header information +header($contentType); +if(file_exists('view/'.$contentBody.'.inc.php')) { + require_once 'view/'.$contentBody.'.inc.php'; +} +else { + error_log('Content body file missing. '.var_export($_SERVER,true),3,'./logs/error.log'); + http_response_code(400); + die('Well, something went wrong...'); +} \ No newline at end of file diff --git a/webroot/mstile-150x150.png b/webroot/mstile-150x150.png new file mode 100644 index 0000000..7fba08e Binary files /dev/null and b/webroot/mstile-150x150.png differ diff --git a/webroot/safari-pinned-tab.svg b/webroot/safari-pinned-tab.svg new file mode 100644 index 0000000..7e25951 --- /dev/null +++ b/webroot/safari-pinned-tab.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/webroot/site.webmanifest b/webroot/site.webmanifest new file mode 100644 index 0000000..7d4ec44 --- /dev/null +++ b/webroot/site.webmanifest @@ -0,0 +1,14 @@ +{ + "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 new file mode 100644 index 0000000..984f36a --- /dev/null +++ b/webroot/view/welcome.inc.php @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + +

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

+ +