name file | size | edit | permission | action |
---|---|---|---|---|
.env | 2733 KB | December 22 2024 06:20:07 | 0644 | |
404.html | 58370 KB | November 20 2024 15:32:22 | 0644 | |
502.html | 58368 KB | November 20 2024 15:32:22 | 0644 | |
Modules | - | December 11 2024 21:02:56 | 0755 | |
README.md | 4158 KB | February 14 2023 12:31:56 | 0644 | |
app | - | December 11 2024 17:57:48 | 0755 | |
artisan | 1686 KB | February 14 2023 12:31:56 | 0644 | |
bootstrap | - | December 11 2024 20:23:36 | 0755 | |
composer.json | 3761 KB | December 11 2024 22:15:00 | 0644 | |
composer.lock | 512048 KB | December 11 2024 22:13:28 | 0644 | |
config | - | June 15 2025 02:09:36 | 0755 | |
database | - | December 05 2024 20:18:12 | 0755 | |
dfsdf dfds fd fds findex.html | 1420 KB | November 20 2024 15:32:24 | 0644 | |
error_log | 19245290 KB | July 18 2025 20:16:21 | 0644 | |
firoz | - | December 23 2024 13:24:46 | 0755 | |
index.php | 1667 KB | December 14 2024 05:20:36 | 0644 | |
lang | - | December 11 2024 21:02:48 | 0755 | |
modules_statuses.json | 472 KB | November 20 2024 15:32:24 | 0644 | |
mpos | - | March 31 2025 02:36:31 | 0755 | |
package.json | 226 KB | February 14 2023 12:31:56 | 0644 | |
phpunit.xml | 1146 KB | February 14 2023 12:31:56 | 0644 | |
public | - | March 31 2025 02:36:31 | 0755 | |
resources | - | December 11 2024 21:10:22 | 0755 | |
routes | - | June 15 2025 02:09:31 | 0755 | |
storage | - | December 11 2024 21:12:44 | 0755 | |
tests | - | December 05 2024 20:18:12 | 0755 | |
vendor | - | December 11 2024 22:13:30 | 0755 | |
vite.config.js | 263 KB | February 14 2023 12:31:56 | 0644 |
" . print_r($mixed, true) . ""; } if (php_sapi_name() !== "cli") { echo "
"; } print_r($mixed); if (php_sapi_name() !== "cli") { echo ""; } else { echo "\n"; } flush(); return null; } /** * builds a full url given a protocol, hostname, base path and url * * @param string $protocol * @param string $host * @param string $base_path * @param string $url * @return string * * Initially the trailing slash of $base_path was optional, and conditionally appended. * However on dynamically created sites, where the page is given as url parameter, * the base path might not end with an url. * Therefore do not append a slash, and **require** the $base_url to ending in a slash * when needed. * Vice versa, on using the local file system path of a file, make sure that the slash * is appended (o.k. also for Windows) */ public static function build_url($protocol, $host, $base_path, $url) { $protocol = mb_strtolower($protocol); if (empty($protocol)) { $protocol = "file://"; } if ($url === "") { return null; } $url_lc = mb_strtolower($url); // Is the url already fully qualified, a Data URI, or a reference to a named anchor? // File-protocol URLs may require additional processing (e.g. for URLs with a relative path) if ( ( mb_strpos($url_lc, "://") !== false && !in_array(substr($url_lc, 0, 7), ["file://", "phar://"], true) ) || mb_substr($url_lc, 0, 1) === "#" || mb_strpos($url_lc, "data:") === 0 || mb_strpos($url_lc, "mailto:") === 0 || mb_strpos($url_lc, "tel:") === 0 ) { return $url; } $res = ""; if (strpos($url_lc, "file://") === 0) { $url = substr($url, 7); $protocol = "file://"; } elseif (strpos($url_lc, "phar://") === 0) { $res = substr($url, strpos($url_lc, ".phar")+5); $url = substr($url, 7, strpos($url_lc, ".phar")-2); $protocol = "phar://"; } $ret = ""; $is_local_path = in_array($protocol, ["file://", "phar://"], true); if ($is_local_path) { //On Windows local file, an abs path can begin also with a '\' or a drive letter and colon //drive: followed by a relative path would be a drive specific default folder. //not known in php app code, treat as abs path //($url[1] !== ':' || ($url[2]!=='\\' && $url[2]!=='/')) if ($url[0] !== '/' && (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN' || (mb_strlen($url) > 1 && $url[0] !== '\\' && $url[1] !== ':'))) { // For rel path and local access we ignore the host, and run the path through realpath() $ret .= realpath($base_path) . '/'; } $ret .= $url; $ret = preg_replace('/\?(.*)$/', "", $ret); $filepath = realpath($ret); if ($filepath === false) { return null; } $ret = "$protocol$filepath$res"; return $ret; } $ret = $protocol; // Protocol relative urls (e.g. "//example.org/style.css") if (strpos($url, '//') === 0) { $ret .= substr($url, 2); //remote urls with backslash in html/css are not really correct, but lets be genereous } elseif ($url[0] === '/' || $url[0] === '\\') { // Absolute path $ret .= $host . $url; } else { // Relative path //$base_path = $base_path !== "" ? rtrim($base_path, "/\\") . "/" : ""; $ret .= $host . $base_path . $url; } // URL should now be complete, final cleanup $parsed_url = parse_url($ret); // reproduced from https://www.php.net/manual/en/function.parse-url.php#106731 $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : ''; $host = isset($parsed_url['host']) ? $parsed_url['host'] : ''; $port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : ''; $user = isset($parsed_url['user']) ? $parsed_url['user'] : ''; $pass = isset($parsed_url['pass']) ? ':' . $parsed_url['pass'] : ''; $pass = ($user || $pass) ? "$pass@" : ''; $path = isset($parsed_url['path']) ? $parsed_url['path'] : ''; $query = isset($parsed_url['query']) ? '?' . $parsed_url['query'] : ''; $fragment = isset($parsed_url['fragment']) ? '#' . $parsed_url['fragment'] : ''; // partially reproduced from https://stackoverflow.com/a/1243431/264628 /* replace '//' or '/./' or '/foo/../' with '/' */ $re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#'); for ($n=1; $n>0; $path=preg_replace($re, '/', $path, -1, $n)) {} $ret = "$scheme$user$pass$host$port$path$query$fragment"; return $ret; } /** * Builds a HTTP Content-Disposition header string using `$dispositionType` * and `$filename`. * * If the filename contains any characters not in the ISO-8859-1 character * set, a fallback filename will be included for clients not supporting the * `filename*` parameter. * * @param string $dispositionType * @param string $filename * @return string */ public static function buildContentDispositionHeader($dispositionType, $filename) { $encoding = mb_detect_encoding($filename); $fallbackfilename = mb_convert_encoding($filename, "ISO-8859-1", $encoding); $fallbackfilename = str_replace("\"", "", $fallbackfilename); $encodedfilename = rawurlencode($filename); $contentDisposition = "Content-Disposition: $dispositionType; filename=\"$fallbackfilename\""; if ($fallbackfilename !== $filename) { $contentDisposition .= "; filename*=UTF-8''$encodedfilename"; } return $contentDisposition; } /** * Converts decimal numbers to roman numerals. * * As numbers larger than 3999 (and smaller than 1) cannot be represented in * the standard form of roman numerals, those are left in decimal form. * * See https://en.wikipedia.org/wiki/Roman_numerals#Standard_form * * @param int|string $num * * @throws Exception * @return string */ public static function dec2roman($num): string { static $ones = ["", "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix"]; static $tens = ["", "x", "xx", "xxx", "xl", "l", "lx", "lxx", "lxxx", "xc"]; static $hund = ["", "c", "cc", "ccc", "cd", "d", "dc", "dcc", "dccc", "cm"]; static $thou = ["", "m", "mm", "mmm"]; if (!is_numeric($num)) { throw new Exception("dec2roman() requires a numeric argument."); } if ($num >= 4000 || $num <= 0) { return (string) $num; } $num = strrev((string)$num); $ret = ""; switch (mb_strlen($num)) { /** @noinspection PhpMissingBreakStatementInspection */ case 4: $ret .= $thou[$num[3]]; /** @noinspection PhpMissingBreakStatementInspection */ case 3: $ret .= $hund[$num[2]]; /** @noinspection PhpMissingBreakStatementInspection */ case 2: $ret .= $tens[$num[1]]; /** @noinspection PhpMissingBreakStatementInspection */ case 1: $ret .= $ones[$num[0]]; default: break; } return $ret; } /** * Restrict a length to the given range. * * If min > max, the result is min. * * @param float $length * @param float $min * @param float $max * * @return float */ public static function clamp(float $length, float $min, float $max): float { return max($min, min($length, $max)); } /** * Determines whether $value is a percentage or not * * @param string|float|int $value * * @return bool */ public static function is_percent($value): bool { return is_string($value) && false !== mb_strpos($value, "%"); } /** * Parses a data URI scheme * http://en.wikipedia.org/wiki/Data_URI_scheme * * @param string $data_uri The data URI to parse * * @return array|bool The result with charset, mime type and decoded data */ public static function parse_data_uri($data_uri) { if (!preg_match('/^data:(?P