From ac77e952820f965013f15189e262a7916627faad Mon Sep 17 00:00:00 2001 From: HotPizzaYT <57576298+HotPizzaYT@users.noreply.github.com> Date: Wed, 11 May 2022 20:58:45 -0500 Subject: [PATCH] Add and remove bunch of stuff... --- 3ds/acc/register.php | 6 ++++-- 3ds/chat/i/honey_troll.png | Bin 0 -> 1508 bytes 3ds/chat/index.php | 16 +++++++------- 3ds/chat/process.php | 3 ++- 3ds/chat/sender.php | 13 ++++++++++++ 3ds/forums/index.php | 13 ++++++++++-- 3ds/forums/topic.php | 2 +- 3ds/forums/view.php | 5 +---- 3ds/games/cbr/data/1/info.php | 20 ++++++++++++++++-- 3ds/games/cbr/data/1/pages/page8.png | Bin 0 -> 67576 bytes 3ds/games/cbr/data/1/pages/page9.png | Bin 0 -> 55874 bytes 3ds/games/cbr/shop.php | 9 ++++---- 3ds/games/nixsim/index.php | 1 + 3ds/info.php | 18 ++++++++++++++++ 3ds/livetype/index.php | 30 +++++++++++++++++++++++++++ 3ds/livetype/type.php | 0 3dsTownSquare.png | Bin 0 -> 1715 bytes 17 files changed, 112 insertions(+), 24 deletions(-) create mode 100644 3ds/chat/i/honey_troll.png create mode 100644 3ds/games/cbr/data/1/pages/page8.png create mode 100644 3ds/games/cbr/data/1/pages/page9.png create mode 100644 3ds/info.php create mode 100644 3ds/livetype/type.php create mode 100644 3dsTownSquare.png diff --git a/3ds/acc/register.php b/3ds/acc/register.php index 662cbd8..bdeb479 100644 --- a/3ds/acc/register.php +++ b/3ds/acc/register.php @@ -22,13 +22,15 @@ body, html { \[\]\(\).,\/\\&?$=!%^#* ])/', $_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 "
SUCCESS: Account created successfully!
"; + } else if (!(count($_POST["username"]) >= 3)){ + echo "ERROR: Username cannot be shorter than 3 characters!"; } else { echo "
ERROR: That account already exists or contains symbols! (<>[]().,/\\&?$=!%^#*)
"; } diff --git a/3ds/chat/i/honey_troll.png b/3ds/chat/i/honey_troll.png new file mode 100644 index 0000000000000000000000000000000000000000..58d8396462df77950c66bce6457c8b55096a0d5f GIT binary patch literal 1508 zcmV
",
":O)" => "
",
- ":o)" => "
"
+ ":o)" => "
",
+ ":ht:" => "
"
);
$txt = str_replace(array_keys($plazaEmotes), array_values($plazaEmotes), $txt);
diff --git a/3ds/chat/sender.php b/3ds/chat/sender.php
index 8c53ca0..da8750c 100644
--- a/3ds/chat/sender.php
+++ b/3ds/chat/sender.php
@@ -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"=>"{$_SESSION['ts_user']} has claimed the hourly points!","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.";
diff --git a/3ds/forums/index.php b/3ds/forums/index.php
index 828838b..e6d5488 100644
--- a/3ds/forums/index.php
+++ b/3ds/forums/index.php
@@ -63,9 +63,18 @@ include("../../detect.php");
$jsonD = json_decode($jsonF, true);
$name = "".$jsonD["name"]."";
$desc = $jsonD["description"];
+
$latest = count($jsonD["posts"]) - 1;
- $latestPost = "Latest post by: ".$jsonD["posts"][$latest]["from"].", \"".htmlspecialchars($jsonD["posts"][$latest]["title"])."\"";
- echo "