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 0000000..58d8396 Binary files /dev/null and b/3ds/chat/i/honey_troll.png differ diff --git a/3ds/chat/index.php b/3ds/chat/index.php index 43173ff..686289a 100644 --- a/3ds/chat/index.php +++ b/3ds/chat/index.php @@ -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: ; } #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"])){
Back
- +
-
-
Loading chat...
+
+ You have to be logged in! Login here
"pre", ":0)" => "clown", ":O)" => "clown", - ":o)" => "clown" + ":o)" => "clown", + ":ht:" => "Honey Troll" ); $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 "
" . $name . "
".$latestPost."
"; + + $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 "
" . $name . "
".$latestPost."
"; } } ?> diff --git a/3ds/forums/topic.php b/3ds/forums/topic.php index 6c75964..138cdb5 100644 --- a/3ds/forums/topic.php +++ b/3ds/forums/topic.php @@ -55,7 +55,7 @@ include("../../detect.php"); ?> Oops! Our header could not be displayed!
-
".$error.""; } ?>
+
".$error.""; } ?>
diff --git a/3ds/forums/view.php b/3ds/forums/view.php index 3ff214d..a4af77e 100644 --- a/3ds/forums/view.php +++ b/3ds/forums/view.php @@ -5,10 +5,7 @@ include("../../detect.php"); ?> - - - + + + +

Coming Soon

+ LiveType is coming soon... +
+ Test + + \ No newline at end of file diff --git a/3ds/livetype/type.php b/3ds/livetype/type.php new file mode 100644 index 0000000..e69de29 diff --git a/3dsTownSquare.png b/3dsTownSquare.png new file mode 100644 index 0000000..291c7d9 Binary files /dev/null and b/3dsTownSquare.png differ