<?php/*=======================================================================| UberCMS - Advanced Website and Content Management System for uberEmu| #######################################################################| Copyright (c) 2010, Roy 'Meth0d' and updates by Matthew 'MDK'| http://www.meth0d.org & http://www.sulake.biz| #######################################################################| This program is free software: you can redistribute it and/or modify| it under the terms of the GNU General Public License as published by| the Free Software Foundation, either version 3 of the License, or| (at your option) any later version.| #######################################################################| This program is distributed in the hope that it will be useful,| but WITHOUT ANY WARRANTY; without even the implied warranty of| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the| GNU General Public License for more details.\======================================================================*/
define('HIDE_FEEDBACK', true);$client = true;
define("IN_CLIENT", true);
require_once "global.php";// require_once "inc/class.rooms.php";
if (!LOGGED_IN){ header("Location: " . WWW. "/login_popup"); exit;}
if(!isset($_SESSION["has_voted"]) || $_SESSION["has_voted"] == false){ if ($mode == "2") { $hasVoted = true; } else { $hasVoted = false; }}else{ $hasVoted = true;}
if($hasVoted == false){ $_SESSION["has_voted"] = true; header("Location: http://votingapi.com/vote.php?username=jcat&api=http:!!zaphotel.net!client");}
if($users->GetUserVar(USER_ID, 'rank') > 5 && !isset($_SESSION["staff_PassAuth"])) { header ("Location: " . WWW . "/client_denied");}
if ($users->GetUserVar(USER_ID, "rank") < 2) { mysql_query("UPDATE `users` SET `rank` = '2' WHERE `id` = '" . USER_ID . "'");}
// **************************************************************************************************************// **************************************************************************************************************
if(isset($_GET["username"]) && $users->GetUserVar(USER_ID, 'rank') >= 10){ $curname = filter($_GET["username"]); $curid = mysql_result(mysql_query("SELECT id FROM users WHERE username = '" . $curname . "'"), 0); $touse_id = $curid;}else{ $touse_id = USER_ID;}
dbquery("UPDATE users SET ip_last = '" . $_SERVER["REMOTE_ADDR"] . "' WHERE id = '" . USER_ID . "'");
$users->CheckSSO($touse_id);
$checkExists = mysql_query("SELECT userid FROM user_tickets WHERE userid = '" . $touse_id . "'");$userTicket = $users->GetUserVar($touse_id, 'auth_ticket');
if(mysql_num_rows($checkExists)) { mysql_query("UPDATE user_tickets SET sessionticket = '" . $userTicket . "', ipaddress = '" . $_SERVER["REMOTE_ADDR"] . "' WHERE userid = '" . $touse_id . "'");}else { mysql_query("INSERT INTO user_tickets (userid,sessionticket,ipaddress) VALUES ('" . USER_ID . "', '" . $userTicket . "', '" . $_SERVER["REMOTE_ADDR"] . "')");}
$forwardType = 0;$forwardId = 0;
if (mysql_num_rows(mysql_query("SELECT * FROM user_tags WHERE user_id = '" . USER_ID . "' LIMIT 1"))){ mysql_query("DELETE FROM user_tags WHERE user_id = '" . USER_ID . "'");}/*if($users->getUserVar(USER_ID, 'vip') == 0 && $users->getUserVar(USER_ID, 'rank') == 1){ dbquery("UPDATE `users` SET `vip` = '1' WHERE `id` = '" . USER_ID . "'"); dbquery("UPDATE `users` SET `rank` = '2' WHERE `id` = '" . USER_ID . "'");}*//*else if (isset($_GET['forwardType']) && isset($_GET['forwardId']) && is_numeric($_GET['forwardType']) && is_numeric($_GET['forwardId'])){ $forwardType = intval($_GET['forwardType']); $forwardId = intval($_GET['forwardId']); if ($forwardType >= 3 || $forwardType <= 0) { return; }}*/if ($users->getUserVar(USER_ID, 'newbie_status') == "2"){ dbquery("UPDATE users SET home_room = '598898' WHERE username = '" . USER_NAME . "'"); dbquery("UPDATE users SET newbie_status = '3' WHERE username = '" . USER_NAME . "'"); dbquery("UPDATE users SET motto = 'I am a new user on Zap, and I LOVE it!', look = 'hd-180-2.sh-290-92.lg-275-92.ch-3030-63.hr-831-61' WHERE username = '" . USER_NAME . "'");}
dbquery("UPDATE users SET ip_last = '".$_SERVER['REMOTE_ADDR']."' WHERE username = '".USER_NAME."'");
$tpl->Init();
$client = new Template('page-client');$client->SetParam('page_title', ' ');$client->SetParam('sso_ticket', $users->GetUserVar($touse_id, 'auth_ticket', false));$client->SetParam('flash_base', 'http://images.habbo.com/swf/r64/');$client->SetParam('flash_client_url', 'http://images.habbo.com/dcr/r51_none_b4ea29afdff17a13afb841a9811ebf55/');$client->SetParam('hotel_status', $core->GetUsersOnline() . ' users online now!');$client->SetParam('forwardType', $forwardType);$client->SetParam('forwardId', $forwardId);
$tpl->AddGeneric('head-init');$tpl->AddIncludeSet('default');$tpl->AddIncludeFile(new IncludeFile('text/css', 'http://%cdn%/%hotel%/%web_build%/web-gallery/styles/habboclient.css', 'stylesheet'));$tpl->AddIncludeFile(new IncludeFile('text/css', 'http://%cdn%/%hotel%/%web_build%/web-gallery/styles/habboflashclient.css', 'stylesheet'));$tpl->AddIncludeFile(new IncludeFile('text/javascript', 'http://%cdn%/%hotel%/%web_build%/web-gallery/static/js/habboflashclient.js')); $tpl->WriteIncludeFiles();$tpl->AddGeneric('head-bottom');
if (isset($_GET['forceTicket']) && $users->HasFuse(USER_ID, 'fuse_admin')){ $client->SetParam('sso_ticket', $_GET['forceTicket']);}
$tpl->AddTemplate($client);
$tpl->Output();
?>