Add and remove bunch of stuff...

This commit is contained in:
HotPizzaYT 2022-05-11 20:58:45 -05:00
commit ac77e95282
17 changed files with 112 additions and 24 deletions

View file

@ -22,13 +22,15 @@ body, html {
<?php
if(isset($_POST["username"]) && $_POST["username"] !== "" && isset($_POST["password"]) && $_POST["password"] !== "" && isset($_POST["email"]) && $_POST["email"] !== ""){
if(!file_exists("data/" . $_POST["username"] . ".json") && !preg_match_all('/([<>\[\]\(\).,\/\\&?$=!%^#* ])/', $_POST["username"])){
if(!file_exists("data/" . $_POST["username"] . ".json") && !preg_match_all('/([<>\[\]\(\).,\/\\&?$=!%^#* ])/', $_POST["username"]) && count($_POST["username"]) >= 3){
$passHash = password_hash($_POST["password"], PASSWORD_ARGON2ID);
$date = date('Y/m/d H:i:s');
$details = array("username" => $_POST["username"], "password" => $passHash, "email" => $_POST["email"], "timezone" => "UTC", "created"=>$date,"createdmt"=>microtime(),"profile"=>"I have not filled this in yet","profilecomments"=>array(),"apps"=>array(),"hasPublishedCB"=>false,"comicbooks"=>array(0),"ownedComics"=>array(),"points"=>0,"cmsg"=>0,"forumPosts"=>array(),"reputation"=>1500,"banned"=>0,"admin"=>0,"ownedApps"=>array(),"drawings"=>array(),"pms"=>array());
$details = array("username" => $_POST["username"], "password" => $passHash, "email" => $_POST["email"], "timezone" => "UTC", "created"=>$date,"createdmt"=>microtime(),"profile"=>"I have not filled this in yet","profilecomments"=>array(),"apps"=>array(),"hasPublishedCB"=>false,"comicbooks"=>array(0),"ownedComics"=>array(),"points"=>30,"cmsg"=>0,"forumPosts"=>array(),"reputation"=>1500,"banned"=>0,"admin"=>0,"ownedApps"=>array(),"drawings"=>array(),"pms"=>array());
$detailsEncoded = json_encode($details, true);
file_put_contents("data/" . $_POST["username"] . ".json", $detailsEncoded);
echo "<p>SUCCESS: Account created successfully!</p>";
} else if (!(count($_POST["username"]) >= 3)){
echo "<p>ERROR: Username cannot be shorter than 3 characters!";
} else {
echo "<p>ERROR: That account already exists or contains symbols! (<>[]().,/\\&?$=!%^#*)</p>";
}

BIN
3ds/chat/i/honey_troll.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -27,15 +27,15 @@ if(isset($_GET["room"])){
}
#contenttop {
background-color: #f0f0f0;
height: 208px;
height: 218px;
}
.conttop {
background-color: #f0f0f0;
height: 208px;
height: 218px;
}
#contentbot {
background-color: #f0f0f0;
height: 222px;
height: 212px;
background-color: <?php echo $jsonD["color"] ?>;
}
#chatscreen {
@ -47,10 +47,10 @@ if(isset($_GET["room"])){
overflow-y: scroll;
}
.test {
height: 100px;
height: 176px;
}
.h200 {
height: 140px;
height: 100px;
background-color: #fff;
}
#msg {
@ -189,10 +189,10 @@ if(isset($_GET["room"])){
<body onload="getIcons(); getfullchat(); setInterval(getfullchat, 1000);">
<div id="contenttop" class="conttop">
<a href="../">Back</a><br/>
<div id="nav" class="scrollable h200"></div>
<div id="chatscreen" class="scrollable test"></div>
</div>
<div id="contentbot">
<div id="chatscreen" class="scrollable test">Loading chat...</div>
<div id="contentbot" class="contbot">
<div id="nav" class="scrollable test">Loading chat...</div>
<?php if(isset($_SESSION["ts_user"])){?><input id="msg" onkeydown="check(event)"></input><button onclick="sendmess()">Send</button><?php } else { ?> You have to be logged in! <a href="../acc/index.php">Login here</a><?php }?>
</div>
<?php } else {

View file

@ -65,7 +65,8 @@
":pre:" => "<img alt='pre' src='i/icon_prerelease.png' />",
":0)" => "<img alt='clown' src='i/clown.png' />",
":O)" => "<img alt='clown' src='i/clown.png' />",
":o)" => "<img alt='clown' src='i/clown.png' />"
":o)" => "<img alt='clown' src='i/clown.png' />",
":ht:" => "<img alt='Honey Troll' src='i/honey_troll.png' />"
);
$txt = str_replace(array_keys($plazaEmotes), array_values($plazaEmotes), $txt);

View file

@ -48,6 +48,7 @@ include_once("functions.php");
}else if(startsWith($_POST["msg"], "/eval ")){
echo "::eval;".str_replace("/eval ", "",$_POST["msg"]);
}else if(startsWith($_POST["msg"], "/whisper ")){
$x = explode(" ", $_POST["msg"]);
$who = $x[1];
$msg = strSplit($_POST["msg"], 2, " ");
@ -60,6 +61,18 @@ include_once("functions.php");
array_unshift($jsonD["msg"], $finalmsg);
$jsonString = json_encode($jsonD);
file_put_contents("data/".$room.".json",$jsonString);
}else if(startsWith($_POST["msg"], "/claim")){
if(file_exists("data/claim.global") && file_get_contents("data/claim.global") == "0"){
$finalmsg = array("cont"=>"<font color='orange'><u>{$_SESSION['ts_user']} has claimed the hourly points!</u></font>","time"=>time(),"type"=>"rawbr","color"=>"red","visibility"=>"all","from"=>"system");
array_unshift($jsonD["msg"], $finalmsg);
$jsonString = json_encode($jsonD);
file_put_contents("data/".$room.".json",$jsonString);
echo "::message;FYI, this command does not actually add any points, sorry!";
}else if(!(file_exists("data/claim.global"))){
echo "::eval;alert('chat.errors.noglobal\\n\\nError details: Could not find the specified global file \"data\\/claim.global\", contact @HxOr1337#0907 on Discord.";
}else if(file_exists("data/claim.global")){
echo "::eval;alert('You failed to claim the points. No points have been rewarded.');";
}
}else{
echo "::message;Command \"" . explode(" ", $_POST["msg"])[0] . "\" not found.";

View file

@ -63,9 +63,18 @@ include("../../detect.php");
$jsonD = json_decode($jsonF, true);
$name = "<a href='topic.php?t=".str_replace(".json","",$file)."'>".$jsonD["name"]."</a>";
$desc = $jsonD["description"];
$latest = count($jsonD["posts"]) - 1;
$latestPost = "Latest post by: ".$jsonD["posts"][$latest]["from"].", \"".htmlspecialchars($jsonD["posts"][$latest]["title"])."\"";
echo "<div class='crow' alt='".$desc."'>" . $name . "<br/><font color='grey'>".$latestPost."</font></div>";
$lpc = "grey";
if(count($jsonD["posts"]) == 0){
$lpc = "red";
$latestPost = "This topic is empty! Be the first one to post something!";
} else {
$lpc = "grey";
$latestPost = "Latest post by: ".$jsonD["posts"][$latest]["from"].", \"".htmlspecialchars($jsonD["posts"][$latest]["title"])."\"";
}
echo "<div class='crow' alt='".$desc."'>" . $name . "<br/><font color='{$lpc}'>".$latestPost."</font></div>";
}
}
?>

View file

@ -55,7 +55,7 @@ include("../../detect.php");
?>
<img src="../../images/header3ds.png" width="<?php echo $width; ?>" alt="Oops! Our header could not be displayed!" />
<center><b><u><?php if($error == ""){ echo $jsonD["name"]; } else { echo "Error!"; } ?></u></b></center>
<center><?php if($error == ""){ $jsonD["description"]; } else { echo "<font color='red'>".$error."</font>"; } ?></center>
<center><?php if($error == ""){ echo $jsonD["description"]; } else { echo "<font color='red'>".$error."</font>"; } ?></center>
</div>
<div id="contentbot">
<center>

View file

@ -5,10 +5,7 @@ include("../../detect.php");
?>
<html>
<head>
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
<style>
body {
margin: 0px;

View file

@ -6,7 +6,7 @@ $cbprefix = "page";
$startsWithZero = true;
$cbPages = 6;
$cbPages = 9;
if($startsWithZero){
$cbPages += 1;
@ -70,7 +70,23 @@ He must have been in that bunker for days...
n-ngh...
Mr. Medic! Our new friend is awake!");
Mr. Medic! Our new friend is awake!",
"*Background chatter*
Son, are you okay?
*Sudden unintelligible babble*
Hey, you're safe now.
My name is Matt Medic. and I'm here to help you. what's your name?",
"Toby...
Mr. Medic...
Are my parents dead?
I'm... afraid so");
$pt = json_encode($pageText);
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View file

@ -40,6 +40,8 @@ include("../../../detect.php");
</style>
<script>
window.selected = 0;
window.previousSel = 0;
window.appData = [{"name":"Sporkbob Schitbag","desc":"Created by Slinkybenis<br />This comic is based off of SpongeBob SquarePants"},{"name":"Then and Now","desc":"Based off of OmegaReploid's Madness Combat au Then and Now, join Hank J Wimbleton and his brothers as we dive into the past...<br/><br/>Working on Then and Now as a comic has been challenging, not just as a writer, but an artist as well. With writing, the reader can let their mind run wild while reading the book, but with a comic, the artist has to go wild with drawing every single pannel. My main issue with drawing every human is the far away shots and to make sure that they don't look like men's penises. I've drawn so many things and often my mother has looked at it and said \"Hm. looks like a penis.\" The fun part about drawing this, however, is that I get to combine diffrent type of art styles. I hope you enjoy reading Then and Now, as this is one of my favorite fan fics to work on, not just to type up but to now offically draw.<br/><br/><a href='https://archiveofourown.org/works/34034140'>Then and Now can be read in text form over here</a>"},{"name":"[Esc] DESTINY","desc":"Coming soon!"}];
function shop(){
window.location = "shop.php";
@ -49,8 +51,7 @@ include("../../../detect.php");
}
window.matureTitles = ["Sporkbob Schitbag"];
// Selection code
window.selected = 0;
window.previousSel = 0;
function kcheck(event){
// Basically disabled
if(event.keyCode == 38){
@ -76,8 +77,8 @@ include("../../../detect.php");
function changeSelection(){
prev = document.getElementById("c" + window.previousSel.toString());
now = document.getElementById("c" + window.selected.toString());
prev.classList.remove("active");
now.classList.add("active");
prev.className = prev.className.replace(" active", "");
now.className += " active";
document.getElementById("cname").innerText = window.appData[window.selected].name;
document.getElementById("cdesc").innerHTML = window.appData[window.selected].desc;

View file

@ -11,6 +11,7 @@ if($isDSi){
<html>
<head>
<meta name="viewport" content="width=<?php echo $width; ?>">
<script>
function color(x){
x = x.replace(/\\\[31m/g, "<font color='red'>");

18
3ds/info.php Normal file
View file

@ -0,0 +1,18 @@
<?php
include("../detect.php");
?>
<head>
<meta name="viewport" content="width=<?php echo $width; ?>">
<style>
body {
width: <?php echo $width; ?>px;
}
.main {
width: <?php echo $width; ?>px;
}
</style>
</head>
<?php
echo phpinfo();
?>

View file

@ -0,0 +1,30 @@
<?php
session_start();
include("../../detect.php");
if($isDSi){
$cheight = "132";
} else {
$cheight = "240";
}
?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=<?php echo $width; ?>">
<style>
body {
width: <?php echo $width; ?>px;
}
.main {
width: <?php echo $width; ?>px;
}
</style>
<script></script>
</head>
<body>
<h1>Coming Soon</h1>
<span style="color: grey">LiveType is coming soon...</span>
<br>
<span style="font-weight: bold;"><strong>Test</strong></span>
</body>
</html>

0
3ds/livetype/type.php Normal file
View file

BIN
3dsTownSquare.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB