www/dev/index.php

108 lines
4.1 KiB
PHP
Raw Normal View History

2023-05-11 15:36:22 +03:00
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
2023-05-11 17:58:03 +03:00
<?php
### ERROR HANDLING ###
function warnError($errno, $errstr, $errfile, $errline)
{
echo "<br><p style='padding:0px;margin:0px;background-color:white;color:black;'><b style='color:red;'>Error:</b> [$errno] $errstr <br> in file <b style='color:blue'>$errfile</b> line <b style='color:red'>$errline</b></p>";
}
set_error_handler("warnError");
if (!$_SERVER['DOCUMENT_ROOT']) {
$_SERVER['DOCUMENT_ROOT'] = '/weblink';
}
# TODO separate file
?>
<style>
body{
color: white;
}
</style>
2023-05-11 15:36:22 +03:00
<head>
<!--!Copyright © 2023 Aliberk Sandıı-->
<meta charset="UTF-8">
<!-- CSS Files -->
2023-05-11 15:42:38 +03:00
<?php
2023-05-11 17:58:03 +03:00
$dir = new DirectoryIterator($_SERVER['DOCUMENT_ROOT'] . "/assets/css");
2023-05-11 15:42:38 +03:00
foreach ($dir as $file) {
if ((!$file->isDot()) && str_ends_with($file, ".css")) {
echo '<link rel="stylesheet" href="/assets/css/' . $file . '">' . PHP_EOL . ' ';
}
} ?>
2023-05-11 15:36:22 +03:00
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//stats.aliberksandikci.com.tr/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '3']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<title>DEVELOPMENT PAGE</title>
2023-05-11 15:36:22 +03:00
</head>
<body>
2023-05-11 16:23:14 +03:00
<h1>DEVELOPMENT PAGE</h1>
<hr>
2023-06-25 21:46:02 +03:00
<sup><a href="/dev/playground/">dev playground</a></sup><br>
2023-05-11 17:58:03 +03:00
2023-05-11 15:36:22 +03:00
<?php
2023-05-11 17:58:03 +03:00
2023-05-11 16:30:48 +03:00
echo 'DOCUMENTS_ROOT:' . $_SERVER['DOCUMENT_ROOT'] . PHP_EOL . "<br>";
echo 'PHP_SELF:' . $_SERVER['PHP_SELF'] . PHP_EOL . "<br>";
echo 'GATEWAY_INTERFACE:' . $_SERVER['GATEWAY_INTERFACE'] . PHP_EOL . "<br>";
echo 'SERVER_ADDR:' . $_SERVER['SERVER_ADDR'] . PHP_EOL . "<br>";
echo 'SERVER_NAME:' . $_SERVER['SERVER_NAME'] . PHP_EOL . "<br>";
echo 'SERVER_SOFTWARE:' . $_SERVER['SERVER_SOFTWARE'] . PHP_EOL . "<br>";
echo 'SERVER_PROTOCOL:' . $_SERVER['SERVER_PROTOCOL'] . PHP_EOL . "<br>";
echo 'REQUEST_METHOD:' . $_SERVER['REQUEST_METHOD'] . PHP_EOL . "<br>";
echo 'REQUEST_TIME:' . $_SERVER['REQUEST_TIME'] . PHP_EOL . "<br>";
echo 'REQUEST_TIME_FLOAT:' . $_SERVER['REQUEST_TIME_FLOAT'] . PHP_EOL . "<br>";
echo 'QUERY_STRING:' . $_SERVER['QUERY_STRING'] . PHP_EOL . "<br>";
echo 'DOCUMENT_ROOT:' . $_SERVER['DOCUMENT_ROOT'] . PHP_EOL . "<br>";
echo 'HTTPS:' . $_SERVER['HTTPS'] . PHP_EOL . "<br>";
echo 'REMOTE_ADDR:' . $_SERVER['REMOTE_ADDR'] . PHP_EOL . "<br>";
echo 'REMOTE_HOST:' . $_SERVER['REMOTE_HOST'] . PHP_EOL . "<br>";
echo 'REMOTE_PORT:' . $_SERVER['REMOTE_PORT'] . PHP_EOL . "<br>";
echo 'REMOTE_USER:' . $_SERVER['REMOTE_USER'] . PHP_EOL . "<br>";
echo 'REDIRECT_REMOTE_USER:' . $_SERVER['REDIRECT_REMOTE_USER'] . PHP_EOL . "<br>";
echo 'SCRIPT_FILENAME:' . $_SERVER['SCRIPT_FILENAME'] . PHP_EOL . "<br>";
echo 'SERVER_ADMIN:' . $_SERVER['SERVER_ADMIN'] . PHP_EOL . "<br>";
echo 'SERVER_PORT:' . $_SERVER['SERVER_PORT'] . PHP_EOL . "<br>";
echo 'SERVER_SIGNATURE:' . $_SERVER['SERVER_SIGNATURE'] . PHP_EOL . "<br>";
echo 'PATH_TRANSLATED:' . $_SERVER['PATH_TRANSLATED'] . PHP_EOL . "<br>";
echo 'SCRIPT_NAME:' . $_SERVER['SCRIPT_NAME'] . PHP_EOL . "<br>";
echo 'REQUEST_URI:' . $_SERVER['REQUEST_URI'] . PHP_EOL . "<br>";
echo 'PHP_AUTH_DIGEST:' . $_SERVER['PHP_AUTH_DIGEST'] . PHP_EOL . "<br>";
echo 'PHP_AUTH_USER:' . $_SERVER['PHP_AUTH_USER'] . PHP_EOL . "<br>";
echo 'PHP_AUTH_PW:' . $_SERVER['PHP_AUTH_PW'] . PHP_EOL . "<br>";
echo 'AUTH_TYPE:' . $_SERVER['AUTH_TYPE'] . PHP_EOL . "<br>";
echo 'PATH_INFO:' . $_SERVER['PATH_INFO'] . PHP_EOL . "<br>";
echo 'ORIG_PATH_INFO:' . $_SERVER['ORIG_PATH_INFO'] . PHP_EOL . "<br>";
2023-05-11 15:36:22 +03:00
?>
2023-05-11 15:42:38 +03:00
2023-05-11 17:58:03 +03:00
<?php
$dir = new DirectoryIterator($_SERVER['DOCUMENT_ROOT'] . "/assets/js");
2023-05-11 15:42:38 +03:00
foreach ($dir as $file) {
if ((!$file->isDot()) && str_ends_with($file, ".js") && $file != "jquery.js") {
echo '<script src="/assets/js/' . $file . '"></script>' . PHP_EOL . ' ';
}
} ?>
2023-05-11 15:36:22 +03:00
</body>
</html>