$1"; $a[1] = "$1"; $a[2] = "$1"; $a[3] = "Legionnaire"; $a[4] = "Praetorian"; $a[5] = "Imperian"; $a[6] = "Equites Legati"; $a[7] = "Equites Imperatoris"; $a[8] = "Equites Caesaris"; $a[9] = "Battering Ram"; $a[10] = "Fire Catapult"; $a[11] = "Senator"; $a[12] = "Settler"; $a[13] = "Clubswinger"; $a[14] = "Spearman"; $a[15] = "Axeman"; $a[16] = "Scout"; $a[17] = "Paladin"; $a[18] = "Teutonic Knight"; $a[19] = "Ram"; $a[20] = "Catapult"; $a[21] = "Chief"; $a[22] = "Settler"; $a[23] = "Phalanx"; $a[24] = "Swordsman"; $a[25] = "Pathfinder"; $a[26] = "Theutates Thunder"; $a[27] = "Druidrider"; $a[28] = "Haeduan"; $a[29] = "Ram"; $a[30] = "Trebuchet"; $a[31] = "Chieftain"; $a[32] = "Settler"; $a[33] = "Rat"; $a[34] = "Spider"; $a[35] = "Snake"; $a[36] = "Bat"; $a[37] = "Wild Boar"; $a[38] = "Wolf"; $a[39] = "Bear"; $a[40] = "Crocodile"; $a[41] = "Tiger"; $a[42] = "Elephant"; $a[43] = "Pikeman"; $a[44] = "Thorned Warrior"; $a[45] = "Guardsman"; $a[46] = "Birds Of Prey"; $a[47] = "Axerider"; $a[48] = "Natarian Knight"; $a[49] = "War Elephant"; $a[50] = "Ballista"; $a[51] = "Natarian Emperor"; $a[52] = "Settler"; $a[53] = "Hero"; $a[54] = "Lumber"; $a[55] = "Clay"; $a[56] = "Iron"; $a[57] = "Crop"; $a[58] = "*aha*"; $a[59] = "*angry*"; $a[60] = "*cool*"; $a[61] = "*cry*"; $a[62] = "*cute*"; $a[63] = "*depressed*"; $a[64] = "*eek*"; $a[65] = "*ehem*"; $a[66] = "*emotional*"; $a[67] = ":D"; $a[68] = ":)"; $a[69] = "*hit*"; $a[70] = "*hmm*"; $a[71] = "*hmpf*"; $a[72] = "*hrhr*"; $a[73] = "*huh*"; $a[74] = "*lazy*"; $a[75] = "*love*"; $a[76] = "*nocomment*"; $a[77] = "*noemotion*"; $a[78] = "*notamused*"; $a[79] = "*pout*"; $a[80] = "*redface*"; $a[81] = "*rolleyes*"; $a[82] = ":("; $a[83] = "*shy*"; $a[84] = "*smile*"; $a[85] = "*tongue*"; $a[86] = "*veryangry*"; $a[87] = "*veryhappy*"; $a[88] = ";)"; $a[89] = "$1"; $a[90] = "$1"; $a[91] = "$1"; $a[92] = "$1"; $replace= array(); $replace[0] = "$1"; $replace[1] = "$1"; $replace[2] = "$1"; $replace[3] = "Legionnaire"; $replace[4] = "Praetorian"; $replace[5] = "Imperian"; $replace[6] = "Equites Legati"; $replace[7] = "Equites Imperatoris"; $replace[8] = "Equites Caesaris"; $replace[9] = "Battering Ram"; $replace[10] = "Fire Catapult"; $replace[11] = "Senator"; $replace[12] = "Settler"; $replace[13] = "Clubswinger"; $replace[14] = "Spearman"; $replace[15] = "Axeman"; $replace[16] = "Scout"; $replace[17] = "Paladin"; $replace[18] = "Teutonic Knight"; $replace[19] = "Ram"; $replace[20] = "Catapult"; $replace[21] = "Chief"; $replace[22] = "Settler"; $replace[23] = "Phalanx"; $replace[24] = "Swordsman"; $replace[25] = "Pathfinder"; $replace[26] = "Theutates Thunder"; $replace[27] = "Druidrider"; $replace[28] = "Haeduan"; $replace[29] = "Ram"; $replace[30] = "Trebuchet"; $replace[31] = "Chieftain"; $replace[32] = "Settler"; $replace[33] = "Rat"; $replace[34] = "Spider"; $replace[35] = "Snake"; $replace[36] = "Bat"; $replace[37] = "Wild Boar"; $replace[38] = "Wolf"; $replace[39] = "Bear"; $replace[40] = "Crocodile"; $replace[41] = "Tiger"; $replace[42] = "Elephant"; $replace[43] = "Pikeman"; $replace[44] = "Thorned Warrior"; $replace[45] = "Guardsman"; $replace[46] = "Birds Of Prey"; $replace[47] = "Axerider"; $replace[48] = "Natarian Knight"; $replace[49] = "War Elephant"; $replace[50] = "Ballista"; $replace[51] = "Natarian Emperor"; $replace[52] = "Settler"; $replace[53] = "Hero"; $replace[54] = "Lumber"; $replace[55] = "Clay"; $replace[56] = "Iron"; $replace[57] = "Crop"; $replace[58] = "*aha*"; $replace[59] = "*angry*"; $replace[60] = "*cool*"; $replace[61] = "*cry*"; $replace[62] = "*cute*"; $replace[63] = "*depressed*"; $replace[64] = "*eek*"; $replace[65] = "*ehem*"; $replace[66] = "*emotional*"; $replace[67] = ":D"; $replace[68] = ":)"; $replace[69] = "*hit*"; $replace[70] = "*hmm*"; $replace[71] = "*hmpf*"; $replace[72] = "*hrhr*"; $replace[73] = "*huh*"; $replace[74] = "*lazy*"; $replace[75] = "*love*"; $replace[76] = "*nocomment*"; $replace[77] = "*noemotion*"; $replace[78] = "*notamused*"; $replace[79] = "*pout*"; $replace[80] = "*redface*"; $replace[81] = "*rolleyes*"; $replace[82] = ":("; $replace[83] = "*shy*"; $replace[84] = "*smile*"; $replace[85] = "*tongue*"; $replace[86] = "*veryangry*"; $replace[87] = "*veryhappy*"; $replace[88] = ";)"; $bbcoded1 = preg_replace($pattern[89], $a[89], $input); $bbcoded1 = preg_replace('/\[\/alliance\](.*?)\[\/message\]/is', '', $input); $bbcoded1 = preg_replace('/\[message\](.*?)\[alliance\]/is', '', $bbcoded1); $aname = $database->getAllianceID($bbcoded1); if($aname != ""){ $replace[89] = "$1"; }else{ $replace[89] = "alliance not exist"; } $abc = "/abcdef/"; $ab = "abcdef"; $bbcoded2 = preg_replace($pattern[90], $a[90], $input); $bbcoded2 = preg_replace('/\[\/player\](.*?)\[\/message\]/is', '', $input); $bbcoded2 = preg_replace('/\[message\](.*?)\[player\]/is', '', $bbcoded2); $uname = $database->getUserField($bbcoded2, "id", 1); if($uname != ""){ $replace[90] = "$1"; }else{ $replace[90] = "player not exist"; } $bbcoded3 = preg_replace($pattern[91], $a[91], $input); $bbcoded3 = preg_replace('/\[\/report\](.*?)\[\/message\]/is', '', $input); $bbcoded3 = preg_replace('/\[message\](.*?)\[report\]/is', '', $bbcoded3); $report = count($database->getNotice4($bbcoded3)); if($report > 0){ $topic = $database->getNotice2($bbcoded3,"topic"); $replace[91] = "$topic"; }else{ $replace[91] = "report not exist"; } $bbcoded4 = preg_replace($pattern[92], $a[92], $input); $bbcoded4 = preg_replace('/\[\/coor\](.*?)\[\/message\]/is', '', $input); $bbcoded4 = preg_replace('/\[message\](.*?)\[coor\]/is', '', $bbcoded4); for($x = -400; $x < 401; $x++) { if(preg_match('/^'.$x.'/', $bbcoded4)){ $xx = 1; $cx = $x; } } for($y = 0; $y < 401; $y++) { if(preg_match('/-'.$y.'$/', $bbcoded4)){ $yy = 1; $cy = $y*(-1); }else if(preg_match('/'.$y.'$/', $bbcoded4)){ $yy = 1; $cy = $y; } } if(preg_match('/|/', $bbcoded4) && $xx == 1 && $yy == 1){ $wref = $database->getVilWref($cx,$cy); $cwref = $generator->getMapCheck($wref); if($wref != ""){ $wref1 = $database->getVillageType3($wref); if($wref1['oasistype'] == 0 && $wref1['occupied'] == 1){ $vname = $database->getVillageField($wref,"name"); }else if($wref1['oasistype'] == 0 && $wref1['occupied'] == 0){ $vname = "Abandoned valley"; }else if($wref1['oasistype'] != 0 && $wref1['occupied'] == 1){ $vname = "Occupied Oasis"; }else if($wref1['oasistype'] != 0 && $wref1['occupied'] == 0){ $vname = "Unoccupied Oasis"; } $replace[92] = "$vname($cx|$cy)"; } } if(preg_match('/'.$a[89].'/', $bbcoded2)) echo $bbcoded2; $input = preg_replace('/\[message\]/', '', $input); $input = preg_replace('/\[\/message\]/', '', $input); $bbcoded = preg_replace($pattern, $replace, $input); ?>