- deleted old stuff

- added sync script
- renamed php page
This commit is contained in:
2025-12-17 03:20:54 -06:00
parent 8fa8d22b41
commit 5828e9830e
29 changed files with 467 additions and 2327 deletions

View File

@@ -1,28 +0,0 @@
<html>
<head>
<title>iceyfox servers tos</title>
<meta data="soon to be finished" />
</head>
<body>
<p>note this is pretty much just a disclaimer as of right now for what information you give</p>
<h1>terms and conditions</h1>
<h2>information givien</h2>
<p>you agree that i (the user) are solely responsible for any and all information entered to iceyfox servers.
you agree that the information given can be viewed at anytime by anyone acessing x10host.com
(wither it be administrators or someone acessing the files illegaly),
witch is not limited to</p>
<li>passwords</li>
<li>usernames</li>
<li>any and all form data</li>
<p>simply put, do not give personal information that you would not trust to this site as it (the site) is
not complete</p>
<p>the site will ask for passwords, just use one you dont normally use</p><br>
<h2>bans and adminstrative action</h2>
<p>you agree that i (the user) can and will be banned by any administrators at anytime for any reason up to the
judgement of said adminstrator</p>
<p>to make a ban appeal emal me iceyfoxservers@gmail.com</p>
<br><br><p>pls no sue</p>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 KiB

View File

@@ -1,193 +0,0 @@
/*::-webkit-scrollbar {
width: 0px; /* Remove scrollbar space
background: transparent; /* Optional: just make scrollbar invisible
}*/
html{
font-size: 25px;
padding: 0px;
margin: 0px;
margin-left: 0px;
}
.side-bar-button{
user-select: none;
width: 50px;
}
.float-button{
position: fixed;
left: 20px;
top: 40%;
background-color: rgba(255,255,255,0.1);
}
.side-bar-button:hover{
background-color: rgb(200,200,200,0.5);
}
.main-wrap > .side-bar-button{
position: absolute;
left: 10px;
top: 550px;
}
.side-bar-button > svg{
width: inherit;
height: inherit;
}
#side_bar{
z-index: 3;
display: grid;
grid-template-columns: 1fr;
grid-auto-rows: min-content;
position: fixed;
width: 18%;
height: 100vh;
min-width: 280px;
opacity: 0;
top: 0px;
padding: 10px;
padding-right: 20px;
border-right: 2px solid black;
background-color: white;
overflow: scroll;
margin-bottom: 200px;
}
#side_bar > div{
padding: 10px;
position: relative;
text-align: center;
display: grid;
grid-template-columns: 1fr;
grid-auto-rows: min-content;
}
#side_bar > div:nth-child(1){
text-align: left;
}
#side_bar > div > div{
height: 30px;
}
#side_bar a{
font-size: 20px;
text-decoration: none;
color: black;
}
#side_bar > div > div:hover{
background-color: rgb(230,230,230);
}
.main-wrap{
margin: auto;
display: grid;
grid-template-columns: 1fr;
width: 95%;
justify-items: center;
justify-content: center;
}
.footer{
position: relative;
background-color: black;
color: white;
padding: 20px;
width: 100%;
}
.body{
display: grid;
grid-template-columns: 1fr;
width: 95vw;
padding: 0px;
min-height: 100vh;
justify-items: center;
margin-bottom: 100px;
}
#image_box{
position: relative;
overflow: hidden;
height: 500px;
width: 90%;
padding: 10px;
}
#image_box_container{
position: relative;
overflow-x: hidden;
white-space: nowrap;
height: 90%;
width: 100%;
padding-left: 10px;
padding-right: 10px;
}
#image_box_container > div{
overflow: hidden;
display: inline-block;
width: 98%;
height: 98%;
margin-right: 10px;
text-align: center;
vertical-align: middle;
}
#image_box_container > div > div{
height: 98%;
width: 95%;
display: flex;
margin: auto auto;
align-items: center;
justify-content: center;
}
#image_box_container img{
width: auto;
max-width: 100%;
max-height: 100%;
text-align: center;
}
.image-box-fader{
pointer-events: none;
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
background: linear-gradient(
to right,
white,
5%,
rgba(137,255,241,0) 50%,
95%,
white 100%
);
}
#image_box_arrow_left, #image_box_arrow_right{
z-index: 2;
position: absolute;
top: 50%;
}
#image_box_arrow_left{
left: 10px;
}
#image_box_arrow_right{
right: 10px;
}
.title-bar-wrap > div{
background-image: url("./img/index_banner.png");
/* Set a specific height */
padding: 150px 0;
min-height: 10px;
width: 100vw;
left: 0px;
font-size: 80px;
color: white;
text-shadow: 2px 2px 2px black;
/* Create the parallax scrolling effect */
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
text-align: center;
}

View File

@@ -1,315 +0,0 @@
<?php session_start(); ?>
<html>
<head>
<style>
html{
overflow: scroll;
overflow-x: hidden;
min-height: 100%;
position: relative;
background-color: rgb(30,30,30);
color: white;
}
::-webkit-scrollbar {
width: 0px; /* Remove scrollbar space */
background: transparent; /* Optional: just make scrollbar invisible */
}
code{
padding-left: 2px;
padding-right: 2px;
text-align: left;
}
.chat-box{
position: relative;
border: solid 4px black;
top: 0vh;
max-width: 60%;
height: 72vh;
overflow: scroll;
padding: 5px;
}
.autost{
color: white;
background-color: green;
padding: 4px;
}
.statusbox{
position: absolute;
border: solid 3px black;
padding: 5px;
top: 10%;
left: 2%;
font-size: 15px;
}
.hider{
position: absolute;
background-color: rgba(0,0,0,0.8);
width: 100%;
bottom: 0px;
top: 0px;
left: 0px;
display: none;
}
.pbox{
color: white;
width: 90%;
height: 60vh;
top: 30px;
left: 30px;
padding: 3%;
position: relative;
background-color: rgb(50,50,50);
overflow: scroll;
font-size: 20px;
}
.inner-chat-box{
font-size: 15px;
}
.inner-chat-box-pfp{
height: 50px;
width: 50px;
object-fit: cover;
border-radius: 50px;
}
.inner-chat-box-wrap{
position: relative;
bottom: 20;
}
.inner-chat-box-a{
text-decoration: none;
}
</style>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<?php
date_default_timezone_set('America/Los_Angeles');
$set_logout_status=true;
require_once("../login/login.php");
if($login_correct=="true"&&$_SESSION['username']!="guest"){
//set status
$statusf=simplexml_load_file("status.xml");
$file = fopen("status.xml","w");
$userexist=false;
for($i=0;$i<=count($statusf->user);$i++){
if($statusf->user[$i]==$_SESSION['username']){
$userexist=true;
break;
}
if($userexist==true){break;}
}
$i=0;
fwrite($file, '<?xml version="1.0" encoding="UTF-8"?>'."\n".'<status>'."\n");
$wrote=false;
foreach($statusf as $status){
if(($statusf->user[$i]==$_SESSION['username'])||($userexist==false)){
if($userexist==false){
fwrite($file, ' <user time="'.$statusf->user[$i]['time'].'">'.$statusf->user[$i]."</user>\n");
}
if($wrote==false){fwrite($file, ' <user time="'.date("n/j/Y/H:i").'">'.$_SESSION['username']."</user>\n"); $wrote=true;}
} else {
fwrite($file, ' <user time="'.$statusf->user[$i]['time'].'">'.$statusf->user[$i]."</user>\n");
}
$i++;
}
fwrite($file, '</status>');
fclose($file);
}
$xml=simplexml_load_file("../account_data/".$_SESSION['username'].".xml");
$ban="false";
for($i=count($xml->history->action);$i>=0;$i--){
if(($xml->history->action[$i]['page']=="simplychat")&&($xml->history->action[$i]['type']=="ban")){
$ban="true";
$reason=strval($xml->history->action[$i]);
break;
}
if($ban=="true"){break;}
}
?>
<title>welcome <?php echo $_SESSION['username']; ?></title>
<div align="center"><div id="error-message" style="display: none; text-align: center; background-color: red; width: 50%;"></div></div>
<script language="javascript" type="text/javascript">
if("<?php echo $_SESSION['errormsglogin']; ?>"!=""){
$("#error-message").css("display","block");
$("#error-message").html("<?php echo $_SESSION['errormsglogin']; ?>");
}
</script>
<div align="center"><div align="center" id="chat" class="chat-box"></div></div>
<a href="../index.html" style="text-decoration: none; color: white; size: 20px; border: 2px outset white; padding: 4px; position: absolute; top: 10px; left: 10px;">go home</a>
<br>
<form id="chatform" align="center" method="post" action="chatposter.php" target="_blank" >
<textarea autocomplete="off" type="text" name="text" id="text" style="height: 50px; width: 50%; background-color: rgb(30,30,30); color: white; font-size: 15;" ></textarea>
</form>
<div id="status" class="statusbox"></div>
<div align="center">
<input autocomplete="off" id="autost" class="autost" type="button" onclick="autos()" value="toggle autoscroll" />
<input autocomplete="off" class="autost" style="background-color: rgba(0,0,0,0);" type="button" onclick="show('rules')" value="show rules, commands, info" />
<input autocomplete="off" class="autost" style="background-color: rgba(0,0,0,0);" type="button" onclick="cleartext()" value="clear text" />
</div>
<div id="time" align="right" style="position: relative; float: right; width: 10vw; right:1vw; bottom: 3vh;"></div>
<audio controls id="hardr" style="width: 0%; height: 0%;"><source src="hardr.wav" type="audio/mpeg"></audio>
<div style="position: absolute; right:20px; top: 40px; padding: 10px;">
<a href="profile.php?username=<?php echo $_SESSION['username']; ?>" target="_blank">
<img style="width:70px; height: 70px; border-radius: 70px; object-fit: cover;" src="<?php echo $_SESSION['profilepicture']; ?>" alt="../account_data/guest.png"></img>
<div style="position: absolute; top: 30%; left: 7%; font-size: 15px; color: white; text-decoration: none; background-color: rgba(30,30,30,0.5);" align="center">logged in as<br><?php echo $_SESSION['username']; ?></div>
</a>
</div>
<script language="javascript" type="text/javascript">username="<?php echo $_SESSION['username']; ?>"</script>
<script src="../login/login.js" ></script>
<div id="rules" class="hider" onclick="hide('rules')"><div class="pbox" id="hidertext"></div></div>
<div id="errorbox" class="hider" onclick="hide('errorbox')"><div class="pbox" id="errorboxtext"></div></div>
<script language="javascript" type="text/javascript">
if('<?php echo $ban; ?>' == 'true') {
if(alert('you were banned by admin. reason: '+'<?php echo $reason; ?>')) {
window.location.replace("../index.html");
} else {
window.location.replace("../index.html");
}
throw new Error('This is not an error. This is just to abort javascript');
}
//toggle auto scroll
function autos(){
switch(autoscroll){
case true:
autoscroll=false;
$("#autost").css("background-color", "red");
break;
case false:
autoscroll=true
$("#autost").css("background-color", "green");
break;
}
}
//post rule commands based on perms
var pboxtext="because of my webhost TOS, NO 18+ CONTENT IS ALLOWED ON THIS CHAT<br>";
if('<?php for($i=0;$i<=count($xml->permissions->perm);$i++){ if($xml->permissions->perm[$i]=="permission.simplychat.clear"){ echo $xml->permissions->perm[$i]; }} ?>'=="permission.simplychat.clear"){
var pboxtext=pboxtext+
"/clear --clears chat<br>";
}
if('<?php for($i=0;$i<=count($xml->permissions->perm);$i++){ if($xml->permissions->perm[$i]=="permission.simplychat.mute"){ echo $xml->permissions->perm[$i]; }} ?>'=="permission.simplychat.mute"){
var pboxtext=pboxtext+
"/mute,user,time(m minutes,h hours,d days),reason --mutes the user with the set amount of time, example"
+" /mute,guest,1m,test<br>";
}
if('<?php for($i=0;$i<=count($xml->permissions->perm);$i++){ if($xml->permissions->perm[$i]=="permission.simplychat.ban"){ echo $xml->permissions->perm[$i]; }} ?>'=="permission.simplychat.ban"){
var pboxtext=pboxtext+
"/ban,user,reason --permanatly bans the user example /ban,guest,fwaggot<br>";
}
var pboxtext=pboxtext+'<br><br><a style="color: rgb(0,120,230);" target="blank" href="http://iceyfox.x10host.com/discord_rules.html">rules</a>'
$("#hidertext").html(pboxtext);
//hide and show
function show(data){
$("#"+data).css("display","block");
}
function hide(data){
$("#"+data).css("display","none");
}
//clear text
function cleartext(){
$("#text").val("");
}
//read the fucking file
var autoscroll=true;
chatget('chat');
chatget('status');
chatloader();
setInterval(chatloader,2000);
function chatget(mode){
if(mode=="chat"){
$.ajax({
type: "GET",
url: "chat.txt",
cache: false,
async: true,
success: function chatreturn(data){
$("#chat").html(data);
loadedchat=data;
}
});}
}
function chatloader(){
usaTime = new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles"});
usaTime = new Date(usaTime);
//read file
$.ajax({
type: "GET",
url: "chat.txt",
cache: false,
async: true,
success: function(data){
if(data!=loadedchat){
chatget('chat');
}
}
});
$.ajax({
type: "GET",
url: "status.xml",
cache: false,
async: true,
dataType: "xml",
success: function(xml){
str="";
datetime = (usaTime.getMonth()+1) + "/"
+ usaTime.getDate() + "/"
+ usaTime.getFullYear() + "/"
+ usaTime.getHours() + ":"
+ usaTime.getMinutes();
$(xml).find('user').each(function(index){
getTime=$(this).attr('time');
if((getTime.split(":")[0].split("/")[3] != usaTime.getHours())||((getTime.split("/")[0]+getTime.split("/")[1]+getTime.split("/")[2]) != (datetime.split("/")[0]+datetime.split("/")[1]+datetime.split("/")[2]))){
var status = "offline";
var statuscolor = "gray";
} else if((parseInt(getTime.split(":")[1])+3 < parseInt(usaTime.getMinutes()))||(parseInt(getTime.split(":")[0].split("/")[3]) != parseInt(datetime.split(":")[0].split("/")[3]) )){
var status = "away";
var statuscolor = "#E64C00";
} else {
var status = "online";
var statuscolor = "rgb(0,200,50)";
}
str=str+($(this).text()+' <code style="background-color: '+statuscolor+';">'+status+'</code><br>time: '+getTime+"<br><br>");
});
$("#time").html("pst "+datetime);
$("#status").html(str);
}
});
//rest of loop shit
if(autoscroll==true){
var elem = document.getElementById('chat');
elem.scrollTop = elem.scrollHeight;
}
}
//run the text cheak stuff
$("#text").keyup(function(event) {
if (event.keyCode === 13 && !event.shiftKey) {
$("#text").val($("#text").val().slice(0,-1));
runtext();
}
});
function runtext(){
if(($("#text").val().toLowerCase().includes("nigger"))==true){
document.getElementById('hardr').play();
return false;
} else if($("#text").val().length>2000){
show('errorbox');
$("#errorboxtext").html("your text can not be greater than 2000 characters<br>"+'<input autocomplete="off" class="autost" style="background-color: rgba(0,0,0,0);" type="button" onclick="cleartext()" value="clear text?" />');
return false;
} else {
$("#chatform").submit();
}
$("#text").val('');
}
</script>
<?php $_SESSION['errormsglogin']=""; ?>
</body>
</html>

View File

@@ -1,3 +0,0 @@
<div style="font-size: 20; color: lightblue; text-decoration: underline;">Welcome To Simply Chatty</div><br><br><br><br>

View File

@@ -1,147 +0,0 @@
<html>
<body>
<?php
session_start();
date_default_timezone_set("America/Los_Angeles");
//set status
if($_SESSION['username']!="guest"){
$statusf=simplexml_load_file("status.xml");
$file = fopen("status.xml","w");
$userexist=false;
for($i=0;$i<=count($statusf->user);$i++){
if($statusf->user[$i]==$_SESSION['username']){
$userexist=true;
break;
}
if($userexist==true){break;}
}
$i=0;
fwrite($file, '<?xml version="1.0" encoding="UTF-8"?>'."\n".'<status>'."\n");
$wrote=false;
foreach($statusf as $status){
if(($statusf->user[$i]==$_SESSION['username'])||($userexist==false)){
if($userexist==false){
fwrite($file, ' <user time="'.$statusf->user[$i]['time'].'">'.$statusf->user[$i]."</user>\n");
}
if($wrote==false){fwrite($file, ' <user time="'.date("n/j/Y/H:i").'">'.$_SESSION['username']."</user>\n"); $wrote=true;}
} else {
fwrite($file, ' <user time="'.$statusf->user[$i]['time'].'">'.$statusf->user[$i]."</user>\n");
}
$i++;
}
fwrite($file, '</status>');
fclose($file);
}
//get users color
if($_SESSION['username']!="guest"){
$userxml=simplexml_load_file("../account_data/".$_SESSION['username'].".xml");
$color=$userxml->color;
} else {
$color="#ffffff";
}
//read file
$get_chat_file=file_get_contents("chat.txt");
//manage text eg image parsing and link parsing ect
$usertext=str_replace(array("<",">"),"",$_POST['text']);
$usertext_split=explode(" ",$usertext);
$usertext="";
foreach($usertext_split as $text){
if(substr($text,0,29)=="https://www.youtube.com/watch"){
$text='
<iframe width="500" height="300" src="https://www.youtube.com/embed/'.explode("&",explode("=",$text)[1])[0].'"></iframe>
';
}
elseif(substr($text,0,4)=="http"||substr($text,0,5)=="https"){
if(strpos($text,".jpg")||strpos($text,".png")||strpos($text,".gif")){
$text='
<a href="'.$text.'" target="_BLANK"><img width="500px" src="'.$text.'"></img></a>
';
} else {
$text='<a href="'.$text.'" target="_BLANK">'.$text.'</a>';
}
}
if($text=="nigger"){
$text="ERROR. N**** TRIED TO BYPASS";
}
$usertext=$usertext.$text." ";
}
//tags
$tags="";
if($_SESSION['username']=="iceyrazor"){
$tags=$tags.'<code style="color: white; background-color: rgba(0,50,200,0.4); padding-left: 4px; padding-right: 4px;">site owner</code>';
}
$chatfile=fopen("chat.txt","w");
$chat_file_send_content=$get_chat_file.'
<div class="inner-chat-box">
<a class="inner-chat-box-a" href="profile.php?username='.$_SESSION['username'].'" target="_blank">
<img class="inner-chat-box-pfp" src="'.$_SESSION['profilepicture'].'" />
</a>
<code class="inner-chat-box-wrap">
'.$tags.'
<code style="color: '.$color.';">'.$_SESSION['username'].'</code>:
<code style="padding-left: 5px; white-space: pre-line;"> '.$usertext.'</code>
</code>
</div>
<br>
';
//cheak perms and run commands
$bot_tag='<code style="color: white; background-color: rgba(0,50,200,0.4); padding-left: 4px; padding-right: 4px;">site bot</code>';
$perm_clear=false;
$perm_mute_guest=false;
$perm_mute=false;
$perm_lock_chat=false;
$perm_bypass_lock=false;
foreach($userxml->permissions->perm as $perm){
if($perm=="simplychatty.clear"){ $perm_clear=true; };
if($perm=="simplychatty.mute-guest"){ $perm_mute_guest=true; };
if($perm=="simplychatty.mute"){ $perm_mute=true; };
if($perm=="simplychatty.lock-chat"){ $perm_lock_chat=true; };
if($perm=="simplychatty.bypass-lock"){ $perm_bypass_lock=true; };
}
if($perm_clear==true&$usertext=="/clear "){
$chat_file_send_content='
<div style="font-size: 20; color: lightblue; text-decoration: underline;">
Welcome To Simply Chatty
</div><br><br><br><br>';
}
$chatstat=file_get_contents("chatstat.txt");
if($perm_lock_chat==true&$usertext=="/lock chat "){
$file_chatstat=fopen("chatstat.txt","w");
if($chatstat=="locked"){
$chat_file_send_content=$get_chat_file.'<div class="inner-chat-box">'.$bot_tag." ".
$_SESSION['username'].' unlocked the chat </div><br>';
fwrite($file_chatstat,"unlocked");
} else {
$chat_file_send_content=$get_chat_file.'<div class="inner-chat-box">'.$bot_tag." ".
$_SESSION['username'].' locked the chat </div><br>';
fwrite($file_chatstat,"locked");
}
fclose($file_chatstat);
}
if($perm_bypass_lock==false&$chatstat=="locked"){
$chat_file_send_content=$get_chat_file."";
}
if(false==true){
//unfinished mute
$chat_file_send_content=$get_chat_file.'<div class="inner-chat-box">'.$bot_tag." ".
$_SESSION['username']." muted ".$usertext_split[1].'</div><br>';
}
//
fwrite($chatfile,$chat_file_send_content);
fclose($chatfile);
?>
<script language="javascript" type="text/javascript">window.close();</script>
</body>
</html>

Binary file not shown.

View File

@@ -1,213 +0,0 @@
<?php session_start(); ?>
<html>
<head>
<title><?php echo $_GET['username']; ?> profile</title>
<style>
html{
background-color: rgb(30,30,30);
color: white;
}
::-webkit-scrollbar {
width: 0px; /* Remove scrollbar space */
background: transparent; /* Optional: just make scrollbar invisible */
}
.editb, .saveb{
display: none;
font-size: 20px;
}
.saveb{
position: absolute;
top: 0px;
left: 60px;
}
.edituserform input{
font-size: 20px;
padding: 5px;
background-color: rgb(30,30,30);
color: white;
border: inset 2px white;
width: 50%;
}
.color{
width: 40px;
height: 40px;
border: none;
}
td{
border: solid 2px white;
padding: 5px;
font-size: 25px;
}
.notibox{
background-color: rgb(0,120,0);
padding: 5px;
display: none;
}
</style>
</head>
<body>
<?php
require_once("../../mysql_connect.php");
$password=$_SESSION['password'];
if($_SESSION['username']!="guest"){
$stmt=$dbc->prepare("select username,password from ".$dbc_ver_accounts." where username=?");
$stmt->execute([$_SESSION['username']]);
$getuser=$stmt->fetch();
if($getuser[0]==$_SESSION['username']){
if(password_verify($_SESSION['password'],$getuser[1])){
$pass="pass";
}
}
}
if($_GET['username']=="guest"){
$pass="guest";
} else {
$stmt=$dbc->prepare("select username,discord,email from ".$dbc_ver_accounts." where username=?");
$stmt->execute([$_GET['username']]);
$getuser=$stmt->fetch();
$get_username=$getuser[0];
$get_discord=$getuser[1];
$get_email=$getuser[2];
if(file_exists("../account_data/".$_GET['username'].".xml")){
$xml=simplexml_load_file("../account_data/".$_GET['username'].".xml");
} else {
$pass="not exist";
}
if(file_exists("../account_data/".$_GET['username'].".png")){
$user_pfp="../account_data/".$_GET['username'].".png";
} elseif(file_exists("../account_data/".$_GET['username'].".jpg")){
$user_pfp="../account_data/".$_GET['username'].".jpg";
} elseif(file_exists("../account_data/".$_GET['username'].".gif")){
$user_pfp="../account_data/".$_GET['username'].".gif";
} else {
$user_pfp="../account_data/guest.png";
}
}
//get history
for($i=0;$i<count($xml->history->action);$i++){
$gethistory[$i][0]=strval($xml->history->action[$i]);
$gethistory[$i][1]=strval($xml->history->action['page'][$i]);
$gethistory[$i][2]=strval($xml->history->action['type'][$i]);
$gethistory[$i][3]=strval($xml->history->action['datetime'][$i]);
$gethistory[$i][4]=strval($xml->history->action['attime'][$i]);
}
?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<!--run cheak-->
<script language="javascript" type="text/javascript">
if("<?php echo $pass; ?>"=="guest"){
if(alert('guest can not view/edit profiles')) {
window.close();
} else {
window.close();
}
throw new Error('This is not an error. This is just to abort javascript');
}
if("<?php echo $pass; ?>"=="not exist"){
if(alert('user does not exist')) {
window.close();
} else {
window.close();
}
window.close();
throw new Error('This is not an error. This is just to abort javascript');
}
</script>
<!--shown page-->
<div id="notibox" class="notibox" align="center"></div>
<div style="padding: 20px; position: absolute; left: 15%; border: solid 2px black; width: 70vw; height: 70vh;">
<div style="position: absolute;">
<img onmouseover="show('editprofilebox')" style="height: 100px; width: 100px; object-fit: cover; border-radius: 100px;" src="<?php echo $user_pfp; ?>"></img>
<div onmouseout="hide('editprofilebox')" style="display: none; position: absolute; top: 0px; bottom: 0px; right: 0px; left: 0px; border-radius: 100px; background-color: rgba(0,0,0,0.6);" id="editprofilebox">
<form style="position: absolute; top: 30px; left: 10px;" action="profile_update.php" method="post" enctype="multipart/form-data" target="_blank" onsubmit="setTimeout(() => { location.reload(); }, 1000);">
<input autocomplete="off" type="file" name="pfp_picture" /><br>
<input autocomplete="off" type="submit" name="pfp_change" value="change" /><br>
</form>
</div>
</div>
<div class="edituserform" style="position: absolute; left: 140px; padding: 4px; font-size: 25px; right: 10px">
<div style="padding: 5px;">username: <span id="username"><?php echo $get_username; ?></span></div>
<div style="padding: 5px;">discord: <span id="discord"><?php echo $get_discord ?></span></div>
<div style="padding: 5px;">email: <span id="email"><?php echo $get_email ?></span></div>
<div style="padding: 5px;">color:
<span id="color"><span style="padding: 3px"></span><span style="padding: 10px; padding-top: 1px; padding-bottom: 1px; background-color: <?php echo $xml->color; ?>;"></span> </span></div>
</div>
<div align="Center" style="position: absolute; padding: 5px; max-height: 30%; overflow: scroll; bottom: 50px; left: 23%; right: 23%; border: solid 2px white;">
history<br>
<p>m=minute, h=hour, d=day</p>
<table align="Center">
<tr style="background-color: rgb(180,20,0);">
<td>page</td><td>date</td><td>type</td><td>for</td><td>reason</td></tr>
<script language="javascript" type="text/javascript">
var gethistory=JSON.parse('<?php echo json_encode($gethistory); ?>');
for(var i=0; i<=(gethistory.length)-1; i++){
document.write("<td>"+gethistory[i][1]+"</td>");
document.write("<td>"+gethistory[i][3]+"</td>");
document.write("<td>"+gethistory[i][2]+"</td>");
document.write("<td>"+gethistory[i][4]+"</td>");
document.write("<td>"+gethistory[i][0]+"</td>");
document.write("</tr>");
}
</script>
</table>
</div>
<div style="position: absolute; bottom: 10px; left: 43%;" align="center">
<button class="editb" id="editbutton" onclick="editm()" >edit</button>
<button class="saveb" id="savebutton" onclick="save()" >save</button>
</div>
</div>
<!--hidden form-->
<form style="display: none" id="editform" action="poster.php" method="get" target="_blank">
<input autocomplete="off" type="hidden" name="doing" value="edituser" />
<input autocomplete="off" type="hidden" name="discord" id="discordF" />
<input autocomplete="off" type="hidden" name="email" id="emailF" />
<input autocomplete="off" type="hidden" name="color" id="colorF" />
</form>
<!--functions and shit-->
<script language="javascript" type="text/javascript">
//notification
if("<?php echo $_SESSION['message']; ?>"=="file uploaded"){
$("#notibox").html("profile changed!");
$("#notibox").css("display","block");
setTimeout(function(){ $("#notibox").css("display","none"); },4000)
} else if("<?php echo $_SESSION['message']; ?>"!=""){
$("#notibox").html("<?php echo $_SESSION['message'] ?>");
$("#notibox").css("background-color","rgb(180,0,0)");
$("#notibox").css("display","block");
}
//functions
if("<?php echo $pass; ?>"=="null"){
$("#editbutton").css("display","block");
}
function editm(){
$("#savebutton").css("display","block");
$("#discord").html('<input autocomplete="off" type="text" id="discordi" value="<?php echo $xml->discord; ?>" />');
$("#email").html('<input autocomplete="off" type="email" id="emaili" value="<?php echo $xml->email; ?>" />');
$("#color").html('<input class="color" autocomplete="off" type="color" id="colori" value="<?php echo $xml->color; ?>"/>');
}
function save(){
$("#discordF").val($("#discordi").val());
$("#emailF").val($("#emaili").val());
$("#colorF").val($("#colori").val());
$("#editform").submit();
setTimeout(() => { location.reload(); }, 500);
}
function show(idd){
if((idd=="editprofilebox")){
if(("<?php echo $pass; ?>"!="!edit")){
$("#"+idd).css("display","block");
}
} else {
$("#"+idd).css("display","block");
}
}
function hide(idd){
$("#"+idd).css("display","none");
}
</script>
<?php $_SESSION['message']=""; ?>
</body>
</html>

View File

@@ -1,33 +0,0 @@
<html>
<body>
<?php
session_start();
require_once("../login/login.php");
if($login_correct=="true"){
if(isset($_POST['pfp_change'])){
$file_type = strtolower(pathinfo($_FILES["pfp_picture"]["name"],PATHINFO_EXTENSION));
if($file_type=="png"||$file_type=="jpg"||$file_type=="gif"){
if($_FILES["pfp_picture"]["size"] < 3000000){
unlink("../account_data/".$_SESSION['username'].".png");
unlink("../account_data/".$_SESSION['username'].".jpg");
unlink("../account_data/".$_SESSION['username'].".gif");
if(move_uploaded_file($_FILES["pfp_picture"]["tmp_name"], "../account_data/".$_SESSION['username'].".".$file_type)) {
$_SESSION['message']="file uploaded";
} else {
$_SESSION['message']="there was a error uploading your file";
}
} else {
$_SESSION['message']="file is too big, must be less than 5mb";
}
} else {
$_SESSION['message']="file is not a image or gif, try again";
}
}
} else {
echo $_SESSION['message']="error. you cant edit a profile that isn't yours. nice try";
}
?>
<script language="javascript" type="text/javascript">window.close();</script>
</body>
</html>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<status>
<user time="offline">iceyrazor</user>
</status>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 KiB

View File

@@ -1,11 +0,0 @@
{
"todo":[
{"name":"wheezebob","words":"wheezer","color":"undefined",
"status":"inactive","comments":"need to define color","issue_date":"8/29/2023"}
],
"done":[
{"name":"iceyrazor","words":"SWD","color":"pink",
"comments":"public buyable map 2777B","issue_date":"8/31/2023","finished_date":"8/31/2023"}
]
}

View File

@@ -1,105 +0,0 @@
<html>
<head>
<title>dmu map queue</title>
<style>
html{
background-color: #000000;
color: #ffffff;
background: url('dmu map queue.png');
background-size: cover;
background-position: center center;
background-attachment: fixed;
}
.main-wrap{
background-color: #111111f0;
width: 80%;
min-height: 800px;
}
a{
color: #007fff;
}
p, td, a{
font-size: 20px;
}
td{
border: 2px solid white;
padding: 5px;
}
.warn{
color: #efef00;
}
</style>
</head>
<body>
<div align="center">
<div class="main-wrap">
<a href="http://iceyfox.x10host.com/" target="_BLANK">main page</a>
<br><br>
<p class="warn">this site updates by itself. do not spam refresh!</p>
<p>this shows what orders are in queue</p>
<br><br><br>
<h1>in queue</h1>
<table id="todo_queue"></table>
<br><br>
<h1>done maps</h1>
<table id="done_list"></table>
</div>
</div>
<script language="javascript">
function fetch_loop(){
fetch('map_queue.json')
.then(response => response.json())
.then(res=>{
update_list(res);
});
setTimeout(fetch_loop,3000);
}
fetch_loop();
function update_list(res){
let str="<tr><td>username</td><td>word(s)</td><td>color</td><td>status</td><td>comments</td><td>date</td></tr>"
res.todo.forEach(item=>{
let Scolor= item.status=="active" ? "#00ff5f" : "#d03f00";
console.log(item);
str+="<tr><td>"+item.name
+"</td><td>"+item.words
+"</td><td>"+item.color
+"</td><td style=\"color:"+Scolor+";\">"+item.status
+"</td><td>"+item.comments
+"</td><td>"+item.issue_date
+"</td></tr>"
});
todo_queue.innerHTML=str
str="<tr><td>username</td><td>word(s)</td><td>color</td><td>comments</td><td>issued date</td><td>finished date</td></tr>"
res.done.forEach(item=>{
console.log(item);
str+="<tr><td>"+item.name
+"</td><td>"+item.words
+"</td><td>"+item.color
+"</td><td>"+item.comments
+"</td><td>"+item.issue_date
+"</td><td>"+item.finished_date
+"</td></tr>"
});
done_list.innerHTML=str
}
</script>
</body>
</html>

View File

@@ -1,103 +0,0 @@
<html>
<head>
<title>iceyfox servers</title>
<style>
::-webkit-scrollbar {
width: 0px; /* Remove scrollbar space */
background: transparent; /* Optional: just make scrollbar invisible */
}
body{
background-image: url('assets/img/index.jpg');
background-attachment: fixed;
background-size: cover;
}
.spacer{
padding-top: 30px;
}
.header, .body, .footer{
font-size: 20px;
width: 96%;
border: 2px solid black;
background-color: rgba(250,250,250,0.3);
padding: 20px;
}
.header{
color: white;
text-shadow: 2px 2px 2px black;
padding: 0px;
width: 98%;
}
.body{
border-radius: 20px;
}
.footer{
background-color: rgba(100,100,100,0.4);
color: white;
}
.nav-bar{
font-size: 20px;
color: white;
background-color: rgba(0,120,200,0.2);
width: 100%;
}
.nav-bar td{
padding-left: 4px;
padding-right: 4px;
}
.nav-bar a{
text-decoration: none;
color: white;
}
.nav-link:hover{
background-color: rgba(0,40,200,0.2);
}
</style>
</head>
<body>
<div align="center">
<div align="center" class="header">
<h1>the ice box</h1>
<div align="left">
<table class="nav-bar">
<tr>
<td>social</td>
<td class="nav-link"><a target="_BLANK" href="https://www.twitch.tv/iceyrazor">twitch</a></td>
<td class="nav-link"><a target="_BLANK" href="https://www.youtube.com/channel/UCOBfHd00-1HBu8bwXV63OSw">youtube</a></td>
<tr>
<td>rule pages:</td>
<td class="nav-link"><a target="_BLANK" href="discord_rules.html">discord rules</a></td>
<td class="nav-link"><a target="_BLANK" href="gmod.html">gmod rules</a></td>
<td class="nav-link"><a target="_BLANK" href="spaceengineers.html">space engineers rules</a></td>
<td class="nav-link"><a target="_BLANK" href="minecraft.html">minecraft rules</a></td>
<td class="nav-link"><a target="_BLANK" href="arma3.html">arma 3 rules</a></td>
</tr>
<tr>
<td>scripts</td>
<td class="nav-link"><a href="/chat/chat.php">simply chaty, my chat box</a></td>
<td class="nav-link"><a href="/tardisproject/tardis.php">tardis project</a></td>
</tr>
</table>
</div>
</div>
<div class="spacer"></div>
<div align="left" class="body">
<p>if you have any ideas, feel free to contact me at the gmail below. (dont spam my gmail or leave stupid s*** there)</p>
<iframe src="https://discordapp.com/widget?id=367256647254540299&theme=dark" align="center" width="350" height="500" allowtransparency="true" frameborder="0"></iframe>
<p>if button doesn't work here ya go (copy and paste): <a href="https://discord.gg/6bSre9V">https://discord.gg/6bSre9V</a></p>
</div>
<div class="spacer"></div>
<div align="center" class="footer">
<p align="center">made by the foxy animator 2018-2019</p>
<p align="center">contact me at: iceyfoxservers@gmail.com, or over discord</p>
<p align="center">this site is completely scripted from scratch. no web creators are used</p>
<p align="center">i didn't make the background image i googled it :3</p>
</div>
</div>
</body>
</html>

View File

@@ -1,84 +0,0 @@
<html>
<head>
<link rel="stylesheet" href="assets/indexold2.css?ver=21" />
</head>
<body>
<div id="side_bar">
<div class="side-bar-button" onClick="close_sb()">
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"/>
</svg>
</div>
<div>
<h2>social media</h2>
<div><a target="_BLANK" href="https://github.com/iceyrazor">github</a></div>
<div><a target="_BLANK" href="https://www.youtube.com/channel/UCOBfHd00-1HBu8bwXV63OSw">youtube</a></div>
<div><a target="_BLANK" href="https://www.twitch.tv/iceyrazor">twitch</a></div>
</div>
<div>
<h2>rule pages</h2>
<div><a target="_BLANK" href="discord_rules.html">discord rules</a></div>
<div><a target="_BLANK" href="gmod.html">gmod rules</a></div>
<div><a target="_BLANK" href="spaceengineers.html">space engineers rules</a></div>
<div><a target="_BLANK" href="minecraft.html">minecraft rules</a></div>
<div><a target="_BLANK" href="arma3.html">arma 3 rules</a></div>
</div>
<div>
<h2>scripts</h2>
<div><a href="/chat/chat.php">simply chaty, my chat box</a></div>
<div><a href="/tardisproject/tardis.php">tardis project</a></div>
</div>
<div>
<div style="height: 501px;"><iframe src="https://discordapp.com/widget?id=367256647254540299&theme=dark" align="center" width="260" height="500" allowtransparency="true" frameborder="0"></iframe></div>
<br><br>
discord:
<div><a href="https://discord.gg/6bSre9V">https://discord.gg/6bSre9V</a></div>
</div>
</div>
<div class="main-wrap">
<div class="title-bar-wrap">
<div>iceyrazor's.... thing</div>
</div>
<div class="body">
<h1>about me</h1>
<p>Im just a guy intrested in 3d modeling, and coding</p>
<p>I do the above, 3d modeling, as well as CGI, Javascript, Nodejs, a bit of C#, and
beginning with webdesign. (as you can tell XD)</p>
<p>And im working with linux, debian</p>
<h1>Some art i have made</h1>
<div id="image_box">
<div id="image_box_container"></div>
<span id="image_box_arrow_left" onClick="move_image_box('-')">
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" fill="currentColor" class="bi bi-arrow-left-circle" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-4.5-.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H11.5z"/>
</svg>
</span>
<span id="image_box_arrow_right" onClick="move_image_box('+')">
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" fill="currentColor" class="bi bi-arrow-right-circle" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z"/>
</svg>
</span>
<span class="image-box-fader" />
</div>
<a target="_BLANK" href="full_art.html">see more art</a>
</div>
<div class="footer" align="center">
<p>made by iceyrazor 2018-2022</p>
<p>contact me at: iceyfoxservers@gmail.com, or over discord</p>
<p>this site is completely scripted from scratch. no web creators are used</p>
</div>
</div>
<div class="side-bar-button float-button" onClick="open_sb()">
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"/>
</svg>
</div>
<script src="assets/index.js"></script>
</body>
</html>

View File

@@ -1,45 +0,0 @@
/*<div style="position: absolute; top: 10px; right: 20px; background-color: white;" align="right">
<button id="loginbutton" onclick="hidetoggle('loginbox')" style="border: solid 2px white; color: black; padding:4px;" >
login/signup ▼</button>
<div id="loginbox" style="display: none; padding: 4px;"><form method="post" action="">
<input autocomplete="off" type="text" name="username" /><br><br>
<input autocomplete="off" type="password" name="password" /><br><br>
<div align="left">
<input autocomplete="off" type="submit" value="login" />
<span style="padding-left: 20px" />
<a href="../register/register.php" style="text-decoration: none; border: solid 1px gray; border-radius: 1px; padding-bottom: 2px; padding-left: 5px; padding-right: 5px; color: black;">register</a>
</div>
</form></div>
</div>*/
//removed until database is fixed
/*document.write('<div style="position: absolute; top: 10px; right: 20px; background-color: white;" align="right">'+
'<button id="loginbutton" '+"onclick=\"hidetoggle('loginbox')\""+' style="border: solid 2px white; color: black; padding:4px;" >'+
'login/signup ▼</button>'+
'<div id="loginbox" style="display: none; padding: 4px;"><form method="post" action="">'+
'<input autocomplete="off" type="text" name="username" /><br><br>'+
'<input autocomplete="off" type="password" name="password" /><br><br>'+
'<div align="left">'+
'<input autocomplete="off" type="submit" value="login" />'+
'<span style="padding-left: 20px" />'+
'<a href="../register/register.php" style="text-decoration: none; border: solid 1px gray; border-radius: 1px; padding-bottom: 2px; padding-left: 5px; padding-right: 5px; color: black;">register</a>'+
'</div></form></div></div>');*/
loginboxtext='<form method="post" action="">'+
'<input autocomplete="off" type="hidden" name="logout" value="true" /><br>'+
'<div align="center">'+
'<input autocomplete="off" type="submit" name="logout" value="logout" />'+
'</div></form></div>';
if(username!="guest"){
$("#loginbox").html(loginboxtext);
$("#loginbutton").html("logout ▼");
}
function hidetoggle(data){
if($("#"+data).css("display")=="none"){
$("#"+data).css("display","block");
} else {
$("#"+data).css("display","none");
}
}

View File

@@ -1,86 +0,0 @@
<?php
//require_once("../../mysql_connect.php");
$_SESSION['username']="guest";
$_SESSION['password']="password";
$_SESSION['profilepicture']="../account_data/guest.png";
/*if(isset($_POST['logout'])){
if($set_logout_status==true){
if($_SESSION['username']!="guest"){
$statusf=simplexml_load_file("status.xml");
$file = fopen("status.xml","w");
$userexist=false;
for($i=0;$i<=count($statusf->user);$i++){
if($statusf->user[$i]==$_SESSION['username']){
$userexist=true;
break;
}
if($userexist==true){break;}
}
$i=0;
fwrite($file, '<?xml version="1.0" encoding="UTF-8"?>'."\n".'<status>'."\n");
$wrote=false;
foreach($statusf as $status){
if(($statusf->user[$i]==$_SESSION['username'])||($userexist==false)){
if($userexist==false){
fwrite($file, ' <user time="'.$statusf->user[$i]['time'].'">'.$statusf->user[$i]."</user>\n");
}
if($wrote==false){fwrite($file, ' <user time="offline">'.$_SESSION['username']."</user>\n"); $wrote=true;}
} else {
fwrite($file, ' <user time="'.$statusf->user[$i]['time'].'">'.$statusf->user[$i]."</user>\n");
}
$i++;
}
fwrite($file, '</status>');
fclose($file);
}
}
$_SESSION['username']="";
$_SESSION['password']="";
}
if($_SESSION['username']==""||$_SESSION['username']=="guest"){
if($_POST['username']==""){
$_SESSION['username']="guest";
$_SESSION['password']="password";
} else {
$_SESSION['username']=$_POST['username'];
$_SESSION['password']=$_POST['password'];
}
}
$_POST['username']="";
$_POST['password']="";
if($_SESSION['username']!="guest"){
$stmt=$dbc->prepare("select username,password from ".$dbc_ver_accounts." where username=?");
$stmt->execute([$_SESSION['username']]);
$getuser=$stmt->fetch();
if($getuser[0]==$_SESSION['username']){
if(password_verify($_SESSION['password'],$getuser[1])){
$login_correct="true";
} else {
$_SESSION['username']="guest";
$_SESSION['password']="password";
$_SESSION['errormsglogin']="login info is incorrect";
$login_correct="false";
}
} else {
$_SESSION['username']="guest";
$_SESSION['password']="password";
$_SESSION['errormsglogin']="login info is incorrect";
$login_correct="false";
}
}
$stmt=null;
$getuser=null;
if(file_exists("../account_data/".$_SESSION['username'].".png")){
$_SESSION['profilepicture']="../account_data/".$_SESSION['username'].".png";
} elseif(file_exists("../account_data/".$_SESSION['username'].".jpg")){
$_SESSION['profilepicture']="../account_data/".$_SESSION['username'].".jpg";
} elseif(file_exists("../account_data/".$_SESSION['username'].".gif")){
$_SESSION['profilepicture']="../account_data/".$_SESSION['username'].".gif";
} else {
$_SESSION['profilepicture']="../account_data/guest.png";
}*/
?>

View File

@@ -1,18 +0,0 @@
<html>
<body>
<?php
$json = file_get_contents('php://input');
$json= str_replace(["<",">"], "", $json);
$data = json_decode($json);
if($data->pass=="ejhwkreyhu82eyhuv8ebnjkelwhj3k"){
unset($data->pass);
$data->mods[0]=str_replace("<", "",$data->mods[0]);
$data->mods[0]=str_replace(">", "",$data->mods[0]);
file_put_contents("minecraft_mod_list.json", json_encode($data));
} else {
echo "pass incorrect";
}
?>
</body>
<script language="javascript" type="text/javascript">window.close();</script>
</html>

View File

@@ -1,18 +0,0 @@
<html>
<head>
<style>
html, input{
font-size: 25px;
background-color: rgb(30,30,30);
color: white;
}
</style>
</head>
<body>
<form method="post" action="manage.php">
<input type="text" name="username" value="username" />
<input type="password" name="password" value="password" />
<input type="submit" value="login" />
</form>
</body>
</html>

View File

@@ -1,104 +0,0 @@
<?php session_start(); ?>
<html>
<head>
<style>
html, input{
font-size: 25px;
background-color: rgb(30,30,30);
color: white;
}
table, td{
border: solid 2px white;
font-size: 25px;
}
td{
padding: 4px;
padding-top: 1px;
padding-bottom: 1px;
}
.button{
padding: 0px;
width: 30px;
height: 35px;
}
</style>
</head>
<body>
<?php
require_once("../../mysql_connect.php");
$username=$_POST['username'];
$password=$_POST['password'];
$userc="true";
if($username!="iceyrazor"){
$userc="false";
} else {
$stmt = $dbc->prepare("select * from accounts where username=?");
$stmt->execute([$username]);
$getpass=$stmt->fetch()['password'];
if(password_verify($password,$getpass)){
$passwordc="true";
} else {
$passwordc="false";
}
}
$stmt = $dbc->query("select username,discord,email from unver_accounts");
$getusername=array();
$getdiscord=array();
$i=0;
while($row = $stmt->fetch()){
$getusername[$i]=$row['username'];
$getdiscord[$i]=$row['discord'];
$i++;
}
$dbc=null;
?>
<script language="javascript">
if('<?php echo $userc; ?>' == "false"){
if(alert('only the owner has permission to use this page')) {
window.location.replace("loginM.php");
} else {
window.location.replace("loginM.php");
}
throw new Error('This is not an error. This is just to abort javascript');
}
if('<?php echo $passwordc; ?>' == "false"){
if(alert('password is incorrect')) {
window.location.replace("loginM.php");
} else {
window.location.replace("loginM.php");
}
throw new Error('This is not an error. This is just to abort javascript');
}
</script>
<div align="center"><table><tr style="background-color: rgb(0,50,120);"><td>user</td><td>discord</td></tr>
<form target="_blank" align="center" method="post" action="poster.php" onsubmit="prefresh()">
<script language="javascript" type="text/javascript">
var uname=JSON.parse('<?php echo json_encode($getusername) ?>');
var discord=JSON.parse('<?php echo json_encode($getdiscord); ?>');
for(i=0;i<uname.length;i++){
document.write("<tr>");
document.write("<td>"+uname[i]+"</td>");
document.write("<td>"+discord[i]+"</td>");
document.write('<td><input autocomplete="off" type="radio" name="user" value="'+uname[i]+'" /></td>');
document.write("</tr>");
}
</script>
</table></div><br>
<div align="center">
action: <select autocomplete="off" name="action">
<option autocomplete="off" value="accept">accept</option>
<option autocomplete="off"value="deny">deny</option>
</select><br><br>
<input autocomplete="off" type="text" name="reason" value="reason" /><br><br>
<input autocomplete="off" type="submit" name="manageconfirm" value="confirm" />
</div></form>
<script language="javascript">
function prefresh(){
setTimeout(() => { location.reload(); }, 1000);
}
</script>
</body>
</html>

View File

@@ -1,83 +0,0 @@
<html>
<head>
<?php session_start(); ?>
</head>
<body>
<?php
require_once("../../mysql_connect.php");
if(isset($_POST['register_submit'])){
$response = $dbc->query("select username from ".$dbc_unver_accounts);
$response2 = $dbc->query("select username from ".$dbc_ver_accounts);
$uexist=false;
if($response){
//cheak if exist
while($row = $response->fetch(PDO::FETCH_ASSOC)){
if($row['username']==$_POST['usernameR']){
$uexist=true;
break;
}
}
while($row = $response2->fetch(PDO::FETCH_ASSOC)){
if($row['username']==$_POST['usernameR']){
$uexist=true;
break;
}
}
//creation
if($uexist==true){
$_SESSION['message'] = "user allready exist";
} else {
//send data
$query="INSERT INTO ".$dbc_unver_accounts." (username, password,
discord, email) VALUES (?,?,?,?)";
$stmt=$dbc->prepare($query);
$password=password_hash($_POST['passwordR'], PASSWORD_DEFAULT);
$stmt->execute([$_POST['usernameR'],$password,$_POST['discord'],
$_POST['email']]);
$_SESSION['message']="complete";
}
} else {
$_SESSION['message'] = "internal server error";
}
}
if(isset($_POST['manageconfirm'])){
if($_POST['action']=="deny"){
$stmt=$dbc->prepare("delete from ".$dbc_unver_accounts." where username=?");
$stmt->execute([$_POST['user']]);
$action="denied";
}
if($_POST['action']=="accept"){
$getinfo=$dbc->prepare("select * from ".$dbc_unver_accounts." where username=?");
$getinfo->execute([$_POST['user']]);
$getinfoarr=array();
while($row=$getinfo->fetch()){
$getinfoarr=array($row['username'],$row['password'],$row['discord'],$row['email']);
}
$drop=$dbc->prepare("delete from ".$dbc_unver_accounts." where username=?");
$drop->execute([$_POST['user']]);
$stmt=$dbc->prepare("INSERT INTO ".$dbc_ver_accounts."
(username, password, discord, email, date_created, primary_key)
VALUES (?,?,?,?,NOW(),NULL)");
$stmt->execute($getinfoarr);
$file=fopen("../account_data/".$_POST['user'].".xml","w");
fwrite($file,'<?xml version="1.0" encoding="UTF-8"?>'."\n<user>\n <color>#ffffff</color>\n <permissions>\n </permissions>\n</user>");
fclose($file);
$action="confirmed";
}
$xml=simplexml_load_file("log.xml");
$file = fopen("log.xml","w");
fwrite($file,'<?xml version="1.0" encoding="UTF-8"?>');
fwrite($file,"\n<log>");
fwrite($file,"\n".'<user name="'.$_POST['user'].'" action="'.$action.'">'.$_POST['reason'].'</user>');
for($i=0;$i<=4;$i++){
fwrite($file,"\n".'<user name="'.$xml->user[$i]['name'].'" action="'.$xml->user[$i]['action'].'">'.$xml->user[$i].'</user>');
}
fwrite($file,"\n</log>");
fclose($file);
}
$dbc=null;
?>
<script language="javascript">window.close();</script>
</body>
</html>

View File

@@ -1,99 +0,0 @@
<html>
<head>
<?php session_start(); ?>
<style>
html, input{
font-size: 25px;
background-color: rgb(30,30,30);
color: white;
}
input{
padding: 4px;
}
fieldset, td{
border: solid 2px white;
font-size: 25px;
}
td{
padding: 4px;
}
.messagebox{
width: 50%;
}
</style>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<!--get log-->
<?php
$xml=simplexml_load_file("log.xml");
$i=0;
foreach($xml as $read){
$logf[$i]=strval($xml->user[$i]);
$logfname[$i]=strval($xml->user[$i]['name']);
$logfaction[$i]=strval($xml->user[$i]['action']);
$i++;
}
?>
<!--register-->
<div align="center">
<form method="post" action="poster.php" target="_blank" onsubmit="prefresh()">
username: <input autocomplete="off" type="text" name="usernameR" required /><br><br>
password: <input autocomplete="off" type="password" name="passwordR" required /><br><br>
discord name (with #numbers): <input autocomplete="off" type="text" name="discord" /><br><br>
(optional, for contact if discord goes down, also will be used as verifing you if you
lose your password)<br>
email: <input autocomplete="off" type="email" name="email" /><br><br>
<p align="center"><code style="color: orange;">note:</code> that when registering,
your account will be validated by a mod, you will have to wait</p>
<!--message-->
<div align="center"><div id="messagebox" class="messagebox"></div></div>
<script language="javascript">
if("<?php echo $_SESSION['message']; ?>"=="complete"){
$("#messagebox").html("complete");
$("#messagebox").css("background-color","green");
} else if("<?php echo $_SESSION['message']; ?>"=="user allready exist"){
$("#messagebox").html("user allready exist");
$("#messagebox").css("background-color","red");
} else if("<?php echo $_SESSION['message']; ?>"=="internal server error"){
$("#messagebox").html("internal server error");
$("#messagebox").css("background-color","red");
} else if("<?php echo $_SESSION['message']; ?>"!=""){
$("#messagebox").html("a unknown error has occured");
$("#messagebox").css("background-color","red");
}
console.log("<?php echo $_SESSION['message']; ?>");
</script><br>
<a href="../TOS and privacy.html">terms of service</a><br><br>
<input autocomplete="off" type="submit" name="register_submit" value="register" />
</form>
</div>
<!--read/print log-->
<br><br><br><br>
<div align="center"><fieldset style="width: 70%;"><table>
<legend>verified log</legend>
<tr style="background-color: rgb(0,50,120);"><td>user</td><td>action</td><td>reason</td></tr>
<script language="javascript" type="text/javascript">
var logf=JSON.parse('<?php echo json_encode($logf); ?>');
var logfname=JSON.parse('<?php echo json_encode($logfname); ?>');
var logfaction=JSON.parse('<?php echo json_encode($logfaction); ?>');
for(i=0;i<'<?php echo $i; ?>';i++){
document.write("<tr>");
document.write("<td>"+logfname[i]+"</td>");
document.write("<td>"+logfaction[i]+"</td>");
document.write("<td>"+logf[i]+"</td>");
document.write("</tr>");
}
//reload
function prefresh(){
setTimeout(() => { location.reload(); }, 500);
}
</script>
</table></fieldset></div><br>
<div align="center"><a href="manage.php" target="blank" style="color: white;">manager</a></div><br><br><br><br>
</body>
<?php $_SESSION['message']=""; ?>
</html>

View File

@@ -1,124 +0,0 @@
<html>
<head>
<title>2 of these people are lieing</title>
<style>
.errorbox{
display: none;
background-color: rgb(200,0,0);
color: white;
padding: 4px;
position: relative;
width: 30%;
}
.adminform, .viewnamebox{
border: 2px solid black;
padding: 10px;
position: relative;
width: 30%;
}
.viewnamebox{
display: none;
}
</style>
</head>
<body>
<?php
$password="1323";
//SET PASSWORD ABOVE
$errorlvl="";
if(file_exists("2otpal.json")==false){
$file = fopen("2otpal.json","w");
fwrite($file,"{\n \"names\":[\n \n ],\n \"maxplayers\":\"4\"\n}");
fclose($file);
$output="2otpal.json did not exist, creating";
echo "<script>console.log('Debug Objects: " . $output . "' );</script>";
}
$string = file_get_contents("2otpal.json");
$Jfile = json_decode($string, true);
if($_POST['doing']=="add"&&$_POST['Name']!=""){
if(count($Jfile['names'])<intval($Jfile['maxplayers'])-1){
$file=fopen("2otpal.json","w");
fwrite($file,"{\n \"names\":[");
for($i=0;$i<count($Jfile['names']);$i++){
fwrite($file,"\n \"".$Jfile['names'][$i]."\",");
}
fwrite($file,"\n \"".$_POST['Name']."\"");
fwrite($file,"\n ],\n \"maxplayers\":\"".$Jfile['maxplayers']."\"\n}");
fclose($file);
} else {
$errorlvl="max names have been reached";
}
}
if($_POST['doing']=="reset names"){
if($_POST['password']==$password){
$file = fopen("2otpal.json","w");
fwrite($file,"{\n \"names\":[\n \n ],\n \"maxplayers\":\"".$Jfile['maxplayers']."\"\n}");
fclose($file);
} else {
$errorlvl="password is not correct";
}
}
if($_POST['doing']=="set players"){
if($_POST['password']==$password){
$file=fopen("2otpal.json","w");
fwrite($file,"{\n \"names\":[");
for($i=0;$i<count($Jfile['names']);$i++){
if($i<count($Jfile['names'])-1){
fwrite($file,"\n \"".$Jfile['names'][$i]."\",");
} else {
fwrite($file,"\n \"".$Jfile['names'][$i]."\"");
}
}
fwrite($file,"\n ],\n \"maxplayers\":\"".$_POST['maxplayers']."\"\n}");
} else {
$errorlvl="password is not correct";
}
}
$string = file_get_contents("2otpal.json");
$Jfile = json_decode($string, true);
$_POST['password']=="";
$_POST['doing']=="";
?>
<div align="center">
<h1>this is a page for my game by tom scott, <br> two of these people are lying</h1>
<p> see his playlist <a href="https://www.youtube.com/watch?v=3UAOs9B9UH8&list=PLfx61sxf1Yz2I-c7eMRk9wBUUDCJkU7H0" target="_blank">here</a></p><br><br>
<div class="errorbox" id="errorbox"></div><br>
<form method="post" target="_self">
<input autocomplete="off" type="hidden" name="doing" value="add" />
wiki page name: <input autocomplete="off" type="text" name="Name" /><br><br>
<input autocomplete="off" type="submit" value="submit">
</form>
<br><button onclick="viewnames()">view wiki names</button><br><br>
<div id="viewnamebox" class="viewnamebox"></div>
<br><br>
<p>admin/host stuff below</p>
<form class="adminform" method="post" target="_self">
<select name="doing">
<option value="reset names">reset names</option>
<option value="set players">set players</option>
</select><br><br>
password: <input autocomplete="off" type="text" name="password"/><br><br>
players: (if setting players): <input autocomplete="off" type="number" max="100" name="maxplayers"/><br><br>
<input type="submit" value="submit">
</form>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script language="javascript" type="text/javascript">
if("<?php echo $errorlvl; ?>"!=""){
$("#errorbox").css("display","block");
$("#errorbox").html("<?php echo $errorlvl; ?>");
}
function viewnames(){
var getnames = <?php echo json_encode($Jfile['names'], JSON_PRETTY_PRINT) ?>;
$("#viewnamebox").css("display","block");
text="";
for(i=0; i<getnames.length; i++){
text=text+getnames[i]+"<br>";
}
$("#viewnamebox").html(text);
}
</script>
</body>
</html>

11
sync-filter.txt Normal file
View File

@@ -0,0 +1,11 @@
- .git
- .git/**
- .gitignore
- README.md
- LICENSE
- sync.sh
- sync-filter.txt
- assets/made_content/
- assets/static-style.css
- blog/
- updates/

6
sync.sh Executable file
View File

@@ -0,0 +1,6 @@
rclone sync ./ iceyfox:/domains/iceyfox.xyz/public_html -v -P --filter-from "sync-filter.txt" --dry-run
echo ------------
read
rclone sync ./ iceyfox:/domains/iceyfox.xyz/public_html -v -P --filter-from "sync-filter.txt"

900
tardisproject/testing??.php → tardisproject/tardis.php Executable file → Normal file
View File

@@ -1,450 +1,450 @@
<html>
<head>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
background-color: rgb(50,50,50);
}
::-webkit-scrollbar {
width: 0px; /* Remove scrollbar space */
background: transparent; /* Optional: just make scrollbar invisible */
}
img{
display: none;
background: transparent;
}
#Gscreen{
border: 1px solid black;
}
.Gscreen-container{
display: flex;
justify-content: center;
}
a{
position: absolute;
top: 10px;
left: 10px;
text-decoration: none;
color: white;
}
</style>
<img id="img_button" src="assets/button.png">
<img id="img_button_back" src="assets/button-back.png">
<img id="img_button_back_white" src="assets/button-back-white.png">
<img id="img_button_back_red" src="assets/button-back-red.png">
<img id="img_panel" src="assets/panel.png">
<img id="img_flever" src="assets/lever.png">
<img id="img_flever_left" src="assets/lever-left.png">
<img id="img_flever_right" src="assets/lever-right.png">
<img id="img_flever_forward" src="assets/lever-forward.png">
<img id="img_flever_back" src="assets/lever-back.png">
<img id="img_flever_mobile" src="assets/lever-mobile-buttons.png">
<img id="img_text_panel" src="assets/text-panel.png">
<img id="img_arrow_left" src="assets/arrow-left.png">
<img id="img_arrow_right" src="assets/arrow-right.png">
<img id="img_switch" src="assets/switch.png">
<img id="img_switch_up" src="assets/switch-up.png">
<img id="img_switch_down" src="assets/switch-down.png">
<img id="img_throttle_base" src="assets/throttle-lever-base.png">
<img id="img_throttle_handle" src="assets/throttle-lever-handle.png">
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<div class="Gscreen-container"><canvas id="Gscreen" width=1000px height=600px></canvas></div>
<a href="../index.html">go home</a>
<script src="classes.js"></script>
<script language="javascript" type="text/javascript">
let scrn=document.getElementById('Gscreen');
let ctx=scrn.getContext('2d');
function locked_game_loop_wrap(loop){
//settings & defaults
setwidth=1000;
setheight=600;
let currfuel=100;
let currplanet=[0,0,0];
let currcords=[0,0];
let destcords=[[0,0,0],[0,0]]
panelnum=2;
let tardis_move_status="idle";
let flightloop_isrunning=false;
//scanner class, had to define here because of scope
class TelepathicScanner{
constructor(x,y,scale){
this.width=scale;
this.height=scale;
this.pos={
x: setwidth/2-this.width/2+x,
y: setheight/2-this.height/2+y
};
}
draw(){
if(power.ison==true){
this.text=scannertext().split("BR")
ctx.font = "20px Ariel";
ctx.fillStyle = "#000"
ctx.globalAlpha = 0.5;
ctx.fillRect(this.pos.x,this.pos.y,this.width-30,this.height-13)
ctx.fillStyle = "#fff";
ctx.globalAlpha = 1;
for(var i=0; i<this.text.length; i++){
ctx.fillText(this.text[i],this.pos.x+2,this.pos.y+this.height/this.text.length*(i+1),this.width/1.21);
}
}
}
}
let planetdata={};
//error cheak and auto sets
$.getJSON("planetdata.json", function(result){
planetdata=result;
})
.error(function(){
if(alert('error loading planet data')){
location.reload();
} else {
location.reload();
}
});
//side loops
function moveloop(){
tardis_move_status="flying";
insideloop();
idlefuelloop();
function insideloop(){
if(fmbutton.ison==true){
if(flever.state=="#img_flever_forward"){
currcords[1]++
}
if(flever.state=="#img_flever_back"){
currcords[1]--
}
if(flever.state=="#img_flever_left"){
currcords[0]--
}
if(flever.state=="#img_flever_right"){
currcords[0]++
}
setTimeout(insideloop,500)
} else {
if(takeoffbutton.ison==false){
tardis_move_status="idle";
}
}
}
function idlefuelloop(){
if(fmbutton.ison==true){
currfuel--
setTimeout(idlefuelloop,3000)
}
}
}
function flightloop(){
if(flightloop_isrunning==false){
flightloop_isrunning=true;
fmbutton.ison=false;
fmbutton.locked=true;
takeoffbutton.locked=true;
tardis_move_status="taking off";
setTimeout(function(){
tardis_move_status="in vortex";
takeoffbutton.locked=false;
currplanet=destcords[0];
currcords=destcords[1];
flightloop_idlefuelloop();
flightloop_waitforoff();
},3000)
function flightloop_idlefuelloop(){
if(takeoffbutton.ison==true){
currfuel--;
setTimeout(flightloop_idlefuelloop,15000);
}
}
function flightloop_waitforoff(){
if(takeoffbutton.ison==false){
takeoffbutton.locked=true;
tardis_move_status="landing";
currplanet=destcords[0];
currcords=destcords[1];
setTimeout(function(){
tardis_move_status="idle";
takeoffbutton.locked=false;
fmbutton.locked=false;
flightloop_isrunning=false;
},3000);
} else {
setTimeout(flightloop_waitforoff,500);
}
}
}
}
function textentryT_runcommands(){
if(textEntryButton.ison==false){
let text=textEntryT.text.toString().split(" ")
if(text[0]=="setdest:"){
destcords=[[parseInt(text[1]),parseInt(text[2]),parseInt(text[3])],[parseInt(text[4]),parseInt(text[5])]];
}
textEntryT.text="";
textEntryButton.ison=false;
} else {
if(document.getElementById("entry_box_mobile").value!==""){
textEntryT.text=document.getElementById("entry_box_mobile").value;
document.getElementById("entry_box_mobile").value="";
}
}
}
/*
button syntax
panel, x, y, scale, back when on, off when no power, red when off, red when no power, name, desc
switch syntax
panel, x, y, scale, off when no power, 3 stage button?
*/
let arrowleft = new Arrowbutton(1,setheight/2-70/2,70,70);
let arrowright = new Arrowbutton(1000-70-1,setheight/2-70/2,70,70);
let panel = new Panel(0,150,1000,450);
telepathicScanner = new TelepathicScanner(10,-150,200);
//panel 2 --space
power = new Switch(2,180,200,70,false,false,"power","enables the power....");
let fmbutton = new Button(2,240,200,50,true,true,false,true,"flightmode button","enables flightmode for moving");
let flever = new Flever(2,320,100);
let flightTpanel = new Textpanel(2,0,0,190,80);
//panel 3 --flight
let throttlelever = new Throttlelever(3,290,140,50);
let telepathicCmain = new Switch(3,-180,-40,50,true,false,"telepathic main","enables main telepath functions");
let telepathicCscanner = new Switch(3,-140,-40,50,true,false,"telepathic scanner","enables telepathic scanner");
telepathicChover = new Switch(3,-100,-40,50,true,false,"telepathic hover","what you are reading right now");
let takeoffbutton= new Button(3,220,220,50,true,true,false,true,"takeoffbutton","for teleporting");
let flightTpanel2 = new Textpanel(3,0,0,120,130);
let textEntryT = new Textpanel(3,-240,220,100,30);
let textEntryButton = new Button(3,-160,220,30,true,true,false,true,"text enable","allows you to use commands (keyboard)")
let text_status = new Textpanel(3,135,-30,140,45);
window.onload = function() {
//gameloop
function gameloop(){
if(currfuel<0)currfuel=0;
if(currfuel>100)currfuel=100;
if(currfuel<1){
fmbutton.ison=false;
}
//cord updater
for(var planet in planetdata){
planetcords=planetdata[planet].cords.split("/")
planetcords=[parseInt(planetcords[0]),parseInt(planetcords[1]),parseInt(planetcords[2])]
if(currplanet[0]==planetcords[0]&&currplanet[1]==planetcords[1]&&currplanet[2]==planetcords[2]){
//get and set based limits
if(currcords[0]>parseInt(planetdata[planet].scale)){currcords[0]=-parseInt(planetdata[planet].scale)}
if(currcords[1]>parseInt(planetdata[planet].scale)){currcords[1]=-parseInt(planetdata[planet].scale)}
if(currcords[0]<-parseInt(planetdata[planet].scale)){currcords[0]=parseInt(planetdata[planet].scale)}
if(currcords[1]<-parseInt(planetdata[planet].scale)){currcords[1]=parseInt(planetdata[planet].scale)}
//asd
for(var objects in planetdata[planet].objects){
for(var ListOfObjects in planetdata[planet].objects[objects]){
LOOcords=planetdata[planet].objects[objects][ListOfObjects].split("/")
LOOcords=[parseInt(LOOcords[0]),parseInt(LOOcords[1])]
if(currcords[0]==LOOcords[0]&&currcords[1]==LOOcords[1]){
}
}
}
}
}
//main drawing
ctx.clearRect(0,0,setwidth,setheight);
panel.draw();
arrowleft.draw("#img_arrow_left");
arrowright.draw("#img_arrow_right");
//panel 2
flightTpanel.text="planet x:"+currplanet[0]+" y:"+currplanet[1]+" z:"+currplanet[2]+"BRx:"+currcords[0]+" y:"+currcords[1]+"BRfuel: "+currfuel;
flightTpanel.draw();
power.draw();
fmbutton.draw();
flever.draw();
//panel3
throttlelever.draw();
telepathicCmain.draw();
telepathicCscanner.draw();
telepathicChover.draw();
takeoffbutton.draw();
flightTpanel2.text="Current-"+
"BRspace: "+currplanet[0]+" "+currplanet[1]+" "+currplanet[2]+"BRplanet: "+currcords[0]+" "+currcords[1]+
"BRDestination-"+
"BRspace: "+destcords[0][0]+" "+destcords[0][1]+" "+destcords[0][2]+"BRplanet: "+destcords[1][0]+" "+destcords[1][1];
flightTpanel2.draw();
textEntryButton.draw();
textEntryT.draw();
text_status.draw();
text_status.text="status: "+tardis_move_status;
if(telepathicCmain.ison==false){
telepathicCscanner.stage=2;
telepathicChover.stage=2;
}
if(telepathicCscanner.ison==true){
telepathicScanner.draw();
}
//draw hovers
fmbutton.drawhover();
power.drawhover();
flever.drawhover();
telepathicCmain.drawhover();
telepathicCscanner.drawhover();
telepathicChover.drawhover();
takeoffbutton.drawhover();
textEntryButton.drawhover();
requestAnimationFrame(gameloop);
}
gameloop();
//!---mouse and button
scrn.addEventListener('mousedown',function(event){
var cx = event.pageX - $('#Gscreen').offset().left;
var cy = event.pageY - $('#Gscreen').offset().top;
arrowleft.click(cx,cy,"down");
arrowright.click(cx,cy,"up");
//panel 2
fmbutton.toggle(cx,cy,true);
if(fmbutton.run_function==true){moveloop();fmbutton.run_function=false;}
power.toggle(cx,cy,false);
flever.toggle(cx,cy);
if(fmbutton.ison==false){flever.mobilebuttons=false}
//panel3
throttlelever.mouseon(cx,cy);
telepathicCmain.toggle(cx,cy);
telepathicCscanner.toggle(cx,cy);
telepathicChover.toggle(cx,cy);
takeoffbutton.toggle(cx,cy,true);
if(takeoffbutton.run_function==true){flightloop();takeoffbutton.run_function=false;}
textEntryButton.toggle(cx,cy,true);
if(textEntryButton.run_function==true){textentryT_runcommands();textEntryButton.run_function=false;}
},false);
scrn.addEventListener('mouseup',function(event){
throttlelever.mouseisdown=false;
},false);
scrn.addEventListener('mousemove',function(event){
var cx = event.pageX - $('#Gscreen').offset().left;
var cy = event.pageY - $('#Gscreen').offset().top;
globalcx = event.pageX - $('#Gscreen').offset().left;
globalcy = event.pageY - $('#Gscreen').offset().top;
//panel 3
throttlelever.move(cx,cy);
fmbutton.move(cx,cy);
power.move(cx,cy);
flever.move(cx,cy);
telepathicCmain.move(cx,cy);
telepathicCscanner.move(cx,cy);
telepathicChover.move(cx,cy);
takeoffbutton.move(cx,cy);
textEntryButton.move(cx,cy);
},false);
document.addEventListener('keydown',function(event){
if(textEntryButton.ison==true){
if(event.keyCode==13){
textEntryButton.ison=false;
textentryT_runcommands();
} else if(event.keyCode==16){
} else if(event.keyCode==8){
textEntryT.text=textEntryT.text.toString().substring(0,textEntryT.text.toString().length-1);
} else if(event.keyCode==32){
textEntryT.text=textEntryT.text+" ";
} else {
textEntryT.text=textEntryT.text+event.key;
}
}
if(fmbutton.ison==true){
if(panelnum==2){
if(event.keyCode==38){
flever.state="#img_flever_forward";
}
if(event.keyCode==37){
flever.state="#img_flever_left";
}
if(event.keyCode==39){
flever.state="#img_flever_right";
}
if(event.keyCode==40){
flever.state="#img_flever_back";
}
if(event.keyCode==70){
alert('respects payed');
}
}
}
},false);
document.addEventListener('keyup',function(event){
flever.state="#img_flever";
},false);
}
//scanner text function
function scannertext(){
text="";
for(var planet in planetdata){
planetcords=planetdata[planet].cords.split("/")
planetcords=[parseInt(planetcords[0]),parseInt(planetcords[1]),parseInt(planetcords[2])]
if(currplanet[0]==planetcords[0]&&currplanet[1]==planetcords[1]&&currplanet[2]==planetcords[2]&&(tardis_move_status=="idle"|tardis_move_status=="flying")){
getcords=[]
for(var objects in planetdata[planet].objects){
for(var ListOfObjects in planetdata[planet].objects[objects]){
LOOcords=planetdata[planet].objects[objects][ListOfObjects].split("/")
LOOcords=[parseInt(LOOcords[0]),parseInt(LOOcords[1])]
if(objects=="refuel"){
getcords.push([LOOcords[0],LOOcords[1],""])
}
if(objects=="space-radio"){
getcords.push([LOOcords[0],LOOcords[1],""])
}
}
}
for(var y=(currcords[1]+4);y>=(currcords[1]-4);y--){
y2=y
if(y2>parseInt(planetdata[planet].scale)){y2=-((parseInt(planetdata[planet].scale)*2+1)-y)}
if(y2<-parseInt(planetdata[planet].scale)){y2=((parseInt(planetdata[planet].scale)*2+1)+y)}
for(var x=(currcords[0]-4);x<=(currcords[0]+4);x++){
x2=x
if(x2>parseInt(planetdata[planet].scale)){x2=-((parseInt(planetdata[planet].scale)*2+1)-x)}
if(x2<-parseInt(planetdata[planet].scale)){x2=((parseInt(planetdata[planet].scale)*2+1)+x)}
for(i=0;i<getcords.length;i++){
if(x2==getcords[i][0]&&y2==getcords[i][1]){
texticon=getcords[i][2]
break;
} else if(x2==currcords[0]&&y2==currcords[1]){
texticon="U"
} else {
texticon="+"
}
}
text=text+"["+texticon+"]"
}
text=text+"BR"
}
}
}
return text;
}
}
locked_game_loop_wrap();
</script>
<br><br>
<div style="color: white;" align="center">
<textarea id="entry_box_mobile" style="color: white; padding: 4px;"></textarea>
<p>the box below allows mobile users to enter text to things one the game without having to
plug in a keyboard</p>
</div>
</body>
</html>
<html>
<head>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
background-color: rgb(50,50,50);
}
::-webkit-scrollbar {
width: 0px; /* Remove scrollbar space */
background: transparent; /* Optional: just make scrollbar invisible */
}
img{
display: none;
background: transparent;
}
#Gscreen{
border: 1px solid black;
}
.Gscreen-container{
display: flex;
justify-content: center;
}
a{
position: absolute;
top: 10px;
left: 10px;
text-decoration: none;
color: white;
}
</style>
<img id="img_button" src="assets/button.png">
<img id="img_button_back" src="assets/button-back.png">
<img id="img_button_back_white" src="assets/button-back-white.png">
<img id="img_button_back_red" src="assets/button-back-red.png">
<img id="img_panel" src="assets/panel.png">
<img id="img_flever" src="assets/lever.png">
<img id="img_flever_left" src="assets/lever-left.png">
<img id="img_flever_right" src="assets/lever-right.png">
<img id="img_flever_forward" src="assets/lever-forward.png">
<img id="img_flever_back" src="assets/lever-back.png">
<img id="img_flever_mobile" src="assets/lever-mobile-buttons.png">
<img id="img_text_panel" src="assets/text-panel.png">
<img id="img_arrow_left" src="assets/arrow-left.png">
<img id="img_arrow_right" src="assets/arrow-right.png">
<img id="img_switch" src="assets/switch.png">
<img id="img_switch_up" src="assets/switch-up.png">
<img id="img_switch_down" src="assets/switch-down.png">
<img id="img_throttle_base" src="assets/throttle-lever-base.png">
<img id="img_throttle_handle" src="assets/throttle-lever-handle.png">
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<div class="Gscreen-container"><canvas id="Gscreen" width=1000px height=600px></canvas></div>
<a href="../index.html">go home</a>
<script src="classes.js"></script>
<script language="javascript" type="text/javascript">
let scrn=document.getElementById('Gscreen');
let ctx=scrn.getContext('2d');
function locked_game_loop_wrap(loop){
//settings & defaults
setwidth=1000;
setheight=600;
let currfuel=100;
let currplanet=[0,0,0];
let currcords=[0,0];
let destcords=[[0,0,0],[0,0]]
panelnum=2;
let tardis_move_status="idle";
let flightloop_isrunning=false;
//scanner class, had to define here because of scope
class TelepathicScanner{
constructor(x,y,scale){
this.width=scale;
this.height=scale;
this.pos={
x: setwidth/2-this.width/2+x,
y: setheight/2-this.height/2+y
};
}
draw(){
if(power.ison==true){
this.text=scannertext().split("BR")
ctx.font = "20px Ariel";
ctx.fillStyle = "#000"
ctx.globalAlpha = 0.5;
ctx.fillRect(this.pos.x,this.pos.y,this.width-30,this.height-13)
ctx.fillStyle = "#fff";
ctx.globalAlpha = 1;
for(var i=0; i<this.text.length; i++){
ctx.fillText(this.text[i],this.pos.x+2,this.pos.y+this.height/this.text.length*(i+1),this.width/1.21);
}
}
}
}
let planetdata={};
//error cheak and auto sets
$.getJSON("planetdata.json", function(result){
planetdata=result;
})
.error(function(){
if(alert('error loading planet data')){
location.reload();
} else {
location.reload();
}
});
//side loops
function moveloop(){
tardis_move_status="flying";
insideloop();
idlefuelloop();
function insideloop(){
if(fmbutton.ison==true){
if(flever.state=="#img_flever_forward"){
currcords[1]++
}
if(flever.state=="#img_flever_back"){
currcords[1]--
}
if(flever.state=="#img_flever_left"){
currcords[0]--
}
if(flever.state=="#img_flever_right"){
currcords[0]++
}
setTimeout(insideloop,500)
} else {
if(takeoffbutton.ison==false){
tardis_move_status="idle";
}
}
}
function idlefuelloop(){
if(fmbutton.ison==true){
currfuel--
setTimeout(idlefuelloop,3000)
}
}
}
function flightloop(){
if(flightloop_isrunning==false){
flightloop_isrunning=true;
fmbutton.ison=false;
fmbutton.locked=true;
takeoffbutton.locked=true;
tardis_move_status="taking off";
setTimeout(function(){
tardis_move_status="in vortex";
takeoffbutton.locked=false;
currplanet=destcords[0];
currcords=destcords[1];
flightloop_idlefuelloop();
flightloop_waitforoff();
},3000)
function flightloop_idlefuelloop(){
if(takeoffbutton.ison==true){
currfuel--;
setTimeout(flightloop_idlefuelloop,15000);
}
}
function flightloop_waitforoff(){
if(takeoffbutton.ison==false){
takeoffbutton.locked=true;
tardis_move_status="landing";
currplanet=destcords[0];
currcords=destcords[1];
setTimeout(function(){
tardis_move_status="idle";
takeoffbutton.locked=false;
fmbutton.locked=false;
flightloop_isrunning=false;
},3000);
} else {
setTimeout(flightloop_waitforoff,500);
}
}
}
}
function textentryT_runcommands(){
if(textEntryButton.ison==false){
let text=textEntryT.text.toString().split(" ")
if(text[0]=="setdest:"){
destcords=[[parseInt(text[1]),parseInt(text[2]),parseInt(text[3])],[parseInt(text[4]),parseInt(text[5])]];
}
textEntryT.text="";
textEntryButton.ison=false;
} else {
if(document.getElementById("entry_box_mobile").value!==""){
textEntryT.text=document.getElementById("entry_box_mobile").value;
document.getElementById("entry_box_mobile").value="";
}
}
}
/*
button syntax
panel, x, y, scale, back when on, off when no power, red when off, red when no power, name, desc
switch syntax
panel, x, y, scale, off when no power, 3 stage button?
*/
let arrowleft = new Arrowbutton(1,setheight/2-70/2,70,70);
let arrowright = new Arrowbutton(1000-70-1,setheight/2-70/2,70,70);
let panel = new Panel(0,150,1000,450);
telepathicScanner = new TelepathicScanner(10,-150,200);
//panel 2 --space
power = new Switch(2,180,200,70,false,false,"power","enables the power....");
let fmbutton = new Button(2,240,200,50,true,true,false,true,"flightmode button","enables flightmode for moving");
let flever = new Flever(2,320,100);
let flightTpanel = new Textpanel(2,0,0,190,80);
//panel 3 --flight
let throttlelever = new Throttlelever(3,290,140,50);
let telepathicCmain = new Switch(3,-180,-40,50,true,false,"telepathic main","enables main telepath functions");
let telepathicCscanner = new Switch(3,-140,-40,50,true,false,"telepathic scanner","enables telepathic scanner");
telepathicChover = new Switch(3,-100,-40,50,true,false,"telepathic hover","what you are reading right now");
let takeoffbutton= new Button(3,220,220,50,true,true,false,true,"takeoffbutton","for teleporting");
let flightTpanel2 = new Textpanel(3,0,0,120,130);
let textEntryT = new Textpanel(3,-240,220,100,30);
let textEntryButton = new Button(3,-160,220,30,true,true,false,true,"text enable","allows you to use commands (keyboard)")
let text_status = new Textpanel(3,135,-30,140,45);
window.onload = function() {
//gameloop
function gameloop(){
if(currfuel<0)currfuel=0;
if(currfuel>100)currfuel=100;
if(currfuel<1){
fmbutton.ison=false;
}
//cord updater
for(var planet in planetdata){
planetcords=planetdata[planet].cords.split("/")
planetcords=[parseInt(planetcords[0]),parseInt(planetcords[1]),parseInt(planetcords[2])]
if(currplanet[0]==planetcords[0]&&currplanet[1]==planetcords[1]&&currplanet[2]==planetcords[2]){
//get and set based limits
if(currcords[0]>parseInt(planetdata[planet].scale)){currcords[0]=-parseInt(planetdata[planet].scale)}
if(currcords[1]>parseInt(planetdata[planet].scale)){currcords[1]=-parseInt(planetdata[planet].scale)}
if(currcords[0]<-parseInt(planetdata[planet].scale)){currcords[0]=parseInt(planetdata[planet].scale)}
if(currcords[1]<-parseInt(planetdata[planet].scale)){currcords[1]=parseInt(planetdata[planet].scale)}
//asd
for(var objects in planetdata[planet].objects){
for(var ListOfObjects in planetdata[planet].objects[objects]){
LOOcords=planetdata[planet].objects[objects][ListOfObjects].split("/")
LOOcords=[parseInt(LOOcords[0]),parseInt(LOOcords[1])]
if(currcords[0]==LOOcords[0]&&currcords[1]==LOOcords[1]){
}
}
}
}
}
//main drawing
ctx.clearRect(0,0,setwidth,setheight);
panel.draw();
arrowleft.draw("#img_arrow_left");
arrowright.draw("#img_arrow_right");
//panel 2
flightTpanel.text="planet x:"+currplanet[0]+" y:"+currplanet[1]+" z:"+currplanet[2]+"BRx:"+currcords[0]+" y:"+currcords[1]+"BRfuel: "+currfuel;
flightTpanel.draw();
power.draw();
fmbutton.draw();
flever.draw();
//panel3
throttlelever.draw();
telepathicCmain.draw();
telepathicCscanner.draw();
telepathicChover.draw();
takeoffbutton.draw();
flightTpanel2.text="Current-"+
"BRspace: "+currplanet[0]+" "+currplanet[1]+" "+currplanet[2]+"BRplanet: "+currcords[0]+" "+currcords[1]+
"BRDestination-"+
"BRspace: "+destcords[0][0]+" "+destcords[0][1]+" "+destcords[0][2]+"BRplanet: "+destcords[1][0]+" "+destcords[1][1];
flightTpanel2.draw();
textEntryButton.draw();
textEntryT.draw();
text_status.draw();
text_status.text="status: "+tardis_move_status;
if(telepathicCmain.ison==false){
telepathicCscanner.stage=2;
telepathicChover.stage=2;
}
if(telepathicCscanner.ison==true){
telepathicScanner.draw();
}
//draw hovers
fmbutton.drawhover();
power.drawhover();
flever.drawhover();
telepathicCmain.drawhover();
telepathicCscanner.drawhover();
telepathicChover.drawhover();
takeoffbutton.drawhover();
textEntryButton.drawhover();
requestAnimationFrame(gameloop);
}
gameloop();
//!---mouse and button
scrn.addEventListener('mousedown',function(event){
var cx = event.pageX - $('#Gscreen').offset().left;
var cy = event.pageY - $('#Gscreen').offset().top;
arrowleft.click(cx,cy,"down");
arrowright.click(cx,cy,"up");
//panel 2
fmbutton.toggle(cx,cy,true);
if(fmbutton.run_function==true){moveloop();fmbutton.run_function=false;}
power.toggle(cx,cy,false);
flever.toggle(cx,cy);
if(fmbutton.ison==false){flever.mobilebuttons=false}
//panel3
throttlelever.mouseon(cx,cy);
telepathicCmain.toggle(cx,cy);
telepathicCscanner.toggle(cx,cy);
telepathicChover.toggle(cx,cy);
takeoffbutton.toggle(cx,cy,true);
if(takeoffbutton.run_function==true){flightloop();takeoffbutton.run_function=false;}
textEntryButton.toggle(cx,cy,true);
if(textEntryButton.run_function==true){textentryT_runcommands();textEntryButton.run_function=false;}
},false);
scrn.addEventListener('mouseup',function(event){
throttlelever.mouseisdown=false;
},false);
scrn.addEventListener('mousemove',function(event){
var cx = event.pageX - $('#Gscreen').offset().left;
var cy = event.pageY - $('#Gscreen').offset().top;
globalcx = event.pageX - $('#Gscreen').offset().left;
globalcy = event.pageY - $('#Gscreen').offset().top;
//panel 3
throttlelever.move(cx,cy);
fmbutton.move(cx,cy);
power.move(cx,cy);
flever.move(cx,cy);
telepathicCmain.move(cx,cy);
telepathicCscanner.move(cx,cy);
telepathicChover.move(cx,cy);
takeoffbutton.move(cx,cy);
textEntryButton.move(cx,cy);
},false);
document.addEventListener('keydown',function(event){
if(textEntryButton.ison==true){
if(event.keyCode==13){
textEntryButton.ison=false;
textentryT_runcommands();
} else if(event.keyCode==16){
} else if(event.keyCode==8){
textEntryT.text=textEntryT.text.toString().substring(0,textEntryT.text.toString().length-1);
} else if(event.keyCode==32){
textEntryT.text=textEntryT.text+" ";
} else {
textEntryT.text=textEntryT.text+event.key;
}
}
if(fmbutton.ison==true){
if(panelnum==2){
if(event.keyCode==38){
flever.state="#img_flever_forward";
}
if(event.keyCode==37){
flever.state="#img_flever_left";
}
if(event.keyCode==39){
flever.state="#img_flever_right";
}
if(event.keyCode==40){
flever.state="#img_flever_back";
}
if(event.keyCode==70){
alert('respects payed');
}
}
}
},false);
document.addEventListener('keyup',function(event){
flever.state="#img_flever";
},false);
}
//scanner text function
function scannertext(){
text="";
for(var planet in planetdata){
planetcords=planetdata[planet].cords.split("/")
planetcords=[parseInt(planetcords[0]),parseInt(planetcords[1]),parseInt(planetcords[2])]
if(currplanet[0]==planetcords[0]&&currplanet[1]==planetcords[1]&&currplanet[2]==planetcords[2]&&(tardis_move_status=="idle"|tardis_move_status=="flying")){
getcords=[]
for(var objects in planetdata[planet].objects){
for(var ListOfObjects in planetdata[planet].objects[objects]){
LOOcords=planetdata[planet].objects[objects][ListOfObjects].split("/")
LOOcords=[parseInt(LOOcords[0]),parseInt(LOOcords[1])]
if(objects=="refuel"){
getcords.push([LOOcords[0],LOOcords[1],""])
}
if(objects=="space-radio"){
getcords.push([LOOcords[0],LOOcords[1],""])
}
}
}
for(var y=(currcords[1]+4);y>=(currcords[1]-4);y--){
y2=y
if(y2>parseInt(planetdata[planet].scale)){y2=-((parseInt(planetdata[planet].scale)*2+1)-y)}
if(y2<-parseInt(planetdata[planet].scale)){y2=((parseInt(planetdata[planet].scale)*2+1)+y)}
for(var x=(currcords[0]-4);x<=(currcords[0]+4);x++){
x2=x
if(x2>parseInt(planetdata[planet].scale)){x2=-((parseInt(planetdata[planet].scale)*2+1)-x)}
if(x2<-parseInt(planetdata[planet].scale)){x2=((parseInt(planetdata[planet].scale)*2+1)+x)}
for(i=0;i<getcords.length;i++){
if(x2==getcords[i][0]&&y2==getcords[i][1]){
texticon=getcords[i][2]
break;
} else if(x2==currcords[0]&&y2==currcords[1]){
texticon="U"
} else {
texticon="+"
}
}
text=text+"["+texticon+"]"
}
text=text+"BR"
}
}
}
return text;
}
}
locked_game_loop_wrap();
</script>
<br><br>
<div style="color: white;" align="center">
<textarea id="entry_box_mobile" style="color: white; padding: 4px;"></textarea>
<p>the box below allows mobile users to enter text to things one the game without having to
plug in a keyboard</p>
</div>
</body>
</html>

View File

@@ -1,33 +0,0 @@
<html>
<head>
<title>video requestor</title>
</head>
<body>
<?php
date_default_timezone_set('America/Los_Angeles');
if($_POST['videourl']!=""){
if($_POST['password']=="1234"){
$text = str_replace(["<",">"],"",$_POST['videourl']);
$text="https://youtube.com/embed/".explode("=",$text)[1];
$file=fopen("url.txt","w");
fwrite($file,$text);
fclose($file);
} else {
$message="password is not right";
}
}
?>
<p><?php echo $message; ?></p>
<div align="center">
<iframe width="560" height="315" src="<?php echo $text; ?>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div><br><br>
<div align="center">
<form method="post">
url: <input autocomplete="off" type="url" name="videourl" maxlength="200" /><br><br>
password: <input autocomplete="off" type="text" name="password" /><br><br>
<input autocomplete="off" type="submit" value="enter">
</div>
</form>
</body>
</html>

View File

@@ -1 +0,0 @@
https://youtube.com/embed/zViYpS3BIqY

View File

@@ -1,27 +0,0 @@
<html>
<head>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<iframe id="videobox" width="560" height="315" src="" frameborder="0" allow="autoplay; encrypted-media; gyroscope; picture-in-picture"></iframe>
<script language="javascript" type="text/javascript">
function loop(){
$.ajax({
type: "GET",
url: "url.txt",
cache: false,
async: true,
success: function(data){
if(data+"?autoplay=1"!=$('#videobox').attr('src')){
$("#videobox").attr("src",data+"?autoplay=1");
$('#videobox').attr('src', $('#videobox').attr('src'));
}
}
});
}
window.onload = setInterval(loop,2000);
</script>
</body>