Advertisement
Porygon

ph-pst-384264

Jan 31st, 2012
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.67 KB | None | 0 0
  1. <?php
  2. /*=======================================================================
  3. | UberCMS - Advanced Website and Content Management System for uberEmu
  4. | #######################################################################
  5. | Copyright (c) 2012, Sheridan 'Vortex' and updates by Matthew 'MDK'
  6. | http://www.meth0d.org & http://www.sulake.biz
  7. | #######################################################################
  8. | This program is free software: you can redistribute it and/or modify
  9. | it under the terms of the GNU General Public License as published by
  10. | the Free Software Foundation, either version 3 of the License, or
  11. | (at your option) any later version.
  12. | #######################################################################
  13. | This program is distributed in the hope that it will be useful,
  14. | but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. | GNU General Public License for more details.
  17. \======================================================================*/
  18.  
  19. define('HIDE_FEEDBACK', true);
  20.  
  21. require_once "global.php";
  22. require_once "inc/class.rooms.php";
  23.  
  24. if (!LOGGED_IN)
  25. {
  26.     header("Location: " . WWW. "/login_popup");
  27.     exit;
  28. }
  29.  
  30. $forwardType = 2;
  31. $forwardId = 2;
  32.  
  33. if ($users->getUserVar(USER_ID, 'newbie_status') == "0")
  34. {
  35.     if (isset($_GET['createRoom']) && is_numeric($_GET['createRoom']))
  36.     {
  37.         $roomId = RoomManager::CreateRoom(USER_NAME . "\'s room", USER_NAME, 'model_s');
  38.  
  39.         switch (intval($_GET['createRoom']))
  40.         {
  41.             default:
  42.             case 0:
  43.              
  44.                 RoomManager::PaintRoom($roomId, '1701', '601');
  45.                 break;
  46.                  
  47.             case 1:
  48.              
  49.                 RoomManager::PaintRoom($roomId, '607', '111');
  50.                 break;
  51.                  
  52.             case 2:
  53.              
  54.                 RoomManager::PaintRoom($roomId, '1901', '301');
  55.                 break;
  56.                  
  57.             case 3:
  58.              
  59.                 RoomManager::PaintRoom($roomId, '1801', '110');
  60.                 break;
  61.                  
  62.             case 4:
  63.              
  64.                 RoomManager::PaintRoom($roomId, '503', '104');
  65.                 break;
  66.                  
  67.             case 5:
  68.              
  69.                 RoomManager::PaintRoom($roomId, '804', '107');
  70.                 break;
  71.         }
  72.  
  73.         //die('createRoom Result: ' . $roomId);
  74.         dbquery("UPDATE users SET home_room = '" . $roomId . "', newbie_status = '1' WHERE id = '" . USER_ID . "' LIMIT 1");
  75.          
  76.         //$forwardType = 2;
  77.         //$forwardId = $roomId;
  78.     }
  79.     else
  80.     {
  81.         header("Location: " . WWW . "/client?createRoom=" . rand(0, 5));
  82.         exit;
  83.     }
  84. }
  85. else if (isset($_GET['forwardType']) && isset($_GET['forwardId']) && is_numeric($_GET['forwardType']) && is_numeric($_GET['forwardId']))
  86. {
  87.     $forwardType = intval($_GET['forwardType']);
  88.     $forwardId = intval($_GET['forwardId']);
  89.      
  90.     if ($forwardType >= 3 || $forwardType <= 0)
  91.     {
  92.         return;
  93.     }
  94. }
  95.  
  96. if ($users->GetUserVar(USER_ID, "newbie_status", false) == "1")
  97. {
  98.     header("Location: " . WWW . "/account/policy-verify");
  99.     exit;
  100. }
  101.  
  102. $users->CheckSSO(USER_ID);
  103.  
  104. $tpl->Init();
  105.  
  106. $tpl->AddGeneric('head-init');
  107. $tpl->AddIncludeSet('default');
  108. $tpl->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/233/web-gallery/v2/styles/habboclient.css', 'stylesheet'));
  109. $tpl->AddIncludeFile(new IncludeFile('text/css', 'http://images.habbo.com/habboweb/63_1dc60c6d6ea6e089c6893ab4e0541ee0/233/web-gallery/v2/styles/habboflashclient.css', 'stylesheet'));
  110. $tpl->AddIncludeFile(new IncludeFile('text/javascript', 'http://images.habbo.com/habboweb/%web_build%/web-gallery/static/js/habboflashclient.js'));            
  111. $tpl->WriteIncludeFiles();
  112. $tpl->AddGeneric('head-bottom');
  113.  
  114. $client = new Template('page-client');
  115. $client->SetParam('page_title', ' ');
  116. $client->SetParam('sso_ticket', $users->GetUserVar(USER_ID, 'auth_ticket', false));
  117. $client->SetParam('flash_base', 'http://176.32.51.107/');
  118. $client->SetParam('flash_client_url', 'http//176.32.51.107/client/');
  119. $client->SetParam('hotel_status', $core->GetUsersOnline() . ' users online now!');
  120. $client->SetParam('forwardType', $forwardType);
  121. $client->SetParam('forwardId', $forwardId);
  122.  
  123. if (isset($_GET['forceTicket']) && $users->HasFuse(USER_ID, 'fuse_admin'))
  124. {
  125.     $client->SetParam('sso_ticket', $_GET['forceTicket']);
  126. }
  127.  
  128. $tpl->AddTemplate($client);
  129.  
  130. $tpl->Output();
  131.  
  132. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement