<?php require_once "../FastInit.php"; header("Content-Type: text/json"); use api\Requests\Requests as Req; use habbo\Articles\ArticleManager; $article_id = Req::Php("article_id"); function goerror($s) { die(json_encode(["error" => true, "message" => $s])); } if (!$article_id) { goerror("ERROR_MISS_ARGS"); } $article = ArticleManager::GetNotice($article_id); if (!$article->Success) { goerror("ERROR_ARTICLE_NOT_FOUND"); } echo json_encode($article->ToArray());
<?php require_once '../FastInit.php'; //header("Content-Type: text/json"); use habbo\Session\HabboCookie as HC; use habbo\Articles\ArticleManager as AM; use api\Requests\Requests as Req; use habbo\Users\HabboUserManager as Habbo; $articleid = Req::Php("article_id"); $positive = Req::Php("positive"); $err = ["error" => true, "message" => "UNKOWN_ERROR"]; function goerror($str) { die(json_encode(["error" => true, "message" => $str])); } if (!HC::HasSession()) { goerror("ERROR_SESSION_NOT_FOUND"); } $session = json_decode(HC::GetSessionData()->value); $habbo = Habbo::GetHabboByName($session->username); if (!$habbo) { goerror("ERROR_SESSION_USER_NOT_FOUND"); } if (!$articleid || !$positive) { goerror("ERROR_MISS_ARGS"); } $article = AM::GetNotice($articleid); if (!$article->Success) { goerror("ERROR_ARTICLE_NOT_FOUND"); } $article->Vote->AddVote($habbo->id, $positive == "true");
require_once '../FastInit.php'; use habbo\Users\HabboUserManager as Habbo; use api\Requests\Requests; use api\Helper\_Array as Arr; use habbo\Session\HabboCookie as CM; use api\Helper\Localization as Loc; header("Content-Type: text/json"); //echo file_get_contents('php://input'); $userdata = ["error" => true, "message" => "Erro desconhecido"]; if (!Arr::ContainsAll(Requests::$PhpInput, ["username", "password"])) { $userdata["error"] = true; $userdata["message"] = "Preencha com Nome e Senha!"; goto end; } $username = Requests::Php("username"); $password = Requests::Php("password"); $user = Habbo::GetHabboByName($username); if (!$user) { $userdata["error"] = true; $userdata["message"] = "Este usuário não existe!"; goto end; } if (!Arr::ContainsAll(Requests::$PhpInput, ["username", "password"])) { $userdata["error"] = true; $userdata["message"] = "Preencha com Nome e Senha!"; goto end; } if (!Habbo::CheckAuth($user, $password)) { $userdata["error"] = true; $userdata["message"] = "Senha Incorreta!"; goto end;
<?php require '../FastInit.php'; use habbo\Mus\MusCommunication as Mus; use api\Requests\Requests as Req; use habbo\Session\HabboCookie as C; if (!C::HasSession()) { echo "ERROR_NO_SESSION"; die; } $habbo = C::GetHabbo(); $command = Req::Php("command"); $user = Req::Php("username"); $extravalue = Req::Php("extravalue"); if ($user == "") { $user = $habbo->username; } else { if ($habbo->rank < STAFF_MIN_RANK) { echo "NO_RIGHTS_TO_THAT"; die; } } switch ($command) { case "sendtoroom": echo Mus::SendUserToRoom($user, $extravalue); break; case "updatemotto": echo Mus::UpdateMotto($user, $extravalue); break; default: echo "ERROR_COMMAND_NOT_REGISTRED";
<?php require_once '../FastInit.php'; //header("Content-Type: text/json"); use habbo\Users\HabboUserManager as Habbo; use api\Requests\Requests as Req; use api\Database\DatabaseManager as DB; use habbo\Rooms\RoomManager as Rooms; $userid = Req::Php("user_id"); $username = Req::Php("username"); $habbo = null; function do_error($type) { die(json_encode(["error" => true, "type" => $type])); } if ($userid == "" && $username == "") { do_error("NO_PARAMS"); } if ($userid == "") { $habbo = Habbo::GetHabboByName($username); } else { $habbo = Habbo::GetHabboById($userid); } if (!$habbo) { do_error("USER_NOT_FOUND"); } $jsondata = []; $userdata = ["username" => $habbo->username, "motto" => $habbo->motto, "look" => $habbo->look, "last_online" => $habbo->last_online, "account_created" => $habbo->account_created, "seasonal_currency" => $habbo->seasonal_currency, "credits" => $habbo->credits, "activity_points" => $habbo->activity_points]; $relations = []; $badges = []; $rooms = Rooms::GetRoomsByOwnerName($habbo->username)->ParseToPublicArray();
<?php require_once '../FastInit.php'; use api\Requests\Requests as Req; use api\Database\DatabaseManager as DB; use habbo\Session\HabboCookie as C; use habbo\Users\HabboUserManager as Habbo; use habbo\Articles\ArticleCommentManager; use habbo\Articles\ArticleManager; header('Content-Type : text/json'); $do = Req::Php('do'); $article_id = Req::Php("article_id"); $message = Req::Php("message"); $comment_id = Req::Php("comment_id"); switch ($do) { case 'comment': if ($message == "" || !C::HasSession()) { break; } $userdata = json_decode(C::GetSessionData()->value); $habbo = Habbo::GetHabboByName($userdata->username); if (!$habbo) { break; } $article = ArticleManager::GetNotice($article_id); if (!$article->Success) { break; } //echo json_encode($article); if ($comment_id == "") { $article->Comments->AddComment($habbo->id, $message);