r59 Page-Client.Tpl And Client For Noobs xD And .Htacess

Status
Not open for further replies.

MD5

New Member
Nov 14, 2010
22
0
Page Client.Tpl
PHP:
<body id="client" class="flashclient"> 
 
<script type="text/javascript"> 
var habboDefaultClientPopupUrl = "%www%/client";
</script> 

<noscript> 
    <meta http-equiv="refresh" content="0;url=%www%/client/nojs" /> 
</noscript>

<script type="text/javascript"> 
    FlashExternalInterface.loginLogEnabled = true;
    
    FlashExternalInterface.logLoginStep("web.view.start");
    
    if (top == self) {
        FlashHabboClient.cacheCheck();
    }
    var flashvars = {
            "client.allow.cross.domain" : "1", 
            "client.notify.cross.domain" : "0", 
            "connection.info.host" : "127.0.0.1", 
            "connection.info.port" : "30000", 
            "site.url" : "%www%", 
            "url.prefix" : "%www%", 
            "client.reload.url" : "%www%/account/reauthenticate?page=/flash_client", 
            "client.fatal.error.url" : "%www%/flash_client_error", 
            "client.connection.failed.url" : "%www%/client_connection_failed", 
            "external.hash" : "", 
            "external.variables.txt" : "%www%/r59/external_variables", 
            "external.texts.txt" : "%www%/r59/external_flash_texts", 
            "user_partnersite" : "habbo", 
            "use.sso.ticket" : "1", 
            "sso.ticket" : "%sso_ticket%", 
            "processlog.enabled" : "0", 
            "account_id" : "0", 
            "client.starting" : "Please wait!, Habbo is starting up.", 
            "flash.client.url" : "%flash_client_url%", 
            "user.hash" : "", 
            "has.identity" : "0", 
            "flash.client.origin" : "popup" 
    };
    var params = {
        "base" : "%flash_base%",
        "allowScriptAccess" : "always",
        "menu" : "false"                
    };
    
    if (!(HabbletLoader.needsFlashKbWorkaround())) {
    	params["wmode"] = "opaque";
    }
    
    var clientUrl = "%flash_base%Habbo10.swf";
    try {
        if (swfobject.getFlashPlayerVersion().major <= 9) { 
            clientUrl = "%flash_base%Habbo.swf"; 
        }
    } catch(e) {}
    swfobject.embedSWF(clientUrl, "flash-container", "100%", "100%", "9.0.115", "http://images.habbo.com/habboweb/59_7fe4ac97ec6a94c67fd0f68778753cf7/8/web-gallery/flash/expressInstall.swf", flashvars, params);
 
    window.onbeforeunload = unloading;
    function unloading() {
        var clientObject;
        if (navigator.appName.indexOf("Microsoft") != -1) {
            clientObject = window["flash-container"];
        } else {
            clientObject = document["flash-container"];
        }
        try {
            clientObject.unloading();
        } catch (e) {}
    }
</script>
 
<div id="overlay"></div> 
<div id="client-ui" > 
    <div id="flash-wrapper"> 
    <div id="flash-container"> 
        <div id="content" style="width: 400px; margin: 20px auto 0 auto; display: none"> 
<div class="cbb clearfix"> 
    <h2 class="title">Please Install Adobe Flash Player.</h2> 
    <div class="box-content"> 
            <p>You can install and download Adobe Flash Player here: <a href="http://get.adobe.com/flashplayer/">install flash player</a>. More instructions for installation can be found here: <a href="http://www.adobe.com/products/flashplayer/productinfo/instructions/">More information</a></p> 
            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://images.habbo.com/habboweb/59_7fe4ac97ec6a94c67fd0f68778753cf7/8/web-gallery/v2/images/client/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p> 
    </div> 

</div> 
        </div> 
        <script type="text/javascript"> 
            $('content').show();
        </script> 
        <noscript> 
            <div style="width: 400px; margin: 20px auto 0 auto; text-align: center"> 
                <p>If you are not automatically redirected, please <a href="/client/nojs">click here</a></p> 
            </div> 
        </noscript> 
    </div> 
    </div> 
	<div id="content" class="client-content"></div>            
</div> 
    <div style="display: none"> 
<div id="habboCountUpdateTarget"> 
%hotel_status%
</div> 
	<script language="JavaScript" type="text/javascript"> 
		setTimeout(function() {
			HabboCounter.init(600);
		}, 20000);
	</script> 
    </div> 
    <script type="text/javascript"> 
        RightClick.init("flash-wrapper", "flash-container");
    </script> 
 

</body> 
</html>
Client.Php
PHP:
<?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);

require_once "global.php";
require_once "inc/class.rooms.php";

if (!LOGGED_IN)
{
	header("Location: " . WWW. "/login_popup");
	exit;
}

$forwardType = 0;
$forwardId = 0;

if ($users->getUserVar(USER_ID, 'newbie_status') == "0")
{
	if (isset($_GET['createRoom']) && is_numeric($_GET['createRoom']))
	{
		$roomId = RoomManager::CreateRoom(USER_NAME . "'s room", USER_NAME, 'model_s');

		switch (intval($_GET['createRoom']))
		{
			default:
			case 0:
			
				RoomManager::PaintRoom($roomId, '1701', '601');
				break;
				
			case 1:
			
				RoomManager::PaintRoom($roomId, '607', '111');
				break;
				
			case 2:
			
				RoomManager::PaintRoom($roomId, '1901', '301');
				break;
				
			case 3:
			
				RoomManager::PaintRoom($roomId, '1801', '110');
				break;
				
			case 4:
			
				RoomManager::PaintRoom($roomId, '503', '104');
				break;
				
			case 5:
			
				RoomManager::PaintRoom($roomId, '804', '107');
				break;
		}

		//die('createRoom Result: ' . $roomId);
		dbquery("UPDATE users SET home_room = '" . $roomId . "', newbie_status = '1' WHERE id = '" . USER_ID . "' LIMIT 1");
		
		//$forwardType = 2;
		//$forwardId = $roomId;
	}
	else
	{
		header("Location: " . WWW . "/client?createRoom=" . rand(0, 5));
		exit;
	}
}
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", false) == "1")
{
dbquery("UPDATE users SET newbie_status = '2' WHERE id = '" . USER_ID . "' LIMIT 1");
}

$users->CheckSSO(USER_ID);

$tpl->Init();

$tpl->AddGeneric('head-init');
$tpl->AddIncludeSet('default');
$tpl->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/59_7fe4ac97ec6a94c67fd0f68778753cf7/8/web-gallery/v2/styles/habboclient.css', 'stylesheet'));
$tpl->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/59_7fe4ac97ec6a94c67fd0f68778753cf7/8/web-gallery/v2/styles/habboflashclient.css', 'stylesheet'));
$tpl->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/59_7fe4ac97ec6a94c67fd0f68778753cf7/8/web-gallery/static/js/habboflashclient.js'));			
$tpl->WriteIncludeFiles();
$tpl->AddGeneric('head-bottom');

$client = new Template('page-client');
$client->SetParam('page_title', ' ');
$client->SetParam('sso_ticket', $users->GetUserVar(USER_ID, 'auth_ticket', false));
$client->SetParam('flash_base', '%www%/r59/');
$client->SetParam('flash_client_url', '%www%/r59/');
$client->SetParam('hotel_status', $core->GetUsersOnline() . ' users online now!');
$client->SetParam('forwardType', $forwardType);
$client->SetParam('forwardId', $forwardId);

if (isset($_GET['forceTicket']) && $users->HasFuse(USER_ID, 'fuse_admin'))
{
	$client->SetParam('sso_ticket', $_GET['forceTicket']);
}

$tpl->AddTemplate($client);

$tpl->Output();

?>
.htacess
PHP:
RewriteRule ^r59/figurepartconfig/partsets(|/)$ /r59/figurepartconfig/partsets.xml
RewriteRule ^r59/figurepartconfig/draworder(|/)$ /r59/figurepartconfig/draworder.xml
RewriteRule ^r59/figurepartconfig/animation(|/)$ /r59/figurepartconfig/animation.xml
RewriteRule ^r59/figuredata(|/)$ /r59/figuredata.xml
RewriteRule ^r59/furnidata(|/)$ /r59/furnidata.txt
RewriteRule ^r59/productdata(|/)$ /r59/productdata.txt
RewriteRule ^r59/external_variables(|/)$ /r59/external_variables.txt
RewriteRule ^r59/external_flash_texts(|/)$ /r59/external_flash_texts.txt
RewriteRule ^r59/banner(|/)$ /r59/banner.png

What This Is For.
This Is For Your r59 Swf's For Page Client
Got To Inc Then GO To .tpl then scroll down
and when you see page-client copy and paste this code
in there delete the first one.For client go back to to the beginning of folder
go to client do copy and paste this client.php and paste in there delete the old one
for .htacess go above global it will say .htacess and skip a line and paste that for client to work.
 

Ayumi

Joshua Pike.
Sep 13, 2010
1,028
73
Since this is for noobs, you should go into more detail of what it is for, why it is here and why they need it etc. But nice release,
 

Livar

Now 35% cooler!
Oct 15, 2010
846
86
I know this is for PEjump's swf's, and sorta useless without prehosted ;) But nice.
 
Status
Not open for further replies.

Users who are viewing this thread

Top