From 3a7ee8083ced0f214d92c8df31e1dfc6c6d8f8ed Mon Sep 17 00:00:00 2001 From: yi12345 Date: Sun, 28 Apr 2013 01:25:05 +0300 Subject: [PATCH] fix ally offer problem --- GameEngine/Alliance.php | 2 +- GameEngine/Database/db_MYSQL.php | 6 + GameEngine/Database/db_MYSQLi.php | 10 +- Templates/Plus/1.tpl | 439 ------------------------------ 4 files changed, 15 insertions(+), 442 deletions(-) delete mode 100644 Templates/Plus/1.tpl diff --git a/GameEngine/Alliance.php b/GameEngine/Alliance.php index b7a39d2f..2a935971 100644 --- a/GameEngine/Alliance.php +++ b/GameEngine/Alliance.php @@ -429,7 +429,7 @@ if($database->aExist($aName, "tag")) { if($database->getAllianceID($aName) != $session->alliance) { if($aType >= 1 and $aType <= 3) { - if(!$database->diplomacyInviteCheck($database->getAllianceID($aName), $session->alliance)) { + if(!$database->diplomacyInviteCheck2($session->alliance, $database->getAllianceID($aName))) { $database->diplomacyInviteAdd($session->alliance, $database->getAllianceID($aName), $aType); if($aType == 1){ $notice = "offer a confederation to"; diff --git a/GameEngine/Database/db_MYSQL.php b/GameEngine/Database/db_MYSQL.php index 39fcdeba..7a3b1e06 100644 --- a/GameEngine/Database/db_MYSQL.php +++ b/GameEngine/Database/db_MYSQL.php @@ -1287,6 +1287,12 @@ class MYSQL_DB { $result = mysql_query($q, $this->connection); return $this->mysql_fetch_all($result); } + + function diplomacyInviteCheck2($ally1, $ally2) { + $q = "SELECT * FROM " . TB_PREFIX . "diplomacy WHERE alli1 = $ally1 AND alli2 = $ally2 accepted = 0"; + $result = mysql_query($q, $this->connection); + return $this->mysql_fetch_all($result); + } function getAllianceDipProfile($aid, $type){ $q = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli1 = '$aid' AND type = '$type' AND accepted = '1' OR alli2 = '$aid' AND type = '$type' AND accepted = '1'"; diff --git a/GameEngine/Database/db_MYSQLi.php b/GameEngine/Database/db_MYSQLi.php index a7f8e041..ce2bc290 100644 --- a/GameEngine/Database/db_MYSQLi.php +++ b/GameEngine/Database/db_MYSQLi.php @@ -1287,8 +1287,14 @@ class MYSQLi_DB { function diplomacyInviteCheck($session_alliance) { $q = "SELECT * FROM " . TB_PREFIX . "diplomacy WHERE alli2 = $session_alliance AND accepted = 0"; - $result = mysqli_query($this->connection, $q); - return $this->mysqli_fetch_all($result); + $result = mysql_query($q, $this->connection); + return $this->mysql_fetch_all($result); + } + + function diplomacyInviteCheck2($ally1, $ally2) { + $q = "SELECT * FROM " . TB_PREFIX . "diplomacy WHERE alli1 = $ally1 AND alli2 = $ally2 accepted = 0"; + $result = mysql_query($q, $this->connection); + return $this->mysql_fetch_all($result); } function getAllianceDipProfile($aid, $type){ diff --git a/Templates/Plus/1.tpl b/Templates/Plus/1.tpl deleted file mode 100644 index 931479c9..00000000 --- a/Templates/Plus/1.tpl +++ /dev/null @@ -1,439 +0,0 @@ - - - - -

Donate for the

- has written the script that this server is using. Script is free at the moment, so keep it that way by donating small anmount!

- -
- - - - -
- - -(paypal check-out) -


-access != BANNED){ -?> -
- - - - - - - - - - - - - - - - - - - - - - - -
Package A
- - Package A
30 Gold
1.00 USD
- - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - -
Package B
- - Package B
100 Gold
3.00 USD
- - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - -
Package C
- - Package C
250 Gold
6.00 USD
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
Package D
- - Package D
600 Gold
12.00 USD
- - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - -
Package E
- - Package E
1600 Gold
34.00 USD
- - - - -
-
- - - - - - - - - - - - - - - - - - - - - -
Voucher
- Voucher
Your Option
- (ID operator) -
- - » Buy -
- - - - - - - - - - -
Rules
- after you buy the product, you should report to the Multihunter. -
to activate your product within 24 hours. -
- - -
-
All prices listed are final sales amounts.
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - -
Package 1
- - Package A
30 Gold
1.00 USD
» next
- - - - - - - - - - - - - - - - - - - - - - - -
Package 2
- - Package B
100 Gold
3.00 USD
» next
- - - - - - - - - - - - - - - - - - - - - - - -
Package 3
- - Package C
250 Gold
6.00 USD
» next
- - - - - - - - - - - - - - - - - - - - - - - -
Package 4
- - Package D
600 Gold
12.00 USD
» next
- - - - - - - - - - - - - - - - - - - - - - - -
Package 5
- - Package E
1600 Gold
34.00 USD
» next
- - -
-
All prices listed are final sales amounts.
- -
\ No newline at end of file