From 33d307ecdb0acbc43f645a2f5eb2a64ff0bff37a Mon Sep 17 00:00:00 2001 From: HotPizzaYT Date: Fri, 27 May 2022 01:04:28 +0000 Subject: [PATCH] Add Razr flip phone support --- 3ds/acc/register.php | 4 ++-- 3ds/chat/.innerch.php.swo | Bin 0 -> 12288 bytes 3ds/chat/.innerch.php.swp | Bin 0 -> 12288 bytes 3ds/chat/dsi.php | 12 +++++++++--- 3ds/chat/innerch.php | 3 ++- 3ds/forums/data/topic/0.json | 2 +- 3ds/forums/pa.php | 20 +++++++++++++++++--- 3ds/forums/~ | 32 ++++++++++++++++++++++++++++++++ 8 files changed, 63 insertions(+), 10 deletions(-) create mode 100644 3ds/chat/.innerch.php.swo create mode 100644 3ds/chat/.innerch.php.swp create mode 100644 3ds/forums/~ diff --git a/3ds/acc/register.php b/3ds/acc/register.php index b79b3e5..1e99dca 100755 --- a/3ds/acc/register.php +++ b/3ds/acc/register.php @@ -25,7 +25,7 @@ if(isset($_POST["username"]) && $_POST["username"] !== "" && isset($_POST["passw if(!file_exists("data/" . $_POST["username"] . ".json") && !preg_match_all('/([<>\[\]\(\).,\/\\&?$=!%^#* ])/', $_POST["username"]) && strlen($_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"=>30,"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"=>1,"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!

"; @@ -35,4 +35,4 @@ if(!file_exists("data/" . $_POST["username"] . ".json") && !preg_match_all('/([< echo "

ERROR: That account already exists or contains symbols! (<>[]().,/\\&?$=!%^#*)

"; } } -?> \ No newline at end of file +?> diff --git a/3ds/chat/.innerch.php.swo b/3ds/chat/.innerch.php.swo new file mode 100644 index 0000000000000000000000000000000000000000..fc4acef295497466dca5f183e5e7725bd0e82aba GIT binary patch literal 12288 zcmeI2L2KMb6vrpIq}wz}NlD0|f$?O??t-=2T~lfjNu>~{1kx1hq@@@mw9@SEBwCG_ z8D(SI&~MOQOMB}#2;>9w*h3EKH|V9bz4X>gPkke;ZEc8I#}J6&iT$ta(af89zj^Ns z#v1m%xb-Pr?+yrD?-KIQ&)*N_pQp&h?+8&+8r!_=61mg=aNw-e z=kFcS7!E@MNB{{S0VIF~kN^@u0!ZLE5-|A*@+~a<dI4GACtB!C2v z01`j~NB{{S0VIF~kN^@mh6JL7knt%(&boIYRyh{RVmpNAu{1oX!{g!~S=2Kw?eA)kZpfKGy*y-i3H^t?gHkD%u;?=#Rh zpcT;jpi7_&pz|QRuCpM#kN^@u0!RP}Ac5CKpwW0t?56=Ad#k=0Jf29(Je@}w6^Y+s z-R6{Q9gX=GGh)iwc9*q+dTT5*V_QAf4hp=XqHf@=I1bN}sUAB{z^<3}DNi-0V$`l# z+{wWr^?jc*70rf<(W_VK{_}@Ii=jw`+1c$Cr77!tZS7eda=D(Ej;U6$-%5mzrAoSa zHg3@fM|^@f30EciQ8a%%m(=D9`Sx$xYzg9FOCxsox! zsySG}=`5$yXqHn_pAJPfnD9q!T@1BRHCxrhtF*UD*E*e&DSf;I>U{5(VomnB9+v4b zC3ax^9TwFdsaMXL*B)fF%G)@NwDw!GiO@M$t>7+XbS;hRNwpuCOR^WR39Y$lH^a@1 z&COe%-GO?b!$Nb#wmXYiTLmg)HGNs<#lH2$(3PW%V71sSx8zL;;DdK#M;5!)ayj;< zkzdK8s(D8#5(@$U0&Xa~d*NKo0|jX5M!zHi%FW(8C>CZ}DCnjt_^{FQdSBKt(ilm_ zqj=J8-q$j_vBluvfQlb!+I+xws2}W|36=wR6w4xmSgiN%*zoDu=dMf3V{GB^R(~5J zwwxYHXY~l2wHCsJ$1>rSxtpuhsDj&dm7Q)vr;$i`IOZm_<(y|mw;||Ew{JtchBHWjTiQg*w4uTK$i8a-Kj)a9r2qf` literal 0 HcmV?d00001 diff --git a/3ds/chat/.innerch.php.swp b/3ds/chat/.innerch.php.swp new file mode 100644 index 0000000000000000000000000000000000000000..6242f43ba9d8388bc43b1144056d3c895baca313 GIT binary patch literal 12288 zcmeI2&x;gC6vs<1X8aixAqNAs<>1V~&h*SI64CAs0oNcH1FlI3%hL38*UXgmbTw7g zj!Po>3qr0T-uw>&`2%wF;6eX`Ttf8X&4ZqN)jhl0BQCQlLKa>#-|5}zs#o%A9uA*@#8)v(X$95!u1U`hoF|yL{b*+W7Y>A#a`Q3*Y z!?8#J2_OL^fCP{L5l`|MY|ApsgO9zHUo{?$C1tM8!jy{GYp_mz!nF=Z ze4QCF;cTPB8h*7klBuz+u44!J?m$t;cbD32p2ibBYPWrMsjyFZqB#}AX2s%W1{SI3 zd6cPeI#7(BJ4bh(-w|32L?X=QRvwTiq(EOaDQ+{w~WgNBLm z8kZZeT0{uC+n#@@ZEgQ-=UHd>+eO^$$i&>=Z+ohQ`X6pi~v@}!4ghu zF`Zhyn38&QAkzMr-)-uAppB~7Dkom1-DSGcY86cBy#-Kbd$$m4yu)>`O!q0VUE^=B zsJ2PHbJl$HAfsj8MoFl(*O-ol&bVs$HzA`dXy?{+<%}ui&tgWuCUH$et z)B_#lnk%-^n$OxYP$8@7+d9wptuBTxz0U|%iQQsL{x1Q%`)+K?e5+b6#$Gq_N12y3 z?|q8IT)@A98_Mo>IG6K40b01xZ;60nv$qe5xmo54x+x1jZ1k+&7j=x(hEnk`8aL~= zv`jCrGdMV);)j~nZ}Uy+`P*lL_G}O*T7U?2Geu60Vd~f#R7|Mx>+W bYVg&yYtXLY3=-g$HlZ?2XmG!@uiC!`G5no% literal 0 HcmV?d00001 diff --git a/3ds/chat/dsi.php b/3ds/chat/dsi.php index 89f468f..9eee834 100755 --- a/3ds/chat/dsi.php +++ b/3ds/chat/dsi.php @@ -1,4 +1,10 @@
- Back
+
- + - You have to be logged in! Login here
@@ -234,4 +240,4 @@ if(isset($_GET["room"])){ } ?> - \ No newline at end of file + diff --git a/3ds/chat/innerch.php b/3ds/chat/innerch.php index 89a4a62..766f0d9 100755 --- a/3ds/chat/innerch.php +++ b/3ds/chat/innerch.php @@ -1,5 +1,6 @@ [\/code]","time":0,"com":[]},{"title":"test","from":"HxOr1337","cont":"test! testity test test test...\r\n\r\n\r\nballs","time":1651021123,"com":[]},{"title":"Post :D","from":"HxOr1337","cont":"Posting post post post 123","time":1651713046,"com":[]},{"title":"Posted from DSi","from":"DSi","cont":"This has been posted from DSi, :D","time":1651978343,"com":[]},{"title":"We hit the min-width!","from":"DSi","cont":"Let's see what happens R:","time":1652213864,"com":[]},{"title":"3DSTownSquare.com","from":"HxOr1337","cont":"I'm proud to announce that 3DSTownsquare has been LAUNCHED! Thank you for waiting almost a month for this. It's been 31 days since 3DSTownSquare's release.","time":1653576810,"com":[]}]} \ No newline at end of file +{"name":"General Beta","description":"General topic for all users to use (beta)","allowGuest":false,"posts":[{"title":"You can now post to the forums","from":"HxOr1337","cont":"Great news everyone, you can now post to the forms!\r\n\r\nThis is a test, unfortunately. :troll:","time":1651021306,"com":[]},{"title":"Why did it roll back","from":"HxOr1337","cont":"Why?","time":1653599865,"com":[]},{"title":"asdsad","from":"HxOr1337","cont":"asdadas","time":1653599876,"com":[]}]} \ No newline at end of file diff --git a/3ds/forums/pa.php b/3ds/forums/pa.php index 22e412c..4095a13 100755 --- a/3ds/forums/pa.php +++ b/3ds/forums/pa.php @@ -5,10 +5,22 @@ body, html { = time()){ + // unset($_COOKIE["cd"]); + setCookie("cd", "", -1); + $iscd = true; +} else if(isset($_COOKIE["cd"])){ + $iscd = false; +} else { + $iscd = true; +} session_start(); - if(isset($_SESSION["ts_user"]) && $_SERVER["REQUEST_METHOD"] === "POST" && isset($_POST["topic"]) && isset($_POST["title"]) && isset($_POST["cont"])){ + if(isset($_SESSION["ts_user"]) && $_SERVER["REQUEST_METHOD"] === "POST" && isset($_POST["topic"]) && isset($_POST["title"]) && isset($_POST["cont"]) && isset($_COOKIE["cd"])){ if($_POST["title"] != "" && $_POST["cont"] != "" && strlen($_POST["title"]) <= 32 && strlen($_POST["cont"]) <= 5000){ - if(file_exists("data/topic/".$_POST["topic"].".json")){ + if(file_exists("data/topic/".$_POST["topic"].".json") && json_decode(file_get_contents("../acc/data/".$_SESSION["ts_user"].".json"),true)["banned"] <= 0 && $iscd){ + setCookie("cd", time()+30000, time()+30000); $jsonF = file_get_contents("data/topic/".$_POST["topic"].".json"); $jsonD = json_decode($jsonF, true); $posts = $jsonD["posts"]; @@ -20,6 +32,8 @@ body, html { echo "Your post has been submittedhere."; + } else { + echo "You're banned, probably."; } }else{ echo "forums.error.unknown"; @@ -27,4 +41,4 @@ body, html { } else { echo "Something went wrong.
"; echo "Debug info: ".var_dump($_SERVER["REQUEST_METHOD"]); - } \ No newline at end of file + } diff --git a/3ds/forums/~ b/3ds/forums/~ new file mode 100644 index 0000000..3177038 --- /dev/null +++ b/3ds/forums/~ @@ -0,0 +1,32 @@ + + +$_POST["title"],"from"=>$_SESSION["ts_user"],"cont"=>$_POST["cont"],"time"=>time(),"com"=>array()); + array_push($jsonD["posts"], $newPost); + $newj = json_encode($jsonD); + file_put_contents("data/topic/".$_POST["topic"].".json", $newj); + $id = count($jsonD["posts"]) - 1; + echo "Your post has been submittedhere."; + + + } + }else{ + echo "forums.error.unknown"; + } + } else { + echo "Something went wrong.
"; + echo "Debug info: ".var_dump($_SERVER["REQUEST_METHOD"]); + }