diff --git a/3ds/acc/profile/view.php b/3ds/acc/profile/view.php index 43cb741..daf10a2 100644 --- a/3ds/acc/profile/view.php +++ b/3ds/acc/profile/view.php @@ -32,6 +32,10 @@ body, html { if(isset($_GET["pf"]) && file_exists("../data/" . $_GET["pf"] . ".json")){ $jsonF = file_get_contents("../data/".$_GET["pf"].".json"); $jsonD = json_decode($jsonF, true); + $cont = str_ireplace("\\n", "
", htmlspecialchars($jsonD["profile"])); + $cont = str_ireplace("[code]", "
", $cont);
+	$cont = str_ireplace("[/code]", "
", $cont); + ?>
@@ -71,7 +75,7 @@ function addComment(item, index){

Created on

Banned:

Admin:

-

", htmlspecialchars($jsonD["profile"])); ?>

+



diff --git a/3ds/chat/i/clown.png b/3ds/chat/i/clown.png new file mode 100644 index 0000000..51a5d47 Binary files /dev/null and b/3ds/chat/i/clown.png differ diff --git a/3ds/chat/index.php b/3ds/chat/index.php index 6a3127b..7761a10 100644 --- a/3ds/chat/index.php +++ b/3ds/chat/index.php @@ -35,6 +35,7 @@ if(isset($_GET["room"])){ height: 200px; background-color: #ffffff; overflow-y: scroll; + word-wrap: break-word; } #msg { width: 272px; @@ -115,12 +116,12 @@ if(isset($_GET["room"])){ //Send the proper header information along with the request http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); - + document.getElementById("msg").value = ""; http.onreadystatechange = function() {//Call a function when the state changes. if(http.readyState == 4 && http.status == 200) { // We don't need to do anything with the response text. // alert(http.responseText); - document.getElementById("msg").value = ""; + if(http.responseText.startsWith("::message;")){ alert(http.responseText.replace("::message;","")); } @@ -153,7 +154,7 @@ if(isset($_GET["room"])){
-
+
Loading chat...
You have to be logged in! Login here
"mario", ":luigi:" => "luigi", ":weegee:" => "weegee", - ":pokeball:" => "pokeball src=", + ":pokeball:" => "pokeball", ":ds:" => "ds", ":baby:" => "baby", ":bheart:" => "heart", @@ -62,7 +62,11 @@ ":rec:" => "RECOMMENDED", ":stb:" => "STABLE", ":uns:" => "UNSTABLE", - ":pre:" => "pre" + ":pre:" => "pre", + ":0)" => "clown", + ":O)" => "clown", + ":o)" => "clown" + ); $txt = str_replace(array_keys($plazaEmotes), array_values($plazaEmotes), $txt); diff --git a/3ds/chat/sender.php b/3ds/chat/sender.php index 0a9e751..8c53ca0 100644 --- a/3ds/chat/sender.php +++ b/3ds/chat/sender.php @@ -51,9 +51,11 @@ include_once("functions.php"); $x = explode(" ", $_POST["msg"]); $who = $x[1]; $msg = strSplit($_POST["msg"], 2, " "); - if(count($jsonD["msg"])+1 >= strval($jsonD["max"])){ - array_pop($jsonD["msg"]); - } + + // Don't pop off array if whisper. To the general public, it may look as if a line was removed! + // if(count($jsonD["msg"])+1 >= strval($jsonD["max"])){ + // array_pop($jsonD["msg"]); + // } $finalmsg = array("cont"=>$msg[1],"time"=>time(),"type"=>"message","color"=>"red","visibility"=>$who,"from"=>$_SESSION["ts_user"]); array_unshift($jsonD["msg"], $finalmsg); $jsonString = json_encode($jsonD); diff --git a/3ds/forums/data/topic/0.json b/3ds/forums/data/topic/0.json new file mode 100644 index 0000000..39be213 --- /dev/null +++ b/3ds/forums/data/topic/0.json @@ -0,0 +1 @@ +{"name":"General Beta","description":"General topic for all users to use (beta)","allowGuest":false,"posts":[{"title":"System Post","from":"System","cont":"wuzzup guise???","time":0,"com":[]},{"title":"Hey guys","from":"HxOr1337","cont":"Hey guys\n\n[code][/code]","time":0,"com":[]}]} \ No newline at end of file diff --git a/3ds/forums/index.php b/3ds/forums/index.php new file mode 100644 index 0000000..debe560 --- /dev/null +++ b/3ds/forums/index.php @@ -0,0 +1,77 @@ + + + + + + 3DSTownSquare forums + + + + +
+ Oops! Our header could not be displayed! +
Welcome to 3DSTownSquare forums!
+
+
+
+
+
+ Topics +
+
+ ".$jsonD["name"].""; + $desc = $jsonD["description"]; + $latestPost = "Latest post by: ".$jsonD["posts"][0]["from"].", \"".htmlspecialchars($jsonD["posts"][0]["title"])."\""; + echo "
" . $name . "
".$latestPost."
"; + } + } + ?> + +
+
+ Back +
+
+ + \ No newline at end of file diff --git a/3ds/forums/topic.php b/3ds/forums/topic.php new file mode 100644 index 0000000..466242d --- /dev/null +++ b/3ds/forums/topic.php @@ -0,0 +1,87 @@ + + + + + + 3DSTownSquare forums + + + + +
+ Oops! Our header could not be displayed! +
Welcome to 3DSTownSquare forums!
+
+
+
+ +
+
+ + Posts in + +
+
+ $post){ + echo ""; + } + } else { + echo $error; + } + ?> + +
+
+ Back +
+
+ + \ No newline at end of file diff --git a/3ds/forums/view.php b/3ds/forums/view.php new file mode 100644 index 0000000..2254f82 --- /dev/null +++ b/3ds/forums/view.php @@ -0,0 +1,105 @@ + + + + + + + + + 3DSTownSquare forums + + + + +
+ Oops! Our header could not be displayed! +
Welcome to 3DSTownSquare forums!
+
+
+
+ + = strval($_GET["post"])){ + $post = $jsonD["posts"][strval($_GET["post"])]; + $cont = str_ireplace("\\n", "
", htmlspecialchars($post["cont"])); + $cont = str_ireplace("[code]", "
", $cont);
+				$cont = str_ireplace("[/code]", "
", $cont); + } else { + $error = "forums.errors.postnotfound"; + } + } else { + $error = "forums.errors.notfound"; + } + ?> +
+
+ +
+
+ "; + echo $cont; + } else { + echo $error; + } + ?> + +
+ + +
+ + ">Back +
+
+ + \ No newline at end of file diff --git a/3ds/index.php b/3ds/index.php index afa59d8..bfff20e 100644 --- a/3ds/index.php +++ b/3ds/index.php @@ -49,8 +49,13 @@ session_start(); $jsonD = json_decode($jsonF, true); $_SESSION["ts_points"] = $jsonD["points"]; ?>Welcome, " . $_SESSION["ts_user"] . ""; ?>, you have Login
+ + +
+ +
\ No newline at end of file diff --git a/images/forums.png b/images/forums.png new file mode 100644 index 0000000..c1ab636 Binary files /dev/null and b/images/forums.png differ diff --git a/images/index.php b/images/index.php new file mode 100644 index 0000000..09f6cea --- /dev/null +++ b/images/index.php @@ -0,0 +1,4 @@ +Error 403 +go home!"); +echo $rand[array_rand($rand)]; \ No newline at end of file