more fixes

This commit is contained in:
unknown
2012-06-22 18:46:04 +03:00
parent ecd0da7daf
commit 6bdb081f3d
13 changed files with 425 additions and 36 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -10,7 +10,7 @@
#################################################################################
$bid1=array(array('prod'=>2),array('wood'=>40,'clay'=>100,'iron'=>50,'crop'=>60,'pop'=>2,'cp'=>1,'prod'=>5,'time'=>260),array('wood'=>65,'clay'=>165,'iron'=>85,'crop'=>100,'pop'=>1,'cp'=>1,'prod'=>9,'time'=>620),array('wood'=>110,'clay'=>280,'iron'=>140,'crop'=>165,'pop'=>1,'cp'=>2,'prod'=>15,'time'=>1190),array('wood'=>185,'clay'=>465,'iron'=>235,'crop'=>280,'pop'=>1,'cp'=>2,'prod'=>22,'time'=>2100),array('wood'=>310,'clay'=>780,'iron'=>390,'crop'=>465,'pop'=>1,'cp'=>2,'prod'=>33,'time'=>3560),array('wood'=>520,'clay'=>1300,'iron'=>650,'crop'=>780,'pop'=>2,'cp'=>3,'prod'=>50,'time'=>3638),array('wood'=>870,'clay'=>2170,'iron'=>1085,'crop'=>1300,'pop'=>2,'cp'=>4,'prod'=>70,'time'=>7220),array('wood'=>1450,'clay'=>3625,'iron'=>1810,'crop'=>2175,'pop'=>2,'cp'=>4,'prod'=>100,'time'=>15590),array('wood'=>2420,'clay'=>6050,'iron'=>3025,'crop'=>3630,'pop'=>2,'cp'=>5,'prod'=>145,'time'=>25150),array('wood'=>4040,'clay'=>10105,'iron'=>5050,'crop'=>6060,'pop'=>2,'cp'=>6,'prod'=>200,'time'=>40440),array('wood'=>6750,'clay'=>16870,'iron'=>8435,'crop'=>10125,'pop'=>2,'cp'=>7,'prod'=>280,'time'=>64900),array('wood'=>11270,'clay'=>28175,'iron'=>14090,'crop'=>16905,'pop'=>2,'cp'=>9,'prod'=>375,'time'=>104050),array('wood'=>18820,'clay'=>47055,'iron'=>23525,'crop'=>28230,'pop'=>2,'cp'=>11,'prod'=>495,'time'=>166680),array('wood'=>31430,'clay'=>78580,'iron'=>39290,'crop'=>47150,'pop'=>2,'cp'=>13,'prod'=>635,'time'=>266880),array('wood'=>52490,'clay'=>131230,'iron'=>65615,'crop'=>78740,'pop'=>2,'cp'=>15,'prod'=>800,'time'=>427210),array('wood'=>87660,'clay'=>219155,'iron'=>109575,'crop'=>131490,'pop'=>3,'cp'=>18,'prod'=>1000,'time'=>683730),array('wood'=>146395,'clay'=>365985,'iron'=>182995,'crop'=>219590,'pop'=>3,'cp'=>22,'prod'=>1300,'time'=>1094170),array('wood'=>244480,'clay'=>611195,'iron'=>305600,'crop'=>366715,'pop'=>3,'cp'=>27,'prod'=>1600,'time'=>1750880),array('wood'=>408280,'clay'=>1020695,'iron'=>510350,'crop'=>612420,'pop'=>3,'cp'=>32,'prod'=>2000,'time'=>2801600),array('wood'=>681825,'clay'=>1704565,'iron'=>852280,'crop'=>1022740,'pop'=>3,'cp'=>38,'prod'=>2450,'time'=>4482770));
$bid1=array(array('prod'=>2),array('wood'=>40,'clay'=>100,'iron'=>50,'crop'=>60,'pop'=>2,'cp'=>1,'prod'=>5,'time'=>260),array('wood'=>65,'clay'=>165,'iron'=>85,'crop'=>100,'pop'=>1,'cp'=>1,'prod'=>9,'time'=>620),array('wood'=>110,'clay'=>280,'iron'=>140,'crop'=>165,'pop'=>1,'cp'=>2,'prod'=>15,'time'=>1190),array('wood'=>185,'clay'=>465,'iron'=>235,'crop'=>280,'pop'=>1,'cp'=>2,'prod'=>22,'time'=>2100),array('wood'=>310,'clay'=>780,'iron'=>390,'crop'=>465,'pop'=>1,'cp'=>2,'prod'=>33,'time'=>3560),array('wood'=>520,'clay'=>1300,'iron'=>650,'crop'=>780,'pop'=>2,'cp'=>3,'prod'=>50,'time'=>5890),array('wood'=>870,'clay'=>2170,'iron'=>1085,'crop'=>1300,'pop'=>2,'cp'=>4,'prod'=>70,'time'=>9620),array('wood'=>1450,'clay'=>3625,'iron'=>1810,'crop'=>2175,'pop'=>2,'cp'=>4,'prod'=>100,'time'=>15590),array('wood'=>2420,'clay'=>6050,'iron'=>3025,'crop'=>3630,'pop'=>2,'cp'=>5,'prod'=>145,'time'=>25150),array('wood'=>4040,'clay'=>10105,'iron'=>5050,'crop'=>6060,'pop'=>2,'cp'=>6,'prod'=>200,'time'=>40440),array('wood'=>6750,'clay'=>16870,'iron'=>8435,'crop'=>10125,'pop'=>2,'cp'=>7,'prod'=>280,'time'=>64900),array('wood'=>11270,'clay'=>28175,'iron'=>14090,'crop'=>16905,'pop'=>2,'cp'=>9,'prod'=>375,'time'=>104050),array('wood'=>18820,'clay'=>47055,'iron'=>23525,'crop'=>28230,'pop'=>2,'cp'=>11,'prod'=>495,'time'=>166680),array('wood'=>31430,'clay'=>78580,'iron'=>39290,'crop'=>47150,'pop'=>2,'cp'=>13,'prod'=>635,'time'=>266880),array('wood'=>52490,'clay'=>131230,'iron'=>65615,'crop'=>78740,'pop'=>2,'cp'=>15,'prod'=>800,'time'=>427210),array('wood'=>87660,'clay'=>219155,'iron'=>109575,'crop'=>131490,'pop'=>3,'cp'=>18,'prod'=>1000,'time'=>683730),array('wood'=>146395,'clay'=>365985,'iron'=>182995,'crop'=>219590,'pop'=>3,'cp'=>22,'prod'=>1300,'time'=>1094170),array('wood'=>244480,'clay'=>611195,'iron'=>305600,'crop'=>366715,'pop'=>3,'cp'=>27,'prod'=>1600,'time'=>1750880),array('wood'=>408280,'clay'=>1020695,'iron'=>510350,'crop'=>612420,'pop'=>3,'cp'=>32,'prod'=>2000,'time'=>2801600),array('wood'=>681825,'clay'=>1704565,'iron'=>852280,'crop'=>1022740,'pop'=>3,'cp'=>38,'prod'=>2450,'time'=>4482770));
$bid2=array(array('prod'=>2),array('wood'=>80,'clay'=>40,'iron'=>80,'crop'=>50,'pop'=>2,'cp'=>1,'prod'=>5,'time'=>220),array('wood'=>135,'clay'=>65,'iron'=>135,'crop'=>85,'pop'=>1,'cp'=>1,'prod'=>9,'time'=>550),array('wood'=>225,'clay'=>110,'iron'=>225,'crop'=>140,'pop'=>1,'cp'=>2,'prod'=>15,'time'=>1080),array('wood'=>375,'clay'=>185,'iron'=>375,'crop'=>235,'pop'=>1,'cp'=>2,'prod'=>22,'time'=>1930),array('wood'=>620,'clay'=>310,'iron'=>620,'crop'=>390,'pop'=>1,'cp'=>2,'prod'=>33,'time'=>3290),array('wood'=>1040,'clay'=>520,'iron'=>1040,'crop'=>650,'pop'=>2,'cp'=>3,'prod'=>50,'time'=>5470),array('wood'=>1735,'clay'=>870,'iron'=>1735,'crop'=>1085,'pop'=>2,'cp'=>4,'prod'=>70,'time'=>8950),array('wood'=>2900,'clay'=>1450,'iron'=>2900,'crop'=>1810,'pop'=>2,'cp'=>4,'prod'=>100,'time'=>14520),array('wood'=>4840,'clay'=>2420,'iron'=>4840,'crop'=>3025,'pop'=>2,'cp'=>5,'prod'=>145,'time'=>23430),array('wood'=>8080,'clay'=>4040,'iron'=>8080,'crop'=>5050,'pop'=>2,'cp'=>6,'prod'=>200,'time'=>37690),array('wood'=>13500,'clay'=>6750,'iron'=>13500,'crop'=>8435,'pop'=>2,'cp'=>7,'prod'=>280,'time'=>60510),array('wood'=>22540,'clay'=>11270,'iron'=>22540,'crop'=>14090,'pop'=>2,'cp'=>9,'prod'=>375,'time'=>97010),array('wood'=>37645,'clay'=>18820,'iron'=>37645,'crop'=>23525,'pop'=>2,'cp'=>11,'prod'=>495,'time'=>155420),array('wood'=>62865,'clay'=>31430,'iron'=>62865,'crop'=>39290,'pop'=>2,'cp'=>13,'prod'=>635,'time'=>248870),array('wood'=>104985,'clay'=>52490,'iron'=>104985,'crop'=>65615,'pop'=>2,'cp'=>15,'prod'=>800,'time'=>398390),array('wood'=>175320,'clay'=>87660,'iron'=>175320,'crop'=>109575,'pop'=>3,'cp'=>18,'prod'=>1000,'time'=>637620),array('wood'=>292790,'clay'=>146395,'iron'=>292790,'crop'=>182995,'pop'=>3,'cp'=>22,'prod'=>1300,'time'=>1020390),array('wood'=>488955,'clay'=>244480,'iron'=>488955,'crop'=>305600,'pop'=>3,'cp'=>27,'prod'=>1600,'time'=>1632820),array('wood'=>816555,'clay'=>408280,'iron'=>816555,'crop'=>510350,'pop'=>3,'cp'=>32,'prod'=>2000,'time'=>2612710),array('wood'=>1363650,'clay'=>681825,'iron'=>1363650,'crop'=>852280,'pop'=>3,'cp'=>38,'prod'=>2450,'time'=>4180540));
$bid3=array(array('prod'=>2),array('wood'=>100,'clay'=>80,'iron'=>30,'crop'=>60,'pop'=>3,'cp'=>1,'prod'=>5,'time'=>450),array('wood'=>165,'clay'=>135,'iron'=>50,'crop'=>100,'pop'=>2,'cp'=>1,'prod'=>9,'time'=>920),array('wood'=>280,'clay'=>225,'iron'=>85,'crop'=>165,'pop'=>2,'cp'=>2,'prod'=>15,'time'=>1670),array('wood'=>465,'clay'=>375,'iron'=>140,'crop'=>280,'pop'=>2,'cp'=>2,'prod'=>22,'time'=>2880),array('wood'=>780,'clay'=>620,'iron'=>235,'crop'=>465,'pop'=>2,'cp'=>2,'prod'=>33,'time'=>4800),array('wood'=>1300,'clay'=>1040,'iron'=>390,'crop'=>780,'pop'=>2,'cp'=>3,'prod'=>50,'time'=>7880),array('wood'=>2170,'clay'=>1735,'iron'=>650,'crop'=>1300,'pop'=>2,'cp'=>4,'prod'=>70,'time'=>12810),array('wood'=>3625,'clay'=>2900,'iron'=>1085,'crop'=>2175,'pop'=>2,'cp'=>4,'prod'=>100,'time'=>20690),array('wood'=>6050,'clay'=>4840,'iron'=>1815,'crop'=>3630,'pop'=>2,'cp'=>5,'prod'=>145,'time'=>33310),array('wood'=>10105,'clay'=>8080,'iron'=>3030,'crop'=>6060,'pop'=>2,'cp'=>6,'prod'=>200,'time'=>53500),array('wood'=>16870,'clay'=>13500,'iron'=>5060,'crop'=>10125,'pop'=>3,'cp'=>7,'prod'=>280,'time'=>85800),array('wood'=>28175,'clay'=>22540,'iron'=>8455,'crop'=>16905,'pop'=>3,'cp'=>9,'prod'=>375,'time'=>137470),array('wood'=>47055,'clay'=>37645,'iron'=>14115,'crop'=>28230,'pop'=>3,'cp'=>11,'prod'=>495,'time'=>220160),array('wood'=>78580,'clay'=>62865,'iron'=>23575,'crop'=>47150,'pop'=>3,'cp'=>13,'prod'=>635,'time'=>352450),array('wood'=>131230,'clay'=>104985,'iron'=>39370,'crop'=>78740,'pop'=>3,'cp'=>15,'prod'=>800,'time'=>564120),array('wood'=>219155,'clay'=>175320,'iron'=>65745,'crop'=>131490,'pop'=>3,'cp'=>18,'prod'=>1000,'time'=>902760),array('wood'=>365985,'clay'=>292790,'iron'=>109795,'crop'=>219590,'pop'=>3,'cp'=>22,'prod'=>1300,'time'=>145546),array('wood'=>611195,'clay'=>488955,'iron'=>183360,'crop'=>366715,'pop'=>3,'cp'=>27,'prod'=>1600,'time'=>2311660),array('wood'=>1020695,'clay'=>816555,'iron'=>306210,'crop'=>612420,'pop'=>3,'cp'=>32,'prod'=>2000,'time'=>3698850),array('wood'=>1704565,'clay'=>1363650,'iron'=>511370,'crop'=>1022740,'pop'=>3,'cp'=>38,'prod'=>2450,'time'=>5918370));
$bid4=array(array('prod'=>2),array('wood'=>70,'clay'=>90,'iron'=>70,'crop'=>20,'pop'=>0,'cp'=>1,'prod'=>5,'time'=>150),array('wood'=>115,'clay'=>150,'iron'=>115,'crop'=>35,'pop'=>0,'cp'=>1,'prod'=>9,'time'=>440),array('wood'=>195,'clay'=>250,'iron'=>195,'crop'=>55,'pop'=>0,'cp'=>2,'prod'=>15,'time'=>900),array('wood'=>325,'clay'=>420,'iron'=>325,'crop'=>95,'pop'=>0,'cp'=>2,'prod'=>22,'time'=>1650),array('wood'=>545,'clay'=>700,'iron'=>545,'crop'=>155,'pop'=>0,'cp'=>2,'prod'=>33,'time'=>2830),array('wood'=>910,'clay'=>1170,'iron'=>910,'crop'=>260,'pop'=>1,'cp'=>3,'prod'=>50,'time'=>4730),array('wood'=>1520,'clay'=>1950,'iron'=>1520,'crop'=>435,'pop'=>1,'cp'=>4,'prod'=>70,'time'=>7780),array('wood'=>2535,'clay'=>3260,'iron'=>2535,'crop'=>725,'pop'=>1,'cp'=>4,'prod'=>100,'time'=>12190),array('wood'=>4235,'clay'=>5445,'iron'=>4235,'crop'=>1210,'pop'=>1,'cp'=>5,'prod'=>145,'time'=>19690),array('wood'=>7070,'clay'=>9095,'iron'=>7070,'crop'=>2020,'pop'=>1,'cp'=>6,'prod'=>200,'time'=>31700),array('wood'=>11810,'clay'=>15185,'iron'=>11810,'crop'=>3375,'pop'=>1,'cp'=>7,'prod'=>280,'time'=>50910),array('wood'=>19725,'clay'=>25360,'iron'=>19725,'crop'=>5635,'pop'=>1,'cp'=>9,'prod'=>375,'time'=>84700),array('wood'=>32940,'clay'=>42350,'iron'=>32940,'crop'=>9410,'pop'=>1,'cp'=>11,'prod'=>495,'time'=>135710),array('wood'=>55005,'clay'=>70720,'iron'=>55005,'crop'=>15715,'pop'=>1,'cp'=>13,'prod'=>635,'time'=>217340),array('wood'=>91860,'clay'=>118105,'iron'=>91860,'crop'=>26245,'pop'=>1,'cp'=>15,'prod'=>800,'time'=>347950),array('wood'=>153405,'clay'=>197240,'iron'=>153405,'crop'=>43830,'pop'=>2,'cp'=>18,'prod'=>1000,'time'=>556910),array('wood'=>256190,'clay'=>329385,'iron'=>256190,'crop'=>73195,'pop'=>2,'cp'=>22,'prod'=>1300,'time'=>891260),array('wood'=>427835,'clay'=>550075,'iron'=>427835,'crop'=>122240,'pop'=>2,'cp'=>27,'prod'=>1600,'time'=>1426210),array('wood'=>714485,'clay'=>918625,'iron'=>714485,'crop'=>204140,'pop'=>2,'cp'=>32,'prod'=>2000,'time'=>2282140),array('wood'=>1193195,'clay'=>1534105,'iron'=>1193195,'crop'=>340915,'pop'=>2,'cp'=>38,'prod'=>2450,'time'=>3651630));
+2 -2
View File
@@ -1480,9 +1480,9 @@ class MYSQL_DB {
return mysql_query($q, $this->connection);
}
function sendMessage($client, $owner, $topic, $message, $send) {
function sendMessage($client, $owner, $topic, $message, $send, $alliance, $player, $coor, $report) {
$time = time();
$q = "INSERT INTO " . TB_PREFIX . "mdata values (0,$client,$owner,'$topic',\"$message\",0,0,$send,$time,0,0)";
$q = "INSERT INTO " . TB_PREFIX . "mdata values (0,$client,$owner,'$topic',\"$message\",0,0,$send,$time,0,0,$alliance,$player,$coor,$report)";
return mysql_query($q, $this->connection);
}
+121 -9
View File
@@ -314,10 +314,63 @@ class Message {
}
if(!preg_match('/\[message\]/',$text) && !preg_match('/\[\/message\]/',$text)){
$text = "[message]".$text."[/message]";
$alliance = $player = $coor = $report = 0;
for($i=0;$i<=$alliance;$i++){
if(preg_match('/\[alliance'.$i.'\]/',$text) && preg_match('/\[\/alliance'.$i.'\]/',$text)){
$alliance1 = preg_replace('/\[message\](.*?)\[\/alliance'.$i.'\]/is', '', $text);
if(preg_match('/\[alliance'.$i.'\]/',$alliance1) && preg_match('/\[\/alliance'.$i.'\]/',$alliance1)){
$j = $i+1;
$alliance2 = preg_replace('/\[\/alliance'.$i.'\](.*?)\[\/message\]/is', '', $text);
$alliance1 = preg_replace('/\[alliance'.$i.'\]/', '[alliance'.$j.']', $alliance1);
$alliance1 = preg_replace('/\[\/alliance'.$i.'\]/', '[/alliance'.$j.']', $alliance1);
$text = $alliance2."[/alliance".$i."]".$alliance1;
$alliance += 1;
}
}
}
for($i=0;$i<=$player;$i++){
if(preg_match('/\[player'.$i.'\]/',$text) && preg_match('/\[\/player'.$i.'\]/',$text)){
$player1 = preg_replace('/\[message\](.*?)\[\/player'.$i.'\]/is', '', $text);
if(preg_match('/\[player'.$i.'\]/',$player1) && preg_match('/\[\/player'.$i.'\]/',$player1)){
$j = $i+1;
$player2 = preg_replace('/\[\/player'.$i.'\](.*?)\[\/message\]/is', '', $text);
$player1 = preg_replace('/\[player'.$i.'\]/', '[player'.$j.']', $player1);
$player1 = preg_replace('/\[\/player'.$i.'\]/', '[/player'.$j.']', $player1);
$text = $player2."[/player".$i."]".$player1;
$player += 1;
}
}
}
for($i=0;$i<=$coor;$i++){
if(preg_match('/\[coor'.$i.'\]/',$text) && preg_match('/\[\/coor'.$i.'\]/',$text)){
$coor1 = preg_replace('/\[message\](.*?)\[\/coor'.$i.'\]/is', '', $text);
if(preg_match('/\[coor'.$i.'\]/',$coor1) && preg_match('/\[\/coor'.$i.'\]/',$coor1)){
$j = $i+1;
$coor2 = preg_replace('/\[\/coor'.$i.'\](.*?)\[\/message\]/is', '', $text);
$coor1 = preg_replace('/\[coor'.$i.'\]/', '[coor'.$j.']', $coor1);
$coor1 = preg_replace('/\[\/coor'.$i.'\]/', '[/coor'.$j.']', $coor1);
$text = $coor2."[/coor".$i."]".$coor1;
$coor += 1;
}
}
}
for($i=0;$i<=$report;$i++){
if(preg_match('/\[report'.$i.'\]/',$text) && preg_match('/\[\/report'.$i.'\]/',$text)){
$report1 = preg_replace('/\[message\](.*?)\[\/report'.$i.'\]/is', '', $text);
if(preg_match('/\[report'.$i.'\]/',$report1) && preg_match('/\[\/report'.$i.'\]/',$report1)){
$j = $i+1;
$report2 = preg_replace('/\[\/report'.$i.'\](.*?)\[\/message\]/is', '', $text);
$report1 = preg_replace('/\[report'.$i.'\]/', '[report'.$j.']', $report1);
$report1 = preg_replace('/\[\/report'.$i.'\]/', '[/report'.$j.']', $report1);
$text = $report2."[/report".$i."]".$report1;
$report += 1;
}
}
}
if($permission[opt7]==1){
if ($userally != 0) {
while ($allmembers = mysql_fetch_array($allmembersQ)) {
$database->sendMessage($allmembers[id],$session->uid,$topic,$text,0);
$database->sendMessage($allmembers[id],$session->uid,$topic,$text,0,$alliance,$player,$coor,$report);
}
}
}
@@ -336,13 +389,72 @@ class Message {
}
if(!preg_match('/\[message\]/',$text) && !preg_match('/\[\/message\]/',$text)){
$text = "[message]".$text."[/message]";
//if to multihunter
if($user == "0") {
//make mail server
$database->sendMessage($user, $session->uid, $topic, $text, 0);
} else {
$database->sendMessage($user, $session->uid, $topic, $text, 0);
}
$alliance = $player = $coor = $report = 0;
for($i=0;$i<=$alliance;$i++){
if(preg_match('/\[alliance'.$i.'\]/',$text) && preg_match('/\[\/alliance'.$i.'\]/',$text)){
$alliance1 = preg_replace('/\[alliance'.$i.'\]/', '', $input);
$alliance1 = preg_replace('/\[\/alliance'.$i.'\]/', '', $alliance1);
if(preg_match('/\[alliance'.$i.'\]/',$alliance1) && preg_match('/\[\/alliance'.$i.'\]/',$alliance1)){
$j = $i+1;
$text = preg_replace('/\[alliance'.$i.'\]/', '/\[alliance'.$j.'\]/', $text);
$text = preg_replace('/\[\/alliance'.$i.'\]/', '/\[\/alliance'.$j.'\]/', $text);
$alliance += 1;
}
}
}
for($i=0;$i<=$alliance;$i++){
if(preg_match('/\[alliance'.$i.'\]/',$text) && preg_match('/\[\/alliance'.$i.'\]/',$text)){
$alliance1 = preg_replace('/\[message\](.*?)\[\/alliance'.$i.'\]/is', '', $text);
if(preg_match('/\[alliance'.$i.'\]/',$alliance1) && preg_match('/\[\/alliance'.$i.'\]/',$alliance1)){
$j = $i+1;
$alliance2 = preg_replace('/\[\/alliance'.$i.'\](.*?)\[\/message\]/is', '', $text);
$alliance1 = preg_replace('/\[alliance'.$i.'\]/', '[alliance'.$j.']', $alliance1);
$alliance1 = preg_replace('/\[\/alliance'.$i.'\]/', '[/alliance'.$j.']', $alliance1);
$text = $alliance2."[/alliance".$i."]".$alliance1;
$alliance += 1;
}
}
}
for($i=0;$i<=$player;$i++){
if(preg_match('/\[player'.$i.'\]/',$text) && preg_match('/\[\/player'.$i.'\]/',$text)){
$player1 = preg_replace('/\[message\](.*?)\[\/player'.$i.'\]/is', '', $text);
if(preg_match('/\[player'.$i.'\]/',$player1) && preg_match('/\[\/player'.$i.'\]/',$player1)){
$j = $i+1;
$player2 = preg_replace('/\[\/player'.$i.'\](.*?)\[\/message\]/is', '', $text);
$player1 = preg_replace('/\[player'.$i.'\]/', '[player'.$j.']', $player1);
$player1 = preg_replace('/\[\/player'.$i.'\]/', '[/player'.$j.']', $player1);
$text = $player2."[/player".$i."]".$player1;
$player += 1;
}
}
}
for($i=0;$i<=$coor;$i++){
if(preg_match('/\[coor'.$i.'\]/',$text) && preg_match('/\[\/coor'.$i.'\]/',$text)){
$coor1 = preg_replace('/\[message\](.*?)\[\/coor'.$i.'\]/is', '', $text);
if(preg_match('/\[coor'.$i.'\]/',$coor1) && preg_match('/\[\/coor'.$i.'\]/',$coor1)){
$j = $i+1;
$coor2 = preg_replace('/\[\/coor'.$i.'\](.*?)\[\/message\]/is', '', $text);
$coor1 = preg_replace('/\[coor'.$i.'\]/', '[coor'.$j.']', $coor1);
$coor1 = preg_replace('/\[\/coor'.$i.'\]/', '[/coor'.$j.']', $coor1);
$text = $coor2."[/coor".$i."]".$coor1;
$coor += 1;
}
}
}
for($i=0;$i<=$report;$i++){
if(preg_match('/\[report'.$i.'\]/',$text) && preg_match('/\[\/report'.$i.'\]/',$text)){
$report1 = preg_replace('/\[message\](.*?)\[\/report'.$i.'\]/is', '', $text);
if(preg_match('/\[report'.$i.'\]/',$report1) && preg_match('/\[\/report'.$i.'\]/',$report1)){
$j = $i+1;
$report2 = preg_replace('/\[\/report'.$i.'\](.*?)\[\/message\]/is', '', $text);
$report1 = preg_replace('/\[report'.$i.'\]/', '[report'.$j.']', $report1);
$report1 = preg_replace('/\[\/report'.$i.'\]/', '[/report'.$j.']', $report1);
$text = $report2."[/report".$i."]".$report1;
$report += 1;
}
}
}
$database->sendMessage($user, $session->uid, $topic, $text, 0, $alliance, $player, $coor, $report);
}
}
@@ -362,7 +474,7 @@ class Message {
$welcomemsg = preg_replace("'%ALLI%'", $database->countAlli(), $welcomemsg);
$welcomemsg = preg_replace("'%SERVER_NAME%'", SERVER_NAME, $welcomemsg);
$welcomemsg = "[message]".$welcomemsg."[/message]";
return $database->sendMessage($uid, 5, WEL_TOPIC, $welcomemsg, 0);
return $database->sendMessage($uid, 5, WEL_TOPIC, $welcomemsg, 0, 0, 0, 0, 0);
}
private function wordCensor($text) {
+270
View File
@@ -0,0 +1,270 @@
<?php
############################### S T A R T ################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename config.php ##
## Version 4.8.5 ##
## Developed by: Dzoki and Dixie Edited by Advocaite ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
date_default_timezone_set("Asia/Jerusalem");
//////////////////////////////////
// ***** ERROR REPORTING *****//
//////////////////////////////////
// (E_ALL ^ E_NOTICE) = enabled
// (0) = disabled
error_reporting (E_ALL ^ E_NOTICE);
//////////////////////////////////
// ***** SERVER SETTINGS *****//
//////////////////////////////////
// ***** Name
define("SERVER_NAME","TravianZ");
// ***** Started
// Defines when has server started.
define("COMMENCE","1340310392");
// ***** Server Start Date / Time
define("START_DATE", "06/21/2012");
define("START_TIME", "22:26");
// ***** Language
// Choose your server language.
define("LANG","en");
// ***** Speed
// Choose your server speed. NOTICE: Higher speed, more likely
// to have some bugs. Lower speed, most likely no major bugs.
// Values: 1 (normal), 3 (3x speed) etc...
define("SPEED", "100000");
// ***** World size
// Defines world size. NOTICE: DO NOT EDIT!!
define("WORLD_MAX", "25");
// ***** Graphic Pack
// True = enabled, false = disabled
//!!!!!!!!!!!! DO NOT ENABLE !!!!!!!!!!!!
define("GP_ENABLE",false);
// Graphic pack location (default: gpack/travian_default/)
define("GP_LOCATE", "gpack/travian_default/");
// ***** Troop Speed
// Values: 1 (normal), 3 (3x speed) etc...
define("INCREASE_SPEED","10000");
// ***** Evasion Speed
define("EVASION_SPEED","6");
// ***** Trader capacity
// Values: 1 (normal), 3 (3x speed) etc...
define("TRADER_CAPACITY","1");
// ***** Village Expand
// 1 = slow village expanding - more Cultural Points needed for every new village
// 0 = fast village expanding - less Cultural Points needed for every new village
define("CP", 1);
// ***** Demolish Level Required
// Defines which level of Main building is required to be able to
// demolish. Min value = 1, max value = 20
// Default: 10
define("DEMOLISH_LEVEL_REQ","10");
// ***** Change storage capacity
define("STORAGE_MULTIPLIER","1");
define("STORAGE_BASE",800*STORAGE_MULTIPLIER);
// ***** Quest
// Ingame quest enabled/disabled.
define("QUEST",true);
// ***** Beginners Protection
// 3600 = 1 hour
// 3600*12 = 12 hours
// 3600*24 = 1 day
// 3600*24*3 = 3 days
// You can choose any value you want!
define("PROTECTION","0");
// ***** Enable WW Statistics
define("WW",False);
// ***** Enable T4 is Coming screen
define("T4_COMING",false);
// ***** Activation Mail
// true = activation mail will be sent, users will have to finish registration
// by clicking on link recieved in mail.
// false = users can register with any mail. Not needed to be real one.
define("AUTH_EMAIL",false);
// ***** PLUS
//Plus account lenght
define("PLUS_TIME",(3600*24*7));
//+25% production lenght
define("PLUS_PRODUCTION",(3600*24*7));
// ***** Great Workshop
define("GREAT_WKS",False);
// ***** Tourn threshold
define("TS_THRESHOLD",20);
// ***** Register open/close
define("REG_OPEN",True);
// ***** Peace system
// 0 = None
// 1 = Normal
// 2 = Christmas
// 3 = New Year
// 4 = Easter
define("PEACE",0);
//////////////////////////////////
// **** LOG SETTINGS **** //
//////////////////////////////////
// LOG BUILDING/UPGRADING
define("LOG_BUILD",false);
// LOG RESEARCHES
define("LOG_TECH",false);
// LOG USER LOGIN (IP's)
define("LOG_LOGIN",false);
// LOG GOLD
define("LOG_GOLD_FIN",false);
// LOG ADMIN
define("LOG_ADMIN",false);
// LOG ATTACK REPORTS
define("LOG_WAR",false);
// LOG MARKET REPORTS
define("LOG_MARKET",false);
// LOG ILLEGAL ACTIONS
define("LOG_ILLEGAL",false);
//////////////////////////////////
// **** NEWSBOX SETTINGS **** //
//////////////////////////////////
//true = enabled
//false = disabled
define("NEWSBOX1",false);
define("NEWSBOX2",false);
define("NEWSBOX3",false);
//////////////////////////////////
// **** SQL SETTINGS **** //
//////////////////////////////////
// ***** SQL Hostname
// example. sql106.000space.com / localhost
// If you host server on own PC than this value is: localhost
// If you use online hosting, value must be written in host cpanel
define("SQL_SERVER", "localhost");
// ***** Database Username
define("SQL_USER", "root");
// ***** Database Password
define("SQL_PASS", "");
// ***** Database Name
define("SQL_DB", "travianz");
// ***** Database - Table Prefix
define("TB_PREFIX", "s1_");
// ***** Database type
// 0 = MYSQL
// 1 = MYSQLi
// default: 1
define("DB_TYPE", 0);
////////////////////////////////////
// **** EXTRA SETTINGS **** //
////////////////////////////////////
// ***** Censore words
//define("WORD_CENSOR", "%ACTCEN%");
// ***** Words (censore)
// Choose which words do you want to be censored
//define("CENSORED","%CENWORDS%");
// ***** Limit Mailbox
// Limits mailbox to defined number of mails. (IGM's)
define("LIMIT_MAILBOX",false);
// If enabled, define number of maximum mails.
define("MAX_MAIL","30");
// ***** Include administrator in statistics/rank
define("INCLUDE_ADMIN", False);
////////////////////////////////////
// **** ADMIN SETTINGS **** //
////////////////////////////////////
// ***** Admin Email
define("ADMIN_EMAIL", "");
// ***** Admin Name
define("ADMIN_NAME", "");
//////////////////////////////////////////
// **** DO NOT EDIT SETTINGS **** //
//////////////////////////////////////////
define("TRACK_USR","");
define("USER_TIMEOUT","");
define("ALLOW_BURST",false);
define("BASIC_MAX",1);
define("INNER_MAX",1);
define("PLUS_MAX",1);
define("ALLOW_ALL_TRIBE",false);
define("CFM_ADMIN_ACT",true);
define("SERVER_WEB_ROOT",false);
define("USRNM_SPECIAL",true);
define("USRNM_MIN_LENGTH",3);
define("PW_MIN_LENGTH",4);
define("BANNED",0);
define("AUTH",1);
define("USER",2);
define("MULTIHUNTER",8);
define("ADMIN",9);
define("COOKIE_EXPIRE", 60*60*24*7);
define("COOKIE_PATH", "/");
////////////////////////////////////////////
// **** DOMAIN/SERVER SETTINGS **** //
////////////////////////////////////////////
define("DOMAIN", "http://localhost/");
define("HOMEPAGE", "http://localhost/");
define("SERVER", "http://localhost/");
$requse = 0;
############################### E N D ##################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename config.php ##
## Version 4.8.5 ##
## Developed by: Dzoki and Dixie Edited by Advocaite ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## ##
#################################################################################
?>
+4 -4
View File
@@ -36,10 +36,10 @@ foreach($posts as $pos) {
<a href="javascript:void(0);" bbType="d" bbTag="b" ><div title="bold" alt="bold" class="bbButton bbBold"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="i" ><div title="italic" alt="italic" class="bbButton bbItalic"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="u" ><div title="underlined" alt="underlined" class="bbButton bbUnderscore"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="alliance" ><div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="Player" ><div title="Player" alt="Player" class="bbButton bbPlayer"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="coor" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="report" ><div title="Report" alt="Report" class="bbButton bbReport"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="alliance0" ><div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="player0" ><div title="Player" alt="Player" class="bbButton bbPlayer"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="coor0" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="report0" ><div title="Report" alt="Report" class="bbButton bbReport"></div></a>
<a href="javascript:void(0);" bbWin="resources" id="text_resourceButton"><div title="Resources" alt="Resources" class="bbButton bbResource"></div></a>
<a href="javascript:void(0);" bbWin="smilies" id="text_smilieButton"><div title="Smilies" alt="Smilies" class="bbButton bbSmilie"></div></a>
<a href="javascript:void(0);" bbWin="troops" id="text_troopButton"><div title="Troops" alt="Troops" class="bbButton bbTroop"></div></a>
+4 -4
View File
@@ -31,10 +31,10 @@ if($session->access!=BANNED){
<a href="javascript:void(0);" bbType="d" bbTag="b" ><div title="bold" alt="bold" class="bbButton bbBold"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="i" ><div title="italic" alt="italic" class="bbButton bbItalic"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="u" ><div title="underlined" alt="underlined" class="bbButton bbUnderscore"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="alliance" ><div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="Player" ><div title="Player" alt="Player" class="bbButton bbPlayer"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="coor" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="report" ><div title="Report" alt="Report" class="bbButton bbReport"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="alliance0" ><div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="player0" ><div title="Player" alt="Player" class="bbButton bbPlayer"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="coor0" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="report0" ><div title="Report" alt="Report" class="bbButton bbReport"></div></a>
<a href="javascript:void(0);" bbWin="resources" id="text_resourceButton"><div title="Resources" alt="Resources" class="bbButton bbResource"></div></a>
<a href="javascript:void(0);" bbWin="smilies" id="text_smilieButton"><div title="Smilies" alt="Smilies" class="bbButton bbSmilie"></div></a>
+4 -4
View File
@@ -35,10 +35,10 @@ foreach($topics as $arr) {
<a href="javascript:void(0);" bbType="d" bbTag="b" ><div title="bold" alt="bold" class="bbButton bbBold"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="i" ><div title="italic" alt="italic" class="bbButton bbItalic"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="u" ><div title="underlined" alt="underlined" class="bbButton bbUnderscore"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="alliance" ><div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="Player" ><div title="Player" alt="Player" class="bbButton bbPlayer"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="coor" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="report" ><div title="Report" alt="Report" class="bbButton bbReport"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="alliance0" ><div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="player0" ><div title="Player" alt="Player" class="bbButton bbPlayer"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="coor0" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="report0" ><div title="Report" alt="Report" class="bbButton bbReport"></div></a>
<a href="javascript:void(0);" bbWin="resources" id="text_resourceButton"><div title="Resources" alt="Resources" class="bbButton bbResource"></div></a>
<a href="javascript:void(0);" bbWin="smilies" id="text_smilieButton"><div title="Smilies" alt="Smilies" class="bbButton bbSmilie"></div></a>
+4 -4
View File
@@ -32,10 +32,10 @@ foreach($topics as $top) {
<a href="javascript:void(0);" bbType="d" bbTag="b" ><div title="bold" alt="bold" class="bbButton bbBold"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="i" ><div title="italic" alt="italic" class="bbButton bbItalic"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="u" ><div title="underlined" alt="underlined" class="bbButton bbUnderscore"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="alliance" ><div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="Player" ><div title="Player" alt="Player" class="bbButton bbPlayer"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="coor" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="report" ><div title="Report" alt="Report" class="bbButton bbReport"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="alliance0" ><div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="player0" ><div title="Player" alt="Player" class="bbButton bbPlayer"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="coor0" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="report0" ><div title="Report" alt="Report" class="bbButton bbReport"></div></a>
<a href="javascript:void(0);" bbWin="resources" id="text_resourceButton"><div title="Resources" alt="Resources" class="bbButton bbResource"></div></a>
<a href="javascript:void(0);" bbWin="smilies" id="text_smilieButton"><div title="Smilies" alt="Smilies" class="bbButton bbSmilie"></div></a>
<a href="javascript:void(0);" bbWin="troops" id="text_troopButton"><div title="Troops" alt="Troops" class="bbButton bbTroop"></div></a>
-1
View File
@@ -215,7 +215,6 @@ if(isset($_POST['ft'])=='check'){
$error = '<span class="error"><b>No Coordinates selected</b></span>';
}elseif($userAccess == '0' or $userAccess == '8' or $userAccess == '9'){
$error = '<span class="error"><b>Player is Banned. You cannot send resources to him.</b></span>';
}
}elseif($_POST['r1']==0 && $_POST['r2']==0 && $_POST['r3']==0 && $_POST['r4']==0){
$error = '<span class="error"><b>Resources not selected.</b></span>';
}elseif(!$_POST['x'] && !$_POST['y'] && !$_POST['dname']){
+4
View File
@@ -1,5 +1,9 @@
<?php
$input = $message->reading['message'];
$alliance = $message->reading['alliance'];
$player = $message->reading['player'];
$coor = $message->reading['coor'];
$report = $message->reading['report'];
include("GameEngine/BBCode.php");
?>
<div id="content" class="messages">
+4 -4
View File
@@ -66,10 +66,10 @@ echo "re1:".$message->reply['topic']; }} ?>" maxlength="35" onkeyup="copyElement
<a href="javascript:void(0);" bbType="d" bbTag="b" ><div title="bold" alt="bold" class="bbButton bbBold"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="i" ><div title="italic" alt="italic" class="bbButton bbItalic"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="u" ><div title="underline" alt="underline" class="bbButton bbUnderscore"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="alliance" ><div title="alliance" alt="alliance" class="bbButton bbAlliance"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="player" ><div title="player" alt="player" class="bbButton bbPlayer"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="coor" ><div title="coordinates" alt="coordinates" class="bbButton bbCoordinate"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="report" ><div title="report" alt="report" class="bbButton bbReport"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="alliance0" ><div title="alliance" alt="alliance" class="bbButton bbAlliance"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="player0" ><div title="player" alt="player" class="bbButton bbPlayer"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="coor0" ><div title="coordinates" alt="coordinates" class="bbButton bbCoordinate" onclick="this.form.submit(); window.location.href = '?t=1&coor=<?php echo $coor+1; ?>';"></div></a>
<a href="javascript:void(0);" bbType="d" bbTag="report0" ><div title="report" alt="report" class="bbButton bbReport"></div></a>
<a href="javascript:void(0);" bbWin="resources" id="message_resourceButton"><div title="resources" alt="resources" class="bbButton bbResource"></div></a>
<a href="javascript:void(0);" bbWin="smilies" id="message_smilieButton"><div title="smilies" alt="smilies" class="bbButton bbSmilie"></div></a>
<a href="javascript:void(0);" bbWin="troops" id="message_troopButton"><div title="troops" alt="troops" class="bbButton bbTroop"></div></a>
+6 -2
View File
@@ -86,7 +86,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%abdata` (
`b7` tinyint(2) unsigned NOT NULL DEFAULT '0',
`b8` tinyint(2) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`vref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
) ENGINE=MYISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `%PREFIX%abdata`
@@ -189,7 +189,7 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%artefacts` (
`effect` varchar(100) NOT NULL,
`img` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
) ENGINE=MYISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Table structure for table `s1_artefacts`
@@ -914,6 +914,10 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%mdata` (
`time` int(11) unsigned NOT NULL DEFAULT '0',
`deltarget` int(11) unsigned NOT NULL,
`delowner` int(11) unsigned NOT NULL,
`alliance` int(11) unsigned NOT NULL,
`player` int(11) unsigned NOT NULL,
`coor` int(11) unsigned NOT NULL,
`report` int(11) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;