first commit
This commit is contained in:
commit
1b4073b3a4
17 files changed
+507
No files matched your search
@@ -0,0 +1,3 @@
|
||||
RewriteEngine on
|
||||
RewriteRule ^doppelklinge/? /?p=doppelklinge [L]
|
||||
RewriteRule ^vermessung/? /?p=vermessung [L]
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
@charset "UTF-8";/*!
|
||||
* Bootstrap v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:33,37,41;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-2xl:2rem;--bs-border-radius-pill:50rem;--bs-link-color:#0d6efd;--bs-link-hover-color:#0a58ca;--bs-code-color:#d63384;--bs-highlight-bg:#fff3cd}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;border:0;border-top:1px solid;opacity:.25}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.1875em;background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:var(--bs-link-color);text-decoration:underline}a:hover{color:var(--bs-link-hover-color)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):noLine truncated
|
||||
/*# sourceMappingURL=bootstrap.min.css.map */
|
||||
@@ -0,0 +1,71 @@
|
||||
body {
|
||||
counter-reset: toplist;
|
||||
font-size: .875rem;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 100;
|
||||
padding: 48px 0 0;
|
||||
}
|
||||
|
||||
@media (max-width: 767.98px) {
|
||||
.sidebar {
|
||||
top: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-sticky {
|
||||
height: calc(100vh - 48px);
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.sidebar .nav-link {
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.sidebar .nav-link {
|
||||
margin-right: 4px;
|
||||
color: #727272;
|
||||
}
|
||||
|
||||
.sidebar .nav-link.active {
|
||||
color: #2470dc;
|
||||
}
|
||||
|
||||
.sidebar .nav-link:hover,
|
||||
.sidebar .nav-link.active {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.sidebar-heading {
|
||||
font-size: .75rem;
|
||||
}
|
||||
|
||||
/* Navbar */
|
||||
.navbar-brand {
|
||||
padding-top: .75rem;
|
||||
padding-bottom: .75rem;
|
||||
background-color: rgba(0, 0, 0, .25);
|
||||
}
|
||||
|
||||
.navbar .navbar-toggler {
|
||||
top: .25rem;
|
||||
right: 1rem;
|
||||
}
|
||||
|
||||
.navbar .form-control {
|
||||
padding: .75rem 1rem;
|
||||
}
|
||||
|
||||
/* custom */
|
||||
ul.list-top > li::before {
|
||||
counter-increment: toplist;
|
||||
content: "# " counter(toplist) ": ";
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 271 KiB |
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$routes = [
|
||||
'doppelklinge' => 'doppelklinge',
|
||||
'vermessung' => 'vermessung',
|
||||
'default' => 'default'
|
||||
];
|
||||
|
||||
ob_start();
|
||||
if(array_key_exists($_page, $routes))
|
||||
require_once("./pages/{$routes[$_page]}.page.php");
|
||||
else
|
||||
require_once("./pages/{$routes['default']}.page.php");
|
||||
|
||||
$_content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
class tpl {
|
||||
static $blocks = array();
|
||||
static $cache_path = '/home/users/flumm/tmp/';
|
||||
|
||||
static function view($file, $data = array()) {
|
||||
$cached_file = self::cache($file);
|
||||
extract($data, EXTR_SKIP);
|
||||
require $cached_file;
|
||||
unlink($cached_file);
|
||||
}
|
||||
|
||||
static function cache($file) {
|
||||
if(!file_exists(self::$cache_path))
|
||||
mkdir(self::$cache_path, 0744);
|
||||
$cached_file = self::$cache_path . str_replace(array('/', '.html'), array('_', ''), $file . '.php');
|
||||
if(!file_exists($cached_file) || filemtime($cached_file) < filemtime($file)) {
|
||||
$code = self::includeFiles($file);
|
||||
$code = self::compileCode($code);
|
||||
file_put_contents($cached_file, '<?php class_exists(\'' . __CLASS__ . '\') or exit; ?>' . PHP_EOL . $code);
|
||||
}
|
||||
return $cached_file;
|
||||
}
|
||||
|
||||
static function compileCode($code) {
|
||||
$code = self::compileBlock($code);
|
||||
$code = self::compileYield($code);
|
||||
$code = self::compileEscapedEchos($code);
|
||||
$code = self::compileEchos($code);
|
||||
$code = self::compilePHP($code);
|
||||
return $code;
|
||||
}
|
||||
|
||||
static function includeFiles($file) {
|
||||
$code = file_get_contents($file);
|
||||
preg_match_all('/{% ?(extends|include) ?\'?(.*?)\'? ?%}/i', $code, $matches, PREG_SET_ORDER);
|
||||
foreach($matches as $value)
|
||||
$code = str_replace($value[0], self::includeFiles($value[2]), $code);
|
||||
$code = preg_replace('/{% ?(extends|include) ?\'?(.*?)\'? ?%}/i', '', $code);
|
||||
return $code;
|
||||
}
|
||||
|
||||
static function compilePHP($code) {
|
||||
return preg_replace('~\{%\s*(.+?)\s*\%}~is', '<?php $1 ?>', $code);
|
||||
}
|
||||
|
||||
static function compileEchos($code) {
|
||||
return preg_replace('~\{{\s*(.+?)\s*\}}~is', '<?php echo $1 ?>', $code);
|
||||
}
|
||||
|
||||
static function compileEscapedEchos($code) {
|
||||
return preg_replace('~\{{{\s*(.+?)\s*\}}}~is', '<?php echo htmlentities($1, ENT_QUOTES, \'UTF-8\') ?>', $code);
|
||||
}
|
||||
|
||||
static function compileBlock($code) {
|
||||
preg_match_all('/{% ?block ?(.*?) ?%}(.*?){% ?endblock ?%}/is', $code, $matches, PREG_SET_ORDER);
|
||||
foreach($matches as $value) {
|
||||
if(!array_key_exists($value[1], self::$blocks))
|
||||
self::$blocks[$value[1]] = '';
|
||||
if(strpos($value[2], '@parent') === false)
|
||||
self::$blocks[$value[1]] = $value[2];
|
||||
else
|
||||
self::$blocks[$value[1]] = str_replace('@parent', self::$blocks[$value[1]], $value[2]);
|
||||
$code = str_replace($value[0], '', $code);
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
|
||||
static function compileYield($code) {
|
||||
foreach(self::$blocks as $block => $value) {
|
||||
$code = preg_replace('/{% ?yield ?' . $block . ' ?%}/', $value, $code);
|
||||
}
|
||||
$code = preg_replace('/{% ?yield ?(.*?) ?%}/i', '', $code);
|
||||
return $code;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
$_page = isset($_GET['p']) ? $_GET['p'] : '';
|
||||
|
||||
require_once('./inc/tpl.class.php');
|
||||
require_once('./inc/router.inc.php');
|
||||
|
||||
$tpl = (object)$tpl;
|
||||
|
||||
if(!@$tpl->debug) {
|
||||
tpl::view('tpl/' . $tpl->file,
|
||||
array_merge([
|
||||
'page' => $_page
|
||||
],
|
||||
gettype($tpl->data) !== 'string' ? $tpl->data : [])
|
||||
);
|
||||
}
|
||||
else {
|
||||
echo "<pre>";
|
||||
print_r($_content);
|
||||
echo "</pre>";
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
// Native JavaScript for Bootstrap v4.2.0 | 2022 © dnp_theme | MIT-License
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).BSN=e()}(this,(function(){"use strict";const t={};function e(e){const n=this,{type:s}=e;[...t[s]].forEach(t=>{const[i,a]=t;i===n&&[...a].forEach(t=>{const[n,a]=t;n.apply(i,[e]),a&&a.once&&o(i,s,n,a)})})}const n=(n,o,s,i)=>{t[o]||(t[o]=new Map);const a=t[o];a.has(n)||a.set(n,new Map);const r=a.get(n),{size:l}=r;r.set(s,i),l||n.addEventListener(o,e,i)},o=(n,o,s,i)=>{const a=t[o],r=a&&a.get(n),l=r&&r.get(s),{options:c}=void 0!==l?l:{options:i};r&&r.has(s)&&r.delete(s),!a||r&&r.size||a.delete(n),a&&a.size||delete t[o],r&&r.size||n.removeEventListener(o,e,c)},s={on:n,off:o,globalListener:e,registry:t};function i(t,e){const n=getComputedStyle(t);return e.includes("--")?n.getPropertyValue(e):n[e]}function a(t){const e=i(t,"transitionProperty"),n=i(t,"transitionDuration"),o=n.includes("ms")?1:1e3,s=e&&"none"!==e?parseFloat(n)*o:0;return Number.isNaN(s)?0:s}const r=(t,e)=>t.dispatchEvent(e);function l(t,e){let n=0;const o=new Event("transitionend"),s=a(t),l=function(t){const e=i(t,"transitionProperty"),n=i(t,"transitionDelay"),o=n.includes("ms")?1:1e3,s=e&&"none"!==e?parseFloat(n)*o:0;return Number.isNaN(s)?0:s}(t);if(s){const i=o=>{o.target===t&&(e.apply(t,[o]),t.removeEventListener("transitionend",i),n=1)};t.addEventListener("transitionend",i),setTimeout(()=>{n||r(t,o)},s+l+17)}else e.apply(t,[o])}const c=t=>t&&[1,2,3,4,5,6,7,8,9,10,11].some(e=>+t.nodeType===e)||!1,d=t=>t&&"Window"===t.constructor.name||!1,h=t=>t&&9===t.nodeType||!1;function u(t){return h(t)?t:c(t)?t.ownerDocument:d(t)?t.document:window.document}function f(t,e){if(c(t))return t;return(c(e)?e:u()).querySelector(t)}function p(t,e){return t?t.closest(e)||p(t.getRootNode().host,e):null}const g=(t,e)=>Object.assign(t,e);function m(t,e){return t.classList.contains(e)}function v(t,e){t.classList.remove(e)}const b=t=>t&&1===t.nodeType||!1,w=new Map,y={set:(t,e,n)=>{if(!b(t))return;w.has(e)||w.set(e,new Map);w.get(e).set(t,n)},getAllFor:t=>w.get(t)||null,get:(t,e)=>{if(!b(t)||!e)return null;const n=y.getAllFor(e);return t&&n&&n.get(t)||null},remove:(t,e)=>{const n=w.get(e);n&&b(t)&&(n.delete(t),0===n.size&&w.delete(e))}},T=(t,e)=>y.get(t,e);function x(t,e){const n=new CustomEvent(t,{cancelable:!0,bubbles:!0});return"object"==typeof e&&g(n,e),n}const E=(t,e)=>t.getAttribute(e);function A(t){return!!["true",!0].includes(t)||!["false",!1].includes(t)&&(""===t||"null"===t?null:""===t||Number.isNaN(+t)?t:+t)}const N=t=>Object.keys(t),k=t=>t.toLowerCase();class P{constructor(t,e){const n=this,o=f(t);if(!o)throw Error(`${n.name} Error: "${t}" is not a valid selector.`);n.options={};const s=y.get(o,n.name);s&&s.dispose(),n.element=o,n.defaults&&N(n.defaults).length&&(n.options=function(t,e,n,o){const s={...t.dataset},i={},a={};return N(s).forEach(t=>{const e=o&&t.includes(o)?t.replace(o,"").replace(/[A-Z]/,t=>k(t)):t;a[e]=A(s[t])}),N(n).forEach(t=>{n[t]=A(n[t])}),N(e).forEach(o=>{i[o]=o in n?n[o]:o in a?a[o]:"title"===o?E(t,"title"):e[o]}),i}(o,n.defaults,e||{},"bs")),y.set(o,n.name,n)}get version(){return"4.2.0"}get name(){return this.constructor.name}get defaults(){return this.constructor.defaults}dispose(){const t=this;y.remove(t.element,t.name),N(t).forEach(e=>{t[e]=null})}}const $=t=>T(t,"Alert"),H=x("close.bs.alert"),S=x("closed.bs.alert");function D(t){const{element:e}=t;C(t),r(e,S),t.dispose(),e.remove()}function C(t,e){const s=e?n:o,{dismiss:i}=t;i&&s(i,"click",t.close)}class M extends P{constructor(t){super(t);const{element:e}=this;this.dismiss=f('[data-bs-dismiss="alert"]',e),C(this,!0)}get name(){return"Alert"}close(t){const e=t?$(p(this,".alert")):this,{element:n}=e;if(n&&m(n,"show")){if(r(n,H),H.defaultPrevented)return;v(n,"show"),m(n,"fade")?l(n,()=>D(e)):D(e)}}dispose(){C(this),super.dispose()}}g(M,{selector:".alert",init:t=>new M(t),getInstance:$});const L=(t,e,n)=>t.setAttribute(e,n);function I(t,e){t.classList.add(e)}const R="data-bs-toggle",F=`[${R}="button"]`,O=t=>T(t,"Button");function W(t,e){(e?n:o)(t.element,"click",t.toggle)}class B extends P{constructor(t){super(t);const{element:e}=this;this.isActive=m(e,"active"),L(e,"aria-pressed",""+!!this.isActive),W(this,!0)}get name(){return"Button"}toggle(t){t&&t.preventDefault();const e=t?O(this):this;if(!e.element)return;const{element:n,isActive:o}=e;if(m(n,"disabled"))return;(o?v:I)(n,"active"),L(n,"aria-pressed",o?"false":"true"),e.isActive=m(n,"active")}dispose(){W(this),super.dispose()}}g(B,{selector:F,init:t=>new B(t),getInstance:O});const z="mouseenter",X="mouseleave";function j(t,e){const{width:n,height:o,top:s,right:i,bottom:a,left:r}=t.getBoundingClientRect();let l=1,c=1;if(e&&b(t)){const{offsetWidth:e,offsetHeight:s}=t;l=e>0?Math.round(n)/e:1,c=s>0?Math.round(o)/s:1}return{width:n/l,height:o/c,top:s/c,right:i/l,bottom:a/c,left:r/l,x:r/l,y:s/c}}function V(t){return u(t).documentElement}const Y=t=>{if(Line truncated
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
$tpl['file'] = 'default.html';
|
||||
$tpl['data'] = '';
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
$tpl['file'] = 'doppelklinge.html';
|
||||
$tpl['data'] = [];
|
||||
|
||||
$progress = !empty($_POST['progress']) ? $_POST['progress'] : '';
|
||||
|
||||
if(!empty($progress)) {
|
||||
$list = [];
|
||||
preg_match_all("/(?<task>.*): (?<act>.*) \/ (?<max>.*)/m", $progress, $tmp);
|
||||
|
||||
for($i = 0; $i < count($tmp[0]); $i++) {
|
||||
$list[$i] = (object)[
|
||||
'task' => trim($tmp['task'][$i]),
|
||||
'act' => (int)str_replace('.', '', $tmp['act'][$i]),
|
||||
'max' => (int)str_replace('.', '', $tmp['max'][$i])
|
||||
];
|
||||
$list[$i]->percent = round($list[$i]->act / $list[$i]->max * 100, 2);
|
||||
}
|
||||
|
||||
usort($list, function($a, $b) { return $b->percent <=> $a->percent; });
|
||||
|
||||
$act = $max = $avg = 0;
|
||||
for($i = 0; $i < 5; $i++) {
|
||||
$act += $list[$i]->act;
|
||||
$max += $list[$i]->max;
|
||||
$avg += $list[$i]->percent;
|
||||
}
|
||||
$percent = round($act / $max * 100, 2);
|
||||
|
||||
$tpl['data'] = [
|
||||
'progress' => $progress,
|
||||
'list' => $list,
|
||||
'percent' => $percent,
|
||||
'avg' => round($avg / 5, 2)
|
||||
];
|
||||
}
|
||||
else {
|
||||
$tpl['data'] = [
|
||||
'progress' => ''
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
$tpl['file'] = 'vermessung.html';
|
||||
$tpl['data'] = [];
|
||||
$tpl['debug'] = false;
|
||||
|
||||
$protocol = !empty($_POST['protocol']) ? $_POST['protocol'] : '';
|
||||
|
||||
if(!empty($protocol)) {
|
||||
preg_match_all("/(?<datetime>.*)\t(?<amt>.*) führt mit (?<laeufer>.*) eine.*erwirtschaftet (?<gm>.*) Goldmünzen/m", $protocol, $res);
|
||||
|
||||
$dtact = date('m.Y');
|
||||
$vms = $newest = [];
|
||||
|
||||
for($i = 0; $i < count($res['datetime']); $i++) {
|
||||
$tmpdt = date('m.Y', strtotime($res['datetime'][$i]));
|
||||
|
||||
if(!array_key_exists($tmpdt, $vms)) {
|
||||
$vms[$tmpdt] = [
|
||||
'user' => [],
|
||||
'gm' => 0,
|
||||
'list' => [],
|
||||
'dtact' => $tmpdt
|
||||
];
|
||||
}
|
||||
|
||||
if(!array_key_exists($res['amt'][$i], $vms[$tmpdt]['user']))
|
||||
$vms[$tmpdt]['user'][$res['amt'][$i]] = 1;
|
||||
else
|
||||
$vms[$tmpdt]['user'][$res['amt'][$i]] += 1;
|
||||
|
||||
$laeufer = explode(', ', str_replace(' und ', ', ', trim($res['laeufer'][$i], ',')));
|
||||
foreach($laeufer as $tmp) {
|
||||
if(!array_key_exists($tmp, $vms[$tmpdt]['user']))
|
||||
$vms[$tmpdt]['user'][$tmp] = 1;
|
||||
else
|
||||
$vms[$tmpdt]['user'][$tmp] += 1;
|
||||
}
|
||||
arsort($vms[$tmpdt]['user']);
|
||||
|
||||
$vms[$tmpdt]['gm'] += (int)str_replace('.', '', $res['gm'][$i]);
|
||||
|
||||
$vms[$tmpdt]['list'][] = [
|
||||
'datum' => $res['datetime'][$i],
|
||||
'gold' => (int)str_replace('.', '', $res['gm'][$i]),
|
||||
'amt' => $res['amt'][$i],
|
||||
'laeufer' => $laeufer
|
||||
];
|
||||
}
|
||||
|
||||
$tpl['data'] = [
|
||||
'protocol' => $protocol,
|
||||
'vms' => $vms,
|
||||
'newest' => array_shift($vms)
|
||||
];
|
||||
}
|
||||
else {
|
||||
$tpl['data'] = [
|
||||
'protocol' => $protocol
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{% extends tpl/layout.html %}
|
||||
|
||||
{% block title %}Willkommen auf fwtrash.de!{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>Wir sind stolz darauf, Ihnen eine Vielzahl von nützlichen Tools und Ressourcen für das Onlinespiel Freewar zur Verfügung zu stellen. Unser Ziel ist es, Ihnen das Spielen von Freewar zu erleichtern und Ihnen zu helfen, das Beste aus dem Spiel herauszuholen.</p>
|
||||
<p>Auf unserer Webseite finden Sie alles, von praktischen Rechnern und Simulatoren bis hin zu umfassenden Anleitungen und Strategieguides. Wir sind ständig bemüht, unser Angebot zu erweitern und zu verbessern, um Ihnen die bestmögliche Unterstützung zu bieten.</p>
|
||||
<p>Schauen Sie sich um und entdecken Sie alles, was fwtrash.de zu bieten hat. Wir hoffen, dass Sie viel Freude beim Stöbern und Nutzen unserer Tools haben werden.</p>
|
||||
<strong>Viel Spaß beim Erkunden und Happy Gaming!</strong>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,37 @@
|
||||
{% extends tpl/layout.html %}
|
||||
|
||||
{% block title %}irgendwas mit Doppelklinge{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/doppelklinge" method="post">
|
||||
<p>Gesamten Mainframe von Position X: 80 Y: 126 einfügen (strg-a, strg-c):</p>
|
||||
<textarea name="progress" rows="4" cols="60">{{ $progress }}</textarea>
|
||||
<br />
|
||||
<input type="submit" value="abschnalzen" />
|
||||
</form>
|
||||
|
||||
{% if(isset($list)): %}
|
||||
<hr />
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Aufgabe</th>
|
||||
<th>Fortschritt</th>
|
||||
<th>Ziel</th>
|
||||
<th>Prozent</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for($i = 0; $i < count($list); $i++): %}
|
||||
<tr style="background-color: {{ $i >= 5 ? 'red' : 'white' }}">
|
||||
<td>{{ $list[$i]->task }}</td>
|
||||
<td>{{ $list[$i]->act }}</td>
|
||||
<td>{{ $list[$i]->max }}</td>
|
||||
<td>{{ $list[$i]->percent }}</td>
|
||||
</tr>
|
||||
{% endfor; %}
|
||||
</tbody>
|
||||
</table>
|
||||
insgesamt {{ $percent }}% erledigt (ø {{ $avg }}%).
|
||||
{% endif; %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,46 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<base href="https://fwtrash.de/" />
|
||||
<title>{% yield title %}</title>
|
||||
<link rel="stylesheet" type="text/css" href="./css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="./css/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
|
||||
<a class="navbar-brand col-md-3 col-lg-2 me-0 px-3 fs-6" href="./">
|
||||
<img src="./img/logo-big.png" style="height: 38px;" />
|
||||
fwtrash.de
|
||||
</a>
|
||||
<button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="navbar-nav">
|
||||
<div class="nav-item text-nowrap"> </div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
|
||||
<div class="position-sticky pt-3 sidebar-sticky">
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item"><a class="nav-link{% if(empty($page)): %} active{% endif; %}" href="/">Home</a></li>
|
||||
<li class="nav-item"><a class="nav-link{% if($page == 'doppelklinge'): %} active{% endif; %}" href="/doppelklinge">Doppelklinge</a></li>
|
||||
<li class="nav-item"><a class="nav-link{% if($page == 'vermessung'): %} active{% endif; %}" href="/vermessung">Vermessungen</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
|
||||
<h1 class="h2">{% yield title %}</h1>
|
||||
<hr />
|
||||
{% yield content %}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
<script src="./js/bootstrap-native.min.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,109 @@
|
||||
{% extends tpl/layout.html %}
|
||||
|
||||
{% block title %}irgendwas mit Vermessungen{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/vermessung" method="post">
|
||||
<p>Gesamtes Clanprotokoll einfügen (strg-a, strg-c):</p>
|
||||
<textarea name="protocol" rows="4" cols="60">{{ $protocol }}</textarea>
|
||||
<br />
|
||||
<input type="submit" value="abschnalzen" />
|
||||
</form>
|
||||
|
||||
{% if(isset($newest)): %}
|
||||
<hr />
|
||||
<span id="wao">wao, {{ number_format($newest['gm'], 0, '', '.') }} Goldmünzen durch {{ count($newest['list']) }} Vermessungen erwirtschaftet!</span>
|
||||
<select id="dtswitch">
|
||||
{% foreach($vms as $vm): %}
|
||||
<option>{{ $vm['dtact'] }}</option>
|
||||
{% endforeach; %}
|
||||
</select>
|
||||
<hr />
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-sm-4">
|
||||
<div class="card">
|
||||
<h5 class="card-header">Topliste:</h5>
|
||||
<div class="card-body">
|
||||
<ul class="list-group list-group-flush list-top" id="toplist">
|
||||
{% foreach($newest['user'] as $name => $c): %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center p-1">
|
||||
{{ $name }}
|
||||
<span class="badge bg-primary rounded-pill">{{ $c }} Vermessungen</span>
|
||||
</li>
|
||||
{% endforeach; %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<h5 class="card-header">berücksichtigte Messungen:</h5>
|
||||
<div class="card-body">
|
||||
<table class="table table-sm table-striped" style="width: 100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Datum</th>
|
||||
<th>Goldmünzen</th>
|
||||
<th>Amtsteher</th>
|
||||
<th>Läufer</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="vmlist">
|
||||
{% foreach($newest['list'] as $tmp): %}
|
||||
<tr>
|
||||
<td style="vertical-align: top">{{ $tmp['datum'] }}</td>
|
||||
<td style="vertical-align: top">{{ $tmp['gold'] }} gm</td>
|
||||
<td style="vertical-align: top">{{ $tmp['amt'] }}</td>
|
||||
<td style="vertical-align: top">{{ implode(', ', $tmp['laeufer']) }}</td>
|
||||
</tr>
|
||||
{% endforeach; %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>const vms = {{ json_encode($vms) }};
|
||||
(() => {
|
||||
const toplist = document.querySelector('#toplist');
|
||||
const vmlist = document.querySelector('#vmlist');
|
||||
const wao = document.querySelector('#wao');
|
||||
const dtswitch = document.querySelector('#dtswitch');
|
||||
|
||||
dtswitch.addEventListener('change', e => {
|
||||
const vm = vms[dtswitch.value];
|
||||
|
||||
toplist.innerHTML = '';
|
||||
vmlist.innerHTML = '';
|
||||
|
||||
let gm = 0;
|
||||
let cvm = 0;
|
||||
|
||||
for(let [ user, count ] of Object.entries(vm.user)) {
|
||||
// fill toplist
|
||||
const li = document.createElement('li');
|
||||
li.classList.add('list-group-item', 'd-flex', 'justify-content-between', 'align-items-center', 'p-1');
|
||||
li.innerText = user;
|
||||
const span = document.createElement('span');
|
||||
span.classList.add('badge', 'bg-primary', 'rounded-pill');
|
||||
span.innerText = `${count} Vermessungen`;
|
||||
li.insertAdjacentElement('beforeend', span);
|
||||
toplist.insertAdjacentElement('beforeend', li);
|
||||
}
|
||||
|
||||
for(let entry of vm.list) {
|
||||
// fill vmlist
|
||||
const tr = document.createElement('tr');
|
||||
tr.innerHTML = `<td>${entry.datum}</td><td>${entry.gold} gm</td><td>${entry.amt}</td><td>${entry.laeufer.join(', ')}</td>`;
|
||||
vmlist.insertAdjacentElement('beforeend', tr);
|
||||
}
|
||||
|
||||
wao.innerHTML = `wao, ${vm.gm.toLocaleString('de-DE')} Goldmünzen durch ${vm.list.length} Vermessungen erwirtschaftet!`;
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
{% endif; %}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user