@@ -189,62 +189,62 @@ discard block |
||
189 | 189 | ); |
190 | 190 | |
191 | 191 | $sn_message_class_list = array( |
192 | - MSG_TYPE_NEW => array( |
|
193 | - 'name' => 'new_message', |
|
194 | - 'switchable' => false, |
|
195 | - 'email' => false, |
|
196 | - ), |
|
197 | - MSG_TYPE_ADMIN => array( |
|
198 | - 'name' => 'msg_admin', |
|
199 | - 'switchable' => false, |
|
200 | - 'email' => true, |
|
201 | - ), |
|
202 | - MSG_TYPE_PLAYER => array( |
|
203 | - 'name' => 'mnl_joueur', |
|
204 | - 'switchable' => false, |
|
205 | - 'email' => true, |
|
206 | - ), |
|
207 | - MSG_TYPE_ALLIANCE => array( |
|
208 | - 'name' => 'mnl_alliance', |
|
209 | - 'switchable' => false, |
|
210 | - 'email' => true, |
|
211 | - ), |
|
212 | - MSG_TYPE_SPY => array( |
|
213 | - 'name' => 'mnl_spy', |
|
214 | - 'switchable' => true, |
|
215 | - 'email' => true, |
|
216 | - ), |
|
217 | - MSG_TYPE_COMBAT => array( |
|
218 | - 'name' => 'mnl_attaque', |
|
219 | - 'switchable' => true, |
|
220 | - 'email' => true, |
|
221 | - ), |
|
222 | - MSG_TYPE_TRANSPORT => array( |
|
223 | - 'name' => 'mnl_transport', |
|
224 | - 'switchable' => true, |
|
225 | - 'email' => true, |
|
226 | - ), |
|
227 | - MSG_TYPE_RECYCLE => array( |
|
228 | - 'name' => 'mnl_exploit', |
|
229 | - 'switchable' => true, |
|
230 | - 'email' => true, |
|
231 | - ), |
|
232 | - MSG_TYPE_EXPLORE => array( |
|
233 | - 'name' => 'mnl_expedition', |
|
234 | - 'switchable' => true, |
|
235 | - 'email' => true, |
|
236 | - ), |
|
237 | - // 97 => 'mnl_general', |
|
238 | - MSG_TYPE_QUE => array( |
|
239 | - 'name' => 'mnl_buildlist', |
|
240 | - 'switchable' => true, |
|
241 | - 'email' => true, |
|
242 | - ), |
|
243 | - MSG_TYPE_OUTBOX => array( |
|
244 | - 'name' => 'mnl_outbox', |
|
245 | - 'switchable' => false, |
|
246 | - 'email' => false, |
|
247 | - ), |
|
192 | + MSG_TYPE_NEW => array( |
|
193 | + 'name' => 'new_message', |
|
194 | + 'switchable' => false, |
|
195 | + 'email' => false, |
|
196 | + ), |
|
197 | + MSG_TYPE_ADMIN => array( |
|
198 | + 'name' => 'msg_admin', |
|
199 | + 'switchable' => false, |
|
200 | + 'email' => true, |
|
201 | + ), |
|
202 | + MSG_TYPE_PLAYER => array( |
|
203 | + 'name' => 'mnl_joueur', |
|
204 | + 'switchable' => false, |
|
205 | + 'email' => true, |
|
206 | + ), |
|
207 | + MSG_TYPE_ALLIANCE => array( |
|
208 | + 'name' => 'mnl_alliance', |
|
209 | + 'switchable' => false, |
|
210 | + 'email' => true, |
|
211 | + ), |
|
212 | + MSG_TYPE_SPY => array( |
|
213 | + 'name' => 'mnl_spy', |
|
214 | + 'switchable' => true, |
|
215 | + 'email' => true, |
|
216 | + ), |
|
217 | + MSG_TYPE_COMBAT => array( |
|
218 | + 'name' => 'mnl_attaque', |
|
219 | + 'switchable' => true, |
|
220 | + 'email' => true, |
|
221 | + ), |
|
222 | + MSG_TYPE_TRANSPORT => array( |
|
223 | + 'name' => 'mnl_transport', |
|
224 | + 'switchable' => true, |
|
225 | + 'email' => true, |
|
226 | + ), |
|
227 | + MSG_TYPE_RECYCLE => array( |
|
228 | + 'name' => 'mnl_exploit', |
|
229 | + 'switchable' => true, |
|
230 | + 'email' => true, |
|
231 | + ), |
|
232 | + MSG_TYPE_EXPLORE => array( |
|
233 | + 'name' => 'mnl_expedition', |
|
234 | + 'switchable' => true, |
|
235 | + 'email' => true, |
|
236 | + ), |
|
237 | + // 97 => 'mnl_general', |
|
238 | + MSG_TYPE_QUE => array( |
|
239 | + 'name' => 'mnl_buildlist', |
|
240 | + 'switchable' => true, |
|
241 | + 'email' => true, |
|
242 | + ), |
|
243 | + MSG_TYPE_OUTBOX => array( |
|
244 | + 'name' => 'mnl_outbox', |
|
245 | + 'switchable' => false, |
|
246 | + 'email' => false, |
|
247 | + ), |
|
248 | 248 | ); |
249 | 249 | |
250 | 250 | $sn_message_groups = array( |
@@ -1096,7 +1096,7 @@ discard block |
||
1096 | 1096 | SHIP_HUGE_DEATH_STAR => SHIP_HUGE_DEATH_STAR, SHIP_HUGE_SUPERNOVA => SHIP_HUGE_SUPERNOVA, |
1097 | 1097 | SHIP_CARGO_SMALL => SHIP_CARGO_SMALL, SHIP_CARGO_BIG => SHIP_CARGO_BIG, SHIP_CARGO_SUPER => SHIP_CARGO_SUPER, SHIP_CARGO_HYPER => SHIP_CARGO_HYPER, |
1098 | 1098 | SHIP_RECYCLER => SHIP_RECYCLER, SHIP_COLONIZER => SHIP_COLONIZER, SHIP_SPY => SHIP_SPY, SHIP_SATTELITE_SOLAR => SHIP_SATTELITE_SOLAR |
1099 | - ), |
|
1099 | + ), |
|
1100 | 1100 | // Defensive building list |
1101 | 1101 | 'defense' => array (UNIT_DEF_TURRET_MISSILE => UNIT_DEF_TURRET_MISSILE, UNIT_DEF_TURRET_LASER_SMALL => UNIT_DEF_TURRET_LASER_SMALL, |
1102 | 1102 | UNIT_DEF_TURRET_LASER_BIG => UNIT_DEF_TURRET_LASER_BIG, UNIT_DEF_TURRET_GAUSS => UNIT_DEF_TURRET_GAUSS, |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | SNC_VER_ERROR_MISSMATCH_KEY_ID => 'error', |
167 | 167 | ); |
168 | 168 | |
169 | -$tableList = array( 'aks', 'alliance', 'alliance_requests', 'announce', 'annonce', 'banned', 'buddy', 'chat', 'config', 'counter', |
|
169 | +$tableList = array('aks', 'alliance', 'alliance_requests', 'announce', 'annonce', 'banned', 'buddy', 'chat', 'config', 'counter', |
|
170 | 170 | 'errors', 'fleets', 'fleet_log', 'galaxy', 'iraks', 'logs', 'log_dark_matter', 'messages', 'notes', 'planets', 'quest', |
171 | 171 | 'quest_status', 'referrals', 'rw', 'statpoints', 'users' |
172 | 172 | ); |
@@ -257,14 +257,14 @@ discard block |
||
257 | 257 | $user_option_list = array(); |
258 | 258 | |
259 | 259 | $user_option_list[OPT_MESSAGE] = array(); |
260 | -foreach($sn_message_class_list as $message_class_id => $message_class_data) |
|
260 | +foreach ($sn_message_class_list as $message_class_id => $message_class_data) |
|
261 | 261 | { |
262 | - if($message_class_data['switchable']) |
|
262 | + if ($message_class_data['switchable']) |
|
263 | 263 | { |
264 | 264 | $user_option_list[OPT_MESSAGE]["opt_{$message_class_data['name']}"] = 1; |
265 | 265 | } |
266 | 266 | |
267 | - if($message_class_data['email']) |
|
267 | + if ($message_class_data['email']) |
|
268 | 268 | { |
269 | 269 | $user_option_list[OPT_MESSAGE]["opt_email_{$message_class_data['name']}"] = 0; |
270 | 270 | } |
@@ -847,7 +847,7 @@ discard block |
||
847 | 847 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_ICE_HYDROGEN, |
848 | 848 | UNIT_PLANET_DENSITY_RARITY => 30, // 1, // 40.00, // * 1/121 0,82645 |
849 | 849 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_PERFECT, |
850 | - UNIT_RESOURCES => array(RES_METAL => 0.20, RES_CRYSTAL => 0.60, RES_DEUTERIUM => 7.10, ), |
|
850 | + UNIT_RESOURCES => array(RES_METAL => 0.20, RES_CRYSTAL => 0.60, RES_DEUTERIUM => 7.10,), |
|
851 | 851 | UNIT_PLANET_DENSITY_MAX_SECTORS => 150, |
852 | 852 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 11, |
853 | 853 | ), |
@@ -856,7 +856,7 @@ discard block |
||
856 | 856 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_ICE_METHANE, |
857 | 857 | UNIT_PLANET_DENSITY_RARITY => 130, // 6, // 6.67, // * 6,0 4,95868 |
858 | 858 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_GOOD, |
859 | - UNIT_RESOURCES => array(RES_METAL => 0.55, RES_CRYSTAL => 0.85, RES_DEUTERIUM => 4.60, ), |
|
859 | + UNIT_RESOURCES => array(RES_METAL => 0.55, RES_CRYSTAL => 0.85, RES_DEUTERIUM => 4.60,), |
|
860 | 860 | UNIT_PLANET_DENSITY_MAX_SECTORS => 200, |
861 | 861 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 6, |
862 | 862 | ), |
@@ -865,7 +865,7 @@ discard block |
||
865 | 865 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_ICE_WATER, |
866 | 866 | UNIT_PLANET_DENSITY_RARITY => 450, //20, // 2.00, // * 20,0 16,52893 |
867 | 867 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_AVERAGE, |
868 | - UNIT_RESOURCES => array(RES_METAL => 0.86, RES_CRYSTAL => 0.95, RES_DEUTERIUM => 2.20, ), |
|
868 | + UNIT_RESOURCES => array(RES_METAL => 0.86, RES_CRYSTAL => 0.95, RES_DEUTERIUM => 2.20,), |
|
869 | 869 | UNIT_PLANET_DENSITY_MAX_SECTORS => 999, |
870 | 870 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 0, |
871 | 871 | ), |
@@ -875,7 +875,7 @@ discard block |
||
875 | 875 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_CRYSTAL_RAW, |
876 | 876 | UNIT_PLANET_DENSITY_RARITY => 20, // 1, // 40.00, // *1,0 0,82645 |
877 | 877 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_PERFECT, |
878 | - UNIT_RESOURCES => array(RES_METAL => 0.40, RES_CRYSTAL => 12.37, RES_DEUTERIUM => 0.50, ), |
|
878 | + UNIT_RESOURCES => array(RES_METAL => 0.40, RES_CRYSTAL => 12.37, RES_DEUTERIUM => 0.50,), |
|
879 | 879 | UNIT_PLANET_DENSITY_MAX_SECTORS => 150, |
880 | 880 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 11, |
881 | 881 | ), |
@@ -884,7 +884,7 @@ discard block |
||
884 | 884 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_CRYSTAL_SILICATE, |
885 | 885 | UNIT_PLANET_DENSITY_RARITY => 140, // 5.71, // * 7,0 5,78512 |
886 | 886 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_GOOD, |
887 | - UNIT_RESOURCES => array(RES_METAL => 0.67, RES_CRYSTAL => 4.50, RES_DEUTERIUM => 0.85, ), |
|
887 | + UNIT_RESOURCES => array(RES_METAL => 0.67, RES_CRYSTAL => 4.50, RES_DEUTERIUM => 0.85,), |
|
888 | 888 | UNIT_PLANET_DENSITY_MAX_SECTORS => 200, |
889 | 889 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 6, |
890 | 890 | ), |
@@ -893,7 +893,7 @@ discard block |
||
893 | 893 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_CRYSTAL_STONE, |
894 | 894 | UNIT_PLANET_DENSITY_RARITY => 500, // 1.90, // * 21,0 17,35537 |
895 | 895 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_AVERAGE, |
896 | - UNIT_RESOURCES => array(RES_METAL => 0.80, RES_CRYSTAL => 2.00, RES_DEUTERIUM => 0.95, ), |
|
896 | + UNIT_RESOURCES => array(RES_METAL => 0.80, RES_CRYSTAL => 2.00, RES_DEUTERIUM => 0.95,), |
|
897 | 897 | UNIT_PLANET_DENSITY_MAX_SECTORS => 999, |
898 | 898 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 0, |
899 | 899 | ), |
@@ -903,7 +903,7 @@ discard block |
||
903 | 903 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_STANDARD, |
904 | 904 | UNIT_PLANET_DENSITY_RARITY => 1000, // 1.0, // * 40,0 33,05785 |
905 | 905 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_NORMAL, |
906 | - UNIT_RESOURCES => array(RES_METAL => 1.00, RES_CRYSTAL => 1.00, RES_DEUTERIUM => 1.00, ), |
|
906 | + UNIT_RESOURCES => array(RES_METAL => 1.00, RES_CRYSTAL => 1.00, RES_DEUTERIUM => 1.00,), |
|
907 | 907 | UNIT_PLANET_DENSITY_MAX_SECTORS => 999, |
908 | 908 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 0, |
909 | 909 | ), |
@@ -913,7 +913,7 @@ discard block |
||
913 | 913 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_METAL_ORE, |
914 | 914 | UNIT_PLANET_DENSITY_RARITY => 550, // 2.11, // * 19,0 15,70248 |
915 | 915 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_AVERAGE, |
916 | - UNIT_RESOURCES => array(RES_METAL => 1.60, RES_CRYSTAL => 0.90, RES_DEUTERIUM => 0.80, ), |
|
916 | + UNIT_RESOURCES => array(RES_METAL => 1.60, RES_CRYSTAL => 0.90, RES_DEUTERIUM => 0.80,), |
|
917 | 917 | UNIT_PLANET_DENSITY_MAX_SECTORS => 999, |
918 | 918 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 0, |
919 | 919 | ), |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_METAL_PERIDOT, |
923 | 923 | UNIT_PLANET_DENSITY_RARITY => 120, // 8.00, // * 5,0 4,13223 |
924 | 924 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_GOOD, |
925 | - UNIT_RESOURCES => array(RES_METAL => 4.71, RES_CRYSTAL => 0.80, RES_DEUTERIUM => 0.55, ), |
|
925 | + UNIT_RESOURCES => array(RES_METAL => 4.71, RES_CRYSTAL => 0.80, RES_DEUTERIUM => 0.55,), |
|
926 | 926 | UNIT_PLANET_DENSITY_MAX_SECTORS => 200, |
927 | 927 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 6, |
928 | 928 | ), |
@@ -931,7 +931,7 @@ discard block |
||
931 | 931 | UNIT_PLANET_DENSITY_INDEX => PLANET_DENSITY_METAL_RAW, |
932 | 932 | UNIT_PLANET_DENSITY_RARITY => 25, // 40.00, // * 1,0 0,82645 |
933 | 933 | UNIT_PLANET_DENSITY_RICHNESS => PLANET_DENSITY_RICHNESS_PERFECT, |
934 | - UNIT_RESOURCES => array(RES_METAL => 8.00, RES_CRYSTAL => 0.40, RES_DEUTERIUM => 0.25, ), |
|
934 | + UNIT_RESOURCES => array(RES_METAL => 8.00, RES_CRYSTAL => 0.40, RES_DEUTERIUM => 0.25,), |
|
935 | 935 | UNIT_PLANET_DENSITY_MAX_SECTORS => 150, |
936 | 936 | UNIT_PLANET_DENSITY_MIN_ASTROTECH => 11, |
937 | 937 | ), |
@@ -1061,7 +1061,7 @@ discard block |
||
1061 | 1061 | ), |
1062 | 1062 | |
1063 | 1063 | // Tech list |
1064 | - 'tech' => array ( |
|
1064 | + 'tech' => array( |
|
1065 | 1065 | TECH_ARMOR => TECH_ARMOR, TECH_WEAPON => TECH_WEAPON, TECH_SHIELD => TECH_SHIELD, |
1066 | 1066 | TECH_SPY => TECH_SPY, TECH_COMPUTER => TECH_COMPUTER, |
1067 | 1067 | TECH_ENERGY => TECH_ENERGY, TECH_LASER => TECH_LASER, TECH_ION => TECH_ION, TECH_PLASMA => TECH_PLASMA, TECH_HYPERSPACE => TECH_HYPERSPACE, |
@@ -1072,7 +1072,7 @@ discard block |
||
1072 | 1072 | ), |
1073 | 1073 | |
1074 | 1074 | // Mercenaries |
1075 | - 'mercenaries' => array ( |
|
1075 | + 'mercenaries' => array( |
|
1076 | 1076 | MRC_STOCKMAN => MRC_STOCKMAN, MRC_SPY => MRC_SPY, MRC_ACADEMIC => MRC_ACADEMIC, |
1077 | 1077 | MRC_ADMIRAL => MRC_ADMIRAL, MRC_COORDINATOR => MRC_COORDINATOR, MRC_NAVIGATOR => MRC_NAVIGATOR, |
1078 | 1078 | ), |
@@ -1098,7 +1098,7 @@ discard block |
||
1098 | 1098 | SHIP_RECYCLER => SHIP_RECYCLER, SHIP_COLONIZER => SHIP_COLONIZER, SHIP_SPY => SHIP_SPY, SHIP_SATTELITE_SOLAR => SHIP_SATTELITE_SOLAR |
1099 | 1099 | ), |
1100 | 1100 | // Defensive building list |
1101 | - 'defense' => array (UNIT_DEF_TURRET_MISSILE => UNIT_DEF_TURRET_MISSILE, UNIT_DEF_TURRET_LASER_SMALL => UNIT_DEF_TURRET_LASER_SMALL, |
|
1101 | + 'defense' => array(UNIT_DEF_TURRET_MISSILE => UNIT_DEF_TURRET_MISSILE, UNIT_DEF_TURRET_LASER_SMALL => UNIT_DEF_TURRET_LASER_SMALL, |
|
1102 | 1102 | UNIT_DEF_TURRET_LASER_BIG => UNIT_DEF_TURRET_LASER_BIG, UNIT_DEF_TURRET_GAUSS => UNIT_DEF_TURRET_GAUSS, |
1103 | 1103 | UNIT_DEF_TURRET_ION => UNIT_DEF_TURRET_ION, UNIT_DEF_TURRET_PLASMA => UNIT_DEF_TURRET_PLASMA, |
1104 | 1104 | |
@@ -1108,7 +1108,7 @@ discard block |
||
1108 | 1108 | ), |
1109 | 1109 | |
1110 | 1110 | // Missiles list |
1111 | - 'missile' => array (UNIT_DEF_MISSILE_INTERCEPTOR => UNIT_DEF_MISSILE_INTERCEPTOR, UNIT_DEF_MISSILE_INTERPLANET => UNIT_DEF_MISSILE_INTERPLANET, ), |
|
1111 | + 'missile' => array(UNIT_DEF_MISSILE_INTERCEPTOR => UNIT_DEF_MISSILE_INTERCEPTOR, UNIT_DEF_MISSILE_INTERPLANET => UNIT_DEF_MISSILE_INTERPLANET,), |
|
1112 | 1112 | |
1113 | 1113 | // Combat units list |
1114 | 1114 | 'combat' => array( |
@@ -1148,9 +1148,9 @@ discard block |
||
1148 | 1148 | ), |
1149 | 1149 | |
1150 | 1150 | // Resource list |
1151 | - 'resources' => array ( 0 => 'metal', 1 => 'crystal', 2 => 'deuterium', 3 => 'dark_matter'), |
|
1151 | + 'resources' => array(0 => 'metal', 1 => 'crystal', 2 => 'deuterium', 3 => 'dark_matter'), |
|
1152 | 1152 | // Resources all |
1153 | - 'resources_all' => array(RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_ENERGY => RES_ENERGY, RES_DARK_MATTER => RES_DARK_MATTER, RES_METAMATTER => RES_METAMATTER, ), |
|
1153 | + 'resources_all' => array(RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_ENERGY => RES_ENERGY, RES_DARK_MATTER => RES_DARK_MATTER, RES_METAMATTER => RES_METAMATTER,), |
|
1154 | 1154 | // Resources can be produced on planet |
1155 | 1155 | 'resources_planet' => array(RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_ENERGY => RES_ENERGY), |
1156 | 1156 | // Resources can be looted from planet |
@@ -1169,13 +1169,13 @@ discard block |
||
1169 | 1169 | ), |
1170 | 1170 | |
1171 | 1171 | // Resources that can be tradeable in market trader AND be a quest_rewards |
1172 | - 'quest_rewards' => array(RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_DARK_MATTER => RES_DARK_MATTER, ), |
|
1172 | + 'quest_rewards' => array(RES_METAL => RES_METAL, RES_CRYSTAL => RES_CRYSTAL, RES_DEUTERIUM => RES_DEUTERIUM, RES_DARK_MATTER => RES_DARK_MATTER,), |
|
1173 | 1173 | |
1174 | 1174 | // // Ques list |
1175 | 1175 | // 'ques' => array(QUE_STRUCTURES, QUE_HANGAR, QUE_RESEARCH), |
1176 | 1176 | |
1177 | - 'STAT_COMMON' => array(STAT_TOTAL => STAT_TOTAL, STAT_FLEET => STAT_FLEET, STAT_TECH => STAT_TECH, STAT_BUILDING => STAT_BUILDING, STAT_DEFENSE => STAT_DEFENSE, STAT_RESOURCE => STAT_RESOURCE, ), |
|
1178 | - 'STAT_PLAYER' => array(STAT_RAID_TOTAL => STAT_RAID_TOTAL, STAT_RAID_WON => STAT_RAID_WON, STAT_RAID_LOST => STAT_RAID_LOST, STAT_LVL_BUILDING => STAT_LVL_BUILDING, STAT_LVL_TECH => STAT_LVL_TECH, STAT_LVL_RAID => STAT_LVL_RAID, ), |
|
1177 | + 'STAT_COMMON' => array(STAT_TOTAL => STAT_TOTAL, STAT_FLEET => STAT_FLEET, STAT_TECH => STAT_TECH, STAT_BUILDING => STAT_BUILDING, STAT_DEFENSE => STAT_DEFENSE, STAT_RESOURCE => STAT_RESOURCE,), |
|
1178 | + 'STAT_PLAYER' => array(STAT_RAID_TOTAL => STAT_RAID_TOTAL, STAT_RAID_WON => STAT_RAID_WON, STAT_RAID_LOST => STAT_RAID_LOST, STAT_LVL_BUILDING => STAT_LVL_BUILDING, STAT_LVL_TECH => STAT_LVL_TECH, STAT_LVL_RAID => STAT_LVL_RAID,), |
|
1179 | 1179 | ), |
1180 | 1180 | ); |
1181 | 1181 |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | global $lang; |
4 | 4 | |
5 | -if(!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) |
|
5 | +if (!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) |
|
6 | 6 | { |
7 | 7 | $debug->error("Attempt to call ALLIANCE page mode {$mode} directly - not from alliance.php", 'Forbidden', 403); |
8 | 8 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $page = gettemplate('ali_admin_mail', true); |
21 | 21 | |
22 | 22 | if ($ranks) { |
23 | - foreach($ranks as $id => $array) { |
|
23 | + foreach ($ranks as $id => $array) { |
|
24 | 24 | $page->assign_block_vars('ranks', array( |
25 | 25 | 'NAME' => $array['name'], |
26 | 26 | 'VALUE' => $id, |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | { |
5 | 5 | global $lang; |
6 | 6 | |
7 | - if(!in_array($unit_id, sn_get_groups('artifacts'))) |
|
7 | + if (!in_array($unit_id, sn_get_groups('artifacts'))) |
|
8 | 8 | { |
9 | 9 | return; |
10 | 10 | } |
@@ -13,24 +13,24 @@ discard block |
||
13 | 13 | $user = db_user_by_id($user['id'], true); |
14 | 14 | |
15 | 15 | $unit_level = $artifact_level_old = mrc_get_level($user, array(), $unit_id, true); |
16 | - if($unit_level > 0) |
|
16 | + if ($unit_level > 0) |
|
17 | 17 | { |
18 | 18 | $db_changeset = array(); |
19 | - switch($unit_id) |
|
19 | + switch ($unit_id) |
|
20 | 20 | { |
21 | 21 | case ART_LHC: |
22 | 22 | case ART_HOOK_SMALL: |
23 | 23 | case ART_HOOK_MEDIUM: |
24 | 24 | case ART_HOOK_LARGE: |
25 | 25 | $has_moon = DBStaticPlanet::db_planet_by_parent($planetrow['id'], true, '`id`'); |
26 | - if($planetrow['planet_type'] == PT_PLANET && !$has_moon['id']) |
|
26 | + if ($planetrow['planet_type'] == PT_PLANET && !$has_moon['id']) |
|
27 | 27 | { |
28 | 28 | $unit_level--; |
29 | 29 | $moon_chance = $unit_id == ART_LHC ? uni_calculate_moon_chance($planetrow['debris_metal'] + $planetrow['debris_crystal']) : ( |
30 | 30 | $unit_id == ART_HOOK_MEDIUM ? mt_rand(1100, 8999) : ($unit_id == ART_HOOK_SMALL ? 1100 : 8999) |
31 | 31 | ); |
32 | 32 | $random = $unit_id == ART_LHC ? mt_rand(1, 100) : $moon_chance; |
33 | - if($random <= $moon_chance) |
|
33 | + if ($random <= $moon_chance) |
|
34 | 34 | { |
35 | 35 | $new_moon_row = uni_create_moon($planetrow['galaxy'], $planetrow['system'], $planetrow['planet'], $user['id'], $moon_chance); |
36 | 36 | $message = sprintf($lang['art_moon_create'][$unit_id], $new_moon_row['name'], uni_render_coordinates($planetrow), pretty_number($moon_chance)); |
@@ -51,14 +51,14 @@ discard block |
||
51 | 51 | case ART_RCD_MEDIUM: |
52 | 52 | case ART_RCD_LARGE: |
53 | 53 | $planetrow = DBStaticPlanet::db_planet_by_id($planetrow['id'], true); |
54 | - if($planetrow['planet_type'] != PT_PLANET) |
|
54 | + if ($planetrow['planet_type'] != PT_PLANET) |
|
55 | 55 | { |
56 | 56 | $message = $lang['art_rcd_err_moon']; |
57 | 57 | break; |
58 | 58 | } |
59 | 59 | |
60 | 60 | $que = que_get($user['id'], $planetrow['id'], QUE_STRUCTURES, false); |
61 | - if(!empty($que['items'])) |
|
61 | + if (!empty($que['items'])) |
|
62 | 62 | { |
63 | 63 | $message = $lang['art_rcd_err_que']; |
64 | 64 | break; |
@@ -67,15 +67,15 @@ discard block |
||
67 | 67 | $artifact_deploy = get_unit_param($unit_id, P_DEPLOY); |
68 | 68 | |
69 | 69 | $sectors_used = 0; |
70 | - foreach($artifact_deploy as $deploy_unit_id => $deploy_unit_level) |
|
70 | + foreach ($artifact_deploy as $deploy_unit_id => $deploy_unit_level) |
|
71 | 71 | { |
72 | - if(!($levels_deployed = max(0, $deploy_unit_level - mrc_get_level($user, $planetrow, $deploy_unit_id, true, true)))) |
|
72 | + if (!($levels_deployed = max(0, $deploy_unit_level - mrc_get_level($user, $planetrow, $deploy_unit_id, true, true)))) |
|
73 | 73 | continue; |
74 | 74 | $sectors_used += $levels_deployed; |
75 | 75 | $db_changeset['unit'][] = OldDbChangeSet::db_changeset_prepare_unit($deploy_unit_id, $levels_deployed, $user, $planetrow['id']); |
76 | 76 | } |
77 | 77 | |
78 | - if($sectors_used == 0) |
|
78 | + if ($sectors_used == 0) |
|
79 | 79 | { |
80 | 80 | $message = $lang['art_rcd_err_no_sense']; |
81 | 81 | break; |
@@ -90,13 +90,13 @@ discard block |
||
90 | 90 | $que_item = null; |
91 | 91 | $que = que_get($user['id'], $planetrow['id'], QUE_RESEARCH, true); |
92 | 92 | $current_que = &$que['ques'][QUE_RESEARCH][$user['id']][0]; |
93 | - if(!empty($current_que)) |
|
93 | + if (!empty($current_que)) |
|
94 | 94 | { |
95 | 95 | reset($current_que); |
96 | 96 | $que_item = &$que['ques'][QUE_RESEARCH][$user['id']][0][key($current_que)]; |
97 | 97 | } |
98 | 98 | |
99 | - if(!empty($que_item) && $que_item['que_time_left'] > 60) |
|
99 | + if (!empty($que_item) && $que_item['que_time_left'] > 60) |
|
100 | 100 | { |
101 | 101 | $unit_level--; |
102 | 102 | $old_time = $que_item['que_time_left']; |
@@ -117,13 +117,13 @@ discard block |
||
117 | 117 | $que = que_get($user['id'], $planetrow['id'], QUE_STRUCTURES, true); |
118 | 118 | $current_que = &$que['ques'][QUE_STRUCTURES][$user['id']][$planetrow['id']]; |
119 | 119 | // $que_item = &$que['que'][QUE_STRUCTURES][0]; |
120 | - if(!empty($current_que)) |
|
120 | + if (!empty($current_que)) |
|
121 | 121 | { |
122 | 122 | reset($current_que); |
123 | 123 | $que_item = &$que['ques'][QUE_STRUCTURES][$user['id']][$planetrow['id']][key($current_que)]; |
124 | 124 | } |
125 | 125 | |
126 | - if(isset($que_item) && $que_item['que_time_left'] > 60) |
|
126 | + if (isset($que_item) && $que_item['que_time_left'] > 60) |
|
127 | 127 | { |
128 | 128 | $unit_level--; |
129 | 129 | $old_time = $que_item['que_time_left']; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | break; |
142 | 142 | |
143 | 143 | } |
144 | - if($unit_level != $artifact_level_old) |
|
144 | + if ($unit_level != $artifact_level_old) |
|
145 | 145 | { |
146 | 146 | $db_changeset['unit'][] = OldDbChangeSet::db_changeset_prepare_unit($unit_id, $unit_level - $artifact_level_old, $user); |
147 | 147 | OldDbChangeSet::db_changeset_apply($db_changeset); |
@@ -1,7 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -function art_use(&$user, &$planetrow, $unit_id) |
|
4 | -{ |
|
3 | +function art_use(&$user, &$planetrow, $unit_id) { |
|
5 | 4 | global $lang; |
6 | 5 | |
7 | 6 | if(!in_array($unit_id, sn_get_groups('artifacts'))) |
@@ -34,14 +33,12 @@ discard block |
||
34 | 33 | { |
35 | 34 | $new_moon_row = uni_create_moon($planetrow['galaxy'], $planetrow['system'], $planetrow['planet'], $user['id'], $moon_chance); |
36 | 35 | $message = sprintf($lang['art_moon_create'][$unit_id], $new_moon_row['name'], uni_render_coordinates($planetrow), pretty_number($moon_chance)); |
37 | - } |
|
38 | - else |
|
36 | + } else |
|
39 | 37 | { |
40 | 38 | $message = $lang['art_lhc_moon_fail']; |
41 | 39 | } |
42 | 40 | msg_send_simple_message($user['id'], 0, 0, MSG_TYPE_ADMIN, $lang['art_lhc_from'], $lang['art_lhc_subj'], $message); |
43 | - } |
|
44 | - else |
|
41 | + } else |
|
45 | 42 | { |
46 | 43 | $message = $lang['art_moon_exists']; |
47 | 44 | } |
@@ -69,8 +66,9 @@ discard block |
||
69 | 66 | $sectors_used = 0; |
70 | 67 | foreach($artifact_deploy as $deploy_unit_id => $deploy_unit_level) |
71 | 68 | { |
72 | - if(!($levels_deployed = max(0, $deploy_unit_level - mrc_get_level($user, $planetrow, $deploy_unit_id, true, true)))) |
|
73 | - continue; |
|
69 | + if(!($levels_deployed = max(0, $deploy_unit_level - mrc_get_level($user, $planetrow, $deploy_unit_id, true, true)))) { |
|
70 | + continue; |
|
71 | + } |
|
74 | 72 | $sectors_used += $levels_deployed; |
75 | 73 | $db_changeset['unit'][] = OldDbChangeSet::db_changeset_prepare_unit($deploy_unit_id, $levels_deployed, $user, $planetrow['id']); |
76 | 74 | } |
@@ -104,8 +102,7 @@ discard block |
||
104 | 102 | DBStaticQue::db_que_set_time_left_by_id($que_item['que_id'], $que_item['que_time_left']); |
105 | 103 | $message = sprintf($lang['art_heurestic_chip_ok'], $lang['tech'][$que_item['que_unit_id']], $que_item['que_unit_level'], sys_time_human($old_time - $que_item['que_time_left'])); |
106 | 104 | msg_send_simple_message($user['id'], 0, 0, MSG_TYPE_QUE, $lang['art_heurestic_chip_subj'], $lang['art_heurestic_chip_subj'], $message); |
107 | - } |
|
108 | - else |
|
105 | + } else |
|
109 | 106 | { |
110 | 107 | $message = $lang['art_heurestic_chip_no_research']; |
111 | 108 | } |
@@ -133,8 +130,7 @@ discard block |
||
133 | 130 | $lang['tech'][$que_item['que_unit_id']], $que_item['que_unit_level'], $planetrow['name'], uni_render_coordinates($planetrow), sys_time_human($old_time - $que_item['que_time_left']) |
134 | 131 | ); |
135 | 132 | msg_send_simple_message($user['id'], 0, 0, MSG_TYPE_QUE, $lang['art_nano_builder_subj'], $lang['art_nano_builder_subj'], $message); |
136 | - } |
|
137 | - else |
|
133 | + } else |
|
138 | 134 | { |
139 | 135 | $message = $lang['art_nano_builder_no_que']; |
140 | 136 | } |
@@ -146,8 +142,7 @@ discard block |
||
146 | 142 | $db_changeset['unit'][] = OldDbChangeSet::db_changeset_prepare_unit($unit_id, $unit_level - $artifact_level_old, $user); |
147 | 143 | OldDbChangeSet::db_changeset_apply($db_changeset); |
148 | 144 | } |
149 | - } |
|
150 | - else |
|
145 | + } else |
|
151 | 146 | { |
152 | 147 | $message = $lang['art_err_no_artifact']; |
153 | 148 | } |
@@ -12,24 +12,24 @@ discard block |
||
12 | 12 | global $debug, $template_result, $user, $lang, $planetrow; |
13 | 13 | |
14 | 14 | // Напоминание для Администрации, что игра отключена |
15 | -if($template_result[F_GAME_DISABLE]) { |
|
15 | +if ($template_result[F_GAME_DISABLE]) { |
|
16 | 16 | echo '<div class="global_admin_warning">', $template_result[F_GAME_DISABLE_REASON], '</div>'; |
17 | 17 | } |
18 | 18 | unset($disable_reason); |
19 | 19 | |
20 | 20 | |
21 | -if(defined('IN_ADMIN') && IN_ADMIN === true) { |
|
21 | +if (defined('IN_ADMIN') && IN_ADMIN === true) { |
|
22 | 22 | lng_include('admin'); |
23 | -} elseif($sys_user_logged_in) { |
|
23 | +} elseif ($sys_user_logged_in) { |
|
24 | 24 | sys_user_vacation($user); |
25 | 25 | |
26 | 26 | $planet_id = SetSelectedPlanet($user); |
27 | 27 | |
28 | 28 | // TODO НЕ НУЖНО АЛЬЯНС КАЖДЫЙ РАЗ ОБНОВЛЯТЬ!!! |
29 | - if($user['ally_id']) { |
|
29 | + if ($user['ally_id']) { |
|
30 | 30 | sn_db_transaction_start(); |
31 | 31 | sn_ali_fill_user_ally($user); |
32 | - if(!$user['ally']['player']['id']) { |
|
32 | + if (!$user['ally']['player']['id']) { |
|
33 | 33 | // sn_sys_logout(false, true); |
34 | 34 | // core_auth::logout(false); |
35 | 35 | classSupernova::$auth->logout(false); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | sn_db_transaction_commit(); |
49 | 49 | |
50 | 50 | $planetrow = $global_data['planet']; |
51 | - if(!($planetrow && isset($planetrow['id']) && $planetrow['id'])) { |
|
51 | + if (!($planetrow && isset($planetrow['id']) && $planetrow['id'])) { |
|
52 | 52 | // sn_sys_logout(false, true); |
53 | 53 | // core_auth::logout(false); |
54 | 54 | classSupernova::$auth->logout(false); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | sys_user_options_unpack($user); |
64 | 64 | |
65 | 65 | global $sn_page_name, $sn_mvc; |
66 | -if(!empty($sn_mvc['pages'][INITIAL_PAGE][PAGE_OPTION_EARLY_HEADER])) { |
|
66 | +if (!empty($sn_mvc['pages'][INITIAL_PAGE][PAGE_OPTION_EARLY_HEADER])) { |
|
67 | 67 | $title = !empty($sn_mvc['pages'][INITIAL_PAGE][PAGE_OPTION_TITLE]) ? $sn_mvc['pages'][INITIAL_PAGE][PAGE_OPTION_TITLE] : ''; |
68 | 68 | renderHeader($page, $title, $template_result, false, $user, classSupernova::$config, $lang, $planetrow); |
69 | 69 | } |
@@ -14,39 +14,39 @@ discard block |
||
14 | 14 | |
15 | 15 | lng_include('fleet'); |
16 | 16 | |
17 | -if($TargetPlanet = sys_get_param_id('jmpto')) |
|
17 | +if ($TargetPlanet = sys_get_param_id('jmpto')) |
|
18 | 18 | { |
19 | 19 | sn_db_transaction_start(); |
20 | 20 | db_user_by_id($user['id'], true, 'id'); |
21 | 21 | $planetrow = DBStaticPlanet::db_planet_by_id($planetrow['id'], true); |
22 | - if(!($NextJumpTime = uni_get_time_to_jump($planetrow))) |
|
22 | + if (!($NextJumpTime = uni_get_time_to_jump($planetrow))) |
|
23 | 23 | { |
24 | 24 | $TargetGate = DBStaticPlanet::db_planet_by_id($TargetPlanet, true, '`id`, `last_jump_time`'); |
25 | - if(mrc_get_level($user, $TargetGate, STRUC_MOON_GATE) > 0) |
|
25 | + if (mrc_get_level($user, $TargetGate, STRUC_MOON_GATE) > 0) |
|
26 | 26 | { |
27 | - $NextDestTime = uni_get_time_to_jump ( $TargetGate ); |
|
28 | - if(!$NextDestTime) |
|
27 | + $NextDestTime = uni_get_time_to_jump($TargetGate); |
|
28 | + if (!$NextDestTime) |
|
29 | 29 | { |
30 | 30 | // $SubQueryOri = ""; |
31 | 31 | // $SubQueryDes = ""; |
32 | 32 | $ship_list = sys_get_param('ships'); |
33 | 33 | $db_changeset = array(); |
34 | - foreach($ship_list as $ship_id => $ship_count) |
|
34 | + foreach ($ship_list as $ship_id => $ship_count) |
|
35 | 35 | { |
36 | - if(!in_array($ship_id, sn_get_groups('fleet'))) |
|
36 | + if (!in_array($ship_id, sn_get_groups('fleet'))) |
|
37 | 37 | { |
38 | 38 | continue; |
39 | 39 | } |
40 | 40 | |
41 | 41 | $ship_count = max(0, min(floor($ship_count), mrc_get_level($user, $planetrow, $ship_id))); |
42 | - if($ship_count) |
|
42 | + if ($ship_count) |
|
43 | 43 | { |
44 | 44 | $db_changeset['unit'][] = OldDbChangeSet::db_changeset_prepare_unit($ship_id, -$ship_count, $user, $planetrow['id']); |
45 | 45 | $db_changeset['unit'][] = OldDbChangeSet::db_changeset_prepare_unit($ship_id, $ship_count, $user, $TargetGate['id']); |
46 | 46 | } |
47 | 47 | } |
48 | 48 | // Dit monsieur, y avait quelque chose a envoyer ??? |
49 | - if(!empty($db_changeset)) |
|
49 | + if (!empty($db_changeset)) |
|
50 | 50 | { |
51 | 51 | DBStaticPlanet::db_planet_set_by_id($TargetGate['id'], "`last_jump_time` = " . SN_TIME_NOW . ""); |
52 | 52 | DBStaticPlanet::db_planet_set_by_id($planetrow['id'], "`last_jump_time` = " . SN_TIME_NOW . ""); |
@@ -55,31 +55,31 @@ discard block |
||
55 | 55 | db_user_set_by_id($user['id'], "`current_planet` = '{$TargetGate['id']}'"); |
56 | 56 | |
57 | 57 | $planetrow['last_jump_time'] = SN_TIME_NOW; |
58 | - $RetMessage = $lang['gate_jump_done'] ." - ". pretty_time(uni_get_time_to_jump($planetrow)); |
|
58 | + $RetMessage = $lang['gate_jump_done'] . " - " . pretty_time(uni_get_time_to_jump($planetrow)); |
|
59 | 59 | } else { |
60 | 60 | $RetMessage = $lang['gate_wait_data']; |
61 | 61 | } |
62 | 62 | } else { |
63 | - $RetMessage = $lang['gate_wait_dest'] ." - ". pretty_time($NextDestTime); |
|
63 | + $RetMessage = $lang['gate_wait_dest'] . " - " . pretty_time($NextDestTime); |
|
64 | 64 | } |
65 | 65 | } else { |
66 | 66 | $RetMessage = $lang['gate_no_dest_g']; |
67 | 67 | } |
68 | 68 | } else { |
69 | - $RetMessage = $lang['gate_wait_star'] ." - ". pretty_time($NextJumpTime); |
|
69 | + $RetMessage = $lang['gate_wait_star'] . " - " . pretty_time($NextJumpTime); |
|
70 | 70 | } |
71 | 71 | sn_db_transaction_commit(); |
72 | 72 | messageBox($RetMessage, $lang['tech'][STRUC_MOON_GATE], "jumpgate.php", 10); |
73 | 73 | } else { |
74 | 74 | $template = gettemplate('jumpgate', true); |
75 | - if(mrc_get_level($user, $planetrow, STRUC_MOON_GATE) > 0) |
|
75 | + if (mrc_get_level($user, $planetrow, STRUC_MOON_GATE) > 0) |
|
76 | 76 | { |
77 | 77 | $Combo = ''; |
78 | 78 | $MoonList = DBStaticPlanet::db_planet_list_moon_other($user['id'], $planetrow['id']); |
79 | 79 | // while($CurMoon = db_fetch($MoonList)) |
80 | - foreach($MoonList as $CurMoon) |
|
80 | + foreach ($MoonList as $CurMoon) |
|
81 | 81 | { |
82 | - if(mrc_get_level($user, $CurMoon, STRUC_MOON_GATE) >= 1) |
|
82 | + if (mrc_get_level($user, $CurMoon, STRUC_MOON_GATE) >= 1) |
|
83 | 83 | { |
84 | 84 | $NextJumpTime = uni_get_time_to_jump($CurMoon); |
85 | 85 | $template->assign_block_vars('moon', array( |
@@ -93,9 +93,9 @@ discard block |
||
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
96 | - foreach(sn_get_groups('fleet') as $Ship) |
|
96 | + foreach (sn_get_groups('fleet') as $Ship) |
|
97 | 97 | { |
98 | - if(($ship_count = mrc_get_level($user, $planetrow, $Ship)) <= 0) |
|
98 | + if (($ship_count = mrc_get_level($user, $planetrow, $Ship)) <= 0) |
|
99 | 99 | { |
100 | 100 | continue; |
101 | 101 | } |
@@ -115,8 +115,7 @@ |
||
115 | 115 | )); |
116 | 116 | |
117 | 117 | display($template, $lang['tech'][STRUC_MOON_GATE]); |
118 | - } |
|
119 | - else |
|
118 | + } else |
|
120 | 119 | { |
121 | 120 | messageBox($lang['gate_no_src_ga'], $lang['tech'][STRUC_MOON_GATE], "overview.php", 10); |
122 | 121 | } |
@@ -18,25 +18,25 @@ discard block |
||
18 | 18 | |
19 | 19 | lng_include('announce'); |
20 | 20 | |
21 | -switch($action) |
|
21 | +switch ($action) |
|
22 | 22 | { |
23 | 23 | case 1://on veut poster une annonce |
24 | - $page .='<HTML> |
|
24 | + $page .= '<HTML> |
|
25 | 25 | <center> |
26 | 26 | <br> |
27 | 27 | <table width="600"> |
28 | - <td class="c" colspan="10" align="center"><b><font color="white">'.$lang['Classifieds'].'</font></b></td></tr> |
|
28 | + <td class="c" colspan="10" align="center"><b><font color="white">'.$lang['Classifieds'] . '</font></b></td></tr> |
|
29 | 29 | <form action="annonce.php?action=2" method="post"> |
30 | - <td class="c" colspan="10" align="center"><b>'.$lang['Resources_to_be_sold'].'</font></b></td> |
|
31 | - <tr><th colspan="5">'.$lang['metal'].'</th><th colspan="5"><input type="texte" value="0" name="metalvendre" /></th></tr> |
|
32 | - <tr><th colspan="5">'.$lang['crystal'].'</th><th colspan="5"><input type="texte" value="0" name="cristalvendre" /></th></tr> |
|
33 | - <tr><th colspan="5">'.$lang['deuterium'].'</th><th colspan="5"><input type="texte" value="0" name="deutvendre" /></th></tr> |
|
30 | + <td class="c" colspan="10" align="center"><b>'.$lang['Resources_to_be_sold'] . '</font></b></td> |
|
31 | + <tr><th colspan="5">'.$lang['metal'] . '</th><th colspan="5"><input type="texte" value="0" name="metalvendre" /></th></tr> |
|
32 | + <tr><th colspan="5">'.$lang['crystal'] . '</th><th colspan="5"><input type="texte" value="0" name="cristalvendre" /></th></tr> |
|
33 | + <tr><th colspan="5">'.$lang['deuterium'] . '</th><th colspan="5"><input type="texte" value="0" name="deutvendre" /></th></tr> |
|
34 | 34 | |
35 | - <td class="c" colspan="10" align="center"><b>'.$lang['Desired_resources'].'</font></b></td></tr> |
|
36 | - <tr><th colspan="5">'.$lang['metal'].'</th><th colspan="5"><input type="texte" value="0" name="metalsouhait" /></th></tr> |
|
37 | - <tr><th colspan="5">'.$lang['crystal'].'</th><th colspan="5"><input type="texte" value="0" name="cristalsouhait" /></th></tr> |
|
38 | - <tr><th colspan="5">'.$lang['deuterium'].'</th><th colspan="5"><input type="texte" value="0" name="deutsouhait" /></th></tr> |
|
39 | - <tr><th colspan="10"><input type="submit" value="'.$lang['send'].'" /></th></tr> |
|
35 | + <td class="c" colspan="10" align="center"><b>'.$lang['Desired_resources'] . '</font></b></td></tr> |
|
36 | + <tr><th colspan="5">'.$lang['metal'] . '</th><th colspan="5"><input type="texte" value="0" name="metalsouhait" /></th></tr> |
|
37 | + <tr><th colspan="5">'.$lang['crystal'] . '</th><th colspan="5"><input type="texte" value="0" name="cristalsouhait" /></th></tr> |
|
38 | + <tr><th colspan="5">'.$lang['deuterium'] . '</th><th colspan="5"><input type="texte" value="0" name="deutsouhait" /></th></tr> |
|
39 | + <tr><th colspan="10"><input type="submit" value="'.$lang['send'] . '" /></th></tr> |
|
40 | 40 | |
41 | 41 | <form> |
42 | 42 | </table> |
@@ -53,20 +53,20 @@ discard block |
||
53 | 53 | $deutvendre = sys_get_param_float('deutvendre'); |
54 | 54 | $deutsouhait = sys_get_param_float('deutsouhait'); |
55 | 55 | |
56 | - if(($metalvendre!=0 && $metalsouhait==0) ||($cristalvendre!=0 && $cristalsouhait==0) || ($deutvendre!=0 && $deutsouhait==0)) |
|
56 | + if (($metalvendre != 0 && $metalsouhait == 0) || ($cristalvendre != 0 && $cristalsouhait == 0) || ($deutvendre != 0 && $deutsouhait == 0)) |
|
57 | 57 | { |
58 | 58 | doquery("INSERT INTO {{annonce}} SET `user` ='{$users['username']}', `galaxie` ='{$users['galaxy']}', `systeme` ='{$users['system']}', `metala` ='{$metalvendre}', `cristala` ='{$cristalvendre}', `deuta` ='{$deutvendre}', `metals` ='{$metalsouhait}', `cristals` ='{$cristalsouhait}', `deuts` ='{$deutsouhait}'"); |
59 | - messageBox ($lang['Your_announce_was_recorded'], $lang['announce_status'],"annonce.php"); |
|
59 | + messageBox($lang['Your_announce_was_recorded'], $lang['announce_status'], "annonce.php"); |
|
60 | 60 | } |
61 | 61 | else |
62 | 62 | { |
63 | - messageBox ($lang['Your_announce_not_recorded'], $lang['announce_status'],"annonce.php?action=1"); |
|
63 | + messageBox($lang['Your_announce_not_recorded'], $lang['announce_status'], "annonce.php?action=1"); |
|
64 | 64 | } |
65 | 65 | break; |
66 | 66 | |
67 | 67 | case 3://Suppression d'annonce |
68 | 68 | doquery("DELETE FROM {{annonce}} WHERE `id` = {$GET_id}"); |
69 | - messageBox ($lang['Your_announce_was_deleted'], $lang['announce_status'],"annonce.php"); |
|
69 | + messageBox($lang['Your_announce_was_deleted'], $lang['announce_status'], "annonce.php"); |
|
70 | 70 | break; |
71 | 71 | |
72 | 72 | default://Sinon on affiche la liste des annonces |
@@ -81,15 +81,15 @@ discard block |
||
81 | 81 | while ($b = db_fetch($annonce)) |
82 | 82 | { |
83 | 83 | $page2 .= '<tr><th>'; |
84 | - foreach($b as $name => $value) |
|
84 | + foreach ($b as $name => $value) |
|
85 | 85 | { |
86 | - if($name!='id') |
|
86 | + if ($name != 'id') |
|
87 | 87 | { |
88 | - $page2 .= $value ; |
|
88 | + $page2 .= $value; |
|
89 | 89 | $page2 .= '</th><th>'; |
90 | 90 | } |
91 | 91 | } |
92 | - $page2 .= ($b['user']==$users['username'])?"<a href=\"annonce.php?action=3&id={$b[id]}\">X</a></th></tr>":"</th></tr>"; |
|
92 | + $page2 .= ($b['user'] == $users['username']) ? "<a href=\"annonce.php?action=3&id={$b[id]}\">X</a></th></tr>" : "</th></tr>"; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | $page2 .= "<tr><th colspan=\"10\" align=\"center\"><a href=\"annonce.php?action=1\">{$lang['add_announce']}</a></th></tr></td></table></HTML>"; |
@@ -57,8 +57,7 @@ |
||
57 | 57 | { |
58 | 58 | doquery("INSERT INTO {{annonce}} SET `user` ='{$users['username']}', `galaxie` ='{$users['galaxy']}', `systeme` ='{$users['system']}', `metala` ='{$metalvendre}', `cristala` ='{$cristalvendre}', `deuta` ='{$deutvendre}', `metals` ='{$metalsouhait}', `cristals` ='{$cristalsouhait}', `deuts` ='{$deutsouhait}'"); |
59 | 59 | messageBox ($lang['Your_announce_was_recorded'], $lang['announce_status'],"annonce.php"); |
60 | - } |
|
61 | - else |
|
60 | + } else |
|
62 | 61 | { |
63 | 62 | messageBox ($lang['Your_announce_not_recorded'], $lang['announce_status'],"annonce.php?action=1"); |
64 | 63 | } |
@@ -2,9 +2,9 @@ discard block |
||
2 | 2 | |
3 | 3 | include('common.' . substr(strrchr(__FILE__, '.'), 1)); |
4 | 4 | |
5 | -if(!empty($_POST['return']) && is_array($_POST['return'])) { |
|
6 | - foreach($_POST['return'] as $fleet_id) { |
|
7 | - if($fleet_id = idval($fleet_id)) { |
|
5 | +if (!empty($_POST['return']) && is_array($_POST['return'])) { |
|
6 | + foreach ($_POST['return'] as $fleet_id) { |
|
7 | + if ($fleet_id = idval($fleet_id)) { |
|
8 | 8 | sn_db_transaction_start(); |
9 | 9 | $FleetRow = db_fleet_get($fleet_id); |
10 | 10 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | lng_include('overview'); |
24 | 24 | lng_include('fleet'); |
25 | 25 | |
26 | -if(!$planetrow) { |
|
26 | +if (!$planetrow) { |
|
27 | 27 | messageBox($lang['fl_noplanetrow'], $lang['fl_error']); |
28 | 28 | } |
29 | 29 | |
@@ -31,13 +31,13 @@ discard block |
||
31 | 31 | |
32 | 32 | $i = 0; |
33 | 33 | $fleet_list = fleet_list_by_owner_id($user['id']); |
34 | -foreach($fleet_list as $fleet_id => $fleet_row) { |
|
34 | +foreach ($fleet_list as $fleet_id => $fleet_row) { |
|
35 | 35 | $i++; |
36 | 36 | $fleet_data = tpl_parse_fleet_db($fleet_row, $i, $user); |
37 | 37 | |
38 | 38 | $template->assign_block_vars('fleets', $fleet_data['fleet']); |
39 | 39 | |
40 | - foreach($fleet_data['ships'] as $ship_data) { |
|
40 | + foreach ($fleet_data['ships'] as $ship_data) { |
|
41 | 41 | $template->assign_block_vars('fleets.ships', $ship_data); |
42 | 42 | } |
43 | 43 | } |
@@ -1,25 +1,25 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if(!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) { |
|
3 | +if (!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) { |
|
4 | 4 | $debug->error("Attempt to call ALLIANCE page mode {$mode} directly - not from alliance.php", 'Forbidden', 403); |
5 | 5 | } |
6 | 6 | |
7 | -if(!$user_admin) { |
|
7 | +if (!$user_admin) { |
|
8 | 8 | messageBox($lang['Denied_access'], $lang['ally_admin']); |
9 | 9 | } |
10 | 10 | |
11 | 11 | $template = gettemplate('ali_admin', $template); |
12 | 12 | |
13 | 13 | $text_list = array( |
14 | - 1 => array ('db_field' => 'ally_description', 'text_type' => 'Public_text_of_alliance'), |
|
15 | - 2 => array ('db_field' => 'ally_text', 'text_type' => 'Internal_text'), |
|
16 | - 3 => array ('db_field' => 'ally_request', 'text_type' => 'Show_of_request_text'), |
|
14 | + 1 => array('db_field' => 'ally_description', 'text_type' => 'Public_text_of_alliance'), |
|
15 | + 2 => array('db_field' => 'ally_text', 'text_type' => 'Internal_text'), |
|
16 | + 3 => array('db_field' => 'ally_request', 'text_type' => 'Show_of_request_text'), |
|
17 | 17 | ); |
18 | 18 | |
19 | 19 | $allyTextID = sys_get_param_int('t', 1); |
20 | -$allyTextID = ($allyTextID<1 || $allyTextID>3) ? 1 : $allyTextID; |
|
20 | +$allyTextID = ($allyTextID < 1 || $allyTextID > 3) ? 1 : $allyTextID; |
|
21 | 21 | |
22 | -if(sys_get_param_str('isSaveOptions')) { |
|
22 | +if (sys_get_param_str('isSaveOptions')) { |
|
23 | 23 | require_once('includes/includes/sys_avatar.php'); |
24 | 24 | |
25 | 25 | $new_image = $ally['ally_image']; |
@@ -31,32 +31,32 @@ discard block |
||
31 | 31 | // $template->assign_block_vars('result', $avatar_upload_result); |
32 | 32 | |
33 | 33 | $ally_changeset = array(); |
34 | - if(($new_tag = sys_get_param_str_unsafe('tag', $ally['ally_tag'])) && $new_tag != $ally['ally_tag']) { |
|
34 | + if (($new_tag = sys_get_param_str_unsafe('tag', $ally['ally_tag'])) && $new_tag != $ally['ally_tag']) { |
|
35 | 35 | $new_tag_unsafe = $new_tag; |
36 | 36 | $new_tag = db_escape($new_tag); |
37 | 37 | $isTaggedAllyExists = DBStaticAlly::db_ally_get_by_tag($new_tag); |
38 | - if(!empty($isTaggedAllyExists)) { |
|
38 | + if (!empty($isTaggedAllyExists)) { |
|
39 | 39 | messageBox(sprintf($lang['ally_message_tag_exists'], $new_tag_unsafe), '', 'alliance.php?mode=admin&edit=ally'); |
40 | 40 | } |
41 | 41 | $ally_changeset[] = "`ally_tag`='{$new_tag}'"; |
42 | 42 | db_user_set_by_id($ally['ally_user_id'], "`username`='[{$new_tag}]'"); |
43 | 43 | } |
44 | 44 | |
45 | - if(($new_name = sys_get_param_str_unsafe('name', $ally['ally_name'])) && $new_name != $ally['ally_name']) { |
|
45 | + if (($new_name = sys_get_param_str_unsafe('name', $ally['ally_name'])) && $new_name != $ally['ally_name']) { |
|
46 | 46 | $new_name_unsafe = $new_name; |
47 | 47 | $new_name = db_escape($new_name); |
48 | 48 | $isTaggedAllyExists = DBStaticAlly::db_ally_get_by_name($new_name); |
49 | - if(!empty($isTaggedAllyExists)) { |
|
49 | + if (!empty($isTaggedAllyExists)) { |
|
50 | 50 | messageBox(sprintf($lang['ally_message_name_exists'], $new_name_unsafe), '', 'alliance.php?mode=admin&edit=ally'); |
51 | 51 | } |
52 | 52 | $ally_changeset[] = "`ally_name`='{$new_name}'"; |
53 | 53 | } |
54 | 54 | |
55 | - if(($new_owner_rank = sys_get_param_str_unsafe('owner_range', $ally['ally_owner_range'])) && $new_owner_rank != $ally['ally_owner_range']) { |
|
55 | + if (($new_owner_rank = sys_get_param_str_unsafe('owner_range', $ally['ally_owner_range'])) && $new_owner_rank != $ally['ally_owner_range']) { |
|
56 | 56 | $new_owner_rank = db_escape($new_owner_rank); |
57 | 57 | $ally_changeset[] = "`ally_owner_range` = '{$new_owner_rank}'"; |
58 | 58 | } |
59 | - if(($new_web = sys_get_param_str_unsafe('web', $ally['ally_web'])) && $new_web != $ally['ally_web']) { |
|
59 | + if (($new_web = sys_get_param_str_unsafe('web', $ally['ally_web'])) && $new_web != $ally['ally_web']) { |
|
60 | 60 | $new_web = db_escape($new_web); |
61 | 61 | $ally_changeset[] = "`ally_web` = '{$new_web}'"; |
62 | 62 | } |
@@ -65,31 +65,31 @@ discard block |
||
65 | 65 | // if(($new_request = sys_get_param_int('request_notallow', $ally['ally_request_notallow'])) && $new_request != $ally['ally_request_notallow']) { |
66 | 66 | // $ally_changeset[] = "`ally_request_notallow` = '{$new_request}'"; |
67 | 67 | // } |
68 | - if($new_image != $ally['ally_image']) { |
|
68 | + if ($new_image != $ally['ally_image']) { |
|
69 | 69 | $new_image = intval($new_image); |
70 | 70 | $ally_changeset[] = "`ally_image` = '{$new_image}'"; |
71 | 71 | } |
72 | 72 | |
73 | - if(!empty($ally_changeset)) { |
|
73 | + if (!empty($ally_changeset)) { |
|
74 | 74 | doquery("UPDATE {{alliance}} SET " . implode(',', $ally_changeset) . " WHERE `id`='{$ally['id']}' LIMIT 1;"); |
75 | 75 | sys_redirect('alliance.php?mode=admin&edit=ally'); |
76 | 76 | } |
77 | 77 | } |
78 | -elseif(sys_get_param_str('isSaveText')) |
|
78 | +elseif (sys_get_param_str('isSaveText')) |
|
79 | 79 | { |
80 | 80 | $text = sys_get_param_str_both('text'); |
81 | 81 | doquery("UPDATE {{alliance}} SET `{$text_list[$allyTextID]['db_field']}`='{$text['safe']}' WHERE `id`='{$ally['id']}';"); |
82 | 82 | $ally[$text_list[$allyTextID]['db_field']] = $text['unsafe']; |
83 | 83 | } |
84 | -elseif(sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader')) |
|
84 | +elseif (sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader')) |
|
85 | 85 | { |
86 | - if(!$isAllyOwner) |
|
86 | + if (!$isAllyOwner) |
|
87 | 87 | { |
88 | 88 | messageBox($lang['Denied_access'], $lang['ally_admin']); |
89 | 89 | } |
90 | 90 | |
91 | 91 | $newLeader = db_user_by_id($idNewLeader, false, `ally_id`); |
92 | - if($newLeader['ally_id'] == $user['ally_id']) |
|
92 | + if ($newLeader['ally_id'] == $user['ally_id']) |
|
93 | 93 | { |
94 | 94 | sn_db_transaction_start(); |
95 | 95 | db_user_set_by_id($user['id'], "`ally_rank_id`='0'"); |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | sys_redirect('alliance.php'); |
100 | 100 | } |
101 | 101 | } |
102 | -elseif(sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband')) |
|
102 | +elseif (sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband')) |
|
103 | 103 | { |
104 | - if(!$isAllyOwner) |
|
104 | + if (!$isAllyOwner) |
|
105 | 105 | { |
106 | 106 | messageBox($lang['Denied_access'], $lang['ally_admin']); |
107 | 107 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'ally_name' => htmlspecialchars($ally['ally_name']), |
125 | 125 | 'ally_tag' => htmlspecialchars($ally['ally_tag']), |
126 | 126 | 'ally_web' => htmlspecialchars($ally['ally_web']), |
127 | - 'ally_request_notallow_0' => (( $ally['ally_request_notallow']) ? ' SELECTED' : ''), |
|
127 | + 'ally_request_notallow_0' => (($ally['ally_request_notallow']) ? ' SELECTED' : ''), |
|
128 | 128 | 'ally_request_notallow_1' => ((!$ally['ally_request_notallow']) ? ' SELECTED' : ''), |
129 | 129 | 'ally_owner_range' => htmlspecialchars($ally['ally_owner_range']), |
130 | 130 | 'hideNotOwner' => $ally['ally_owner'] != $user['id'] ? 'display: hide;' : '', |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | { |
134 | 134 | $userAllyAdmins = db_user_list("`ally_id`= {$ally['id']}", false, '`id`, `username`'); |
135 | 135 | unset($tmp); |
136 | - foreach($userAllyAdmins as $userAllyAdmin) |
|
136 | + foreach ($userAllyAdmins as $userAllyAdmin) |
|
137 | 137 | { |
138 | 138 | $tmp .= "<option value={$userAllyAdmin['id']}>{$userAllyAdmin['username']}</option>"; |
139 | 139 | } |
@@ -141,9 +141,9 @@ discard block |
||
141 | 141 | $template->assign_var('adminMembers', $tmp); |
142 | 142 | } |
143 | 143 | |
144 | -foreach($sn_ali_admin_internal as $sn_ali_admin_action => $sn_ali_admin_action_locale) |
|
144 | +foreach ($sn_ali_admin_internal as $sn_ali_admin_action => $sn_ali_admin_action_locale) |
|
145 | 145 | { |
146 | - if(!$sn_ali_admin_action_locale['title']) |
|
146 | + if (!$sn_ali_admin_action_locale['title']) |
|
147 | 147 | { |
148 | 148 | continue; |
149 | 149 | } |
@@ -74,14 +74,12 @@ discard block |
||
74 | 74 | doquery("UPDATE {{alliance}} SET " . implode(',', $ally_changeset) . " WHERE `id`='{$ally['id']}' LIMIT 1;"); |
75 | 75 | sys_redirect('alliance.php?mode=admin&edit=ally'); |
76 | 76 | } |
77 | -} |
|
78 | -elseif(sys_get_param_str('isSaveText')) |
|
77 | +} elseif(sys_get_param_str('isSaveText')) |
|
79 | 78 | { |
80 | 79 | $text = sys_get_param_str_both('text'); |
81 | 80 | doquery("UPDATE {{alliance}} SET `{$text_list[$allyTextID]['db_field']}`='{$text['safe']}' WHERE `id`='{$ally['id']}';"); |
82 | 81 | $ally[$text_list[$allyTextID]['db_field']] = $text['unsafe']; |
83 | -} |
|
84 | -elseif(sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader')) |
|
82 | +} elseif(sys_get_param_str('isTransfer') && $idNewLeader = sys_get_param_id('idNewLeader')) |
|
85 | 83 | { |
86 | 84 | if(!$isAllyOwner) |
87 | 85 | { |
@@ -98,8 +96,7 @@ discard block |
||
98 | 96 | sn_db_transaction_commit(); |
99 | 97 | sys_redirect('alliance.php'); |
100 | 98 | } |
101 | -} |
|
102 | -elseif(sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband')) |
|
99 | +} elseif(sys_get_param_str('isDisband') && sys_get_param_str('isConfirmDisband')) |
|
103 | 100 | { |
104 | 101 | if(!$isAllyOwner) |
105 | 102 | { |
@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if(!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) |
|
3 | +if (!defined('SN_IN_ALLY') || SN_IN_ALLY !== true) |
|
4 | 4 | { |
5 | 5 | $debug->error("Attempt to call ALLIANCE page mode {$mode} directly - not from alliance.php", 'Forbidden', 403); |
6 | 6 | } |
7 | 7 | |
8 | 8 | $template = gettemplate('ali_info', true); |
9 | 9 | |
10 | -if($mode == 'exit') |
|
10 | +if ($mode == 'exit') |
|
11 | 11 | { |
12 | 12 | if ($ally['ally_owner'] == $user['id']) |
13 | 13 | { |
@@ -24,25 +24,25 @@ discard block |
||
24 | 24 | messageBox(sprintf($lang['ali_info_leave_success'], $ally['ally_name']), $lang['sys_alliance']); |
25 | 25 | } |
26 | 26 | } |
27 | -elseif($mode == 'ainfo') |
|
27 | +elseif ($mode == 'ainfo') |
|
28 | 28 | { |
29 | 29 | $tag = sys_get_param_str('tag'); |
30 | 30 | $id_ally = sys_get_param_id('a'); |
31 | - if($tag) |
|
31 | + if ($tag) |
|
32 | 32 | { |
33 | 33 | $ally = doquery("SELECT * FROM {{alliance}} WHERE ally_tag='{$tag}' LIMIT 1;", '', true); |
34 | 34 | } |
35 | - elseif($id_ally) |
|
35 | + elseif ($id_ally) |
|
36 | 36 | { |
37 | 37 | $ally = doquery("SELECT * FROM {{alliance}} WHERE id='{$id_ally}' LIMIT 1;", '', true); |
38 | 38 | } |
39 | 39 | |
40 | - if(!$ally) |
|
40 | + if (!$ally) |
|
41 | 41 | { |
42 | 42 | messageBox($lang['ali_sys_notFound'], $lang['Ally_info_1']); |
43 | 43 | } |
44 | 44 | |
45 | - if(!$ally['ally_description']) |
|
45 | + if (!$ally['ally_description']) |
|
46 | 46 | { |
47 | 47 | $ally['ally_description'] = $lang['Ally_nodescription']; |
48 | 48 | } |
@@ -51,17 +51,17 @@ discard block |
||
51 | 51 | 'EXTERNAL' => true, |
52 | 52 | 'USER_ALLY_ID' => $user['ally_id'], |
53 | 53 | )); |
54 | - $page_header = $lang['sys_alliance']; |
|
54 | + $page_header = $lang['sys_alliance']; |
|
55 | 55 | } |
56 | 56 | else |
57 | 57 | { |
58 | 58 | $page_header = $lang['your_alliance']; |
59 | 59 | |
60 | - if($ally['ally_owner'] == $user['id']) |
|
60 | + if ($ally['ally_owner'] == $user['id']) |
|
61 | 61 | { |
62 | 62 | $range = $ally['ally_owner_range'] ? $ally['ally_owner_range'] : $lang['Founder']; |
63 | 63 | } |
64 | - elseif($user['ally_rank_id'] != 0 && isset($ranks[$user['ally_rank_id']]['name'])) |
|
64 | + elseif ($user['ally_rank_id'] != 0 && isset($ranks[$user['ally_rank_id']]['name'])) |
|
65 | 65 | { |
66 | 66 | $range = $ranks[$user['ally_rank_id']]['name']; |
67 | 67 | } |
@@ -105,9 +105,9 @@ discard block |
||
105 | 105 | )); |
106 | 106 | |
107 | 107 | $relations = ali_relations($ally['id']); |
108 | -foreach($relations as $relation) |
|
108 | +foreach ($relations as $relation) |
|
109 | 109 | { |
110 | - if($relation['alliance_diplomacy_contr_ally_id'] && $relation['alliance_diplomacy_ally_id']) |
|
110 | + if ($relation['alliance_diplomacy_contr_ally_id'] && $relation['alliance_diplomacy_ally_id']) |
|
111 | 111 | { |
112 | 112 | $template->assign_block_vars('relation', array( |
113 | 113 | 'NAME' => $relation['alliance_diplomacy_contr_ally_name'], |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
120 | -function ali_render(){$func_args = func_get_args();return sn_function_call(__FUNCTION__, $func_args);} |
|
120 | +function ali_render() {$func_args = func_get_args(); return sn_function_call(__FUNCTION__, $func_args); } |
|
121 | 121 | ali_render(); |
122 | 122 | |
123 | 123 | display($template, "{$lang['alliance']} [{$ally['ally_name']}]"); |
@@ -23,16 +23,14 @@ discard block |
||
23 | 23 | $lang['Go_out_welldone'] = str_replace("%s", $ally_name, $lang['Go_out_welldone']); |
24 | 24 | messageBox(sprintf($lang['ali_info_leave_success'], $ally['ally_name']), $lang['sys_alliance']); |
25 | 25 | } |
26 | -} |
|
27 | -elseif($mode == 'ainfo') |
|
26 | +} elseif($mode == 'ainfo') |
|
28 | 27 | { |
29 | 28 | $tag = sys_get_param_str('tag'); |
30 | 29 | $id_ally = sys_get_param_id('a'); |
31 | 30 | if($tag) |
32 | 31 | { |
33 | 32 | $ally = doquery("SELECT * FROM {{alliance}} WHERE ally_tag='{$tag}' LIMIT 1;", '', true); |
34 | - } |
|
35 | - elseif($id_ally) |
|
33 | + } elseif($id_ally) |
|
36 | 34 | { |
37 | 35 | $ally = doquery("SELECT * FROM {{alliance}} WHERE id='{$id_ally}' LIMIT 1;", '', true); |
38 | 36 | } |
@@ -52,20 +50,17 @@ discard block |
||
52 | 50 | 'USER_ALLY_ID' => $user['ally_id'], |
53 | 51 | )); |
54 | 52 | $page_header = $lang['sys_alliance']; |
55 | -} |
|
56 | -else |
|
53 | +} else |
|
57 | 54 | { |
58 | 55 | $page_header = $lang['your_alliance']; |
59 | 56 | |
60 | 57 | if($ally['ally_owner'] == $user['id']) |
61 | 58 | { |
62 | 59 | $range = $ally['ally_owner_range'] ? $ally['ally_owner_range'] : $lang['Founder']; |
63 | - } |
|
64 | - elseif($user['ally_rank_id'] != 0 && isset($ranks[$user['ally_rank_id']]['name'])) |
|
60 | + } elseif($user['ally_rank_id'] != 0 && isset($ranks[$user['ally_rank_id']]['name'])) |
|
65 | 61 | { |
66 | 62 | $range = $ranks[$user['ally_rank_id']]['name']; |
67 | - } |
|
68 | - else |
|
63 | + } else |
|
69 | 64 | { |
70 | 65 | $range = $lang['member']; |
71 | 66 | } |