Changeset 646 for trunk/test_server/index.php
- Timestamp:
- Oct 30, 2009, 10:44:28 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test_server/index.php
r645 r646 1 1 <?php 2 require_once( 'configuration.php' ); 3 Switch ($lang) 2 include_once( 'config.php' ); 3 include_once( 'functiondata.php' ); 4 include_once( 'languages.php' ); 5 ?> 6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 7 <html xmlns="http://www.w3.org/1999/xhtml"> 8 <head> 9 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" /> 10 <title><?php echo "$title"; ?></title> 11 <link href="<?php echo $img_base ?>rospora.css" rel="stylesheet" type="text/css" /> 12 </head> 13 <body style="text-align: center"> 14 <table width="57%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#999999" height="363"> 15 <tr> 16 <th height="72" colspan="4" class="cells" scope="col"><div align="left" class="cell"> 17 <a href="index.php"><img src="<?php echo $img_base ?>logo4.gif" alt="Mangos" width="214" height="68" class="header" border="0"/></a></div></th> 18 </tr> 19 <tr> 20 <td height="32" colspan="4" class="cell"></td> 21 </tr> 22 <tr> 23 <td width="4%" rowspan="7" class="cell"></td> 24 <th width="24%" height="36" class="menu2" nowrap>MENU</th> 25 <td width="4%" rowspan="7" align="left" class="cell"></td> 26 <td width="68%" height="36" align="left" class="menu2"> 27 <?php 28 $select= $_GET['select']; 29 print "<strong class=title><center>$status $title</center></strong><br>"; 30 ?> 31 </td> 32 </tr> 33 <tr> 34 <th height="32" class="menu1" nowrap style="background-color: #333333"> 35 <a href="online.php">Online Players</a> </th> 36 <td rowspan="6" class="tables" valign="top" align="left"><div align="center" class="tables" style="height:1px; scroll:auto; clear:both; position:relative; margin-top:auto; overflow: visible; visibility: visible;"> 37 <div align="left" class="tables2"> 38 <p class="tables"></p> 39 <table width="100%" height="1" border="0" valign="top" cellpadding="0" cellspacing="0" bgcolor="#37404F" id="2"> 40 <?php 41 if ( $select = $_GET['select'] ){ 42 switch ($select){ 43 case status: 44 echo "$textone"; 45 break; 46 case statics: 47 echo " <tr> 48 <th width='34%' scope='col'>Database</th> 49 <th width='66%' scope='col'>$rev</th> 50 </tr> 51 <tr> 52 <th scope='row'>Max. Online </th> 53 <td>$time</td> 54 </tr> 55 <tr> 56 <th scope='row'> </th> 57 <td> </td> 58 </tr> 59 <tr> 60 <th scope='row'> </th> 61 <td>Statics on total population </td> 62 </tr> 63 <tr> 64 <th scope='row'> </th> 65 <td> </td> 66 </tr> 67 <tr> 68 <th scope='row'>Human</th> 69 <td><img src='$staticpic$yuzde_human'/></td> 70 </tr> 71 <tr> 72 <th scope='row'>Dwarf</th> 73 <td><img src='$staticpic$yuzde_dwarf'/></td> 74 </tr> 75 <tr> 76 <th scope='row'>Night Elf </th> 77 <td><img src='$staticpic$yuzde_nightelf'/></td> 78 </tr> 79 <tr> 80 <th scope='row'>Gnome</th> 81 <td><img src='$staticpic$yuzde_gnome'/></td> 82 </tr> 83 <tr> 84 <th scope='row'>Dranei</th> 85 <td><img src='$staticpic$yuzde_dranei'/></td> 86 </tr> 87 <tr> 88 <th scope='row'> </th> 89 <td> </td> 90 </tr> 91 <tr> 92 <th scope='row'>Orc</th> 93 <td><img src='$staticpic$yuzde_orc'/></td> 94 </tr> 95 <tr> 96 <th scope='row'>Troll</th> 97 <td><img src='$staticpic$yuzde_troll'/></td> 98 </tr> 99 <tr> 100 <th scope='row'>Undead</th> 101 <td><img src='$staticpic$yuzde_undead'/></td> 102 </tr> 103 <tr> 104 <th scope='row'>Tauren</th> 105 <td><img src='$staticpic$yuzde_tauren'/></td> 106 </tr> 107 <tr> 108 <th scope='row'>Blood Elf </th> 109 <td><img src='$staticpic$yuzde_bloodelf'/></td> 110 </tr> 111 <tr> 112 <th scope='row'> </th> 113 <td> </td> 114 </tr> 115 <tr> 116 <th scope='row'>Accounts</th> 117 <td>$max_acc</td> 118 </tr> 119 <tr> 120 <th scope='row'>Characters</th> 121 <td>$max_char</td> 122 </tr> 123 <tr> 124 <th scope='row'>Game Masters </th> 125 <td>$max_gm</td> 126 </tr> 127 <tr> 128 <th scope='row'> </th> 129 <td> </td> 130 </tr> 131 <tr> 132 <th scope='row'> </th> 133 <td> </td> 134 </tr> 135 <tr> 136 <th scope='row'> </th> 137 <td> </td> 138 </tr> 139 <tr> 140 <th scope='row'> </th> 141 <td> </td> 142 </tr> 143 <tr> 144 <th scope='row'> </th> 145 <td> </td> 146 </tr> 147 <tr> 148 <th scope='row'> </th> 149 <td> </td> 150 </tr> 151 <tr> 152 <th scope='row'> </th> 153 <td> </td> 154 </tr>"; 155 break; 156 case accountcreate: 157 echo "$cont"; 158 break; 159 }} 160 else 4 161 { 5 case "en": 6 $button="create_en.jpg"; 7 $text = Array( 8 'acc' => 'Vytvoreni Acc', 9 'create' => 'bylo uspesne dokonceno ! Prejeme prijemnou zabavu na nasem serveru', 10 'failed' => 'nebylo uspesne dokonceno', 11 'not_all' => 'Fields are filled not all', 12 'playerson' => 'Hraci on-line', 13 'off' => '>>> set realmlist 77.93.220.66', 14 'name' => 'Jmeno Accountu', 15 'tbc' => 'Datadisk?', 16 'password' => 'Heslo', 17 'ip_limit' => Array('Z tve IP adresy',' accounty byly jiz vytvoreny'), 18 'char' => Array('','','','',''), 19 'backtext' => 'Back', 20 ); 21 break; 22 case "ru": 23 $button="create_ru.gif"; 24 $text = Array( 25 'acc' => 'Ñîçäàíèå àêêàóíòà', 26 'create' => 'çàâåðøåíî !', 27 'failed' => 'íåâîçìîæíî !', 28 'not_all' => 'Çàïîëíåíû íå âñå ïîëÿ', 29 'playerson' => 'èãðîêîâ íà ñåðâåðå', 30 'off' => 'ñåé÷àñ îòêëþ÷åí', 31 'name' => 'Èìÿ Àêêàóíòà', 32 'tbc' => '?????????????? ?????', 33 'password' => 'Ïàðîëü', 34 'ip_limit' => Array('Ñ âàøåãî IP ',' àêêàóíòîâ óæå ñîçäàíî'), 35 'char' => Array('Ïåðñîíàæ','Ðàñà','Êëàññ','ËâË','Ðàñïîëîæåíèå'), 36 'backtext' => 'Back', 37 ); 38 break; 39 case "tr": 40 $button="create_tr.gif"; 41 $text = Array( 42 'acc' => 'Hesap Alýmý', 43 'create' => 'tamamlandý !', 44 'failed' => 'münkün deðil !', 45 'not_all' => 'Gerekli alanlar boþ býrakýlmýþ', 46 'playerson' => 'oyuncu çevrimiçi', 47 'off' => 'çevrimdýþý', 48 'name' => 'Hesap Özelliði', 49 'tbc' => 'Hesap Þekli', 50 'password' => 'Þifre', 51 'ip_limit' => Array('Bu IP adresi ile ',' hesap zaten açýlmýþ'), 52 'char' => Array('Ýsim','Irk','Sýnýf','Seviye','Yer'), 53 'backtext' => 'Geri', 54 ); 55 break; 56 case "hu": 57 $button="create_en.gif"; 58 $text = Array( 59 'acc' => 'Account létrehozása', 60 'create' => 'Kész!', 61 'failed' => 'Sikertelen!', 62 'not_all' => 'Nincs kitöltve minden mező˙', 63 'playerson' => 'Játékos Online', 64 'off' => 'jelenleg nem fut', 65 'name' => 'Account név', 66 'tbc' => 'Account típusa', 67 'password' => 'Jelszó', 68 'ip_limit' => Array('Erről az IP-ről ',' már regisztráltak'), 69 'char' => Array('Név','Faj','Kaszt','Szint','Pozició'), 70 'backtext' => 'Vissza', 71 ); 162 print "<tr><td><center>Welcome to <b>MaNGOS</b> , Powered Free MMORPG Server</center></td></tr>"; 72 163 } 73 $maps_a = Array(74 0 => 'Azeroth',75 1 => 'Kalimdor',76 2 => 'UnderMine',77 13 => 'Test zone',78 17 => 'Kalidar',79 30 => 'Alterac Valley',80 33 => 'Shadowfang Keep Instance',81 34 => 'The Stockade Instance',82 35 => 'Stormwind Prizon',83 36 => 'Deadmines Instance',84 37 => 'Plains of Snow',85 43 => 'Wailing Caverns Instance',86 44 => 'Monastery Interior',87 47 => 'Razorfen Kraul Instance',88 48 => 'Blackfathom Deeps Instance',89 70 => 'Uldaman Instance',90 90 => 'Gnomeregan Instance',91 109 => 'Sunken Temple Instance',92 129 => 'Razorfen Downs Instance',93 530 => 'Outland',94 169 => 'Emerald Forest',95 189 => 'Scarlet Monastery Instance',96 209 => 'ZulFarrak Instance',97 229 => 'Blackrock Spire Instance',98 230 => 'Blackrock Depths Instance',99 249 => 'Onyxias Lair Instance',100 269 => 'Caverns of Time',101 289 => 'Scholomance Instance',102 309 => 'ZulGurub Instance',103 329 => 'Stratholme Instance',104 349 => 'Maraudon Instance',105 369 => 'Deeprun Tram',106 389 => 'Ragefire Chasm Instance',107 409 => 'The Molten Core Instance',108 429 => 'Dire Maul Instance',109 449 => 'Alliance PVP Barracks',110 450 => 'Horde PVP Barracks',111 451 => 'Development Land',112 469 => 'Blackwing Lair Instance',113 489 => 'Warsong Gulch',114 509 => 'Ruins of AhnQiraj Instance',115 529 => 'Arathi Basin',116 531 => 'Temple of AhnQiraj Instance',117 533 => 'Naxxramas Instance',118 532 => 'Karazahn',119 534 => 'Hyjal Past',120 540 => 'Shattered Halls Instance',121 542 => 'Blood Furnace Instance',122 543 => 'Hellfire Ramparts Instance',123 544 => 'Magtheridons Lair Instance',124 545 => 'Steamvault Instance',125 546 => 'Underbog Instance',126 547 => 'Slave Pens Instance',127 548 => 'Coilfang Resevoir Instance',128 550 => 'Tempest Keep',129 552 => 'Tempest Keep',130 553 => 'Tempest Keep',131 554 => 'Tempest Keep',132 555 => 'Auchindoun',133 556 => 'Auchindoun',134 557 => 'Auchindoun',135 558 => 'Auchindoun',136 559 => 'Nagrand Arena',137 560 => 'Hillsbrad Past',138 562 => 'Blades Edge Arena',139 564 => 'Black Temple',140 565 => 'Gruuls Lair',141 566 => 'Netherstorm Arena',142 568 => 'Zulaman',143 );144 145 $zone = Array(146 0 => Array(147 Array(700,10,1244,1873,'Undercity',1497),148 Array(-840,-1330,-5050,-4560,'Ironforge',1537),149 Array(1190,200,-9074,-8280,'Stormwind City',1519),150 Array(-2170,-4400,-7348,-6006,'Badlands',3),151 Array(-500,-4400,-4485,-2367,'Wetlands',11),152 Array(2220,-2250,-15422,-11299,'Stranglethorn Vale',33),153 Array(-1724,-3540,-9918,-8667,'Redridge Mountains',44),154 Array(-2480,-4400,-6006,-4485,'Loch Modan',38),155 Array(662,-1638,-11299,-9990,'Duskwood',10),156 Array(-1638,-2344,-11299,-9918,'Deadwind Pass',41),157 Array(834,-1724,-9990,-8526,'Elwynn Forest',12),158 Array(-500,-3100,-8667,-7348,'Burning Steppes',46),159 Array(-608,-2170,-7348,-6285,'Searing Gorge',51),160 Array(2000,-2480,-6612,-4485,'Dun Morogh',1),161 Array(-1575,-5425,-432,805,'The Hinterlands',47),162 Array(3016,662,-11299,-9400,'Westfall',40),163 Array(600,-1575,-1874,220,'Hillsbrad Foothills',267),164 Array(-2725,-6056,805,3800,'Eastern Plaguelands',139),165 Array(-850,-2725,805,3400,'Western Plaguelands',28),166 Array(2200,600,-900,1525,'Silverpine Forest',130),167 Array(2200,-850,1525,3400,'Tirisfal Glades',85),168 Array(-2250,-3520,-12800,-10666,'Blasted Lands',4),169 Array(-2344,-4516,-11070,-9600,'Swamp of Sorrows',8),170 Array(-1575,-3900,-2367,-432,'Arathi Highlands',45),171 Array(600,-1575,220,1525,'Alterac Mountains',36),172 ),173 1 => Array(174 Array(2698,2030,9575,10267,'Darnassus',1657),175 Array(326,-360,-1490,-910,'Thunder Bluff',1638),176 Array(-3849,-4809,1387,2222,'Orgrimmar',1637),177 Array(-1300,-3250,7142,8500,'Moonglade',493),178 Array(2021,-400,-9000,-6016,'Silithus',1377),179 Array(-2259,-7000,4150,8500,'Winterspring',618),180 Array(-400,-2094,-8221,-6016,'Un\'Goro Crater',490),181 Array(-590,-2259,3580,7142,'Felwood',361),182 Array(-3787,-8000,1370,6000,'Azshara',16),183 Array(-1900,-5500,-10475,-6825,'Tanaris',440),184 Array(-2478,-5500,-5135,-2330,'Dustwallow Marsh',15),185 Array(360,-1536,-3474,-412,'Mulgore',215),186 Array(4000,-804,-6828,-2477,'Feralas',357),187 Array(3500,360,-2477,372,'Desolace',405),188 Array(-804,-5500,-6828,-4566,'Thousand Needles',400),189 Array(-3758,-5500,-1300,1370,'Durotar',14),190 Array(1000,-3787,1370,4150,'Ashenvale',331),191 Array(2500,-1300,4150,8500,'Darkshore',148),192 Array(3814,-1100,8600,11831,'Teldrassil',141),193 Array(3500,-804,-412,3580,'Stonetalon Mountains',406),194 Array(-804,-4200,-4566,1370,'The Barrens',17),195 ),196 530 => Array(197 Array(6135.25,4829,-2344.78,-1473.95,'Shattrath City',3703),198 Array(-6400.75,-7612.20,9346.93,10153.70,'Silvermoon City',3487),199 Array(5483.33,-91.66,1739.58,5456.25,'Netherstorm',3523),200 Array(7083.33,1683.33,-4600,-999.99,'Terokkar Forest',3519),201 Array(10295.83,4770.83,-3641.66,41.66,'Nagrand',3518),202 Array(-10075,-13337.49,-2933.33,-758.33,'Bloodmyst Isle',3525),203 Array(8845.83,3420.83,791.66,4408.33,'Blades Edge Mountains',3522),204 Array(4225,-1275,-5614.58,-1947.91,'Shadowmoon Valley',3520),205 Array(-11066.36,-12123.13,-4314.37,-3609.68,'The Exodar',3557),206 Array(9475,4447.91,-1416.66,1935.41,'Zangarmarsh',3521),207 Array(5539.58,375,-1962.49,1481.25,'Hellfire Peninsula',3483),208 Array(-10500,-14570.83,-5508.33,-2793.75,'Azuremyst Isle',3524),209 Array(-5283.33,-8583.33,6066.66,8266.66,'Ghostlands',3433),210 Array(-4487,-9412,7758,11041,'Eversong Woods',3430)211 ),212 );213 214 $def = Array(215 'character_race' => Array(216 1 => 'Human',217 2 => 'Orc',218 3 => 'Dwarf',219 4 => 'Night Elf',220 5 => 'Undead',221 6 => 'Tauren',222 7 => 'Gnome',223 8 => 'Troll',224 9 => 'Goblin',225 10 => 'Dranei',226 11 => 'Blood Elf',227 ),228 229 'character_class' => Array(230 1 => 'Warrior',231 2 => 'Paladin',232 3 => 'Hunter',233 4 => 'Rogue',234 5 => 'Priest',235 7 => 'Shaman',236 8 => 'Mage',237 9 => 'Warlock',238 11 => 'Druid',239 ),240 241 'character_rank' => Array(242 'alliance' => Array(243 1 => 'Private',244 2 => 'Corporal',245 3 => 'Sergeant',246 4 => 'Master Sergeant',247 5 => 'Sergeant Major',248 6 => 'Knight',249 7 => 'Knight-Lieutenant',250 8 => 'Knight-Captain',251 9 => 'Knight-Champion',252 10 => 'Lieutenant Commander',253 11 => 'Commander',254 12 => 'Marshal',255 13 => 'Field Marshal',256 14 => 'Grand Marshal'257 ),258 'horde' => Array(259 1 => 'Scout',260 2 => 'Grunt',261 3 => 'Sergeant',262 4 => 'Senior Sergeant',263 5 => 'First Sergeant',264 6 => 'Stone Guard',265 7 => 'Blood Guard',266 8 => 'Legionnare',267 9 => 'Centurion',268 10 => 'Champion',269 11 => 'Lieutenant General',270 12 => 'General',271 13 => 'Warlord',272 14 => 'High Warlord'273 )274 ),275 );276 277 278 279 280 281 class DBLayer282 {283 var $link_id;284 var $query_result;285 var $saved_queries = array();286 var $num_queries = 0;287 288 function DBLayer($db_host, $db_username, $db_password, $db_name)289 {290 $this->link_id = @mysql_connect($db_host, $db_username, $db_password, true);291 292 if ($this->link_id)293 {294 if (@mysql_select_db($db_name, $this->link_id))295 return $this->link_id;296 else297 error('Unable to select database. MySQL reported: '.mysql_error(), __FILE__, __LINE__);298 }299 else300 error('Unable to connect to MySQL server. MySQL reported: '.mysql_error(), __FILE__, __LINE__);301 }302 303 function query($sql)304 {305 $this->query_result = @mysql_query($sql, $this->link_id);306 307 if ($this->query_result)308 {309 ++$this->num_queries;310 return $this->query_result;311 }312 else313 {314 return false;315 }316 }317 318 319 function result($query_id = 0, $row = 0)320 {321 return ($query_id) ? @mysql_result($query_id, $row) : false;322 }323 324 325 function fetch_assoc($query_id = 0)326 {327 return ($query_id) ? @mysql_fetch_assoc($query_id) : false;328 }329 330 331 function fetch_row($query_id = 0)332 {333 return ($query_id) ? @mysql_fetch_row($query_id) : false;334 }335 336 337 function num_rows($query_id = 0)338 {339 return ($query_id) ? @mysql_num_rows($query_id) : false;340 }341 342 343 function affected_rows()344 {345 return ($this->link_id) ? @mysql_affected_rows($this->link_id) : false;346 }347 348 349 function insert_id()350 {351 return ($this->link_id) ? @mysql_insert_id($this->link_id) : false;352 }353 354 355 function get_num_queries()356 {357 return $this->num_queries;358 }359 360 361 function get_saved_queries()362 {363 return $this->saved_queries;364 }365 366 367 function free_result($query_id = false)368 {369 return ($query_id) ? @mysql_free_result($query_id) : false;370 }371 372 373 function escape($str)374 {375 if (function_exists('mysql_real_escape_string'))376 return mysql_real_escape_string($str, $this->link_id);377 else378 return mysql_escape_string($str);379 }380 381 382 function error()383 {384 $result['error_sql'] = @current(@end($this->saved_queries));385 $result['error_no'] = @mysql_errno($this->link_id);386 $result['error_msg'] = @mysql_error($this->link_id);387 388 return $result;389 }390 391 392 function close()393 {394 if ($this->link_id)395 {396 if ($this->query_result)397 @mysql_free_result($this->query_result);398 399 return @mysql_close($this->link_id);400 }401 else402 return false;403 }404 }405 class honor_system406 {407 var $realm_db;408 var $mangos_db;409 410 function get_all_honor()411 {412 $q = $this->mangos_db->query("SELECT * FROM `character_kill` ORDER BY `guid`");413 while($res_row = $this->mangos_db->fetch_assoc($q))414 {415 if($res_row['type']==1){416 $honor_arr[$res_row['guid']] += $res_row['honor'];417 }elseif($res_row['type']==2){418 $honor_arr[$res_row['guid']] -= $res_row['honor'];419 }420 }421 return $honor_arr;422 }423 424 function get_character_honor($char_id)425 {426 $q = $this->mangos_db->query("SELECT * FROM `character_kill` WHERE `guid`='$char_id'");427 while($res_row = $this->mangos_db->fetch_assoc($q))428 {429 if($res_row['type']==1){430 $honor += $res_row['honor'];431 }elseif($res_row['type']==2){432 $honor -= $res_row['honor'];433 }434 }435 return $honor;436 }437 438 function calc_character_rank($honor_points)439 {440 $rank = 0;441 if($honor_points <= 0){442 $rank = 0;443 }444 else{445 if($honor_points < 2000 and $honor_points > 500) $rank = 2;446 else if($honor_points <= 500 and $honor_points > 0) $rank = 1;447 else if ($honor_points >= 2000) $rank = round(($honor_points / 5000) + 1,0);448 }449 return $rank;450 }451 }452 453 function error($message, $file, $line, $db_error = false)454 {455 global $siteerrors;456 $s = "\t\t".'Error: <strong>'.$message.'.</strong>'."\n";457 echo $s;458 }459 460 function get_zone_name($mapid, $x, $y){461 global $maps_a, $zone;462 463 if (!empty($maps_a[$mapid]))464 {465 $zmap=$maps_a[$mapid];466 if (($mapid==0) or ($mapid==1))467 {468 $i=0; $c=count($zone[$mapid]);469 while ($i<$c)470 {471 if ($zone[$mapid][$i][2] < $x AND $zone[$mapid][$i][3] > $x AND $zone[$mapid][$i][1] < $y AND $zone[$mapid][$i][0] > $y) $zmap=$zone[$mapid][$i][4];472 $i++;473 }474 }475 } else $zmap="Unknown zone";476 return $zmap;477 }478 479 function test_realm(){480 global $server, $port;481 $s = @fsockopen("$server", $port, $ERROR_NO, $ERROR_STR,(float)0.5);482 if($s){@fclose($s);return true;} else return false;483 }484 485 function get_realm_name(){486 global $hostr, $userr, $passwordr, $dbr, $database_encoding;487 $realm_db = new DBLayer($hostr, $userr, $passwordr, $dbr);488 $realm_db->query("SET NAMES $database_encoding");489 $query = $realm_db->query("SELECT * FROM `realmlist`");490 $result = $realm_db->fetch_assoc($query);491 $realm_db->close();492 unset($realm_db);493 return($result['name']);494 }495 496 497 498 if (empty($_POST['username']) and empty($_POST['passw']) and empty($_POST['email']))499 {500 $cont=' <TR>501 <TD rowSpan=6><IMG height=110502 src="'.$img_base.'pixel.gif" width=15></TD>503 <TD vAlign=center align=left width=190><B504 style="FONT-SIZE: 8pt; COLOR: white; LETTER-SPACING: 3px; FONT-VARIANT: small-caps"><LABEL505 for=username>'.$text["name"].':</LABEL> </B><BR><INPUT506 id=username style="WIDTH: 175px" tabIndex=1 maxLength=16507 size=18 name=username></TD>508 <TD rowSpan=6><IMG height=1 src="'.$img_base.'pixel.gif" width=15></TD></TR>509 <TR><TD width=190 height=1></TD></TR>510 <TR><TD width=190 height=1></TD></TR>511 <TR>512 <TD vAlign=center align=left width=190><B513 style="FONT-SIZE: 8pt; COLOR: white; LETTER-SPACING: 3px; FONT-VARIANT: small-caps"><LABEL514 for=passw>'.$text["password"].':</LABEL> </B><BR><INPUT id=passw515 style="WIDTH: 175px" tabIndex=2 type=password maxLength=12516 size=18 name=passw></TD></TR>517 <TD vAlign=center align=left width=190><B518 style="FONT-SIZE: 8pt; COLOR: white; LETTER-SPACING: 3px; FONT-VARIANT: small-caps"><LABEL519 for=tbc>'.$text["tbc"].':</LABEL> </B><BR><select size="1" name="tbc">520 <option selected value="1">TBC</option>521 <option value="3">Wotlk</option></select>522 </TD></TR>523 <TR>524 <TD vAlign=center align=left width=190><B525 style="FONT-SIZE: 8pt; COLOR: white; LETTER-SPACING: 3px; FONT-VARIANT: small-caps"><LABEL526 for=email>E-mail:</LABEL> </B><BR><INPUT id=email527 style="WIDTH: 175px" tabIndex=2 maxLength=50528 size=18 name=email></TD></TR>529 <TR>530 <TD align=left>531 <TABLE cellSpacing=0 cellPadding=0 border=0>532 <TBODY>533 <TR>534 <TD><IMG height=3535 src="'.$img_base.'pixel.gif" width=1></TD>536 <TD></TD>537 <TD></TD></TR></TBODY></TABLE></TD></TR>538 <TR>539 <TD align=left colSpan=3>540 <TABLE cellSpacing=0 cellPadding=0 border=0>541 <TBODY>542 <TR>543 <TD><IMG height=39544 src="'.$img_base.'pixel.gif" width=19></TD>545 <TD><INPUT class=button546 style="WIDTH: 168px; HEIGHT: 25px" tabIndex=3 type=image547 alt=Create src="'.$img_base.$button.'"548 value=Create border=0></TD>549 </TR></TBODY></TABLE></TD></TR>';550 }551 elseif (empty($_POST['username']) or empty($_POST['passw']) or empty($_POST['email']))552 {553 554 $cont='<TR><TD rowSpan=6><IMG height=182 width=1 src="'.$img_base.'pixel.gif"><TD align=Center><SMALL class=error>555 '.$text["not_all"].'556 <br><br><a href="" onClick="history.go(-1)">'.$text["backtext"].'</a></SMALL></TD></TD></TR>';557 558 }559 else560 {561 $username = htmlspecialchars(trim("$_POST[username]"));562 $passw = trim($_POST['passw']);563 $email = htmlspecialchars(trim($_POST['email']));564 $tbc = trim($_POST['tbc']);565 $ip = getenv('REMOTE_ADDR');566 // ñäåëàòü ïðîâåðêó íà íåïîëó÷åíèå èïà567 568 $realm_db = new DBLayer($hostr, $userr, $passwordr, $dbr);569 $realm_db->query("SET NAMES $database_encoding");570 571 $ip_cr=0;572 if ($lock_reg!=0){573 $query = $realm_db->query("SELECT `last_ip` FROM `account` WHERE `last_ip`='$ip'");574 while($result = $realm_db->fetch_assoc($query)) $ip_cr++;575 }576 577 if (($ip_cr>=$lock_reg) && ($lock_reg!=0))578 {579 $cont='<TR><TD rowSpan=6><IMG height=182 width=1 src="'.$img_base.'pixel.gif"><TD align=Center><SMALL class=error>580 '.$text["ip_limit"][0].$ip.'<br>'.$ip_cr.$text["ip_limit"][1].'581 <br><br><a href="" onClick="history.go(-1)">'.$text["backtext"].'</a></SMALL></TD></TD></TR>';582 } else583 {584 $sha_pass_hash = sha1(strtoupper($username) . ":" . strtoupper($passw));585 if($realm_db->query("INSERT INTO `account` (`username`,`sha_pass_hash`,`email`,`expansion`) VALUES ('$username','$sha_pass_hash','$email','$tbc')"))586 {587 $cont='<TR><TD rowSpan=6><IMG height=182 width=1 src="'.$img_base.'pixel.gif"><TD align=Center><SMALL>588 '.$text["acc"].'<br><strong>'.$username.'</strong><br>'.$text["create"].'<br>589 </SMALL></TD></TD></TR>';590 }591 else592 {593 $cont='<TR><TD rowSpan=6><IMG height=182 width=1 src="'.$img_base.'pixel.gif"><TD align=Center><SMALL class=error>594 '.$text["acc"].'<br><strong>'.$username.'</strong><br>'.$text["failed"].'595 <br><br><a href="" onClick="history.go(-1)">'.$text["backtext"].'</a></SMALL></TD></TD></TR>';596 }597 }598 599 600 601 $realm_db->close();602 unset($realm_db);603 }604 605 606 607 function make_players_array(){608 global $host, $user, $password, $db, $database_encoding, $pl_array;609 $i=0;610 $mangos_db = new DBLayer($host, $user, $password, $db);611 $mangos_db->query("SET NAMES $database_encoding");612 $query = $mangos_db->query("SELECT * FROM `character` WHERE `online`='1' ORDER BY `name`");613 while($result = $mangos_db->fetch_assoc($query))614 {615 $char_data = explode(' ',$result['data']);616 $char_gender = dechex($char_data[36]);617 $char_gender = str_pad($char_gender,8, 0, STR_PAD_LEFT);618 $char_gender = $char_gender{3};619 $res_pos=get_zone_name($result['map'], $result['position_x'], $result['position_y']);620 621 $pl_array[$i] = Array($result['name'], $result['race'], $result['class'], $char_data[34], $res_pos, $char_gender);622 $i++;623 }624 $mangos_db->close();625 unset($mangos_db);626 return $i;627 }628 629 $onlineplayers=make_players_array();630 631 if (!$sort = &$_GET['s']) $sort=0;632 if (!$flag = &$_GET['f']) $flag=0;633 if ($flag==0) { $flag=1; $sort_type='<'; }634 else { $flag=0; $sort_type='>'; }635 $link=$_SERVER['PHP_SELF']."?f=".$flag."&s=";636 637 if (!empty($pl_array))638 {639 usort($pl_array, create_function('$a, $b', 'if ( $a['.$sort.'] == $b['.$sort.'] ) return 0; if ( $a['.$sort.'] '.$sort_type.' $b['.$sort.'] ) return -1; return 1;'));640 }641 642 $list="";643 $i=0;644 while ($i < $onlineplayers)645 {646 $name=$pl_array[$i][0];647 $race=$pl_array[$i][1];648 $class=$pl_array[$i][2];649 $res_race = $def['character_race'][$race];650 $res_class = $def['character_class'][$class];651 $lvl=$pl_array[$i][3];652 $loc=$pl_array[$i][4];653 $gender=$pl_array[$i][5];654 $list.= "655 <tr class=txt>656 <td></td>657 <td>$name</td>658 <td align='center'><img alt=$res_race src='".$img_base.$race."-$gender.gif' height='18' width='18'></td>659 <td align='center'><img alt=$res_class src='".$img_base."$class.gif' height='18' width='18'></td>660 <td align='center'>$lvl</td>661 <td >$loc</td>662 </tr>";663 $i++;664 }665 666 $title=get_realm_name();667 $copyright=get_realm_name();668 $status=get_realm_name();669 if (test_realm())670 {671 $title.=(' ('.$onlineplayers.' '.$text["playerson"].')');672 $status = "<img alt=Online src='".$img_base."online.gif' height='18' width='18'>";673 } else674 {675 $title.=(' '.$text["off"] );676 $status = "<img alt=Offline src='".$img_base."offline.gif' height='18' width='18'>";677 }678 //Please Dont Edit Copyright Line , Respect To Our Work!679 $foorat="<center><font face=\"Arial\" size=\"2\"><b>This RoSPORA Licenced to $copyright</b></font><br><font face=\"Arial\" size=\"1\">RoSPORAis a free software released under the GNU/GPL<br>SPORA engine code is © copyright by <a href=\"mailto:mirage666@pisem.net\">mirage666</a><br>RoSPORA re-desined engine code is © copyright by <a href=\"mailto:powerlogy@gmail.com\">PoWeRLoGY</a></font>";680 681 682 683 // Main part !!!684 164 ?> 685 <HTML><HEAD><META HTTP-EQUIV="Pragma" CONTENT="no-cache"><TITLE><?php print $title ?></TITLE> 686 <META http-equiv=Content-Type content="text/html; charset=<?php print $charset ?>"><LINK 687 id=bnetstyle href="<?php print $img_base ?>style.css" type=text/css 688 rel=stylesheet> 689 <link rel="Shortcut Icon" href="img/wowlogoanim.gif" type="image/gif"> 690 <script type="text/javascript"> 691 var weekdaystxt=["Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"] 692 693 function showLocalTime(container, servermode, offsetMinutes, displayversion){ 694 if (!document.getElementById || !document.getElementById(container)) return 695 this.container=document.getElementById(container) 696 this.displayversion=displayversion 697 var servertimestring=(servermode=="server-php")? '<? print date("F d, Y H:i:s", time())?>' : (servermode=="server-ssi")? '<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->' : '<%= Now() %>' 698 this.localtime=this.serverdate=new Date(servertimestring) 699 this.localtime.setTime(this.serverdate.getTime()+offsetMinutes*60*1000) //add user offset to server time 700 this.updateTime() 701 this.updateContainer() 702 } 703 704 showLocalTime.prototype.updateTime=function(){ 705 var thisobj=this 706 this.localtime.setSeconds(this.localtime.getSeconds()+1) 707 setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second 708 } 709 710 showLocalTime.prototype.updateContainer=function(){ 711 var thisobj=this 712 if (this.displayversion=="long") 713 this.container.innerHTML=this.localtime.toLocaleString() 714 else{ 715 var hour=this.localtime.getHours() 716 var minutes=this.localtime.getMinutes() 717 var seconds=this.localtime.getSeconds() 718 var ampm=(hour>=12)? "PM" : "AM" 719 var dayofweek=weekdaystxt[this.localtime.getDay()] 720 this.container.innerHTML=formatField(hour, 1)+":"+formatField(minutes)+":"+formatField(seconds)+" "+ampm+" ("+dayofweek+")" 721 } 722 setTimeout(function(){thisobj.updateContainer()}, 1000) //update container every second 723 } 724 725 function formatField(num, isHour){ 726 if (typeof isHour!="undefined"){ //if this is the hour field 727 var hour=(num>12)? num-12 : num 728 return (hour==0)? 12 : hour 729 } 730 return (num<=9)? "0"+num : num//if this is minute or sec field 731 } 732 733 </script> 734 <SCRIPT language=javascript> 735 <!-- 736 var styleSheet; 737 var agt = navigator.userAgent.toLowerCase(); 738 var appVer = navigator.appVersion.toLowerCase(); 739 var verInt = parseInt(appVer); 740 var ie = (appVer.indexOf('msie') != -1); 741 var opera = (agt.indexOf('opera') != -1); 742 var mozilla = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('opera')==-1) 743 && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) 744 && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)); 745 var ns4 = (mozilla && (verInt == 4)); 746 747 if (ie && !opera) { 748 document.styleSheets["bnetstyle"].addRule ("input", "background-color: #040D1A"); 749 document.styleSheets["bnetstyle"].addRule ("input", "border-style: solid"); 750 document.styleSheets["bnetstyle"].addRule ("input", "border-width: 1px"); 751 document.styleSheets["bnetstyle"].addRule ("input", "border-color: #7F7F7F"); 752 document.styleSheets["bnetstyle"].addRule ("input", "color: #FFAC04"); 753 754 document.styleSheets["bnetstyle"].addRule ("textarea", "background-color: #040D1A"); 755 document.styleSheets["bnetstyle"].addRule ("textarea", "border-style: solid"); 756 document.styleSheets["bnetstyle"].addRule ("textarea", "border-width: 1px"); 757 document.styleSheets["bnetstyle"].addRule ("textarea", "border-color: #7F7F7F"); 758 document.styleSheets["bnetstyle"].addRule ("textarea", "color: #FFAC04"); 759 760 document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-Base-Color: #012158"); 761 document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-Arrow-Color: #7F7F7F"); 762 document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-3dLight-Color: #7F7F7F"); 763 document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-DarkShadow-Color: black"); 764 document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-Highlight-Color: black"); 765 document.styleSheets["bnetstyle"].addRule ("textarea", "scrollbar-Shadow-Color: #00B3FF"); 766 767 document.styleSheets["bnetstyle"].addRule ("select", "background-color: #040D1A"); 768 document.styleSheets["bnetstyle"].addRule ("select", "color: #FFAC04"); 769 770 document.styleSheets["bnetstyle"].addRule ("select.gray", "background-color: #040D1A"); 771 document.styleSheets["bnetstyle"].addRule ("select.gray", "color: #FFAC04"); 772 773 document.styleSheets["bnetstyle"].addRule ("ul.thread", "margin-left: 22px;"); 774 } 775 //--> 776 </SCRIPT> 777 </HEAD> 778 <BODY text=#cccc99 vLink=#aaaaaa link=#ffffbb bgColor=#000000 leftMargin=0 779 topMargin=0 marginheight="0" marginwidth="0"> 780 <FORM name=login_form method=post> 781 782 <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0> 783 <TBODY> 784 <TR> 785 <TD align=middle> 786 </center> 787 <TABLE cellSpacing=0 cellPadding=0 background="<?php print $img_base ?>back_create.jpg" border=0 style="background-repeat: no-repeat;"> 788 <TBODY> 789 <TR> 790 <TD vAlign=top> 791 <DIV style="POSITION: relative"> 792 <DIV 793 style="LEFT: 130px; WIDTH: 400px; POSITION: absolute; TOP: 0px"></DIV></DIV></TD> 794 <TD><left><object width="180" height="180"> 795 <param name="movie" value="http://www.worldofwarcraft.com/wrath/flash/global/dkhuman_idle.swf"/> 796 <param name="WMode" value="Center"/> 797 <embed src="http://www.worldofwarcraft.com/wrath/flash/global/dkhuman_idle.swf" width="180" height="180" wmode="transparent"/> 798 </embed> 799 </object> 800 </left><IMG height=169 src="<?php print $img_base ?>pixel.gif" 801 width=1></TD> 802 <TD></TD></TR> 803 <TR> 804 <TD><IMG height=1 src="<?php print $img_base ?>pixel.gif" 805 width=203></TD> 806 <TD> 807 <TABLE cellSpacing=0 cellPadding=0 width=220 border=0> 808 <TBODY> 809 <?php 810 if($accountoption==1) 811 { 812 echo"$cont"; 813 } 814 else 815 { 816 echo "<br><br><br><br><center><strong><font face=\"Arial\" color=\"#FF0000\" size=\"2\">$accountmessage</font></center></strong><br><br><br><br><br>"; 817 } 818 ?></TBODY></TABLE></TD> 819 <TD><IMG height=1 src="<?php print $img_base ?>pixel.gif" 820 width=217></TD></TR> 821 <TR> 822 <TD colSpan=3> 823 <TABLE cellSpacing=0 cellPadding=0 border=0> 824 <TBODY> 825 <TR> 826 <TD colSpan=3><IMG height=17 827 src="<?php print $img_base ?>pixel.gif" width=1></TD></TR> 828 <TR> 829 <TD width=106><IMG height=1 830 src="<?php print $img_base ?>pixel.gif" width=106></TD> 831 <TD width=410><SMALL> 832 833 834 835 <script type="text/javascript"> 836 new showLocalTime("timecontainer", "server-php", 0, "short") 837 </script></center><br> 838 839 <table cellpadding='3' cellspacing='0' align='center'> 840 <tbody> 841 <tr class=title> 842 <td align='left' nowrap='nowrap' width=50></td> 843 <td align='left' nowrap='nowrap' width=60><a href="<?php print $link.'0">'.$text['char'][0] ?></a></td> 844 <td align='center' nowrap='nowrap' width=40><a href="<?php print $link.'1">'.$text['char'][1] ?></a></td> 845 <td align='center' nowrap='nowrap' width=40><a href="<?php print $link.'2">'.$text['char'][2] ?></a></td> 846 <td align='center' nowrap='nowrap' width=40><a href="<?php print $link.'3">'.$text['char'][3] ?></a></td> 847 <td align='left' nowrap='nowrap' width=100><a href="<?php print $link.'4">'.$text['char'][4] ?></a></td> 848 </tr><?php 849 if($onlineoption==1) 850 { 851 echo"$list"; 852 } 853 else 854 { 855 echo "<center><strong><font face=\"Arial\" color=\"#FF0000\" size=\"2\"><br>$onlinemessage</font></strong></center>"; 856 } 857 ?> 858 <tr> 859 <td class='txt' align='center' colspan='6' nowrap='nowrap'><IMG height=1 src='<?php print $img_base ?>pixel.gif' width=400></td></tr> 860 </tbody> 165 </table> 166 </div> 167 </div></td> 168 <tr> 169 <td height="16" align="left" nowrap="nowrap" class="menu1" style="background-color: #333333"> 170 <a href="index.php?select=accountcreate">Create Account</a></td> 171 </tr> 172 <tr> 173 <td height="37" align="left" nowrap="nowrap" class="menu1" style="background-color: #333333"> 174 <a href="index.php?select=statics">Statics</a></td> 175 </tr> 176 <tr> 177 <td height="34" align="left" class="menu1" style="background-color: #333333"><a href="<?php echo $forumadd ?>" target="_blank">Forum</a></td> 178 </tr> 179 <tr> 180 <td height="34" align="left" class="menu1" style="background-color: #333333"><a href="<?php echo $voteadd ?>" target="_blank">Vote</a></td> 181 </tr> 182 <tr> 183 <td height="30" class="tables" style="background-color: #303B4A"><?php echo $credits ?></td> 184 </tr> 861 185 </table> 862 863 </SMALL></TD> 864 <TD width=124><IMG height=1 865 src="<?php print $img_base ?>pixel.gif" width=124></TD></TR> 866 <TR> 867 <TD colSpan=3><IMG height=100 868 src="<?php print $img_base ?>pixel.gif" 869 width=1></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></FORM></BODY> 870 </HTML> 871 <?php 872 //Please Dont Edit This Copyright Lines , Respect To Our Work 873 echo "$foorat"; 874 ?> 186 </body> 187 </html>
Note:
See TracChangeset
for help on using the changeset viewer.