Reformated code

This commit is contained in:
WolverinDEV 2018-06-20 21:07:32 +02:00
parent 31d8b7a56c
commit 65e0eec1c5

View file

@ -2,19 +2,26 @@
$testXF = false; $testXF = false;
if(file_exists('auth.php')) if (file_exists('auth.php'))
include_once('auth.php'); include_once('auth.php');
else if(file_exists('auth/auth.php')) else if (file_exists('auth/auth.php'))
include_once('auth/auth.php'); include_once('auth/auth.php');
else { else {
//die("Could not resolve auth.php!"); //die("Could not resolve auth.php!");
function authPath() { return ""; } function authPath()
function redirectOnInvalidSession() {} {
$localhost = true; return "";
} }
if(!$localhost || $testXF){
function redirectOnInvalidSession()
{
}
$localhost = true;
}
if (!$localhost || $testXF) {
redirectOnInvalidSession(); redirectOnInvalidSession();
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
@ -38,29 +45,35 @@
<!-- localhost:63342/TeaSpeak-Web/index.php?_ijt=o48hmliefjoa8cer8v7mpl98pj&connect_default_host=192.168.43.141 --> <!-- localhost:63342/TeaSpeak-Web/index.php?_ijt=o48hmliefjoa8cer8v7mpl98pj&connect_default_host=192.168.43.141 -->
<x-properties id="properties"> <x-properties id="properties">
<!-- <x-property key="" value=""/> --> <!-- <x-property key="" value=""/> -->
<?php <?php
function spawnProperty($name, $value) { function spawnProperty($name, $value)
{
echo '<x-property key="' . $name . '" value="' . urlencode($value) . '"></x-property>'; echo '<x-property key="' . $name . '" value="' . urlencode($value) . '"></x-property>';
} }
spawnProperty('connect_default_host', $localhost ? "localhost" : "ts.TeaSpeak.de"); spawnProperty('connect_default_host', $localhost ? "localhost" : "ts.TeaSpeak.de");
spawnProperty('forum_user_data', $_COOKIE[$GLOBALS["COOKIE_NAME_USER_DATA"]]); spawnProperty('forum_user_data', $_COOKIE[$GLOBALS["COOKIE_NAME_USER_DATA"]]);
spawnProperty('forum_user_sign', $_COOKIE[$GLOBALS["COOKIE_NAME_USER_SIGN"]]); spawnProperty('forum_user_sign', $_COOKIE[$GLOBALS["COOKIE_NAME_USER_SIGN"]]);
?> ?>
</x-properties> </x-properties>
<!-- Global site tag (gtag.js) - Google Analytics --> <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-113151733-4"></script> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-113151733-4"></script>
<script> <script>
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date()); gtag('js', new Date());
gtag('config', 'UA-113151733-4'); gtag('config', 'UA-113151733-4');
</script> </script>
</head> </head>
<body> <body>
<!-- No javascript error --> <!-- No javascript error -->
<div style="display: block; position: fixed; top: 0px; bottom: 0px; left: 0px; right: 0px; background-color: gray; z-index: 1000; text-align: center;" class="no-js"> <div style="display: block; position: fixed; top: 0px; bottom: 0px; left: 0px; right: 0px; background-color: gray; z-index: 1000; text-align: center;"
class="no-js">
<div style="position: relative; display: inline-block; top: 30%"> <div style="position: relative; display: inline-block; top: 30%">
<img src="img/script.svg" height="128px"> <img src="img/script.svg" height="128px">
<h1>Please enable JavaScript</h1> <h1>Please enable JavaScript</h1>
@ -70,7 +83,7 @@
</div> </div>
<script type="text/javascript" class="no-js"> <script type="text/javascript" class="no-js">
let elements = document.getElementsByClassName("no-js"); let elements = document.getElementsByClassName("no-js");
while(elements.length > 0) //Removing these elements (even self) while (elements.length > 0) //Removing these elements (even self)
elements.item(0).remove(); elements.item(0).remove();
</script> </script>
@ -92,7 +105,8 @@
</div> </div>
<!-- Critical load error --> <!-- Critical load error -->
<div style="display: none; position: fixed; top: 0px; bottom: 0px; left: 0px; right: 0px; background-color: gray; z-index: 1000; text-align: center;" id="critical-load"> <div style="display: none; position: fixed; top: 0px; bottom: 0px; left: 0px; right: 0px; background-color: gray; z-index: 1000; text-align: center;"
id="critical-load">
<div style="position: relative; display: inline-block; top: 30%"> <div style="position: relative; display: inline-block; top: 30%">
<img src="img/script.svg" height="128px"> <img src="img/script.svg" height="128px">
<h1 style="color: red">Got some trouble while loading important files!</h1> <h1 style="color: red">Got some trouble while loading important files!</h1>
@ -104,26 +118,40 @@
TeaSpeak-Web<br> TeaSpeak-Web<br>
<div style="width: 100%; display: flex; justify-content: center"> <div style="width: 100%; display: flex; justify-content: center">
<div style="width: 1200px; height: 900px; display: flex; flex-direction: column; resize: both; margin: 20px"> <!-- Container --> <div style="width: 1200px; height: 900px; display: flex; flex-direction: column; resize: both; margin: 20px">
<div style="height: 45px; width: 100%; border-radius: 2px 0px 0px 0px; border-bottom-width: 0px; background-color: lightgrey" class="main_container"> <!-- Container -->
<div style="height: 45px; width: 100%; border-radius: 2px 0px 0px 0px; border-bottom-width: 0px; background-color: lightgrey"
class="main_container">
<div id="control_bar" class="control_bar"> <div id="control_bar" class="control_bar">
<div class="button btn_connect"><div class="icon_x32 client-connect"></div></div> <div class="button btn_connect">
<div class="icon_x32 client-connect"></div>
</div>
<!--<div class="button btn_disconnect"><div class="icon_x32 client-disconnect"></div></div>--> <!--<div class="button btn_disconnect"><div class="icon_x32 client-disconnect"></div></div>-->
<div style="border-left:2px solid gray;height: auto; margin-left: 5px; margin-right: 5px"></div> <div style="border-left:2px solid gray;height: auto; margin-left: 5px; margin-right: 5px"></div>
<div class="button btn_client_away"><div class="icon_x32 client-away"></div></div> <div class="button btn_client_away">
<div class="button btn_mute_input"><div class="icon_x32 client-input_muted"></div></div> <div class="icon_x32 client-away"></div>
<div class="button btn_mute_output"><div class="icon_x32 client-output_muted"></div></div> </div>
<div class="button btn_mute_input">
<div class="icon_x32 client-input_muted"></div>
</div>
<div class="button btn_mute_output">
<div class="icon_x32 client-output_muted"></div>
</div>
<div style="width: 100%"></div> <div style="width: 100%"></div>
<div class="button btn_open_settings"><div class="icon_x32 client-settings"></div></div> <div class="button btn_open_settings">
<div class="icon_x32 client-settings"></div>
</div>
</div> </div>
</div> </div>
<div style="flex-direction: row; height: 100%; width: 100%; display: flex"> <div style="flex-direction: row; height: 100%; width: 100%; display: flex">
<div style="width: 60%; flex-direction: column;"> <div style="width: 60%; flex-direction: column;">
<div style="height: 60%; border-radius: 0px 0px 0px 0px; border-right-width: 0px; overflow: auto; overflow-x: visible" class="main_container"> <div style="height: 60%; border-radius: 0px 0px 0px 0px; border-right-width: 0px; overflow: auto; overflow-x: visible"
class="main_container">
<div class="channelTree" id="channelTree"></div> <div class="channelTree" id="channelTree"></div>
</div> <!-- Channel tree --> </div> <!-- Channel tree -->
<div style="height: 40%; border-radius: 0px 0px 0px 2px; border-top-width: 0px; border-right-width: 0px;" class="main_container"> <div style="height: 40%; border-radius: 0px 0px 0px 2px; border-top-width: 0px; border-right-width: 0px;"
class="main_container">
<div id="chat"> <div id="chat">
<div class="messages"> <div class="messages">
<div class="message_box"></div> <div class="message_box"></div>
@ -157,7 +185,8 @@
<footer> <footer>
<div class="container"> <div class="container">
<div style="align-self: center;">TeaSpeak Web client by WolverinDEV</div> <div style="align-self: center;">TeaSpeak Web client by WolverinDEV</div>
<div style="align-self: center; position: fixed; right: 5px;"><a href="<?php echo authPath() . "auth.php?type=logout"; ?>">logout</a></div> <div style="align-self: center; position: fixed; right: 5px;"><a
href="<?php echo authPath() . "auth.php?type=logout"; ?>">logout</a></div>
</div> </div>
</footer> </footer>
</html> </html>