Advertisement
Guest User

Untitled

a guest
Jan 4th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.5.0
  8. * @ Author : DeZender
  9. * @ Release on : 09.06.2012
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. require( '.' . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'boot.php' );
  15. require_once( MODEL_PATH . 'profile.php' );
  16. class GPage extends SecureGamePage {
  17. var $fullView = null;
  18. var $profileData = null;
  19. var $selectedTabIndex = null;
  20. var $villagesCount = null;
  21. var $villages = null;
  22. var $birthDate = null;
  23. var $agentForPlayers = array( );
  24. var $myAgentPlayers = array( );
  25. var $errorText = null;
  26. var $bbCodeReplacedArray = array( );
  27. var $isAdmin = null;
  28.  
  29. function GPage() {
  30. parent::securegamepage( );
  31. $this->viewFile = 'profile.phtml';
  32. $this->contentCssClass = 'player';
  33. }
  34.  
  35. function load() {
  36. parent::load( );
  37. $this->isAdmin = $this->data['player_type'] == PLAYERTYPE_ADMIN;
  38. $uid = (( isset( $_GET['uid'] ) && 0 < intval( $_GET['uid'] ) ) ? intval( $_GET['uid'] ) : $this->player->playerId);
  39.  
  40. if (( ( ( $this->isAdmin && isset( $_GET['spy'] ) ) && 0 < $uid ) && $uid != $this->player->playerId )) {
  41. $gameStatus = $this->player->gameStatus;
  42. $previd = $this->player->playerId;
  43. $this->player = new Player( );
  44. $this->player->playerId = $uid;
  45. $this->player->prevPlayerId = $previd;
  46. $this->player->isAgent = FALSE;
  47. $this->player->isSpy = TRUE;
  48. $this->player->gameStatus = $gameStatus;
  49. $this->player->save( );
  50. $this->redirect( 'village1.php' );
  51. return null;
  52. }
  53.  
  54. $this->selectedTabIndex = 0;
  55. $this->fullView = FALSE;
  56. $m = new ProfileModel( );
  57.  
  58. if ($uid != $this->player->playerId) {
  59. $this->profileData = $m->getPlayerDataById( $uid );
  60.  
  61. if ($this->profileData == NULL) {
  62. $m->dispose( );
  63. $this->redirect( 'village1.php' );
  64. return null;
  65. }
  66. } else {
  67. $this->profileData = $this->data;
  68. $this->profileData['id'] = $uid;
  69. $this->fullView = !$this->player->isAgent;
  70. $this->selectedTabIndex = (( ( ( ( !$this->player->isAgent && isset( $_GET['t'] ) ) && is_numeric( $_GET['t'] ) ) && 0 <= intval( $_GET['t'] ) ) && intval( $_GET['t'] ) <= 4 ) ? intval( $_GET['t'] ) : 0);
  71.  
  72. if (( $this->selectedTabIndex == 4 && $this->data['player_type'] == PLAYERTYPE_TATAR )) {
  73. $this->selectedTabIndex = 0;
  74. }
  75.  
  76. $agentForPlayers = (trim( $this->profileData['agent_for_players'] ) == '' ? array( ) : explode( ',', $this->profileData['agent_for_players'] ));
  77. foreach ($agentForPlayers as $agent) {
  78. list( $agentId, $agentName ) = explode( ' ', $agent );
  79. $this->agentForPlayers[$agentId] = $agentName;
  80. }
  81.  
  82. $myAgentPlayers = (trim( $this->profileData['my_agent_players'] ) == '' ? array( ) : explode( ',', $this->profileData['my_agent_players'] ));
  83. foreach ($myAgentPlayers as $agent) {
  84. list( $agentId, $agentName ) = explode( ' ', $agent );
  85. $this->myAgentPlayers[$agentId] = $agentName;
  86. }
  87. }
  88.  
  89. $this->profileData['rank'] = $m->getPlayerRank( $uid, $this->profileData['total_people_count'] * 10 + $this->profileData['villages_count'] );
  90. .......................................................
  91. ...........................
  92. .............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement