Kommunauty
Connexion
Inscription

[Tuto] Création des races


voldi Messages : 34

salut, je viens de l'installer!

je suis content ça marche du premier coup !!!

jeudi 10 juin 2010

stylus512 Messages : 3

ta de la chance moi j'ai quelque problème au pire et se que tu pourrai me passer les dossier var.php et le tech.mo

jeudi 10 juin 2010

voldi Messages : 34
stylus512 :

ta de la chance moi j'ai quelque problème au pire et se que tu pourrai me passer les dossier var.php et le tech.mo

voila vars.php

<?php


if ( defined('INSIDE')) {
// Liste de champs pour l'indication des messages en attante
$messfields = array (
0 => "mnl_spy",
1 => "mnl_joueur",
2 => "mnl_alliance",
3 => "mnl_attaque",
4 => "mnl_exploit",
5 => "mnl_transport",
15 => "mnl_expedition",
97 => "mnl_general",
99 => "mnl_buildlist",
100 => "new_message"
);

// Equivalance base de donnée par type
$resource = array(
  1 => "metal_mine",
  2 => "crystal_mine",
  3 => "deuterium_sintetizer",
  4 => "solar_plant",
12 => "fusion_plant",
14 => "robot_factory",
15 => "nano_factory",
21 => "hangar",
22 => "metal_store",
23 => "crystal_store",
24 => "deuterium_store",
31 => "laboratory",
33 => "terraformer",
34 => "ally_deposit",
41 => "mondbasis",
42 => "phalanx",
43 => "sprungtor",
44 => "silo",

106 => "spy_tech",
108 => "computer_tech",
109 => "military_tech",
110 => "defence_tech",
111 => "shield_tech",
113 => "energy_tech",
114 => "hyperspace_tech",
115 => "combustion_tech",
117 => "impulse_motor_tech",
118 => "hyperspace_motor_tech",
120 => "laser_tech",
121 => "ionic_tech",
122 => "buster_tech",
123 => "intergalactic_tech",
124 => "expedition_tech",
199 => "graviton_tech",

202 => "small_ship_cargo",
203 => "big_ship_cargo",
204 => "light_hunter",
205 => "heavy_hunter",
206 => "crusher",
207 => "battle_ship",
208 => "colonizer",
209 => "recycler",
210 => "spy_sonde",
211 => "bomber_ship",
212 => "solar_satelit",
213 => "destructor",
214 => "dearth_star",
215 => "battleship",

401 => "misil_launcher",
402 => "small_laser",
403 => "big_laser",
404 => "gauss_canyon",
405 => "ionic_canyon",
406 => "buster_canyon",
407 => "small_protection_shield",
408 => "big_protection_shield",

502 => "interceptor_misil",
503 => "interplanetary_misil",

601 => "rpg_geologue",
602 => "rpg_amiral",
603 => "rpg_ingenieur",
604 => "rpg_technocrate",
605 => "rpg_constructeur",
606 => "rpg_scientifique",
607 => "rpg_stockeur",
608 => "rpg_defenseur",
609 => "rpg_bunker",
610 => "rpg_espion",
611 => "rpg_commandant",
612 => "rpg_destructeur",
613 => "rpg_general",
614 => "rpg_raideur",
615 => "rpg_empereur",
1000 => "humain",
    1001 => "tokra",
    1002 => "goauld",
    1003 => "asgard",
);

$requeriments = array(
// Batiments
12 => array(   3 =>   5, 113 =>   3),
15 => array(  14 =>  10, 108 =>  10),
21 => array(  14 =>   2),
33 => array(  15 =>   1, 113 =>  12),

// Batiments Lunaires
42 => array(  41 =>   1),
43 => array(  41 =>   1, 114 =>   7),

// Technologies
106 => array(  31 =>   3),
108 => array(  31 =>   1),
109 => array(  31 =>   4),
110 => array( 113 =>   3,  31 =>   6),
111 => array(  31 =>   2),
113 => array(  31 =>   1),
114 => array( 113 =>   5, 110 =>   5,  31 =>   7),
115 => array( 113 =>   1,  31 =>   1),
117 => array( 113 =>   1,  31 =>   2),
118 => array( 114 =>   3,  31 =>   7),
120 => array(  31 =>   1, 113 =>   2),
121 => array(  31 =>   4, 120 =>   5, 113 =>   4),
122 => array(  31 =>   5, 113 =>   8, 120 =>  10, 121 =>   5),
123 => array(  31 =>  10, 108 =>   8, 114 =>   8),
124 => array(  31 =>   3, 108 =>   4, 117 =>   3),
199 => array(  31 =>  12),

// Flotte
202 => array(  21 =>   2, 115 =>   2),
203 => array(  21 =>   4, 115 =>   6),
204 => array(  21 =>   1, 115 =>   1),
205 => array(  21 =>   3, 111 =>   2, 117 =>   2),
206 => array(  21 =>   5, 117 =>   4, 121 =>   2),
207 => array(  21 =>   7, 118 =>   4),
208 => array(  21 =>   4, 117 =>   3),
209 => array(  21 =>   4, 115 =>   6, 110 =>   2),
210 => array(  21 =>   3, 115 =>   3, 106 =>   2),
211 => array( 117 =>   6,  21 =>   8, 122 =>   5),
212 => array(  21 =>   1),
213 => array(  21 =>   9, 118 =>   6, 114 =>   5),
214 => array(  21 =>  12, 118 =>   7, 114 =>   6, 199 =>   1),
215 => array( 114 =>   5, 120 =>  12, 118 =>   5,  21 =>   8),

// Defense
401 => array(  21 =>   1),
402 => array( 113 =>   1,  21 =>   2, 120 =>   3),
403 => array( 113 =>   3,  21 =>   4, 120 =>   6),
404 => array(  21 =>   6, 113 =>   6, 109 =>   3, 110 =>   1),
405 => array(  21 =>   4, 121 =>   4),
406 => array(  21 =>   8, 122 =>   7),
407 => array( 110 =>   2,  21 =>   1),
408 => array( 110 =>   6,  21 =>   6),
502 => array(  44 =>   2),
503 => array(  44 =>   4),

// Officier
603 => array( 601 =>   5),
604 => array( 602 =>   5),
605 => array( 601 =>  10, 603 =>   2),
606 => array( 601 =>  10, 603 =>   2),
607 => array( 605 =>   1),
608 => array( 606 =>   1),
609 => array( 601 =>  20, 603 =>  10, 605 =>   3, 606 =>   3, 607 =>   2, 608 =>   2),
610 => array( 602 =>  10, 604 =>   5),
611 => array( 602 =>  10, 604 =>   5),
612 => array( 610 =>   1),
613 => array( 611 =>   1),
614 => array( 602 =>  20, 604 =>  10, 610 =>   2, 611 =>   2, 612 =>   1, 613 =>   3),
615 => array( 614 =>   1, 609 =>   1),
);

$pricelist = array(
  1 => array ( 'metal' =>      60, 'crystal' =>      15, 'deuterium' =>       0, 'energy' =>    0, 'factor' => 3/2),
  2 => array ( 'metal' =>      48, 'crystal' =>      24, 'deuterium' =>       0, 'energy' =>    0, 'factor' => 1&#46;6),
  3 => array ( 'metal' =>     225, 'crystal' =>      75, 'deuterium' =>       0, 'energy' =>    0, 'factor' => 3/2),
  4 => array ( 'metal' =>      75, 'crystal' =>      30, 'deuterium' =>       0, 'energy' =>    0, 'factor' => 3/2),
12 => array ( 'metal' =>     900, 'crystal' =>     360, 'deuterium' =>     180, 'energy' =>    0, 'factor' => 1&#46;8),
14 => array ( 'metal' =>     400, 'crystal' =>     120, 'deuterium' =>     200, 'energy' =>    0, 'factor' =>   2),
15 => array ( 'metal' => 1000000, 'crystal' =>  500000, 'deuterium' =>  100000, 'energy' =>    0, 'factor' =>   2),
21 => array ( 'metal' =>     400, 'crystal' =>     200, 'deuterium' =>     100, 'energy' =>    0, 'factor' =>   2),
22 => array ( 'metal' =>    2000, 'crystal' =>       0, 'deuterium' =>       0, 'energy' =>    0, 'factor' =>   2),
23 => array ( 'metal' =>    2000, 'crystal' =>    1000, 'deuterium' =>       0, 'energy' =>    0, 'factor' =>   2),
24 => array ( 'metal' =>    2000, 'crystal' =>    2000, 'deuterium' =>       0, 'energy' =>    0, 'factor' =>   2),
31 => array ( 'metal' =>     200, 'crystal' =>     400, 'deuterium' =>     200, 'energy' =>    0, 'factor' =>   2),
33 => array ( 'metal' =>       0, 'crystal' =>   50000, 'deuterium' =>  100000, 'energy' => 1000, 'factor' =>   2),
34 => array ( 'metal' =>   20000, 'crystal' =>   40000, 'deuterium' =>       0, 'energy' =>    0, 'factor' =>   2),
41 => array ( 'metal' =>   20000, 'crystal' =>   40000, 'deuterium' =>   20000, 'energy' =>    0, 'factor' =>   2),
42 => array ( 'metal' =>   20000, 'crystal' =>   40000, 'deuterium' =>   20000, 'energy' =>    0, 'factor' =>   2),
43 => array ( 'metal' => 2000000, 'crystal' => 4000000, 'deuterium' => 2000000, 'energy' =>    0, 'factor' =>   2),
44 => array ( 'metal' =>   20000, 'crystal' =>   20000, 'deuterium' =>    1000, 'energy' =>    0, 'factor' =>   2),

106 => array ( 'metal' =>     200, 'crystal' =>    1000, 'deuterium' =>     200, 'energy' =>    0, 'factor' =>   2),
108 => array ( 'metal' =>       0, 'crystal' =>     400, 'deuterium' =>     600, 'energy' =>    0, 'factor' =>   2),
109 => array ( 'metal' =>     800, 'crystal' =>     200, 'deuterium' =>       0, 'energy' =>    0, 'factor' =>   2),
110 => array ( 'metal' =>     200, 'crystal' =>     600, 'deuterium' =>       0, 'energy' =>    0, 'factor' =>   2),
111 => array ( 'metal' =>    1000, 'crystal' =>       0, 'deuterium' =>       0, 'energy' =>    0, 'factor' =>   2),
113 => array ( 'metal' =>       0, 'crystal' =>     800, 'deuterium' =>     400, 'energy' =>    0, 'factor' =>   2),
114 => array ( 'metal' =>       0, 'crystal' =>    4000, 'deuterium' =>    2000, 'energy' =>    0, 'factor' =>   2),
115 => array ( 'metal' =>     400, 'crystal' =>       0, 'deuterium' =>     600, 'energy' =>    0, 'factor' =>   2),
117 => array ( 'metal' =>    2000, 'crystal' =>    4000, 'deuterium' =>     600, 'energy' =>    0, 'factor' =>   2),
118 => array ( 'metal' =>   10000, 'crystal' =>   20000, 'deuterium' =>    6000, 'energy' =>    0, 'factor' =>   2),
120 => array ( 'metal' =>     200, 'crystal' =>     100, 'deuterium' =>       0, 'energy' =>    0, 'factor' =>   2),
121 => array ( 'metal' =>    1000, 'crystal' =>     300, 'deuterium' =>     100, 'energy' =>    0, 'factor' =>   2),
122 => array ( 'metal' =>    2000, 'crystal' =>    4000, 'deuterium' =>    1000, 'energy' =>    0, 'factor' =>   2),
123 => array ( 'metal' =>  240000, 'crystal' =>  400000, 'deuterium' =>  160000, 'energy' =>    0, 'factor' =>   2),
124 => array ( 'metal' =>    4000, 'crystal' =>    8000, 'deuterium' =>    4000, 'energy' =>    0, 'factor' =>   2),
199 => array ( 'metal' =>       0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 300000, 'factor' =>   3),

202 => array ( 'metal' =>    2000, 'crystal' =>    2000, 'deuterium' =>       0, 'energy' => 0, 'factor' => 1, 'consumption' => 20  , 'consumption2' => 40  , 'speed' =>      5000, 'speed2' =>     10000, 'capacity' =>    5000 ),
203 => array ( 'metal' =>    6000, 'crystal' =>    6000, 'deuterium' =>       0, 'energy' => 0, 'factor' => 1, 'consumption' => 50  , 'consumption2' => 50  , 'speed' =>      7500, 'speed2' =>      7500, 'capacity' =>   25000 ),
204 => array ( 'metal' =>    3000, 'crystal' =>    1000, 'deuterium' =>       0, 'energy' => 0, 'factor' => 1, 'consumption' => 20  , 'consumption2' => 20  , 'speed' =>     12500, 'speed2' =>     12500, 'capacity' =>      50 ),
205 => array ( 'metal' =>    6000, 'crystal' =>    4000, 'deuterium' =>       0, 'energy' => 0, 'factor' => 1, 'consumption' => 75  , 'consumption2' => 75  , 'speed' =>     10000, 'speed2' =>     15000, 'capacity' =>     100 ),
206 => array ( 'metal' =>   20000, 'crystal' =>    7000, 'deuterium' =>    2000, 'energy' => 0, 'factor' => 1, 'consumption' => 300 , 'consumption2' => 300 , 'speed' =>     15000, 'speed2' =>     15000, 'capacity' =>     800 ),
207 => array ( 'metal' =>   45000, 'crystal' =>   15000, 'deuterium' =>       0, 'energy' => 0, 'factor' => 1, 'consumption' => 500 , 'consumption2' => 500 , 'speed' =>     10000, 'speed2' =>     10000, 'capacity' =>    1500 ),
208 => array ( 'metal' =>   10000, 'crystal' =>   20000, 'deuterium' =>   10000, 'energy' => 0, 'factor' => 1, 'consumption' => 1000, 'consumption2' => 1000, 'speed' =>      2500, 'speed2' =>      2500, 'capacity' =>    7500 ),
209 => array ( 'metal' =>   10000, 'crystal' =>    6000, 'deuterium' =>    2000, 'energy' => 0, 'factor' => 1, 'consumption' => 300 , 'consumption2' => 300 , 'speed' =>      2000, 'speed2' =>      2000, 'capacity' =>   20000 ),
210 => array ( 'metal' =>       0, 'crystal' =>    1000, 'deuterium' =>       0, 'energy' => 0, 'factor' => 1, 'consumption' => 1   , 'consumption2' => 1   , 'speed' => 100000000, 'speed2' => 100000000, 'capacity' =>       5 ),
211 => array ( 'metal' =>   50000, 'crystal' =>   25000, 'deuterium' =>   15000, 'energy' => 0, 'factor' => 1, 'consumption' => 1000, 'consumption2' => 1000, 'speed' =>      4000, 'speed2' =>      5000, 'capacity' =>     500 ),
212 => array ( 'metal' =>       0, 'crystal' =>    2000, 'deuterium' =>     500, 'energy' => 0, 'factor' => 1, 'consumption' => 0   , 'consumption2' => 0   , 'speed' =>         0, 'speed2' =>         0, 'capacity' =>       0 ),
213 => array ( 'metal' =>   60000, 'crystal' =>   50000, 'deuterium' =>   15000, 'energy' => 0, 'factor' => 1, 'consumption' => 1000, 'consumption2' => 1000, 'speed' =>      5000, 'speed2' =>      5000, 'capacity' =>    2000 ),
214 => array ( 'metal' => 5000000, 'crystal' => 4000000, 'deuterium' => 1000000, 'energy' => 0, 'factor' => 1, 'consumption' => 1   , 'consumption2' => 1   , 'speed' =>       100, 'speed2' =>       100, 'capacity' => 1000000 ),
215 => array ( 'metal' =>   30000, 'crystal' =>   40000, 'deuterium' =>   15000, 'energy' => 0, 'factor' => 1, 'consumption' => 250 , 'consumption2' => 250 , 'speed' =>     10000, 'speed2' =>     10000, 'capacity' =>     750 ),

401 => array ( 'metal' =>    2000, 'crystal' =>       0, 'deuterium' =>       0, 'energy' => 0, 'factor' => 1 ),
402 => array ( 'metal' =>    1500, 'crystal' =>     500, 'deuterium' =>       0, 'energy' => 0, 'factor' => 1 ),
403 => array ( 'metal' =>    6000, 'crystal' =>    2000, 'deuterium' =>       0, 'energy' => 0, 'factor' => 1 ),
404 => array ( 'metal' =>   20000, 'crystal' =>   15000, 'deuterium' =>    2000, 'energy' => 0, 'factor' => 1 ),
405 => array ( 'metal' =>    2000, 'crystal' =>    6000, 'deuterium' =>       0, 'energy' => 0, 'factor' => 1 ),
406 => array ( 'metal' =>   50000, 'crystal' =>   50000, 'deuterium' =>   30000, 'energy' => 0, 'factor' => 1 ),
407 => array ( 'metal' =>   10000, 'crystal' =>   10000, 'deuterium' =>       0, 'energy' => 0, 'factor' => 1 ),
408 => array ( 'metal' =>   50000, 'crystal' =>   50000, 'deuterium' =>       0, 'energy' => 0, 'factor' => 1 ),

502 => array ( 'metal' =>    8000, 'crystal' =>    2000, 'deuterium' =>       0, 'energy' => 0, 'factor' => 1 ),
503 => array ( 'metal' =>   12500, 'crystal' =>    2500, 'deuterium' =>   10000, 'energy' => 0, 'factor' => 1 ),

601 => array ( 'max' =>  20),
602 => array ( 'max' =>  20),
603 => array ( 'max' =>  10),
604 => array ( 'max' =>  10),
605 => array ( 'max' =>   3),
606 => array ( 'max' =>   3),
607 => array ( 'max' =>   2),
608 => array ( 'max' =>   2),
609 => array ( 'max' =>   1),
610 => array ( 'max' =>   2),
611 => array ( 'max' =>   2),
612 => array ( 'max' =>   1),
613 => array ( 'max' =>   3),
614 => array ( 'max' =>   1),
615 => array ( 'max' =>   1),
);

$CombatCaps = array(
202 => array ( 'shield' =>    10, 'attack' =>      5, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    5, 213 =>   1, 214 =>   1, 215 =>   1, 401 =>   1, 402 =>   1, 403 =>   1, 404 =>   1, 405 =>   1, 406 =>   1, 407 =>   1, 408 =>   1 )),
203 => array ( 'shield' =>    25, 'attack' =>      5, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    5, 213 =>   1, 214 =>   1, 215 =>   1, 401 =>   1, 402 =>   1, 403 =>   1, 404 =>   1, 405 =>   1, 406 =>   1, 407 =>   1, 408 =>   1 )),
204 => array ( 'shield' =>    10, 'attack' =>     50, 'sd' => array (202 =>   2, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    5, 213 =>   1, 214 =>   1, 215 =>   1, 401 =>   1, 402 =>   1, 403 =>   1, 404 =>   1, 405 =>   1, 406 =>   1, 407 =>   1, 408 =>   1 )),
205 => array ( 'shield' =>    25, 'attack' =>    150, 'sd' => array (202 =>   3, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    5, 213 =>   1, 214 =>   1, 215 =>   1, 401 =>   1, 402 =>   1, 403 =>   1, 404 =>   1, 405 =>   1, 406 =>   1, 407 =>   1, 408 =>   1 )),
206 => array ( 'shield' =>    50, 'attack' =>    400, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   6, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    5, 213 =>   1, 214 =>   1, 215 =>   1, 401 =>  10, 402 =>   1, 403 =>   1, 404 =>   1, 405 =>   1, 406 =>   1, 407 =>   1, 408 =>   1 )),
207 => array ( 'shield' =>   200, 'attack' =>   1000, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    5, 213 =>   1, 214 =>   1, 215 =>   1, 401 =>   8, 402 =>   1, 403 =>   1, 404 =>   1, 405 =>   1, 406 =>   1, 407 =>   1, 408 =>   1 )),
208 => array ( 'shield' =>   100, 'attack' =>     50, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    5, 213 =>   1, 214 =>   1, 215 =>   1, 401 =>   1, 402 =>   1, 403 =>   1, 404 =>   1, 405 =>   1, 406 =>   1, 407 =>   1, 408 =>   1 )),
209 => array ( 'shield' =>    10, 'attack' =>      1, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    5, 213 =>   1, 214 =>   1, 215 =>   1, 401 =>   1, 402 =>   1, 403 =>   1, 404 =>   1, 405 =>   1, 406 =>   1, 407 =>   1, 408 =>   1 )),
210 => array ( 'shield' =>     0, 'attack' =>      0, 'sd' => array (202 =>   0, 203 =>   0, 204 =>   0, 205 =>   0, 206 =>   0, 207 =>   0, 208 =>   0, 209 =>   0, 210 =>    0, 211 =>   0, 212 =>    0, 213 =>   0, 214 =>   0, 215 =>   0, 401 =>   0, 402 =>   0, 403 =>   0, 404 =>   0, 405 =>   0, 406 =>   0, 407 =>   0, 408 =>   0 )),
211 => array ( 'shield' =>   500, 'attack' =>   1000, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    5, 213 =>   1, 214 =>   1, 215 =>   1, 401 =>  20, 402 =>  20, 403 =>  10, 404 =>   1, 405 =>  10, 406 =>   1, 407 =>   1, 408 =>   1 )),
212 => array ( 'shield' =>    10, 'attack' =>      1, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    1, 211 =>   1, 212 =>    0, 213 =>   1, 214 =>   1, 215 =>   1, 401 =>   1, 402 =>   1, 403 =>   1, 404 =>   1, 405 =>   1, 406 =>   1, 407 =>   1, 408 =>   1 )),
213 => array ( 'shield' =>   500, 'attack' =>   2000, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    5, 213 =>   1, 214 =>   1, 215 =>   2, 401 =>   1, 402 =>  10, 403 =>   1, 404 =>   1, 405 =>   1, 406 =>   1, 407 =>   1, 408 =>   1 )),
214 => array ( 'shield' => 50000, 'attack' => 200000, 'sd' => array (202 => 250, 203 => 250, 204 => 200, 205 => 100, 206 =>  33, 207 =>  30, 208 => 250, 209 => 250, 210 => 1250, 211 =>  25, 212 => 1250, 213 =>   5, 214 =>   1, 215 =>  15, 401 => 200, 402 => 200, 403 => 100, 404 =>  50, 405 => 100, 406 =>   1, 407 =>   1, 408 =>   1 )),
215 => array ( 'shield' =>   400, 'attack' =>    700, 'sd' => array (202 =>   3, 203 =>   3, 204 =>   1, 205 =>   4, 206 =>   4, 207 =>   7, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    5, 213 =>   1, 214 =>   1, 215 =>   1, 401 =>   1, 402 =>   1, 403 =>   1, 404 =>   1, 405 =>   1, 406 =>   1, 407 =>   1, 408 =>   1 )),

401 => array ( 'shield' =>    20, 'attack' =>     80, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    0, 213 =>   1, 214 =>   1, 215 =>   1) ),
402 => array ( 'shield' =>    25, 'attack' =>    100, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    0, 213 =>   1, 214 =>   1, 215 =>   1) ),
403 => array ( 'shield' =>   100, 'attack' =>    250, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    0, 213 =>   1, 214 =>   1, 215 =>   1) ),
404 => array ( 'shield' =>   200, 'attack' =>   1100, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    0, 213 =>   1, 214 =>   1, 215 =>   1) ),
405 => array ( 'shield' =>   500, 'attack' =>    150, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    0, 213 =>   1, 214 =>   1, 215 =>   1) ),
406 => array ( 'shield' =>   300, 'attack' =>   3000, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    0, 213 =>   1, 214 =>   1, 215 =>   1) ),
407 => array ( 'shield' =>  2000, 'attack' =>      1, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    0, 213 =>   1, 214 =>   1, 215 =>   1) ),
408 => array ( 'shield' =>  2000, 'attack' =>      1, 'sd' => array (202 =>   1, 203 =>   1, 204 =>   1, 205 =>   1, 206 =>   1, 207 =>   1, 208 =>   1, 209 =>   1, 210 =>    5, 211 =>   1, 212 =>    0, 213 =>   1, 214 =>   1, 215 =>   1) ),

502 => array ( 'shield' =>     1, 'attack' =>      1 ),
503 => array ( 'shield' =>     1, 'attack' =>  12000 )
);

$ProdGrid = array(
// Mine de Métal
1   => array( 'metal' =>   40, 'crystal' =>   10, 'deuterium' =>    0, 'energy' => 0, 'factor' => 3/2,
'formule' => array(
'metal'     => 'return   (30 * $BuildLevel * pow((1&#46;1), $BuildLevel)) * (0&#46;1 * $BuildLevelFactor);',
'crystal'   => 'return   "0";',
'deuterium' => 'return   "0";',
'energy'    => 'return - (10 * $BuildLevel * pow((1&#46;1), $BuildLevel)) * (0&#46;1 * $BuildLevelFactor);')
),
// Mine de Cristal
2   => array( 'metal' =>   30, 'crystal' =>   15, 'deuterium' =>    0, 'energy' => 0, 'factor' => 1&#46;6,
'formule' => array(
'metal'     => 'return   "0";',
'crystal'   => 'return   (20 * $BuildLevel * pow((1&#46;1), $BuildLevel)) * (0&#46;1 * $BuildLevelFactor);',
'deuterium' => 'return   "0";',
'energy'    => 'return - (10 * $BuildLevel * pow((1&#46;1), $BuildLevel)) * (0&#46;1 * $BuildLevelFactor);')
),
// Mine de Deutérium
3   => array( 'metal' =>  150, 'crystal' =>   50, 'deuterium' =>    0, 'energy' => 0, 'factor' => 3/2,
'formule' => array(
'metal'     => 'return   "0";',
'crystal'   => 'return   "0";',
'deuterium' => 'return  ((10 * $BuildLevel * pow((1&#46;1), $BuildLevel)) * (-0&#46;002 * $BuildTemp + 1&#46;28)) * (0&#46;1 * $BuildLevelFactor);',
'energy'    => 'return - (30 * $BuildLevel * pow((1&#46;1), $BuildLevel)) * (0&#46;1 * $BuildLevelFactor);')
),
// Energie Solaire
4   => array( 'metal' =>   50, 'crystal' =>   20, 'deuterium' =>    0, 'energy' => 0, 'factor' => 3/2,
'formule' => array(
'metal'     => 'return   "0";',
'crystal'   => 'return   "0";',
'deuterium' => 'return   "0";',
'energy'    => 'return   (20 * $BuildLevel * pow((1&#46;1), $BuildLevel)) * (0&#46;1 * $BuildLevelFactor);')
),
// Energie Fusion
12  => array( 'metal' =>  500, 'crystal' =>  200, 'deuterium' =>  100, 'energy' => 0, 'factor' => 1&#46;8,
'formule' => array(
'metal'     => 'return   "0";',
'crystal'   => 'return   "0";',
'deuterium' => 'return - (10 * $BuildLevel * pow((1&#46;1), $BuildLevel)) * (0&#46;1 * $BuildLevelFactor);',
'energy'    => 'return   (50 * $BuildLevel * pow((1&#46;1), $BuildLevel)) * (0&#46;1 * $BuildLevelFactor);')
),
// Satelitte Solaire
212 => array( 'metal' =>    0, 'crystal' => 2000, 'deuterium' =>  500, 'energy' => 0, 'factor' => 0&#46;5,
'formule' => array(
'metal'     => 'return   "0";',
'crystal'   => 'return   "0";',
'deuterium' => 'return   "0";',
'energy'    => 'return  (($BuildTemp / 4) + 20) * $BuildLevel * (0&#46;1 * $BuildLevelFactor);')
)
);

$reslist&#91;'build'&#93;    = array (   1,   2,   3,   4,  12,  14,  15,  21,  22,  23,  24,  31,  33,  34,  44,  41,  42,  43 );
$reslist&#91;'tech'&#93;     = array ( 106, 108, 109, 110, 111, 113, 114, 115, 117, 118, 120, 121, 122, 123, 124, 199 );
$reslist&#91;'fleet'&#93;    = array ( 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215 );
$reslist&#91;'defense'&#93;  = array ( 401, 402, 403, 404, 405, 406, 407, 408, 502, 503 );
$reslist&#91;'officier'&#93; = array ( 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615);
$reslist&#91;'prod'&#93;     = array (   1,   2,   3,   4,  12, 212 );
}


?>

et tech.mo

<?php

$lang&#91;'Tech'&#93;         = "Technologies";
$lang&#91;'Requirements'&#93; = "N&eacute;cessite";
$lang&#91;'Metal'&#93;        = "M&eacute;tal";
$lang&#91;'Crystal'&#93;      = "Cristal";
$lang&#91;'Deuterium'&#93;    = "Deut&eacute;rium";
$lang&#91;'Energy'&#93;       = "&Eacute;nergie";
$lang&#91;'Message'&#93;      = "Message";
$lang&#91;'level'&#93;        = "Niveau";
$lang&#91;'treeinfo'&#93;     = "&#91;i&#93;";
$lang&#91;'comingsoon'&#93;   = "Bientot";
$lang&#91;'te_dt_tx_pre'&#93; = "Pr&eacute;requis pour";


$lang&#91;'type_mission'&#93;&#91;1&#93;  = "Attaquer";
$lang&#91;'type_mission'&#93;&#91;2&#93;  = "Attaque group&eacute;e";
$lang&#91;'type_mission'&#93;&#91;3&#93;  = "Transporter";
$lang&#91;'type_mission'&#93;&#91;4&#93;  = "Stationner";
$lang&#91;'type_mission'&#93;&#91;5&#93;  = "Stationner chez un alli&eacute;";
$lang&#91;'type_mission'&#93;&#91;6&#93;  = "Espionner";
$lang&#91;'type_mission'&#93;&#91;7&#93;  = "Coloniser";
$lang&#91;'type_mission'&#93;&#91;8&#93;  = "Recycler";
$lang&#91;'type_mission'&#93;&#91;9&#93;  = "D&eacute;truire";
$lang&#91;'type_mission'&#93;&#91;15&#93; = "Exp&eacute;ditions";

// Short names for fight rapport
$lang&#91;'tech_rc'&#93; = array (
202 => 'P&#46;transp&#46;',
203 => 'G&#46;transp&#46;',
204 => 'Ch&#46;l&eacute;ger',
205 => 'Ch&#46;lourd',
206 => 'Croiseur',
207 => 'V&#46;bataille',
208 => 'V&#46;colo&#46;',
209 => 'Recycleur',
210 => 'Sonde',
211 => 'Bombardier',
212 => 'Sat&#46;sol&#46;',
213 => 'Destr&#46;',
214 => 'Rip',
215 => 'Traqueur',

401 => 'Missile',
402 => 'L&#46;l&eacute;ger&#46;',
403 => 'L&#46;lourd',
404 => 'Can&#46;Gauss',
405 => 'Art&#46;ions',
406 => 'Lanc&#46;plasma',
407 => 'P&#46;bouclier',
408 => 'G&#46;bouclier',
);

$lang&#91;'tech'&#93; = array(
  0 => "B&acirc;timents",
  1 => "Mine de m&eacute;tal",
  2 => "Mine de cristal",
  3 => "Synth&eacute;tiseur de deut&eacute;rium",
  4 => "Centrale &eacute;lectrique solaire",
 12 => "Centrale &eacute;lectrique de fusion",
 14 => "Usine de robots",
 15 => "Usine de nanites",
 21 => "Chantier spatial",
 22 => "Hangar de m&eacute;tal",
 23 => "Hangar de cristal",
 24 => "R&eacute;servoir de deut&eacute;rium",
 31 => "Laboratoire de recherche",
 33 => "Terraformeur",
 34 => "D&eacute;p&ocirc;t de ravitaillement",

 40 => 'B&acirc;timents sp&eacute;ciaux',
 41 => 'Base lunaire',
 42 => 'Phalange de capteur',
 43 => 'Porte de saut spatial',

 44 => "Silo de missiles",

// Technologies
100 => 'Recherches',
106 => 'Technologie Espionnage',
108 => 'Technologie Ordinateur',
109 => 'Technologie Armes',
110 => 'Technologie Bouclier',
111 => 'Technologie Protection des vaisseaux spatiaux',
113 => 'Technologie Energie',
114 => 'Technologie Hyperespace',
115 => 'R&eacute;acteur &agrave; combustion',
117 => 'R&eacute;acteur &agrave; impulsion',
118 => 'Propulsion hyperespace',
120 => 'Technologie Laser',
121 => 'Technologie Ions',
122 => 'Technologie Plasma',
123 => 'R&eacute;seau de recherche intergalactique',
124 => 'Technologie Exp&eacute;ditions',
199 => 'Technologie Graviton',

200 => 'Vaisseaux',
202 => 'Petit transporteur',
203 => 'Grand transporteur',
204 => 'Chasseur l&eacute;ger',
205 => 'Chasseur lourd',
206 => 'Croiseur',
207 => 'Vaisseau de bataille',
208 => 'Vaisseau de colonisation',
209 => 'Recycleur',
210 => 'Sonde espionnage',
211 => 'Bombardier',
212 => 'Satellite solaire',
213 => 'Destructeur',
214 => 'Etoile de la mort',
215 => 'Traqueur',

400 => 'D&eacute;fense',
401 => 'Lanceur de missiles',
402 => 'Artillerie laser l&eacute;g&egrave;re',
403 => 'Artillerie laser lourde',
404 => 'Canon de Gauss',
405 => 'Artillerie &agrave; ions',
406 => 'Lanceur de plasma',
407 => 'Petit bouclier',
408 => 'Grand bouclier',
502 => 'Missile Interception',
503 => 'Missile Interplan&eacute;taire',

600 => "Officier",
601 => "G&eacute;ologue",
602 => "Amiral",
603 => "Ingenieur",
604 => "Technocrate",
605 => "Constructeur",
606 => "Scientifique",
607 => "Stockeur",
608 => "Defenseur",
609 => "Bunker",
610 => "Espion",
611 => "Commandant",
612 => "Destructeur",
613 => "General",
614 => "Raideur",
615 => "Empereur",

1000 => "Humain",
1001 => "Tok'ra",
1002 => "Goa'uld",
1003 => "Asgard"


);

$lang&#91;'res'&#93;&#91;'descriptions'&#93; = array(
1 => "Principal fournisseur de mati&egrave;res premi&egrave;res pour la construction de structures portantes et de vaisseaux&#46;",
2 => "Fournisseur principal de ressources pour les installations &eacute;lectroniques et pour les alliages&#46;",
3 => "Extrait la petite quantit&eacute; de deut&eacute;rium de l'eau d'une plan&egrave;te&#46;",
4 => "Les centrales &eacute;lectriques solaires transforment les rayons de soleil en &eacute;nergie&#46; Presque tous les b&acirc;timents ont besoin d'&eacute;nergie pour fonctionner&#46;",
12 => "La centrale &eacute;lectrique de fusion produit de l'&eacute;nergie en fusionnant 2 atomes d'hydrog&egrave;ne en un atome d'h&eacute;lium&#46;",
14 => "Les usines de robots produisent des robots ouvriers qui servent &agrave; la construction de l'infrastructure plan&eacute;taire&#46; Chaque niveau augmente la vitesse de construction des diff&eacute;rents b&acirc;timents&#46;",
15 => "C'est le perfectionnement de la technologie de robots&#46; Chaque niveau augmente la vitesse de construction des vaisseaux et des b&acirc;timents&#46;",
21 => "Le chantier spatial permet de construire les vaisseaux et les installations de d&eacute;fense&#46;",
22 => "Hangar pour minerai avant le traitement&#46;",
23 => "Hangar pour cristal avant le traitement&#46;",
24 => "R&eacute;servoirs g&eacute;ants pour le stockage de deut&eacute;rium&#46;",
31 => "Le laboratoire de recherche est n&eacute;cessaire pour d&eacute;velopper de nouvelles technologies&#46;",
33 => "Le terraformeur permet d'agrandir la surface utile des plan&egrave;tes&#46;",
34 => "Le d&eacute;p&ocirc;t de ravitaillement permet le stationnement prolong&eacute; de flottes d'autres membres de l'alliance ou de flottes de membres de votre liste d'amis pour augmenter la d&eacute;fense d'une plan&egrave;te&#46; Les flottes restent en orbite et re&ccedil;oivent le carburant n&eacute;cessaire depuis ce d&eacute;p&ocirc;t&#46;",
41 => "Une lune n'ayant pas d'atmosph&egrave;re, une base lunaire est n&eacute;cessaire pour pouvoir commencer la colonisation&#46;",
42 => "La phalange de capteur permet d'observer les mouvements de flotte&#46; Une phalange de niveau &eacute;lev&eacute; a une plus grande port&eacute;e&#46;",
43 => "Les portes de saut spatial sont d'immenses &eacute;metteurs permettant de transporter des vaisseaux &agrave; travers la galaxie sans perte de temps&#46;",
44 => "Les silos de missiles servent &agrave; stocker les missiles&#46;",

106 => "Cette technologie permet d'obtenir des informations sur les autres plan&egrave;tes de l'univers&#46;",
108 => "Avec l'augmentation des capacit&eacute;s des ordinateurs, plus de flottes peuvent &ecirc;tre command&eacute;es&#46; Chaque niveau de technologie ordinateur augmente d'une le nombre total de flottes commandables&#46;",
109 => "La technologie armes rend les syst&egrave;mes d'armes plus efficaces&#46; Chaque niveau de technologie armes augmente la puissance des armes des unit&eacute;s par tranche de 10% de la valeur de base&#46;",
110 => "Chaque niveau de la technologie de bouclier augmente l'efficacit&eacute; des boucliers par tranche de 10%&#46;",
111 => "Des alliages sp&eacute;ciaux rendent les vaisseaux spatiaux de plus en plus r&eacute;sistants&#46; L'efficacit&eacute; des protections peut &ecirc;tre augment&eacute;e de 10% par niveau&#46;",
113 => "Maîtriser les diff&eacute;rents types d'&eacute;nergie est n&eacute;cessaire pour de nombreuses technologies&#46;",
114 => "L'int&eacute;gration de la 4eme et de la 5eme dimension permet le d&eacute;veloppement d'un nouveau genre de propulsion plus puissant et efficace&#46;",
115 => "Le d&eacute;veloppement de ces r&eacute;acteurs rend les vaisseaux plus rapides mais chaque niveau n'augmente la vitesse que de 10%&#46;",
117 => "Le r&eacute;acteur &agrave; impulsion est bas&eacute; sur le principe de r&eacute;action disant que la plus grande part de la masse du rayon est gagn&eacute;e comme sous-produit de la fusion d'atomes qui sert &agrave; produire l'&eacute;nergie n&eacute;cessaire&#46;",
118 => "Par une d&eacute;formation spatiale et temporelle dans l'environnement du vaisseau, l'espace est comprim&eacute; ce qui permet de parcourir de longues distances dans un minimum de temps&#46;",
120 => "La concentration de lumi&egrave;re cr&eacute;e un rayon pouvant cr&eacute;er des d&eacute;g&acirc;ts importants  en touchant un objet&#46;",
121 => "Rayon mortel compos&eacute; d'ions acc&eacute;l&eacute;r&eacute;s&#46; En touchant un objet, il cause des d&eacute;g&acirc;ts importants&#46;",
122 => "Une am&eacute;lioration de la technologie d'ions qui n'acc&eacute;l&egrave;re pas des ions mais du plasma tr&egrave;s &eacute;nerg&eacute;tique&#46; Ceci a un effet d&eacute;vastateur en touchant un objet&#46;",
123 => "Les chercheurs de plusieurs plan&egrave;tes utilisent ce r&eacute;seau pour communiquer&#46;",
124 => "Les vaisseaux peuvent dor&eacute;navant &ecirc;tre &eacute;quip&eacute;s de modules de recherche qui permettent l'&eacute;valuation scientifique des donn&eacute;es recueillies lors de longues exp&eacute;ditions&#46;",
199 => "Une quantit&eacute; concentr&eacute;e de particules de graviton, r&eacute;seau artificiel de gravitation, est propuls&eacute;e, capable de d&eacute;truire des vaisseaux ou m&ecirc;me des lunes&#46;",

202 => "Le petit transporteur est un vaisseau tr&egrave;s maniable et capable de transporter des mati&egrave;res premi&egrave;res sur d'autres plan&egrave;tes rapidement&#46;",
203 => "Le d&eacute;veloppement du transporteur augmente la capacit&eacute; de fret et rend le vaisseau plus rapide que le petit transporteur&#46;",
204 => "Le chasseur l&eacute;ger est un vaisseau tr&egrave;s manoeuvrable qui est stationn&eacute; sur presque toutes les plan&egrave;tes&#46; Les co&ucirc;ts ne sont pas tr&egrave;s importants, mais la puissance du bouclier et la capacit&eacute; de fret sont tr&egrave;s limit&eacute;es&#46;",
205 => "Cette version am&eacute;lior&eacute;e du chasseur l&eacute;ger poss&egrave;de une meilleure protection et une capacit&eacute; d'attaque plus importante&#46;",
206 => "Les croiseurs ont une protection presque trois fois plus importante que celle des chasseurs lourds et leur puissance de tir est plus de deux fois plus grande&#46; De plus, ils sont tr&egrave;s rapides&#46;",
207 => "Les vaisseaux de bataille jouent un r&ocirc;le central dans les flottes&#46; Avec leur artillerie lourde, leur vitesse consid&eacute;rable et la grande capacit&eacute; de fret, ils sont des adversaires respectables&#46;",
208 => "Les nouvelles plan&egrave;tes peuvent &ecirc;tre colonis&eacute;es avec ce vaisseau&#46;",
209 => "Le recycleur collecte les ressources dans les Champs de d&eacute;bris&#46;",
210 => "Les sondes d'espionnage sont des petits drones manoeuvrables qui espionnent les plan&egrave;tes m&ecirc;me &agrave; grande distance&#46;",
211 => "Le bombardier a &eacute;t&eacute; d&eacute;velopp&eacute; pour pouvoir d&eacute;truire les installations de d&eacute;fense des plan&egrave;tes&#46;",
212 => "Les satellites solaires sont des plates-formes couvertes de cellules solaires, qui se trouvent dans une orbite tr&egrave;s &eacute;lev&eacute;e et stationnaire&#46; Ils collectent la lumi&egrave;re du soleil et la transmettent par laser &agrave; la station de base&#46;",
213 => "Le destructeur est le roi des vaisseaux de guerre&#46;",
214 => "La puissance de destruction de l'&eacute;toile de la mort est imbattable&#46;",
215 => "Le traqueur est sp&eacute;cialis&eacute; dans l'interception de flottes ennemies&#46;",

401 => "Le lanceur de missiles est une fa&ccedil;on simple et bon march&eacute; de se d&eacute;fendre&#46;",
402 => "Le bombardement concentr&eacute; de photons peut causer des d&eacute;g&acirc;ts nettement plus important que les armes balistiques habituelles&#46;",
403 => "L'artillerie lourde au laser est l'&eacute;volution cons&eacute;quente de l'artillerie l&eacute;g&egrave;re au laser&#46;",
404 => "Le canon de Gauss (canon &eacute;lectromagn&eacute;tique) acc&eacute;l&egrave;re un projectile pesant des tonnes en consommant une gigantesque quantit&eacute; d'&eacute;nergie&#46;",
405 => "L'artillerie d'ions lance des vagues d'ions sur l'objet, ce qui d&eacute;stabilise les boucliers et endommage l'&eacute;lectronique&#46;",
406 => "Les lanceurs de plasma disposent de la puissance d'une &eacute;ruption solaire et peuvent donc &ecirc;tre plus destructeurs que les destructeurs eux-m&ecirc;mes&#46;",
407 => "Le petit bouclier couvre toute une plan&egrave;te avec un champ infranchissable qui peut absorber une quantit&eacute; &eacute;norme d'&eacute;nergie&#46;",
408 => "L'am&eacute;lioration du petit bouclier peut se servir de nettement plus d'&eacute;nergie pour se d&eacute;fendre&#46;",
502 => "Le missile interception d&eacute;truit les missiles adverses&#46;",
503 => "Les missiles interplan&eacute;taires d&eacute;truisent la d&eacute;fense adverse&#46;",

);

// Created by Perberos&#46; All rights reversed (C) 2006
// Complet by XNova Team&#46; All rights reversed (C) 2008
?>
jeudi 10 juin 2010

stylus512 Messages : 3

je te remercie je vais tester cela

jeudi 10 juin 2010

Morvana Messages : 7

Salut !!! J'ai suivis le tuto que j'ai adapté pour XGP 2.9.6

Pour les races en soit il n'y a pas de souci, ça marche nickel.

Par contre là ou ça ne marche pas, c'est lors de la colonistation, ça fait planter le jeu (je suppose que pour la création de lune c'est pareil) car il y a un problème au niveau de:

CreateOnePlanetRecord.php

En effet il n'arrive pas à comprendre le

$QryInsertMoonInPlanet .= "`".$_POST['faction']."` = '1', "; (je précise que j'ai remplacé partout race par faction, le problème vient pas de là...)

Quelqu'un peu m'aider à le résoudre ? En effet je suis par très doué à ce niveau en PHP

jeudi 23 février 2012

kiki9999 Messages : 85

Salut !!! J'ai suivis le tuto que j'ai adapté pour XGP 2.9.6

Pour les races en soit il n'y a pas de souci, ça marche nickel.

Par contre là ou ça ne marche pas, c'est lors de la colonistation, ça fait planter le jeu (je suppose que pour la création de lune c'est pareil) car il y a un problème au niveau de:

CreateOnePlanetRecord.php

En effet il n'arrive pas à comprendre le

$QryInsertMoonInPlanet .= "`".$_POST['faction']."` = '1', "; (je précise que j'ai remplacé partout race par faction, le problème vient pas de là...)

Quelqu'un peu m'aider à le résoudre ? En effet je suis par très doué à ce niveau en PHP

j ai le même problème que toi

j'ai voulu l'adapter a 2moons 1.3.5 et sa bloque a l’inscription est quand je veux crée une planète visa le panel admin

voici l'erreur

Message: SQL Error: Unknown column '' in 'field list'

Query Code: INSERT INTO tld_planets SET `universe` = '1', `id_owner` = '6', `galaxy` = '5', `system` = '5', `planet` = '5', `` = '1', `last_update` = '1340296340', `planet_type` = '1', `image` = 'dschjungelplanet01', `diameter` = '12206', `field_max` = '149', `temp_min` = '39', `temp_max` = '79', `metal` = '500', `metal_perhour` = '20', `crystal` = '500', `crystal_perhour` = '20', `deuterium` = '0', `deuterium_perhour` = '20';
File: /data/filer-6/web/web452/htdocs/TLD-Wars/v2/includes/classes/class.MySQLi.php
Line: 96
URL: http://test-tld.verygames.net/TLD-Wars/v2/admin.php?page=create&mode=planet
PHP-Version: 5.2.11
PHP-API: cgi-fcgi
2Moons Version: 1.3.1866
Debug Backtrace:
#0 /data/filer-6/web/web452/htdocs/TLD-Wars/v2/includes/functions/CreateOnePlanetRecord.php(209): DB_mysqli->query('INSERT INTO tld...')
#1 /data/filer-6/web/web452/htdocs/TLD-Wars/v2/includes/pages/adm/ShowCreatorPage.php(224): CreateOnePlanetRecord(5, 5, 5, 1, 6, '', '', false)
#2 /data/filer-6/web/web452/htdocs/TLD-Wars/v2/admin.php(99): ShowCreatorPage()
#3 {main}

si quelqu’un peux m'aider sa serai sympas

jeudi 21 juin 2012

kiki9999 Messages : 85

Bon voila se que j'ai fait mais je reste bloquer sur index.php (qui es équivalent a reg.php pour moi )

Alors voila mon register_from.tpl

{include file="index_header.tpl"}
<div class="wrapper-guide">
<div id="page">

<div id="header">
<ul class="buttons">
<li><a href="index.php">{$menu_index}</a></li>
<li class="skull"><a href="index.php?page=screens">Screenshot</a></li>
<li class="tour"><a href="{$forum_url}" target="_blank">{$forum}</a></li>
</ul>
</div>
<div id="main">

<div class="content-big">
<div class="register">
<div class="form-reg">
<form name="reg" action="?page=reg&mode=send&lang={$lang}" method="post" id="formID">

<div class="left-col">
<ul class="login">

<li>
<label for="username">{$user_reg}</label>
<div class="bg"><input id="character" name="character" class="text" type="text" value="" alt="{$user_reg}" maxlength="15" /></div>
</li>
<li>
<label for="email">{$email_reg}</label>
<div class="bg"><input id="email" name="email" class="text" type="text" value="" alt="{$email_reg}" maxlength="255" /></div>
</li>
                        <li>
<label for="email">{$email2_reg}</label>
<div class="bg"><input id="email2" name="email2" class="text" type="text" value="" alt="{$email2_reg}" maxlength="255" /></div>
</li>
<li>
<label for="userpass">{$pass_reg}</label>
<div class="bg"><input id="password" name="password" class="text" type="password" value="" alt="{$pass_reg}" maxlength="15" /></div>
</li>
<li>
<label for="userpass">{$pass2_reg}</label>
<div class="bg"><input id="password2" name="password2" class="text" type="password" value="" alt="{$pass2_reg}" maxlength="15" /></div>
</li>
<li>
<label for="username">{$planet_reg}</label>
<div class="bg"><input id="planet" name="planet" class="text" type="text" value="" alt="{$planet_reg}" maxlength="15" /></div>
</li>
</ul>
</div>
<div class="right-col">
<br><br>
{if $game_captcha}
<label for="captcha">{$captcha_reg}</label>
<label for="captcha"><a href="javascript:Recaptcha.reload()">{$captcha_reload}</a></label>
<div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type('audio')">{$captcha_get_audio}</a></div>
<div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type('image')">{$captcha_get_image}</a></div>
         <label for="captcha"><a href="javascript:Recaptcha.showhelp()">{$captcha_help}</a></label>
<div id="display_captcha" style="display:none"><div id="recaptcha_image"></div><input type="text" id="recaptcha_response_field" size="30" maxlength="40" tabindex="7" name="recaptcha_response_field" class="input-text"></div>
{/if}
<label>{$Race}</label><br>            
    <select name="race" id="race">
        <option value="humain">{$id_race_1}</option>
        <option value="tokra">{$id_race_2}</option>
        <option value="goauld">{$id_race_3}</option>
        <option value="asgard">{$id_race_4}</option>
    </select><br>
<label>{$lang_reg}</label><br>
<select name="lang" id="lang">
            {html_options options=$AvailableLangs selected=$lang}
</select><br>

<label for="universe">{$uni_reg}</label><br>
<select name="universe" id="universe">
            {html_options options=$AvailableUnis selected=$UNI}
</select>



<p class="agb-text"><br>

<input class="agb-check" name="rgt" type="checkbox" /> J'accepte les <a href="index.php?page=rules&lang={$lang}"  target="_blank">{$menu_rules}</a> et <a href="index.php?page=agb" target="_blank">{$menu_agb}</a></p>


<input class="submit" type="submit" value="{$send}" />

</div>

</form>
</div>
</div>
<strong class="logo">{$servername}</strong>

</div>

<div id="footer">
<br><br><p>{$servername} ©</p>
<ul>
<li><a href="index.php?page=agb" target="_blank">{$menu_agb}</a></li>
<li><a href="index.php?page=rules&lang={$lang}"  target="_blank">{$menu_rules}</a></li>
{foreach $langs as $lng} <li><a href="?lang={$lng}"></a>{/foreach}
</ul>
</div>
</div>
</div>
</div>
{include file="index_footer.tpl"}

les race on étai rajouter ligne 58

Le suivant es mon PUBLIC.php

<?php

//general
$LNG['index']                           = 'Accueil';
$LNG['register']                        = 'S\'enregistrer';
$LNG['forum']                           = 'Forum';
$LNG['send']                            = 'Soumettre';
$LNG['menu_index']                      = 'Page d\'Accueil';     
$LNG['menu_news']                       = 'News';        
$LNG['menu_rules']                      = 'Règles';
$LNG['menu_agb']                        = 'Termes et Conditions';
$LNG['menu_pranger']                    = 'Bannis';
$LNG['menu_top100']                     = 'Hall of Fame';        
$LNG['menu_disclamer']                  = 'Contacter un administrateur';          
$LNG['uni_closed']                      = '(offline)';
         
/* ------------------------------------------------------------------------------------------ */

$LNG['music_off']                       = 'Musique: OFF';
$LNG['music_on']                        = 'Musique: ON';


//index.php
//case lostpassword
$LNG['mail_not_exist']                  = 'L\'adresse e-mail n\'existe pas!';
$LNG['mail_title']                      = 'Nouveau mot de passe';
$LNG['mail_text']                       = 'Votre nouveau mot de passe est:';
$LNG['mail_sended']                     = 'Votre mot de passe a été envoyé avec succès!';
$LNG['mail_sended_fail']                = 'L\'e-mail n\'a pas pu être envoyé!';

$LNG['server_infos'] = array(
"<<<<<<<<<<BIENVENUE>>>>>>>>>>",
"<  VOTRE JEUX >",
".",
"",
);

//case default
$LNG['login_error_1']                   = 'Nom d\'utilisateur / mot de passe incorrect !';
$LNG['login_error_2']                   = 'Quelqu\'un s\'est connecté depuis un autre PC dans votre compte!';
$LNG['login_error_3']                   = 'Votre session a expiré!';
$LNG['screenshots']                     = 'Captures d\'écran';
$LNG['universe']                        = 'Univers';
$LNG['chose_a_uni']                     = 'Choisissez un univers';
$LNG['universe']                        = 'Univers';
$LNG['chose_a_uni']                     = 'Choisissez un univers';

/* ------------------------------------------------------------------------------------------ */

//lostpassword.tpl
$LNG['lost_pass_title']                 = 'Récupérer mot de passe';
$LNG['retrieve_pass']                   = 'Restaurer';
$LNG['email']                           = 'Adresse e-mail';

//index_body.tpl
$LNG['user']                            = 'Pseudo';
$LNG['pass']                            = 'Mot de passe';
$LNG['remember_pass']                   = 'Connection automatique';
$LNG['lostpassword']                    = 'Mot de passe oublié?';
$LNG['welcome_to']                      = 'Bienvenue à';
$LNG['server_description']              = '';
$LNG['server_register']                 = 'S\'il vous plaît inscrivez-vous maintenant!';
$LNG['server_message']                  = 'Inscrivez-vous et une nouvelle expérience passionnante vous attend dans le monde du';
$LNG['login']                           = 'Login';
$LNG['disclamer']                       = 'Contacter un administrateur';
$LNG['login_info']                      = 'En me connectant j\'accepte les <a onclick="ajax(\'?page=rules&\'+\'getajax=1&\'+\'lang=%1$s\');" style="cursorointer;">Règles</a> et les <a onclick="ajax(\'?page=agb&\'+\'getajax=1&\'+\'lang=%1$s\');" style="cursorointer;">Termes et Conditions</a>';

/* ------------------------------------------------------------------------------------------ */

//reg.php - Registrierung
$LNG['register_closed']                         = 'Les inscriptions sont closes!';
$LNG['register_at']                             = 'Inscrit à ';
$LNG['reg_mail_message_pass']                   = 'Un pas de plus pour activer votre nom d\'utilisateur';
$LNG['reg_mail_reg_done']                       = 'Bienvenue à %s!';
$LNG['invalid_mail_adress']                     = 'Adresse e-mail invalide!<br>';
$LNG['empty_user_field']                        = 'S\'il vous plaît remplir tous les champs!<br>';
$LNG['password_lenght_error']                   = 'Le mot de passe doit être au moins 4 caractères de long!<br>';
$LNG['user_field_no_alphanumeric']              = 'S\'il vous plaît entrez votre pseudo avec des caractères alphanumériques UNIQUEMENT!<br>';
$LNG['user_field_no_space']                     = 'Ne pas laisser le champs PSEUDO vide!<br>';
$LNG['planet_field_no_alphanumeric']            = 'S\'il vous plaît entrez le nom de la planète avec des caractères alphanumériques UNIQUEMENT!<br>';
$LNG['planet_field_no_space']                   = 'Ne pas laisser le champs NOM PLANETE vide!<br>';
$LNG['terms_and_conditions']                    = 'Vous devez accepter <a href="index.php?page=agb">Termes et Conditions</a> et <a href="index.php?page=rules>Rules</a> s\il vous plaît!<br>';
$LNG['user_already_exists']                     = 'Le nom d\'utilisateur est déjà pris!<br>';
$LNG['mail_already_exists']                     = 'L\'adresse e-mail est déjà utilisée!<br>';
$LNG['wrong_captcha']                           = 'Code de sécurité est incorrect!<br>';
$LNG['different_passwords']                     = 'Vous avez indiqué 2 mots de passe différents!<br>';
$LNG['different_mails']                         = 'Vous avez indiqué 2 adresses e-mail différentes!<br>';
$LNG['welcome_message_from']                    = 'Administrateur';
$LNG['welcome_message_sender']                  = 'Administrateur';
$LNG['welcome_message_subject']                 = 'Bienvenue';
$LNG['welcome_message_content']                 = 'Bienvenue sur votre jeu FinalGalaxy ';
$LNG['newpass_smtp_email_error']                = '<br><br>Une erreur s\'est produite. Votre mot de passe est: ';
$LNG['reg_completed']                           = 'Toute l\'équipe vous remercie de votre inscription! Vous recevrez un email avec un lien d\'activation.';
$LNG['planet_already_exists']                   = 'La position de la planète est déjà occupée! <br>';

//registry_form.tpl
$LNG['server_message_reg']                      = 'Inscrivez-vous dès maintenant et faire partie de';
$LNG['register_at_reg']                         = 'Inscrit à';
$LNG['uni_reg']                                 = 'Univers';
$LNG['user_reg']                                = 'Pseudo';
$LNG['pass_reg']                                = 'Mot de passe';
$LNG['pass2_reg']                               = 'Mot de passe';
$LNG['email_reg']                               = 'Adresse e-mail';
$LNG['email2_reg']                              = 'Adresse e-mail';
$LNG['planet_reg']                              = 'Nom planète mère';
$LNG['lang_reg']                                = 'Langue';
$LNG['register_now']                            = 'S\'inscrire!';
$LNG['captcha_reg']                             = 'Question de sécurité';
$LNG['accept_terms_and_conditions']             = 'J\'accèpte les Règles</a>';
$LNG['captcha_reload']                          = 'Rechargement';
$LNG['captcha_help']                            = 'Aide';
$LNG['captcha_get_image']                       = 'Charge Bild-CAPTCHA';
$LNG['captcha_reload']                          = 'Nouveau CAPTCHA';
$LNG['captcha_get_audio']                       = 'Chargement Son-CAPTCHA';
$LNG['user_active']                             = 'Utilisateur %s a été activé!';
$LNG['Race']                = 'Choisissez votre race';
$LNG['id_race_1']           = "Humain";
$LNG['id_race_2']           = "Tok'ra";
$LNG['id_race_3']           = "Goa'uld";
$LNG['id_race_4']           = 'Asgard';

//registry_closed.tpl
$LNG['info']                                            = 'Information';
$LNG['reg_closed']                                      = 'Les inscriptions sont closes';

//Rules
$LNG['rules_overview']                          = "Règles";
$LNG['rules']                                           = array(
        "Comptes"                                       => "Chaque joueur est autorisé à contrôler un seul compte. Chaque compte est le droit d'être joué par un seul joueur à un moment, assis en compte étant la seule exception.
Séance de compte donne droit à un joueur donné à son compte en vertu de veille sur les règlements suivants:

- Suis-admin doit être informé avant la séance prend place, en ouvrant un ticket.
- Pas de mouvements de la flotte sont autorisés que le compte est être assis à moins d'une attaque qui peut raid ou un crash du compte est arrivée, dans ce cas, vous pouvez enregistrer votre parc (s) par le déploiement ou le transport d'une planète ou une lune appartenant à la compte sam. Vous ne pouvez pas ninja une attaque entrante dans le cas où vous auriez besoin de déplacer une flotte pour elle.
- Un compte ne peut être gardé pendant une période maximale de 48 heures en continu (autorisation admin doit être obtenu dans les cas où une prorogation de délai est nécessaire).
Le sitter peut, sur le compte satellite et alors que la période de séance dure:

- consacrer des ressources à des bâtiments ou des recherches.
- Fleetsave tout navire qui imminente en voie de disparition par une flotte d'attaque entrante, seulement avec une mission de déploiement ou du transport à l'un des comptes propres planètes.
- Placez un compte en mode vacances.

Le sitter peut pas:

- les ressources de transport, ni entre les planètes / lunes du compte étant assis, ni à aucune autre planète / lune.
- consacrer des ressources à des structures défensives ou de navires.
- Asseyez-vous un compte si il était assis un autre au cours des 7 derniers jours.
- Asseyez-vous un compte qui était assis dans les 7 derniers jours.
- Supprimer un compte en mode vacances.",


        "Pushing"                                       => "N'est pas autorisé pour un compte pour obtenir des profits injustes d'un faible compte classé dans une question de ressources.
Cela inclut, mais n'est pas limité à:

- Ressources envoyé à partir d'un faible compte classé à un rang supérieur avec une rien de tangible en retour.
- Un joueur s'écraser sa flotte dans un rang supérieur un pour les mieux classés de un à garder le champ de débris, et donc en tirer profit.
- Les prêts qui ne sont pas retournés dans les 48 heures.
- Métiers dans lequel le joueur le mieux classé supérieur ne retourne pas les ressources dans les 48 heures.
- Les joueurs répondant à une extorsion de fonds joueur classé supérieur en versant des ressources.
- Métiers qui signifie un profit injuste pour les plus joueurs classés en tombant en dehors de la gamme suivante de ratios:

03:02:01 Si chaque unité de deutérium est une valeur de 2 unités de cristal ou 3 unités de métal.

02:01:01 Si chaque unité de deutérium est une valeur de 1 unité de cristal ou 2 unités de métal.",

        "Bashing"                                       => "Il n'est pas permis d'attaquer une planète donnée ou de la lune possédée par un joueur de plus de 6 fois en une seule période de 24 heures.

Bashing n'est autorisée que si votre Alliance est en guerre avec une autre Alliance. La guerre doit être annoncé dans le forum et les deux dirigeants doivent accepter les termes.",

        
        "Bugusing"                                      => "L'utilisation d'un bug dans un but lucratif anyones intentionnellement ou non de rapporter un bug est intentionnellement strictement interdite.",


        "Les menaces"   => "Ce qui implique que vous allez à localiser et à nuire à un autre joueur, est interdite.",

        "Spam"                  => "Toute situation visant à saturer une interface joueurs à travers toute méthode est interdite. Cela inclut, mais n'est pas limité à:

- Messages personnels spam
- Sondes spam
- Vue d'ensemble spam",

  "Guerres"                    => "Après les dirigeants des alliances sont d'accord pour la guerre, il est officiellement le. Et se poursuivra jusqu'à l'une des alliances qu'il annule. Pour annuler officiellement la guerre dont ils ont besoin pour annuler le pacte de guerre du in-game, et l'annoncer dans le fil, ils ont commencé d'abord.
Alors que la guerre est sur??, la règle de dénigrement entre les alliances impliquées ne compte pas. Signification des membres appartenant à des alliances dans ladite guerre ne peut être attaquer une quantité infinie de fois à la peine à .
Si l'alliance abandonne et annule la guerre, la règle bashing prendra effet à nouveau, et les membres de la casser après la guerre a pris fin avec puni d'une interdiction de 1 jour, plus si le degré d'attaque est extrêmement élevé.

Si l'alliance adverse dispose d'une flotte en vol. Et la guerre est annulée avant leur arrivée. Ils ne seront pas punis pour cette attaque. Mais toute la flotte envoyée après l'annulation de guerre seront comptabilisés dans l'état bashing.


Pour de nouvelles guerres l'un des leaders nécessité de créer un nouveau thread dans la guerre la section de diplomatie.
Là , ils peuvent définir des règles spécifiques ou des termes, ils veulent la guerre. Les règles mises en place, et sont acceptés par l'alliance adverse doit être mis en jachère, et ne doit pas contredire les règles énoncées ici.",                          

);

$LNG['rules_info1']                             = "Cependant, il devient dans ce <a href=\"%s\" target=\"_blank\">Forum</a> et plus la page initiale dans le jeu informé à ce sujet ...";
$LNG['rules_info2']                             = "En complément, les <a onclick=\"ajax('?page=agb&getajax=1');\" style=\"cursorointer;\">Termes et Conditions</a> sont considérées et respectées!</font>";


//AGB

$LNG['agb_overview']                            = "Termes et Conditions";
$LNG['agb']                                             = array(
        "Contenu Service"                               => array(
                "La reconnaissance de ces politiques sont une condition préalable nécessaire pour pouvoir participer au jeu.
Elles s'appliquent à toutes les offres de la part des opérateurs, y compris le Forum et d'autres jeu-contenu.",
                
                "Le service est gratuit.
Ainsi, il n'ya pas de revendications à la disponibilité, la livraison, la fonctionnalité, ou de dommages.
En outre, le joueur n'a aucune prétention à restaurer, compte aurait d'être traitée défavorablement.",
        ),

        "Adhésion"                             => array(
                "En vous connectant au jeu et / ou les membres du Forum va commencer dans le jeu.",
                
                "Qui commence avec la déclaration d'adhésion peut être résiliée de la part de l'élément en supprimant le compte ou par lettre d'un administrateur.
L'effacement des données pour des raisons techniques ne peut être faite immédiatement.",
                
                "Dénoncé par l'opérateur Aucun utilisateur n'a aucun droit de participer aux appels d'offres de l'opérateur.
L'opérateur se réserve le droit de supprimer les comptes.
La décision de supprimer un compte est uniquement et exclusivement à l'opérateur et l'administrateur et l'opérateur.
Toute réclamation légale pour l'adhésion est exclue.",
                
                "Tous les droits restent à l'opérateur.",
        ),

        "Contenu / responsabilité"     => "Pour le contenu des capacités de jeu différentes communications, les utilisateurs sont responsables. Pornographique, raciste, injurieux ou contraire viole la loi applicable contenu contraire en dehors de la responsabilité de l'exploitant.
Les infractions peuvent mener à l'annulation ou la révocation immédiate.",

        "Procédures interdites"                        => array(
                "L'utilisateur n'est pas autorisé à utiliser le matériel / logiciel ou d'autres substances ou des mécanismes associés au site web, qui peut interférer avec la fonction et le jeu.
L'utilisateur ne peut pas continuer à prendre toute action qui pourrait causer un stress excessif ou augmentation de la capacité technique.
L'utilisateur n'est pas autorisé à manipuler le contenu généré par l'opérateur ou d'interférer de quelque façon avec le jeu.",
                
                "N'importe quel type de bot, script ou d'autres fonctions automatisées sont interdites.
Le jeu peut être joué que dans le navigateur. Même ses fonctions ne doit pas être utilisé pour obtenir un avantage dans le jeu.
Ainsi, pas de publicité doit être bloqué. La décision de savoir quand un logiciel est bénéfique pour les joueurs, incombe exclusivement à l'opérateur / avec les administrateurs / exploitants.",
                
        
        ),

        "Sur l'utilisation"             => array(
                "Un joueur ne peut utiliser chaque compte un par univers, que l'on appelle \ multinationales \ ne sont pas autorisés et seront supprimés sans avertissement peut / sera bloqué.
La décision de savoir quand il ya un \ multi \ incombe exclusivement à l'opérateur / administrateurs / exploitants.",
                
                "Les détails doivent être régies par les règles.",
                
                "Lock-out peut en permanence à la discrétion de l'exploitant ou temporaire.
De même, la fermeture peut s'étendre à une ou toutes les aires de jeux.
La décision sera suspendue quand et combien de temps un joueur qui est seulement avec l'opérateur / avec les administrateurs / exploitants.",
        ),

        "Protection des renseignements personnels"                                      => array(
                "L'opérateur se réserve le droit de stocker les données des joueurs afin de surveiller le respect des règles, conditions d'utilisation et le droit applicable.
Classé tous tenus et présentés par le joueur ou son renseignements sur son compte.
Ces IPs (sont associées à des périodes d'utilisation et de l'utilisation, l'adresse e-mail indiquée lors de votre inscription et d'autres données.
Dans le forum, il fait dans le profil sont stockées.",
                
                "Ces données seront diffusées dans certaines circonstances, à accomplir ses devoirs statutaires aux greffiers et autres personnes autorisées.
En outre, les données peuvent (si besoin est émis) dans certaines circonstances à des tiers.",
                
                "L'utilisateur peut s'opposer au stockage de données personnelles à tout moment. Un appel est un droit de résiliation.",
        ),

        "Droits de l'exploitant des Comptes"    => array(
                "Tous les comptes et tous les objets virtuels restent en la possession et la propriété de l'opérateur.
Le joueur n'a pas la propriété et autres droits à n'importe quel compte ou des pièces.
Tous les droits restent avec l'opérateur.
Un transfert d'exploitation ou d'autres droits à l'utilisateur aura lieu à tout moment.",
                
                "Vente non autorisée, utiliser, copier, distribuer, reproduire ou autrement violer les droits (par exemple en raison) de l'opérateur seront signalés aux autorités et de poursuites.
Expressément autorisée est la libre circulation, le transfert définitif du compte et les actions de leurs propres ressources dans l'univers, sauf dans la mesure permise par les règles.",
        ),

        "Responsabilité"       => "L'exploitant de chaque univers n'est pas responsable de tout dommage.
Un passif est exclu, sauf pour les dommages causés intentionnellement ou par négligence grave et tous les dommages à la vie et la santé.
à cet égard, est expressément souligné que les jeux vidéo peuvent présenter des risques importants pour la santé.
Les dommages ne sont pas dans le sens de l'opérateur.",

        "Modifications des conditions"  => "L'opérateur se réserve le droit de modifier ces termes à tout moment ou d'étendre.
Un changement ou ajout sera publié au moins une semaine avant l'entrée dans le forum.",
);

//Facebook Connect

$LNG['fb_perm']                 = 'Accès interdit. %s besoins de tous les droits afin que vous puissiez vous connecter avec votre compte Facebook. \n Alternativement, vous pouvez vous connecter sans compte Facebook!';

//NEWS

$LNG['news_overview']                   = "News";
$LNG['news_from']                               = "Sur %s par %s";
$LNG['news_does_not_exist']             = "Pas de News disponibles!";

//Impressum

$LNG['disclamer']                               = "Disclaimer";
$LNG['disclamer_name']                  = "Pseudo";
$LNG['disclamer_adress']                = "Adresse";
$LNG['disclamer_tel']                   = "Téléphone:";
$LNG['disclamer_email']                 = "Adresse E-mail";

// Traduction français by HaloRaptor . All rights reversed (C) 2011 haloraptor33@gmail.com

?>

Les race rajouter ligne 116

Mon index.php j'ai rajouter un truk ligne 425 mais je n'arrive pas a trouver ou mettre la ligne SQL pour valider la race choisi

<?php
/**
TLD-Wars by TLD-Games avec reecriture des code de 2moons
*/
 
if (isset($_GET['action']) && $_GET['action'] == 'keepalive')
{
header('Content-Type: image/gif');
exit("\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3B");
}

define('INSIDE', true );
define('LOGIN', true );

define('ROOT_PATH', str_replace('\\', '/',dirname(__FILE__)).'/');

if(!file_exists(ROOT_PATH.'includes/config.php')) {
header('Location: install.php');
exit;
}

include_once(ROOT_PATH . 'includes/common.php');

$template = new template();
$template->cache = true;
$THEME->isHome();
$page = request_var('page', '');
$mode = request_var('mode', '');

switch ($page) {
case 'facebook':
if($CONF['fb_on'] == 0)
redirectTo("index.php");

$CONF = $db->uniquequery("SELECT `fb_apikey`, `fb_skey`, `initial_fields`, `LastSettedGalaxyPos`, `LastSettedSystemPos`, `LastSettedPlanetPos`, `smtp_host`, `smtp_port`, `smtp_user`, `smtp_pass`, `game_name`, `users_amount` FROM ".CONFIG." WHERE `uni` = ".$UNI.";");

include_once(ROOT_PATH . 'includes/libs/facebook/facebook.php');
$facebook = new Facebook(array(
  'appId'  => $CONF['fb_apikey'],
  'secret' => $CONF['fb_skey'],
  'cookie' => true,
));
$session = $facebook->getSession();

// Session based API call.
if (!$session)
redirectTo("index.php");

$uid = $facebook->getUser();

if (!$uid)
redirectTo("index.php");

$login = $db->uniquequery("SELECT `id`, `username`, `dpath`, `authlevel`, `id_planet` FROM ".USERS." WHERE `universe` = '".$UNI."' AND `fb_id` = '".$uid."';");
if (isset($login)) {
session_start();
$SESSION        = new Session();
$SESSION->CreateSession($login['id'], $login['username'], $login['id_planet'], $UNI, $login['authlevel'], $login['dpath']);

redirectTo("game.php?page=overview");
} else {
$me = $facebook->api('/me');
$UserMail =  $me['email'];

$Exist['alruser'] = $db->uniquequery("SELECT `id`, `username`, `dpath`, `authlevel`, `id_planet` FROM ".USERS." WHERE `email` = '".$UserMail."';");
if(isset($Exist['alruser']))
{
$db->query("UPDATE `".USERS."` SET `fb_id` = '".$uid."' WHERE `id` = '".$Exist['alruser']['id']."';");
session_start();
$SESSION        = new Session();
$SESSION->CreateSession($Exist['alruser']['id'], $Exist['alruser']['username'], $Exist['alruser']['id_planet'], $UNI, $Exist['alruser']['authlevel'], $Exist['alruser']['dpath']);
redirectTo("game.php?page=overview");
}

$Caracters = "aazertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN1234567890";
$Count = strlen($Caracters);
$Taille = 8;
$NewPass = "";
for($i = 0; $i < $Taille; $i ++) {
$CaracterBoucle = rand ( 0, $Count - 1 );
$NewPass .= substr ( $Caracters, $CaracterBoucle, 1 );
}

$UserName = $db->sql_escape($me['name']);
$UserIP = $_SERVER["REMOTE_ADDR"];
$UserPass = md5($NewPass);
$IfNameExist = false;
$i = "(1)";

while(!$IfNameExist)
{
$Exist['userv'] = $db->uniquequery("SELECT username FROM ".USERS." WHERE username = '".$UserName."' AND `universe` = '".$UNI."';");
$Exist['valid'] = $db->uniquequery("SELECT username FROM ".USERS_VALID." WHERE username = '".$UserName."' AND `universe` = '".$UNI."';");
if(!isset($Exist['userv']) && !isset($Exist['valid']))
$IfNameExist = true;
else
$UserName = $i.$UserName;
}

$SQL = "INSERT INTO ".USERS." SET ";
$SQL .= "`username` = '" .$db->sql_escape($UserName)."', ";
$SQL .= "`universe` = '" .$UNI."', ";
$SQL .= "`email` = '" . $UserMail . "', ";
$SQL .= "`email_2` = '" . $UserMail . "', ";
$SQL .= "`ip_at_reg` = '" . $UserIP . "', ";
$SQL .= "`id_planet` = '0', ";
$SQL .= "`onlinetime` = '".TIMESTAMP."', ";
$SQL .= "`register_time` = '".TIMESTAMP."', ";
$SQL .= "`password` = '" . $UserPass . "', ";
$SQL .= "`lang` = '".$LANG->GetUser()."', ";
$SQL .= "`dpath` = '".DEFAULT_THEME."', ";
$SQL .= "`darkmatter` = '".BUILD_FB_DARKMATTER."', ";
$SQL .= "`fb_id` = '" . $uid . "', ";
$SQL .= "`uctime`= '0';";
$db->query($SQL);

if($CONF['mail_active'] == 1)
{
$MailSubject = sprintf($LNG['reg_mail_reg_done'], $CONF['game_name']);
$MailRAW = file_get_contents("./language/".$CONF['lang']."/email/email_reg_done.txt");
$MailContent = sprintf($MailRAW, $UserName, $CONF['game_name']);
MailSend($UserMail, $UserName, $MailSubject, $MailContent);
$MailRAW = file_get_contents("./language/".$CONF['lang']."/email/email_lost_password.txt");
$MailContent = sprintf($MailRAW, $ExistMail['username'], $CONF['game_name'], $NewPass, "http://".$_SERVER['SERVER_NAME'].$_SERVER["PHP_SELF"]);
MailSend($UserMail, $UserName, $LNG['mail_title'], $MailContent);
}

$NewUser = $db->GetInsertID();

$LastSettedGalaxyPos = $CONF['LastSettedGalaxyPos'];
$LastSettedSystemPos = $CONF['LastSettedSystemPos'];
$LastSettedPlanetPos = $CONF['LastSettedPlanetPos'];
require_once(ROOT_PATH.'includes/functions/CreateOnePlanetRecord.php');
$PlanetID = false;

while ($PlanetID === false) {
$Planet = mt_rand(4, 12);
if ($LastSettedPlanetPos < 3) {
$LastSettedPlanetPos += 1;
} else {
if ($LastSettedSystemPos == MAX_SYSTEM_IN_GALAXY) {
$LastSettedGalaxyPos += 1;
$LastSettedSystemPos = 1;
$LastSettedPlanetPos = 1;
} else {
$LastSettedSystemPos += 1;
$LastSettedPlanetPos = 1;
}
}

$PlanetID = CreateOnePlanetRecord($LastSettedGalaxyPos, $LastSettedSystemPos, $Planet, $UNI, $NewUser, $UserPlanet, true);
}

$SQL = "UPDATE " .USERS." SET ";
$SQL .= "`id_planet` = '".$PlanetID."', ";
$SQL .= "`galaxy` = '".$LastSettedGalaxyPos."', ";
$SQL .= "`system` = '".$LastSettedSystemPos."', ";
$SQL .= "`planet` = '".$Planet."' ";
$SQL .= "WHERE ";
$SQL .= "`id` = '".$NewUser."' ";
$SQL .= "LIMIT 1;";
$SQL .= "INSERT INTO ".STATPOINTS." (`id_owner`, `id_ally`, `stat_type`, `tech_rank`, `tech_old_rank`, `tech_points`, `tech_count`, `build_rank`, `build_old_rank`, `build_points`, `build_count`, `defs_rank`, `defs_old_rank`, `defs_points`, `defs_count`, `fleet_rank`, `fleet_old_rank`, `fleet_points`, `fleet_count`, `total_rank`, `total_old_rank`, `total_points`, `total_count`) VALUES (".$NewUser.", 0, 1, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, 1, 0, 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0);";
$db->multi_query ( $SQL );

$from = $LNG ['welcome_message_from'];
$Subject = $LNG ['welcome_message_subject'];
$message = sprintf($LNG['welcome_message_content'], $CONF['game_name']);
SendSimpleMessage($NewUser, 1, $Time, 1, $from, $Subject, $message );

update_config(array('LastSettedGalaxyPos' => $LastSettedGalaxyPos, 'LastSettedSystemPos' => $LastSettedSystemPos, 'LastSettedPlanetPos' => $LastSettedPlanetPos, 'users_amount' => $CONF['users_amount'] + 1), false, $UNI);
session_start();
$SESSION        = new Session();
$SESSION->CreateSession($NewUser, $UserName, $PlanetID, $UNI);
redirectTo("game.php?page=overview");
}
break;
case 'lostpassword':
if ($mode == "send") {
$USERmail = request_var('email', '');
$Universe = request_var('universe', 0);
$ExistMail = $db->uniquequery("SELECT `username` FROM ".USERS." WHERE `email` = '".$db->sql_escape($USERmail)."' AND `universe` = '".$Universe."';");
if (empty($ExistMail['username'])) {
$template->message($LNG['mail_not_exist'], "index.php?page=lostpassword&lang=".$LANG->getUser(), 3, true);
} else {
$Caracters = "aazertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN1234567890";
$Count = strlen($Caracters);
$Taille = 8;
$NewPass = "";
for($i = 0; $i < $Taille; $i ++) {
$CaracterBoucle = rand ( 0, $Count - 1 );
$NewPass .= substr ( $Caracters, $CaracterBoucle, 1 );
}

$MailRAW = file_get_contents("./language/".$CONF['lang']."/email/email_lost_password.txt");
$MailContent = sprintf($MailRAW, $ExistMail['username'], $CONF['game_name'], $NewPass, "http://".$_SERVER['SERVER_NAME'].$_SERVER["PHP_SELF"]);

$Mail = MailSend($USERmail, $ExistMail['username'], $LNG['mail_title'], $MailContent);

if(true === true)
{
$db->query("UPDATE ".USERS." SET `password` ='" . md5($NewPass) . "' WHERE `username` = '".$ExistMail['username']."' AND `universe` = '".$Universe."';");
$template->message($LNG['mail_sended'], "./?lang=".$LANG->getUser(), 5, true);
} else {
$template->message($LNG['mail_sended_fail'], "./?lang=".$LANG->getUser(), 5, true);
}

}
} else {
$AvailableUnis[$CONF['uni']] = $CONF['game_name'].($CONF['game_disable'] == 0 ? $LNG['uni_closed'] : '');
$Query = $db->query("SELECT `uni`, `game_disable`, `game_name` FROM ".CONFIG." WHERE `uni` != '".$UNI."' ORDER BY `uni` ASC;");
while($Unis = $db->fetch_array($Query)) {
$AvailableUnis[$Unis['uni']] = $Unis['game_name'].($Unis['game_disable'] == 0 ? $LNG['uni_closed'] : '');
}
ksort($AvailableUnis);
$year = date(Y);
$asd = "xNova Revolution";
$template->assign_vars(array(
'email' => $LNG['email'],
'uni_reg' => $LNG['uni_reg'],
'send' => $LNG['send'],
'AvailableUnis' => $AvailableUnis,
'chose_a_uni' => $LNG['chose_a_uni'],
'lost_pass_title' => $LNG['lost_pass_title'],
'year' => $year,
'asd' => $asd,
));
$template->show('lostpassword.tpl');
}
break;
case 'reg' :
if ($CONF['reg_closed'] == 1){
$year = date(Y);
$asd = "xNova Revolution";
$template->assign_vars(array(
'closed' => $LNG['reg_closed'],
'info' => $LNG['info'],
'year' => $year,
'asd' => $asd,
));
$template->show('registry_closed.tpl');
exit;
}
switch ($mode) {
case 'send' :
$UserPass = request_var('password', '');
$UserPass2 = request_var('password2', '');
$UserName = request_var('character', '', UTF8_SUPPORT);
$UserPlanet = request_var('planet', '', UTF8_SUPPORT);
$UserEmail = request_var('email', '');
$UserEmail2 = request_var('email2', '');
$agbrules = request_var('rgt', '');
$UserLang = request_var('lang', '');
$Universe = request_var('universe', 0);

if ($CONF['capaktiv'] === '1') {
require_once('includes/libs/reCAPTCHA/recaptchalib.php');
$resp = recaptcha_check_answer($CONF['capprivate'], $_SERVER['REMOTE_ADDR'], $_REQUEST['recaptcha_challenge_field'], $_REQUEST['recaptcha_response_field']);
if (!$resp->is_valid)
$errors .= $LNG['wrong_captcha'];
}

$Exist['userv'] = $db->uniquequery("SELECT username, email FROM ".USERS." WHERE `universe` = '".$Universe."' AND (username = '".$db->sql_escape($UserName)."' OR email = '".$db->sql_escape($UserEmail)."');");
$Exist['valid'] = $db->uniquequery("SELECT username, email FROM ".USERS_VALID." WHERE `universe` = '".$Universe."' AND (username = '".$db->sql_escape($UserName)."' OR email = '".$db->sql_escape($UserEmail)."');");

$errors = '';
$errors    .= !ValidateAddress($UserEmail) ? $LNG['invalid_mail_adress'] : '';
$errors    .= empty($UserName) ? $LNG['empty_user_field'] : '';
$errors    .= empty($UserPlanet) ? $LNG['empty_planet_field'] : '';
$errors    .= !isset($UserPass{5}) ? $LNG['password_lenght_error'] : '';
$errors    .= $UserPass != $UserPass2 ? $LNG['different_passwords'] : '';
$errors    .= $UserEmail != $UserEmail2 ? $LNG['different_mails'] : '';
$errors    .= $agbrules != 'on' ? sprintf($LNG['terms_and_conditions'], $LANG->getUser()) : '';
$errors    .= (isset($Exist['userv']['username']) || isset($Exist['valid']['username']) && ($UserName == $Exist['userv']['username'] || $UserName == $Exist['valid']['username'])) ? $LNG['user_already_exists'] : '';
$errors    .= (isset($Exist['userv']['email']) || isset($Exist['valid']['email'])) && ($UserEmail == $Exist['userv']['email'] || $UserEmail == $Exist['valid']['email']) ? $LNG['mail_already_exists'] : '';

if (!CheckName($UserName))
$errors .= (UTF8_SUPPORT) ? $LNG['user_field_no_space'] : $LNG['user_field_no_alphanumeric'];

if (!CheckName($UserPlanet))
$errors .= (UTF8_SUPPORT) ? $LNG['planet_field_no_space'] : $LNG['planet_field_no_alphanumeric'];

if (!empty($errors)) {
$template->message($errors, '?page=reg&lang='.$LANG->getUser(), 3, true);
exit;
}

$md5newpass = md5($UserPass);

$clef = uniqid('2m');

$SQL = "INSERT INTO ".USERS_VALID." SET ";
$SQL .= "`username` = '".$db->sql_escape($UserName)."', ";
$SQL .= "`email` = '".$db->sql_escape($UserEmail)."', ";
$SQL .= "`lang` = '".$db->sql_escape($UserLang)."', ";
$SQL .= "`planet` = '".$db->sql_escape($UserPlanet)."', ";
$SQL .= "`date` = '".TIMESTAMP."', ";
$SQL .= "`cle` = '".$clef."', ";
$SQL .= "`universe` = '".$Universe."', ";
$SQL .= "`password` = '".$md5newpass."', ";
$SQL .= "`ip` = '".$_SERVER['REMOTE_ADDR']."'; ";
$db->query($SQL);

if($CONF['user_valid'] == 0 || $CONF['mail_active'] == 0) {
redirectTo("index.php?page=reg&mode=valid&lang=".$UserLang."&clef=".$clef);
} else {
$MailSubject = $LNG['reg_mail_message_pass'];
$MailRAW = file_get_contents("./language/".$UserLang."/email/email_vaild_reg.txt");
$MailContent = sprintf($MailRAW, $UserName, $CONF['game_name'], "http://".$_SERVER['SERVER_NAME'].$_SERVER["PHP_SELF"], $clef, $UserPass, $CONF['smtp_sendmail'], $UserLang);

MailSend($UserEmail, $UserName, $MailSubject, $MailContent);
$template->message($LNG['reg_completed'], '?lang='.$UserLang, 10, true);
}
break;
case 'valid' :
$pseudo = request_var('id', '');
$clef = request_var('clef', '');
$admin = request_var('admin', 0);
$Valider = $db->uniquequery("SELECT `username`, `password`, `email`, `ip`, `planet`, `lang`, `universe` FROM ".USERS_VALID." WHERE `cle` = '".$db->sql_escape($clef)."';");
if(!isset($Valider))
redirectTo('index.php?page=reg');

$UserName = $Valider['username'];
$UserPass = $Valider['password'];
$UserMail = $Valider['email'];
$UserIP = $Valider['ip'];
$UserPlanet = $Valider['planet'];
$UserLang = $Valider['lang'];
$UserUni = $Valider['universe'];
$CONF = $db->uniquequery("SELECT `initial_fields`, `LastSettedGalaxyPos`, `LastSettedSystemPos`, `LastSettedPlanetPos`, `mail_active`, `mail_use`, `smail_path`, `smtp_host`, `smtp_port`, `smtp_user`, `smtp_pass`, `smtp_ssl`, `smtp_sendmail`, `game_name`, `users_amount`, `metal_basic_income`, `crystal_basic_income`, `deuterium_basic_income` FROM ".CONFIG." WHERE `uni` = ".$UserUni.";");

$SQL = "INSERT INTO " . USERS . " SET ";
$SQL .= "`username` = '".$UserName . "', ";
$SQL .= "`universe` = '".$UserUni . "', ";
$SQL .= "`email` = '".$UserMail."', ";
$SQL .= "`email_2` = '".$UserMail."', ";
$SQL .= "`lang` = '".$UserLang."', ";
$SQL .= "`ip_at_reg` = '".$UserIP."', ";
$SQL .= "`id_planet` = '0', ";
$SQL .= "`onlinetime` = '".TIMESTAMP."', ";
$SQL .= "`register_time` = '".TIMESTAMP. "', ";
$SQL .= "`password` = '".$UserPass."', ";
$SQL .= "`dpath` = '".DEFAULT_THEME."', ";
$SQL .= "`darkmatter` = '".BUILD_DARKMATTER."', ";
$SQL .= "`uctime`= '0';";
$db->query($SQL);
$NewUser = $db->GetInsertID();
if($CONF['mail_active'] == 1) {
$MailSubject = sprintf($LNG['reg_mail_reg_done'], $CONF['game_name']);
$MailRAW = file_get_contents("./language/".$UserLang."/email/email_reg_done.txt");
$MailContent = sprintf($MailRAW, $UserName, $CONF['game_name']);
MailSend($UserMail, $UserName, $MailSubject, $MailContent);
}
$LastSettedGalaxyPos = $CONF['LastSettedGalaxyPos'];
$LastSettedSystemPos = $CONF['LastSettedSystemPos'];
$LastSettedPlanetPos = $CONF['LastSettedPlanetPos'];
require_once(ROOT_PATH.'includes/functions/CreateOnePlanetRecord.php');
$PlanetID = false;

while ($PlanetID === false) {
$Planet = mt_rand(4, 12);
if ($LastSettedPlanetPos < 3) {
$LastSettedPlanetPos += 1;
} else {
if ($LastSettedSystemPos == MAX_SYSTEM_IN_GALAXY) {
$LastSettedGalaxyPos += 1;
$LastSettedSystemPos = 1;
$LastSettedPlanetPos = 1;
} else {
$LastSettedSystemPos += 1;
$LastSettedPlanetPos = 1;
}
}

$PlanetID = CreateOnePlanetRecord($LastSettedGalaxyPos, $LastSettedSystemPos, $Planet, $UserUni, $NewUser, $UserPlanet, true);
}

$SQL = "DELETE FROM ".USERS_VALID." WHERE `cle` = '".$db->sql_escape($clef)."';";
$SQL .= "UPDATE ".USERS." SET ";
$SQL .= "`id_planet` = '".$PlanetID."', ";
$SQL .= "`galaxy` = '".$LastSettedGalaxyPos."', ";
$SQL .= "`system` = '".$LastSettedSystemPos."', ";
$SQL .= "`planet` = '".$Planet."' ";
$SQL .= "WHERE ";
$SQL .= "`id` = '".$NewUser."' ";
$SQL .= "LIMIT 1;";
$SQL .= "INSERT INTO ".STATPOINTS." (`id_owner`, `id_ally`, `stat_type`, `universe`, `tech_rank`, `tech_old_rank`, `tech_points`, `tech_count`, `build_rank`, `build_old_rank`, `build_points`, `build_count`, `defs_rank`, `defs_old_rank`, `defs_points`, `defs_count`, `fleet_rank`, `fleet_old_rank`, `fleet_points`, `fleet_count`, `total_rank`, `total_old_rank`, `total_points`, `total_count`) VALUES (".$NewUser.", 0, 1, ".$UserUni.", '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0);";
$db->multi_query($SQL);

$from = $LNG['welcome_message_from'];
$Subject = $LNG['welcome_message_subject'];
$message = sprintf($LNG['welcome_message_content'], $CONF['game_name']);
SendSimpleMessage($NewUser, 1, $Time, 1, $from, $Subject, $message);

update_config(array('users_amount' => $CONF['users_amount'] + 1, 'LastSettedGalaxyPos' => $LastSettedGalaxyPos, 'LastSettedSystemPos' => $LastSettedSystemPos, 'LastSettedPlanetPos' => $LastSettedPlanetPos), false, $UserUni);
if ($admin == 1) {
echo sprintf($LNG['user_active'], $UserName);
} else {
session_start();
$SESSION        = new Session();
$SESSION->CreateSession($NewUser, $UserName, $PlanetID, $UserUni);

redirectTo("game.php?page=overview");
}
break;
default:
$AvailableUnis[$CONF['uni']] = $CONF['game_name'].($CONF['game_disable'] == 0 ? $LNG['uni_closed'] : '');
$Query = $db->query("SELECT `uni`, `game_disable`, `game_name` FROM ".CONFIG." WHERE `uni` != '".$UNI."' ORDER BY `uni` ASC;");
while($Unis = $db->fetch_array($Query)) {
$AvailableUnis[$Unis['uni']] = $Unis['game_name'].($Unis['game_disable'] == 0 ? $LNG['uni_closed'] : '');
}
ksort($AvailableUnis);
$year = date(Y);
    $asd = "xNova Revolution";
$template->assign_vars(array(
'server_message_reg' => $LNG['server_message_reg'],
'register_at_reg' => $LNG['register_at_reg'],
'user_reg' => $LNG['user_reg'],
'pass_reg' => $LNG['pass_reg'],
'pass2_reg' => $LNG['pass2_reg'],
'email_reg' => $LNG['email_reg'],
'email2_reg' => $LNG['email2_reg'],
'planet_reg' => $LNG['planet_reg'],
'lang_reg' => $LNG['lang_reg'],
                    'Race'                          => $LNG['Race'],
                    'id_race_1'                     => $LNG['id_race_1'],
                    'id_race_2'                     => $LNG['id_race_2'],
                    'id_race_3'                     => $LNG['id_race_3'],
                    'id_race_4'                     => $LNG['id_race_4'],
'captcha_reg' => $LNG['captcha_reg'],
'register_now' => $LNG['register_now'],
'accept_terms_and_conditions' => sprintf($LNG['accept_terms_and_conditions'], $LANG->getUser()),
'captcha_reload' => $LNG['captcha_reload'],
'captcha_help' => $LNG['captcha_help'],
'captcha_get_image' => $LNG['captcha_get_image'],
'captcha_reload' => $LNG['captcha_reload'],
'captcha_get_audio' => $LNG['captcha_get_audio'],
'AvailableUnis' => $AvailableUnis,
'AvailableLangs' => $LANG->getAllowedLangs(false),
'uni_reg' => $LNG['uni_reg'],
'chose_a_uni' => $LNG['chose_a_uni'],
'register' => $LNG['register'],
'send' => $LNG['send'],
'uni_closed' => $LNG['uni_closed'],
'year' => $year,
'asd' => $asd,
));
$template->show('registry_form.tpl');
break;
}
break;
case 'agb' :
$template->assign_vars(array(
'agb' => $LNG['agb'],
'agb_overview' => $LNG['agb_overview'],
));
$template->show('index_agb.tpl');
break;
case 'rules' :
$template->assign_vars(array(
'rules' => $LNG['rules'],
'rules_overview' => $LNG['rules_overview'],
'rules_info1' => sprintf($LNG['rules_info1'], $CONF['forum_url']),
'rules_info2' => $LNG['rules_info2'],
));
$template->show('index_rules.tpl');
break;
case 'screens':
$template->assign_vars(array(
'screenshots'           => $LNG['screenshots'],
));
$template->show('index_screens.tpl');
break;
case 'top100' :
$Universe = request_var('universe', 1);
$top = $db->query("SELECT * FROM ".TOPKB." WHERE `universe` = '".$Universe."' ORDER BY gesamtunits DESC LIMIT 100;");
while($data = $db->fetch_array($top)) {
$TopKBList[] = array(
'result' => $data['fleetresult'],
'time' => date("D d M H:i:s", $data['time']),
'units' => pretty_number($data['gesamtunits']),
'rid' => $data['rid'],
'attacker' => $data['angreifer'],
'defender' => $data['defender'],
'result' => $data['fleetresult'],
);
}

$AvailableUnis[$CONF['uni']] = $CONF['game_name'].($CONF['game_disable'] == 0 ? $LNG['uni_closed'] : '');
$Query = $db->query("SELECT `uni`, `game_disable`, `game_name` FROM ".CONFIG." WHERE `uni` != '".$UNI."' ORDER BY `uni` ASC;");
while($Unis = $db->fetch_array($Query)) {
$AvailableUnis[$Unis['uni']] = $Unis['game_name'].($Unis['game_disable'] == 0 ? $LNG['uni_closed'] : '');
}
ksort($AvailableUnis);

$template->assign_vars(array(
'AvailableUnis' => $AvailableUnis,
'ThisUni' => $ThisUni,
'tkb_units' => $LNG['tkb_units'],
'tkb_datum' => $LNG['tkb_datum'],
'tkb_owners' => $LNG['tkb_owners'],
'tkb_platz' => $LNG['tkb_platz'],
'tkb_top' => $LNG['tkb_top'],
'tkb_gratz' => $LNG['tkb_gratz'],
'tkb_legende' => $LNG['tkb_legende'],
'tkb_gewinner' => $LNG['tkb_gewinner'],
'tkb_verlierer' => $LNG['tkb_verlierer'],
'TopKBList' => $TopKBList,
));

$template->show('index_top100.tpl');
break;
case 'pranger' :
$Universe = request_var('universe', 1);
$PrangerRAW = $db->query("SELECT * FROM ".BANNED." WHERE `universe` = '".$Universe."' ORDER BY `id`;");

while($u = $db->fetch_array($PrangerRAW))
{
$PrangerList[] = array(
'player' => $u['who'],
'theme' => $u['theme'],
'from' => date("d. M Y H:i:s",$u['time']),
'to' => date("d. M Y H:i:s",$u['longer']),
'admin' => $u['author'],
'mail' => $u['email'],
'info' => sprintf($LNG['bn_writemail'], $u['author']),
);
}

$AvailableUnis[$CONF['uni']] = $CONF['game_name'].($CONF['game_disable'] == 0 ? $LNG['uni_closed'] : '');
$Query = $db->query("SELECT `uni`, `game_disable`, `game_name` FROM ".CONFIG." WHERE `uni` != '".$UNI."' ORDER BY `uni` ASC;");
while($Unis = $db->fetch_array($Query)) {
$AvailableUnis[$Unis['uni']] = $Unis['game_name'].($Unis['game_disable'] == 0 ? $LNG['uni_closed'] : '');
}
ksort($AvailableUnis);

$template->assign_vars(array(
'AvailableUnis' => $AvailableUnis,
'ThisUni' => $ThisUni,
'PrangerList' => $PrangerList,
'bn_no_players_banned' => $LNG['bn_no_players_banned'],
'bn_exists' => $LNG['bn_exists'],
'bn_players_banned' => $LNG['bn_players_banned'],
'bn_players_banned_list' => $LNG['bn_players_banned_list'],
'bn_player' => $LNG['bn_player'],
'bn_reason' => $LNG['bn_reason'],
'bn_from' => $LNG['bn_from'],
'bn_until' => $LNG['bn_until'],
'bn_by' => $LNG['bn_by'],
));

$template->show('index_pranger.tpl');
break;
case 'disclamer':
$template->assign_vars(array(
'disclamer' => $LNG['disclamer'],
'disclamer_name' => $LNG['disclamer_name'],
'disclamer_adress' => $LNG['disclamer_adress'],
'disclamer_tel' => $LNG['disclamer_tel'],
'disclamer_email' => $LNG['disclamer_email'],
));
$template->show('index_disclamer.tpl');
break;
case 'news' :
$NewsRAW = $db->query ("SELECT date,title,text,user FROM ".NEWS." ORDER BY id DESC;");
while ($NewsRow = $db->fetch_array($NewsRAW)) {
$NewsList[] = array(
'title' => $NewsRow['title'],
'from' => sprintf($LNG['news_from'], date("d. M Y H:i:s", $NewsRow['date']), $NewsRow['user']),
'text' => makebr($NewsRow['text']),
);
}
$template->assign_vars(array(
'NewsList' => $NewsList,
'news_overview' => $LNG['news_overview'],
'news_does_not_exist' => $LNG['news_does_not_exist'],
));

$template->show('index_news.tpl');
break;
default :
if ($_POST) {
$luser = request_var('username', '', UTF8_SUPPORT);
$lpass = request_var('password', '', UTF8_SUPPORT);
$luniv = request_var('universe', 1);
$login = $db->uniquequery("SELECT `id`, `username`, `dpath`, `authlevel`, `id_planet` FROM ".USERS." WHERE `username` = '".$db->sql_escape($luser)."' AND `universe` = '".$luniv."' AND `password` = '".md5($lpass)."';");

if (isset($login)) {
session_start();
$SESSION        = new Session();
$SESSION->CreateSession($login['id'], $login['username'], $login['id_planet'], $luniv, $login['authlevel'], $login['dpath']);

redirectTo("game.php?page=overview");
} else {
redirectTo('index.php?code=1');
}
} else {
$AvailableUnis[$CONF['uni']] = $CONF['game_name'].($CONF['game_disable'] == 0 ? $LNG['uni_closed'] : '');
$Query = $db->query("SELECT `uni`, `game_disable`, `game_name` FROM ".CONFIG." WHERE `uni` != '".$UNI."' ORDER BY `uni` ASC;");
while($Unis = $db->fetch_array($Query)) {
$AvailableUnis[$Unis['uni']] = $Unis['game_name'].($Unis['game_disable'] == 0 ? $LNG['uni_closed'] : '');
}
ksort($AvailableUnis);
$Code = request_var('code', 0);
if(!empty($Code)) {
$template->assign_vars(array(
'code' => $LNG['login_error_'.$Code],
));
}
$year = date(Y);
$asd = "xNova Revolution";
$template->assign_vars(array(
'AvailableUnis' => $AvailableUnis,
'welcome_to' => $LNG['welcome_to'],
'server_description' => sprintf($LNG['server_description'], $CONF['game_name']),
'server_infos' => $LNG['server_infos'],
'login' => $LNG['login'],
'login_info' => sprintf($LNG['login_info'], $LANG->getUser()),
'user' => $LNG['user'],
'pass' => $LNG['pass'],
'lostpassword' => $LNG['lostpassword'],
'register_now' => $LNG['register_now'],
'screenshots' => $LNG['screenshots'],
'chose_a_uni' => $LNG['chose_a_uni'],
'universe' => $LNG['universe'],
'year'     => $year,
'asd'                   => $asd,
));
$template->show('index_body.tpl');
}
break;
}
?>

Le suivant et mon var.php rajout ligne 130

<?php

/**
 *  2Moons
 *  Copyright (C) 2011  Slaver
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @package 2Moons
 * @author Slaver <slaver7@gmail.com>
 * @copyright 2009 Lucky <lucky@xgproyect.net> (XGProyecto)
 * @copyright 2011 Slaver <slaver7@gmail.com> (Fork/2Moons)
 * @license http://www.gnu.org/licenses/gpl.html GNU GPLv3 License
 * @version 1.3.5 (2011-04-22)
 * @info $Id: vars.php 1857 2011-04-29 14:45:51Z slaver7 $
 * @link http://code.google.com/p/2moons/
 */

$resource = array(
1 => "metal_mine",
2 => "crystal_mine",
3 => "deuterium_sintetizer",
4 => "solar_plant",
6 => "university",
12 => "fusion_plant",
14 => "robot_factory",
15 => "nano_factory",
21 => "hangar",
22 => "metal_store",
23 => "crystal_store",
24 => "deuterium_store",
31 => "laboratory",
33 => "terraformer",
34 => "ally_deposit",
41 => "mondbasis",
42 => "phalanx",
43 => "sprungtor",
44 => "silo",

106 => "spy_tech",
108 => "computer_tech",
109 => "military_tech",
110 => "defence_tech",
111 => "shield_tech",
113 => "energy_tech",
114 => "hyperspace_tech",
115 => "combustion_tech",
117 => "impulse_motor_tech",
118 => "hyperspace_motor_tech",
120 => "laser_tech",
121 => "ionic_tech",
122 => "buster_tech",
123 => "intergalactic_tech",
124 => "expedition_tech",
131 => "metal_proc_tech",
132 => "crystal_proc_tech",
133 => "deuterium_proc_tech",
199 => "graviton_tech",

202 => "small_ship_cargo",
203 => "big_ship_cargo",
204 => "light_hunter",
205 => "heavy_hunter",
206 => "crusher",
207 => "battle_ship",
208 => "colonizer",
209 => "recycler",
210 => "spy_sonde",
211 => "bomber_ship",
212 => "solar_satelit",
213 => "destructor",
214 => "dearth_star",
215 => "battleship",
216 => "lune_noir",
217 => "ev_transporter",
218 => "star_crasher",
219 => "giga_recykler",
220 => "dm_ship",

401 => "misil_launcher",
402 => "small_laser",
403 => "big_laser",
404 => "gauss_canyon",
405 => "ionic_canyon",
406 => "buster_canyon",
407 => "small_protection_shield",
408 => "big_protection_shield",
409 => "planet_protector",
410 => "graviton_canyon",
411 => "orbital_station",

502 => "interceptor_misil",
503 => "interplanetary_misil",

601 => "rpg_geologue",
602 => "rpg_amiral",
603 => "rpg_ingenieur",
604 => "rpg_technocrate",
605 => "rpg_constructeur",
606 => "rpg_scientifique",
607 => "rpg_stockeur",
608 => "rpg_defenseur",
609 => "rpg_bunker",
610 => "rpg_espion",
611 => "rpg_commandant",
612 => "rpg_destructeur",
613 => "rpg_general",
614 => "rpg_raideur",
615 => "rpg_empereur",

700 => "dm_attack",
701 => "dm_defensive",
702 => "dm_buildtime",
703 => "dm_resource",
704 => "dm_energie",
705 => "dm_researchtime",
706 => "dm_fleettime",
    
    1000 => "humain",
    1001 => "tokra",
    1002 => "goauld",
    1003 => "asgard",
);

$requeriments = array(
6 => array(  14 =>  20, 31  =>  22, 15 => 4, 108 => 12, 123 => 3),
12 => array(   3 =>   5, 113 =>   3),
15 => array(  14 =>  10, 108 =>  10),
21 => array(  14 =>   2),
33 => array(  15 =>   1, 113 =>  12),

42 => array(  41 =>   1),
43 => array(  41 =>   1, 114 =>   7),
44 => array(  21 =>   1),

106 => array(  31 =>   3),
108 => array(  31 =>   1),
109 => array(  31 =>   4),
110 => array( 113 =>   3,  31 =>   6),
111 => array(  31 =>   2),
113 => array(  31 =>   1),
114 => array( 113 =>   5, 110 =>   5,  31 =>   7),
115 => array( 113 =>   1,  31 =>   1),
117 => array( 113 =>   1,  31 =>   2),
118 => array( 114 =>   3,  31 =>   7),
120 => array(  31 =>   1, 113 =>   2),
121 => array(  31 =>   4, 120 =>   5, 113 =>   4),
122 => array(  31 =>   5, 113 =>   8, 120 =>  10, 121 =>   5),
123 => array(  31 =>  10, 108 =>   8, 114 =>   8),
124 => array( 106 =>   3, 117 =>   3, 31 =>   3),
131 => array(  31 =>   8, 113 =>   5),
132 => array(  31 =>   8, 113 =>   5),
133 => array(  31 =>   8, 113 =>   5),
199 => array(  31 =>  12),

202 => array(  21 =>   2, 115 =>   2),
203 => array(  21 =>   4, 115 =>   6),
204 => array(  21 =>   1, 115 =>   1),
205 => array(  21 =>   3, 111 =>   2, 117 =>   2),
206 => array(  21 =>   5, 117 =>   4, 121 =>   2),
207 => array(  21 =>   7, 118 =>   4),
208 => array(  21 =>   4, 117 =>   3),
209 => array(  21 =>   4, 115 =>   6, 110 =>   2),
210 => array(  21 =>   3, 115 =>   3, 106 =>   2),
211 => array( 117 =>   6,  21 =>   8, 122 =>   5),
212 => array(  21 =>   1),
213 => array(  21 =>   9, 118 =>   6, 114 =>   5),
214 => array(  21 =>  12, 118 =>   7, 114 =>   6, 199 =>   1),
215 => array( 114 =>   5, 120 =>  12, 118 =>   5,  21 =>   8),
216 => array( 106 =>  12,  21 =>  15, 109 =>  14, 110 => 14, 111 => 15, 114 => 10, 120 => 20, 199 => 3),
217 => array( 111 =>  10,  21 =>  14, 114 =>  10, 110 => 14, 117 => 15),
218 => array(  21 =>  18, 109 =>  20, 110 =>  20, 111 => 20, 114 => 15, 118 => 20, 120 => 25, 199 => 8),
219 => array(  21 =>  15, 109 =>  15, 110 =>  15, 111 => 15, 118 => 8),
220 => array(  21 =>   9, 114 =>   5, 118 =>   6),

401 => array(  21 =>   1),
402 => array( 113 =>   1,  21 =>   2, 120 =>   3),
403 => array( 113 =>   3,  21 =>   4, 120 =>   6),
404 => array(  21 =>   6, 113 =>   6, 109 =>   3, 110 =>   1),
405 => array(  21 =>   4, 121 =>   4),
406 => array(  21 =>   8, 122 =>   7),
407 => array( 110 =>   2,  21 =>   1),
408 => array( 110 =>   6,  21 =>   6),
409 => array( 609 =>   1),
410 => array( 199 =>   7,  21 =>  18, 109 => 20),
411 => array( 199 =>  10, 110 =>  22, 122 =>  20, 108 => 15, 111 => 25, 113 => 20, 608 => 2, 21 => 20),


502 => array(  44 =>   2,  21 =>   1),
503 => array(  44 =>   4,  21 =>   1, 117 =>   1),

603 => array( 601 =>   5),
604 => array( 602 =>   5),
605 => array( 601 =>  10, 603 =>   2),
606 => array( 601 =>  10, 603 =>   2),
607 => array( 605 =>   1),
608 => array( 606 =>   1),
609 => array( 601 =>  20, 603 =>  10, 605 =>   3, 606 =>   3, 607 =>   2, 608 =>   2),
610 => array( 602 =>  10, 604 =>   5),
611 => array( 602 =>  10, 604 =>   5),
612 => array( 610 =>   1),
613 => array( 611 =>   1),
614 => array( 602 =>  20, 604 =>  10, 610 =>   2, 611 =>   2, 612 =>   1, 613 =>   3),
615 => array( 614 =>   1, 609 =>   1),
);

$pricelist = array(
1 => array('metal' =>      60, 'crystal' =>      15, 'deuterium' =>       0, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' => 3/2),
2 => array('metal' =>      48, 'crystal' =>      24, 'deuterium' =>       0, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' => 1.6),
3 => array('metal' =>     225, 'crystal' =>      75, 'deuterium' =>       0, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' => 3/2),
4 => array('metal' =>      75, 'crystal' =>      30, 'deuterium' =>       0, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' => 3/2),
6 => array('metal' =>100000000,'crystal' =>50000000, 'deuterium' =>25000000, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' => 2.2),
12 => array('metal' =>     900, 'crystal' =>     360, 'deuterium' =>     180, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' => 1.8),
14 => array('metal' =>     400, 'crystal' =>     120, 'deuterium' =>     200, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2),
15 => array('metal' => 1000000, 'crystal' =>  500000, 'deuterium' =>  100000, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2),
21 => array('metal' =>     400, 'crystal' =>     200, 'deuterium' =>     100, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2),
22 => array('metal' =>    2000, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2),
23 => array('metal' =>    2000, 'crystal' =>    1000, 'deuterium' =>       0, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2),
24 => array('metal' =>    2000, 'crystal' =>    2000, 'deuterium' =>       0, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2),
31 => array('metal' =>     200, 'crystal' =>     400, 'deuterium' =>     200, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2),
33 => array('metal' =>       0, 'crystal' =>   50000, 'deuterium' =>  100000, 'energy_max' =>   1000, 'darkmatter' =>  0, 'factor' =>   2),
34 => array('metal' =>   20000, 'crystal' =>   40000, 'deuterium' =>       0, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2),
41 => array('metal' =>   20000, 'crystal' =>   40000, 'deuterium' =>   20000, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2),
42 => array('metal' =>   20000, 'crystal' =>   40000, 'deuterium' =>   20000, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2),
43 => array('metal' => 2000000, 'crystal' => 4000000, 'deuterium' => 2000000, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2),
44 => array('metal' =>   20000, 'crystal' =>   20000, 'deuterium' =>    1000, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2),

106 => array('metal' =>     200, 'crystal' =>    1000, 'deuterium' =>     200, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
108 => array('metal' =>       0, 'crystal' =>     400, 'deuterium' =>     600, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
109 => array('metal' =>     800, 'crystal' =>     200, 'deuterium' =>       0, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
110 => array('metal' =>     200, 'crystal' =>     600, 'deuterium' =>       0, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
111 => array('metal' =>    1000, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
113 => array('metal' =>       0, 'crystal' =>     800, 'deuterium' =>     400, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
114 => array('metal' =>       0, 'crystal' =>    4000, 'deuterium' =>    2000, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
115 => array('metal' =>     400, 'crystal' =>       0, 'deuterium' =>     600, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
117 => array('metal' =>    2000, 'crystal' =>    4000, 'deuterium' =>    600,  'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
118 => array('metal' =>   10000, 'crystal' =>   20000, 'deuterium' =>    6000, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
120 => array('metal' =>     200, 'crystal' =>     100, 'deuterium' =>       0, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
121 => array('metal' =>    1000, 'crystal' =>     300, 'deuterium' =>     100, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
122 => array('metal' =>    2000, 'crystal' =>    4000, 'deuterium' =>    1000, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
123 => array('metal' =>  240000, 'crystal' =>  400000, 'deuterium' =>  160000, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
131 => array('metal' =>     750, 'crystal' =>     500, 'deuterium' =>     250, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
132 => array('metal' =>    1000, 'crystal' =>     750, 'deuterium' =>     500, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
133 => array('metal' =>    1250, 'crystal' =>    1000, 'deuterium' =>     750, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
124 => array('metal' =>    4000, 'crystal' =>    8000, 'deuterium' =>    4000, 'energy_max' =>      0, 'darkmatter' =>  0, 'factor' =>   2, 'max' => 255),
199 => array('metal' =>       0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 300000, 'darkmatter' =>  0, 'factor' =>   3, 'max' => 255),

202 => array('metal' =>      2000, 'crystal' =>      2000, 'deuterium' =>        0, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>     10, 'consumption2' => 20  , 'speed' =>      5000, 'speed2' =>     10000, 'capacity' =>      5000, 'tech' => 4),
203 => array('metal' =>      6000, 'crystal' =>      6000, 'deuterium' =>        0, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>     50, 'consumption2' => 50  , 'speed' =>      7500, 'speed2' =>      7500, 'capacity' =>     25000, 'tech' => 1),
204 => array('metal' =>      3000, 'crystal' =>      1000, 'deuterium' =>        0, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>     20, 'consumption2' => 20  , 'speed' =>     12500, 'speed2' =>     12500, 'capacity' =>        50, 'tech' => 1),
205 => array('metal' =>      6000, 'crystal' =>      4000, 'deuterium' =>        0, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>     75, 'consumption2' => 75  , 'speed' =>     10000, 'speed2' =>     15000, 'capacity' =>       100, 'tech' => 2),
206 => array('metal' =>     20000, 'crystal' =>      7000, 'deuterium' =>     2000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>    300, 'consumption2' => 300 , 'speed' =>     15000, 'speed2' =>     15000, 'capacity' =>       800, 'tech' => 2),
207 => array('metal' =>     45000, 'crystal' =>     15000, 'deuterium' =>        0, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>    250, 'consumption2' => 250 , 'speed' =>     10000, 'speed2' =>     10000, 'capacity' =>      1500, 'tech' => 3),
208 => array('metal' =>     10000, 'crystal' =>     20000, 'deuterium' =>    10000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>   1000, 'consumption2' => 1000, 'speed' =>      2500, 'speed2' =>      2500, 'capacity' =>      7500, 'tech' => 2),
209 => array('metal' =>     10000, 'crystal' =>      6000, 'deuterium' =>     2000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>    300, 'consumption2' => 300 , 'speed' =>      2000, 'speed2' =>      2000, 'capacity' =>     20000, 'tech' => 1),
210 => array('metal' =>         0, 'crystal' =>      1000, 'deuterium' =>        0, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>      1, 'consumption2' => 1   , 'speed' => 100000000, 'speed2' => 100000000, 'capacity' =>         5, 'tech' => 1),
211 => array('metal' =>     50000, 'crystal' =>     25000, 'deuterium' =>    15000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>   1000, 'consumption2' => 1000, 'speed' =>      4000, 'speed2' =>      5000, 'capacity' =>       500, 'tech' => 5),
212 => array('metal' =>         0, 'crystal' =>      2000, 'deuterium' =>      500, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>      0, 'consumption2' => 0   , 'speed' =>         0, 'speed2' =>         0, 'capacity' =>         0, 'tech' => 0),
213 => array('metal' =>     60000, 'crystal' =>     50000, 'deuterium' =>    15000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>   1000, 'consumption2' => 1000, 'speed' =>      5000, 'speed2' =>      5000, 'capacity' =>      2000, 'tech' => 3),
214 => array('metal' =>   5000000, 'crystal' =>   4000000, 'deuterium' =>  1000000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>      1, 'consumption2' => 1   , 'speed' =>       200, 'speed2' =>       200, 'capacity' =>   1000000, 'tech' => 3),
215 => array('metal' =>     30000, 'crystal' =>     40000, 'deuterium' =>    15000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>    250, 'consumption2' => 250 , 'speed' =>     10000, 'speed2' =>     10000, 'capacity' =>       750, 'tech' => 3),
216 => array('metal' =>   8000000, 'crystal' =>   2000000, 'deuterium' =>  1500000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>    250, 'consumption2' => 250 , 'speed' =>       900, 'speed2' =>       900, 'capacity' =>  15000000, 'tech' => 3),
217 => array('metal' =>     35000, 'crystal' =>     20000, 'deuterium' =>     1500, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>     90, 'consumption2' =>     90, 'speed' =>    6000, 'speed2' =>      6000, 'capacity' => 400000000, 'tech' => 3),
218 => array('metal' => 275000000, 'crystal' => 130000000, 'deuterium' => 60000000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>  10000, 'consumption2' =>  10000, 'speed' =>      10, 'speed2' =>        10, 'capacity' =>  50000000, 'tech' => 3),
219 => array('metal' =>   1000000, 'crystal' =>    600000, 'deuterium' =>   200000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' =>    300, 'consumption2' =>    300, 'speed' =>    7500, 'speed2' =>      7500, 'capacity' => 200000000, 'tech' => 3),
220 => array('metal' =>   6000000, 'crystal' =>   7000000, 'deuterium' =>  3000000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1, 'consumption' => 100000, 'consumption2' => 100000, 'speed' =>     100, 'speed2' =>       100, 'capacity' =>   6000000, 'tech' => 3),
  
401 => array('metal' =>       2000, 'crystal' =>          0, 'deuterium' =>         0, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1 ),
402 => array('metal' =>       1500, 'crystal' =>        500, 'deuterium' =>         0, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1 ),
403 => array('metal' =>       6000, 'crystal' =>       2000, 'deuterium' =>         0, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1 ),
404 => array('metal' =>      20000, 'crystal' =>      15000, 'deuterium' =>      2000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1 ),
405 => array('metal' =>       2000, 'crystal' =>       6000, 'deuterium' =>         0, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1 ),
406 => array('metal' =>      50000, 'crystal' =>      50000, 'deuterium' =>     30000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1 ),
407 => array('metal' =>      10000, 'crystal' =>      10000, 'deuterium' =>         0, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1 ),
408 => array('metal' =>      50000, 'crystal' =>      50000, 'deuterium' =>         0, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1 ),
409 => array('metal' =>   10000000, 'crystal' =>    5000000, 'deuterium' =>   2500000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1 ),
410 => array('metal' =>   15000000, 'crystal' =>   15000000, 'deuterium' =>         0, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1 ),
411 => array('metal' => 5000000000, 'crystal' => 2000000000, 'deuterium' => 500000000, 'energy_max' => 1000000, 'darkmatter' =>  10000, 'factor' => 1 ),         

502 => array('metal' =>   8000, 'crystal' =>       0, 'deuterium' =>    2000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1 ),
503 => array('metal' =>  12500, 'crystal' =>    2500, 'deuterium' =>   10000, 'energy_max' => 0, 'darkmatter' =>  0, 'factor' => 1 ),

601 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>  20, 'info' => 0.05),
602 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>  20, 'info' => 0.05),
603 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>  10, 'info' => 0.05),
604 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>  10, 'info' => 0.05),
605 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>   3, 'info' => 0.1),
606 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>   3, 'info' => 0.1),
607 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>   2, 'info' => 0.5),
608 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>   2, 'info' => 0.25),
609 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>   1, 'info' => false),
610 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>   2, 'info' => 5),
611 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>   3, 'info' => 3),
612 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>   1, 'info' => false),
613 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>   3, 'info' => 0.10),
614 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>   1, 'info' => false),
615 => array('metal' =>      0, 'crystal' =>       0, 'deuterium' =>       0, 'energy_max' => 0, 'darkmatter' => 1000, 'factor' => 1, 'max' =>   1, 'info' => false),

700 => array('time' => 24, 'darkmatter' => 1500, 'add' => 0.1),
701 => array('time' => 24, 'darkmatter' => 1500, 'add' => 0.1),
702 => array('time' => 24, 'darkmatter' =>  750, 'add' => 0.1),
703 => array('time' => 24, 'darkmatter' => 2500, 'add' => 0.1),
704 => array('time' => 24, 'darkmatter' => 2000, 'add' => 0.1),
705 => array('time' => 24, 'darkmatter' => 1250, 'add' => 0.1),
706 => array('time' => 24, 'darkmatter' => 3000, 'add' => 0.1),
);
$CombatCaps = array(
202 => array('shield' =>      10, 'attack' =>        5, 'sd' => array (210 =>    5, 212 =>    5)),
203 => array('shield' =>      25, 'attack' =>        5, 'sd' => array (210 =>    5, 212 =>    5)),
204 => array('shield' =>      10, 'attack' =>       50, 'sd' => array (210 =>    5, 212 =>    5)),
205 => array('shield' =>      25, 'attack' =>      150, 'sd' => array (202 =>    3, 210 =>    5, 212 =>   5)),
206 => array('shield' =>      50, 'attack' =>      400, 'sd' => array (204 =>    6, 401 =>   10, 210 =>   5, 212 =>   5)),
207 => array('shield' =>     200, 'attack' =>     1000, 'sd' => array (210 =>    5, 212 =>    5)),
208 => array('shield' =>     100, 'attack' =>       50, 'sd' => array (210 =>    5, 212 =>    5)),
209 => array('shield' =>      10, 'attack' =>        1, 'sd' => array (210 =>    5, 212 =>    5)),
210 => array('shield' =>    .001, 'attack' =>     .001, 'sd' => array ()),
211 => array('shield' =>     500, 'attack' =>     1000, 'sd' => array (210 =>    5, 212 =>    5, 401 =>  20, 402 =>  20, 403 =>  10, 405 =>  10)),
212 => array('shield' =>    .001, 'attack' =>     .001, 'sd' => array ()),
213 => array('shield' =>     500, 'attack' =>     2000, 'sd' => array (210 =>    5, 212 =>    5, 215 =>   2, 402 =>  10)),
214 => array('shield' =>   50000, 'attack' =>   200000, 'sd' => array (210 => 1250, 212 => 1250, 202 => 250, 203 => 250, 208 => 250, 209 => 250, 204 => 200, 205 => 100, 206 => 33, 207 => 30, 211 => 25, 215 => 15, 213 => 5, 401 => 200, 402 => 200, 403 => 100, 404 =>  50, 405 => 100)),
215 => array('shield' =>     400, 'attack' =>      700, 'sd' => array (202 =>    3, 203 =>   3, 205 =>   4, 206 =>   4, 207 =>   10, 210 =>   5, 212 =>   5)),
216 => array('shield' =>   70000, 'attack' =>   150000, 'sd' => array (210 => 1250, 212 => 1250, 202 => 250, 203 => 250, 204 => 200, 205 => 100, 206 =>  33, 207 =>  30, 208 => 250, 209 => 250, 211 =>  25, 213 =>   5, 214 =>   1, 215 =>  15, 401 => 400, 402 => 200, 403 => 100, 404 =>  50, 405 => 100)),
217 => array('shield' =>     120, 'attack' =>       50, 'sd' => array (210 =>    5, 212 =>    5)),
218 => array('shield' => 2000000, 'attack' => 35000000, 'sd' => array (210 => 1250, 212 => 1250, 202 => 250, 203 => 250, 204 => 200, 205 => 100, 206 =>  33, 207 =>  30, 208 => 250, 209 => 250, 211 =>  25, 213 =>   5, 215 =>  15, 401 => 400, 402 => 200, 403 => 100, 404 =>  50, 405 => 100)),
219 => array('shield' =>    1000, 'attack' =>        1, 'sd' => array (210 =>    5, 212 =>    5)),
220 => array('shield' =>   50000, 'attack' =>      5, 'sd' => array (210 =>    5, 212 =>    5)),

401 => array('shield' =>      20, 'attack' =>       80, 'sd' => array ()),
402 => array('shield' =>      25, 'attack' =>      100, 'sd' => array ()),
403 => array('shield' =>     100, 'attack' =>      250, 'sd' => array ()),
404 => array('shield' =>     200, 'attack' =>     1100, 'sd' => array ()),
405 => array('shield' =>     500, 'attack' =>      150, 'sd' => array ()),
406 => array('shield' =>     300, 'attack' =>     3000, 'sd' => array ()),
407 => array('shield' =>    2000, 'attack' =>        1, 'sd' => array ()),
408 => array('shield' =>   10000, 'attack' =>        1, 'sd' => array ()),
409 => array('shield' => 1000000, 'attack' =>        1, 'sd' => array ()),
410 => array('shield' =>   80000, 'attack' =>   500000, 'sd' => array ()),
411 => array('shield' =>2000000000, 'attack' => 400000000, 'sd' => array ()),

502 => array('shield' =>     1, 'attack' =>      1, 'sd' => array ()),
503 => array('shield' =>     1, 'attack' =>  12000,  'sd' => array ()),
);

$ProdGrid = array(
1   => array(
'metal'     => 'return (30 * $BuildLevel * pow((1.1), $BuildLevel)) * (0.1 * $BuildLevelFactor);',
'crystal'   => 'return 0;',
'deuterium' => 'return 0;',
'energy'    => 'return - (10 * $BuildLevel * pow((1.1), $BuildLevel)) * (0.1 * $BuildLevelFactor);'
),

2   => array(
'metal'     => 'return 0;',
'crystal'   => 'return (20 * $BuildLevel * pow((1.1), $BuildLevel)) * (0.1 * $BuildLevelFactor);',
'deuterium' => 'return 0;',
'energy'    => 'return - (10 * $BuildLevel * pow((1.1), $BuildLevel)) * (0.1 * $BuildLevelFactor);'
),

3   => array(
'metal'     => 'return 0;',
'crystal'   => 'return 0;',
'deuterium' => 'return (10 * $BuildLevel * pow((1.1), $BuildLevel) * (-0.002 * $BuildTemp + 1.28) * (0.1 * $BuildLevelFactor));',
'energy'    => 'return - (30 * $BuildLevel * pow((1.1), $BuildLevel)) * (0.1 * $BuildLevelFactor);'
),

4   => array(
'metal'     => 'return 0;',
'crystal'   => 'return 0;',
'deuterium' => 'return 0;',
'energy'    => 'return (20 * $BuildLevel * pow((1.1), $BuildLevel)) * (0.1 * $BuildLevelFactor);'
),

12  => array(
'metal'     => 'return 0;',
'crystal'   => 'return 0;',
'deuterium' => 'return - (10 * $BuildLevel * pow(1.1,$BuildLevel) * (0.1 * $BuildLevelFactor));',
'energy'    => 'return (30 * $BuildLevel * pow((1.05 + $BuildEnergy * 0.01), $BuildLevel)) * (0.1 * $BuildLevelFactor);'
),

212 => array(
'metal'     => 'return 0;',
'crystal'   => 'return 0;',
'deuterium' => 'return 0;',
'energy'    => 'return ((($BuildTemp + 160) / 6) * (0.1 * $BuildLevelFactor) * $BuildLevel);'
)
);

$reslist['allow']    = array(1 => array(1,  2,  3,  4,  6, 12, 14, 15, 21, 22, 23, 24, 31, 33, 34, 44), 3 => array(12, 14, 21, 22, 23, 24, 34, 41, 42, 43));
$reslist['build']    = array(  1,   2,   3,   4,   6,  12,  14,  15,  21,  22,  23,  24,  31,  33,  34,  44,  41,  42,  43);
$reslist['tech']     = array(106, 108, 109, 110, 111, 113, 114, 115, 117, 118, 120, 121, 122, 123, 124, 131, 132, 133, 199);
$reslist['fleet']    = array(202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220);
$reslist['defense']  = array(401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 502, 503 );
$reslist['officier'] = array(601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615);
$reslist['dmfunc'] = array(700, 701, 702, 703, 704, 705, 706);
$reslist['prod']     = array(  1,   2,   3,   4,  12, 212 );
$reslist['procent']  = array(100,  90,  80,  70,  60,  50,  40,  30,  20,  10,   0);
$reslist['one']   = array(407, 408, 409, 411);

?>

Maintenant mon ShowOverviewPage.php rajout ligne 190

<?php

/**
 *  2Moons
 *  Copyright (C) 2011  Slaver
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @package 2Moons
 * @author Slaver <slaver7@gmail.com>
 * @copyright 2009 Lucky <lucky@xgproyect.net> (XGProyecto)
 * @copyright 2011 Slaver <slaver7@gmail.com> (Fork/2Moons)
 * @license http://www.gnu.org/licenses/gpl.html GNU GPLv3 License
 * @version 1.3.5 (2011-04-22)
 * @info $Id: ShowOverviewPage.php 1857 2011-04-29 14:45:51Z slaver7 $
 * @link http://code.google.com/p/2moons/
 */


function GetTeamspeakData()
{
global $CONF, $USER, $LNG;
if ($CONF['ts_modon'] == 0)
return false;
elseif(!file_exists(ROOT_PATH.'cache/teamspeak_cache.php'))
return $LNG['ov_teamspeak_not_online'];

$Data = unserialize(file_get_contents(ROOT_PATH.'cache/teamspeak_cache.php'));
if(!is_array($Data))
return $LNG['ov_teamspeak_not_online'];

$Teamspeak = '';

if($CONF['ts_version'] == 2) {
$trafges = pretty_number($Data[1]['total_bytessend'] / 1048576 + $Data[1]['total_bytesreceived'] / 1048576);
$Teamspeak = sprintf($LNG['ov_teamspeak_v2'], $CONF['ts_server'], $CONF['ts_udpport'], $USER['username'], $Data[0]["server_currentusers"], $Data[0]["server_maxusers"], $Data[0]["server_currentchannels"], $trafges);
} elseif($CONF['ts_version'] == 3){
$trafges = pretty_number($Data['data']['connection_bytes_received_total'] / 1048576 + $Data['data']['connection_bytes_sent_total'] / 1048576);
$Teamspeak = sprintf($LNG['ov_teamspeak_v3'], $CONF['ts_server'], $CONF['ts_tcpport'], $USER['username'], $Data['data']['virtualserver_password'], ($Data['data']['virtualserver_clientsonline'] - 1), $Data['data']['virtualserver_maxclients'], $Data['data']['virtualserver_channelsonline'], $trafges);
}
return $Teamspeak;
}

function ShowOverviewPage()
{
global $CONF, $LNG, $PLANET, $USER, $db, $resource, $UNI;
$PlanetRess = new ResourceUpdate();
$PlanetRess->CalcResource();
$PlanetRess->SavePlanetToDB();

$template = new template();
$template->getplanets();
        $template->loadscript('jquery.countdown.js');
$AdminsOnline = $AllPlanets = $Moon = array();

foreach($template->UserPlanets as $ID => $CPLANET)
{
if ($ID == $_SESSION['planet'] || $CPLANET['planet_type'] == 3)
continue;

if(!empty($_GET['i'])){

/*============> A dat sa voteze , sa vedem ce avem de facut <==============*/
$vote_id = (int)$_GET['i'];

$cautare = $db->query("SELECT *FROM `tld_votesystem` where `id` = '".$vote_id."' ; ");

/*============> a bagat prostu un nr la nimereala futul norocu <==============*/
if($db->num_rows($cautare) == 0){
$template->message("Don't try anything , wont work","game.php?page=rewardpage",4);
die();
}
$cautare = $db->fetch_array($cautare);
/*============> am verificat ca existat sitemul acesta , vedem daca a votat <==============*/

$find_vote = $db->query("SELECT *FROM `tld_votesystem_log` where `user_id` = '".$USER['id']."' AND `vote_system_id` = '".$vote_id."' ;");
if($db->num_rows($find_vote)>0){
/*============> a votat deja , verificam daca ii dam dreptul <==============*/
$find = $db->fetch_array($find_vote);
//$x = $find['time']+$cautare['time']*60*60;
//print_r($x);
if(TIMESTAMP <= ($find['time']+$cautare['time']*60*60)){
/*============> a mai votat in mai putin de 12h <==============*/
$template->message("You already voted in the past ".$cautare['time']."h","game.php?page=rewardpage",4);
die();
}else{
$db->query("Update ".USERS." set `darkmatter` = `darkmatter` + ".$cautare['prize']." where `id` = '".$USER['id']."' ; ");
//$db->query("Update ".PLANETS." set `metal` = `metal` + ".$prize_m.",`crystal` = `crystal` + ".$prize_c.",`deuterium` = `deuterium` + ".$prize_d." where `id` = '".$PLANET['id']."' ; ");
$db->query("UPDATE `tld_votesystem_log` set `time` = ".TIMESTAMP." where `user_id` = '".$USER['id']."' and `vote_system_id` =  '".$vote_id."' ;");
header("Location: ".$cautare['link']);
}
}else{

/*============> nu a votat pe noul sistem , si ii punem insert <==============*/
$db->query("Update ".USERS." set `darkmatter` = `darkmatter` + ".$cautare['prize']." where `id` = '".$USER['id']."' ; ");
//$db->query("Update ".PLANETS." set `metal` = `metal` + ".$prize_m.",`crystal` = `crystal` + ".$prize_c.",`deuterium` = `deuterium` + ".$prize_d." where `id` = '".$PLANET['id']."' ; ");
$db->query("INSERT INTO `tld_votesystem_log` VALUES (".$USER['id'].", ".TIMESTAMP.", ".$vote_id.")");
header("Location: ".$cautare['link']);
}
/* $db->query("Update ".USERS." set `darkmatter` = `darkmatter` + ".$cautare['prize'].", `vote1` = ". time() ."  where `id` = '".$USER['id']."' ; ");
header("Location: ".$cautare['link']);*/
}

/*============> Afisarea vote systemului <==============*/
$find_vote = $db->query("SELECT *FROM `tld_votesystem` ");
$votes = array(); /*aici vom pune toate arrayurile cu voturi*/
while($vote = $db->fetch_array($find_vote)){
/*============> cautarea daca a votat in ultimele 12 h <==============*/
$find = $db->query("SELECT *FROM `tld_votesystem_log` where `user_id` = ".$USER['id']." AND `vote_system_id` = ".$vote['id']." ;");

/*============> facem arrayul pentru afisarea voturilor<==============*/
$votes[$vote['id']]= array();
$votes[$vote['id']]['pic'] = $vote['image'];

if($db->num_rows($find)>0){
/*============> a votat pana acuma , si acum verificam timpul <==============*/
$find = $db->fetch_array($find);
if(TIMESTAMP < ($find['time']+$vote['time']*60*60)){
/*============> nu au trecut cele 12h de cand a votat <==============*/
$secunde = $find['time'] + $vote['time']*60*60 - TIMESTAMP;
$votes[$vote['id']]['link'] = '<font color=\'red\'><span class=countdown secs='.$secunde.'></span></font>';
}else{
$votes[$vote['id']]['link'] = '<font color=lime><a target="_blank"  href=game.php?page=rewardpage&i='.$vote['id'].'>VOTE</a></font>';
}
}else{
$votes[$vote['id']]['link'] = '<font color=lime><a target="_blank"  href=game.php?page=rewardpage&i='.$vote['id'].'>VOTE</a></font>';
}
}
/*============> Terminarea afisarii vote systemului <==============*/

$template->assign_vars(array(
'voturile' => $votes,
'dm_detail' => "1000-3000",
));



if (!empty($CPLANET['b_building']) && $CPLANET['b_building'] > TIMESTAMP) {
$Queue = unserialize($CPLANET['b_building_id']);
$BuildPlanet = $LNG['tech'][$Queue[0][0]]." (".$Queue[0][1].")<br><span style=\"color:#7F7F7F;\">(".pretty_time($Queue[0][3] - TIMESTAMP).")</span>";
} else {
$BuildPlanet     = $LNG['ov_free'];
}

$AllPlanets[] = array(
'id' => $CPLANET['id'],
'name' => $CPLANET['name'],
'image' => $CPLANET['image'],
'build' => $BuildPlanet,
);
}

if ($PLANET['id_luna'] != 0)
{
$Moon = $db->uniquequery("SELECT `id`, `name` FROM ".PLANETS." WHERE `id` = '".$PLANET['id_luna']."';");
}

if (!empty($PLANET['b_building'])) {
$Queue = unserialize($PLANET['b_building_id']);
$Build = $LNG['tech'][$Queue[0][0]].' ('.$Queue[0][1].')<br><div id="blc">"'.pretty_time($PLANET['b_building'] - TIMESTAMP).'</div>';
$template->execscript('BuildTime();');
}
else
{
$Build = $LNG['ov_free'];
}

$OnlineAdmins = $db->query("SELECT `id`,`username` FROM ".USERS." WHERE `universe` = '".$UNI."' AND `onlinetime` >= '".(TIMESTAMP-10*60)."' AND `authlevel` > '".AUTH_USR."';");
while ($AdminRow = $db->fetch_array($OnlineAdmins)) {
$AdminsOnline[$AdminRow['id']] = $AdminRow['username'];
}

$db->free_result($OnlineAdmins);

$template->loadscript('overview.js');
        $template->loadscript('jquery.countdown.js');
$template->execscript('GetFleets(true);');

    if ($USER['humain'] == 0 && $USER['tokra'] == 0 && $USER['goauld'] == 0 && $USER['asgard'] == 0)
        {
         $template->assign_vars(array(
                'race'                      => $LNG['inconnu'],
            ));
        }
    if ($USER['humain'] == 1 && $USER['tokra'] == 0 && $USER['goauld'] == 0 && $USER['asgard'] == 0)
        {
         $template->assign_vars(array(
                'race'                      => $LNG['humain'],
            ));
        }
    if ($USER['humain'] == 0 && $USER['tokra'] == 1 && $USER['goauld'] == 0 && $USER['asgard'] == 0)
        {
         $template->assign_vars(array(
                'race'                      => $LNG['tokra'],
            ));
        }
    if ($USER['humain'] == 0 && $USER['tokra'] == 0 && $USER['goauld'] == 1 && $USER['asgard'] == 0)
        {
         $template->assign_vars(array(
                'race'                      => $LNG['goauld'],
            ));
        }
    if ($USER['humain'] == 0 && $USER['tokra'] == 0 && $USER['goauld'] == 0 && $USER['asgard'] == 1)
        {
         $template->assign_vars(array(
                'race'                      => $LNG['asgard'],
            ));
        }
    
$template->assign_vars(array(
'user_rank' => sprintf($LNG['ov_userrank_info'], pretty_number($USER['total_points']), $LNG['ov_place'], $USER['total_rank'], $USER['total_rank'], $LNG['ov_of'], $CONF['users_amount']),
'is_news' => $CONF['OverviewNewsFrame'],
'news' => makebr($CONF['OverviewNewsText']),
'planetname' => $PLANET['name'],
'planetimage' => $PLANET['image'],
'galaxy' => $PLANET['galaxy'],
'system' => $PLANET['system'],
'planet' => $PLANET['planet'],
'buildtime' => $PLANET['b_building'],
'userid' => $USER['id'],
'username' => $USER['username'],
'build' => $Build,
'Moon' => $Moon,
'AllPlanets' => $AllPlanets,
'AdminsOnline' => $AdminsOnline,
'Teamspeak' => GetTeamspeakData(),
'messages' => ($USER['new_message'] > 0) ? (($USER['new_message'] == 1) ? $LNG['ov_have_new_message'] : sprintf($LNG['ov_have_new_messages'], pretty_number($USER['new_message']))): false,
'planet_diameter' => pretty_number($PLANET['diameter']),
'planet_field_current' => $PLANET['field_current'],
'planet_field_max' => CalculateMaxPlanetFields($PLANET),
'planet_temp_min' => $PLANET['temp_min'],
'planet_temp_max' => $PLANET['temp_max'],

                                             
'ov_news' => $LNG['ov_news'],
'fcm_moon' => $LNG['fcm_moon'],
'ov_server_time' => $LNG['ov_server_time'],
'ov_planet' => $LNG['ov_planet'],
'ov_planetmenu' => $LNG['ov_planetmenu'],
'ov_diameter' => $LNG['ov_diameter'],
'ov_distance_unit' => $LNG['ov_distance_unit'],
'ov_developed_fields' => $LNG['ov_developed_fields'],
'ov_max_developed_fields' => $LNG['ov_max_developed_fields'],
'ov_fields' => $LNG['ov_fields'],
'ov_temperature' => $LNG['ov_temperature'],
'ov_aprox' => $LNG['ov_aprox' ],
'ov_temp_unit' => $LNG['ov_temp_unit'],
'ov_to' => $LNG['ov_to'],
'ov_position' => $LNG['ov_position'],
'ov_points' => $LNG['ov_points'],
'ov_events' => $LNG['ov_events'],
'ov_admins_online' => $LNG['ov_admins_online'],
'ov_no_admins_online' => $LNG['ov_no_admins_online'],
'ov_userbanner' => $LNG['ov_userbanner'],
'ov_teamspeak' => $LNG['ov_teamspeak'],
'ov_password' => $LNG['ov_password'],
'ov_planet_rename' => $LNG['ov_planet_rename'],
'ov_rename_label' => $LNG['ov_rename_label'],
'ov_security_confirm' => sprintf($LNG['ov_security_confirm'], $PLANET['name']),
'ov_security_request' => $LNG['ov_security_request'],
'ov_delete_planet' => $LNG['ov_delete_planet'],
'ov_planet_abandoned' => $LNG['ov_planet_abandoned'],
'ov_reflink' => $LNG['ov_reflink'],
'ref_active' => $CONF['ref_active'],
'voturile' => $votes,
'dm_detail' => "1000-3000",
'path' => PROTOCOL.$_SERVER['HTTP_HOST'].HTTP_ROOT,
));

$template->show("overview_body.tpl");
}
?>

Apres j'ai rajouter ceci dans mon INGAME.php

$LNG['inconnu']                             = 'Race : Inconnue | Contactez votre administrateur';
$LNG['humain']                              = 'Race : Humain';
$LNG['tokra']                               = "Race : Tok'ra";
$LNG['goauld']                              = "Race : Goa'uld";
$LNG['asgard']                              = 'Race : Asgard';

et ceci dan mon overview_body.tpl

        <tr>
            <td>Race</td>
            <td colspan="2">{$race}</td>
        </tr>

puit j'ai mi sa dans ma base de donnée

ALTER TABLE uni1_users ADD humain INT(11) not null AFTER lang;
ALTER TABLE uni1_users ADD tokra INT(11) not null AFTER humain;
ALTER TABLE uni1_users ADD goauld INT(11) not null AFTER tokra;
ALTER TABLE uni1_users ADD asgard INT(11) not null AFTER goauld;

oui j'ai modif pour que la race soit lier a l'utilisateur et non a la planète le seul turk que je trouve pas c'est ou mettre ma ligne SQL pour modifier ces ligne a l’inscription

Pouvait vous m'aider ?

Merci d'avance

jeudi 21 juin 2012

kiki9999 Messages : 85

Bon j'ai trouver ou mettre la ligne SQL mais j'ai une erreur

Message: SQL Error: Unknown column '' in 'field list'

Query Code: INSERT INTO tld_users SET `username` = 'Dark-kiki', `universe` = '1', `email` = 'Thirion.christopher@gmail.com', `email_2` = 'Thirion.christopher@gmail.com', `lang` = 'fr', `` = '1', `ip_at_reg` = '93.14.52.49', `id_planet` = '0', `onlinetime` = '1340319274', `register_time` = '1340319274', `password` = '4c19f9c0c0a11022346d2ffbf22ef22a', `dpath` = 'Cyan', `darkmatter` = 'BUILD_DARKMATTER', `uctime`= '0';

j'ai rajouter $UserRace = $_POST['race']; ligne 329 et $SQL .= "`".$UserRace."` = '1', "; ligne 339 dans index.php

<?php
/**
TLD-Wars by TLD-Games avec reecriture des code de 2moons
*/
 
if (isset($_GET['action']) && $_GET['action'] == 'keepalive')
{
header('Content-Type: image/gif');
exit("\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3B");
}

define('INSIDE', true );
define('LOGIN', true );

define('ROOT_PATH', str_replace('\\', '/',dirname(__FILE__)).'/');

if(!file_exists(ROOT_PATH.'includes/config.php')) {
header('Location: install.php');
exit;
}

include_once(ROOT_PATH . 'includes/common.php');

$template = new template();
$template->cache = true;
$THEME->isHome();
$page = request_var('page', '');
$mode = request_var('mode', '');

switch ($page) {
case 'facebook':
if($CONF['fb_on'] == 0)
redirectTo("index.php");

$CONF = $db->uniquequery("SELECT `fb_apikey`, `fb_skey`, `initial_fields`, `LastSettedGalaxyPos`, `LastSettedSystemPos`, `LastSettedPlanetPos`, `smtp_host`, `smtp_port`, `smtp_user`, `smtp_pass`, `game_name`, `users_amount` FROM ".CONFIG." WHERE `uni` = ".$UNI.";");

include_once(ROOT_PATH . 'includes/libs/facebook/facebook.php');
$facebook = new Facebook(array(
  'appId'  => $CONF['fb_apikey'],
  'secret' => $CONF['fb_skey'],
  'cookie' => true,
));
$session = $facebook->getSession();

// Session based API call.
if (!$session)
redirectTo("index.php");

$uid = $facebook->getUser();

if (!$uid)
redirectTo("index.php");

$login = $db->uniquequery("SELECT `id`, `username`, `dpath`, `authlevel`, `id_planet` FROM ".USERS." WHERE `universe` = '".$UNI."' AND `fb_id` = '".$uid."';");
if (isset($login)) {
session_start();
$SESSION        = new Session();
$SESSION->CreateSession($login['id'], $login['username'], $login['id_planet'], $UNI, $login['authlevel'], $login['dpath']);

redirectTo("game.php?page=overview");
} else {
$me = $facebook->api('/me');
$UserMail =  $me['email'];

$Exist['alruser'] = $db->uniquequery("SELECT `id`, `username`, `dpath`, `authlevel`, `id_planet` FROM ".USERS." WHERE `email` = '".$UserMail."';");
if(isset($Exist['alruser']))
{
$db->query("UPDATE `".USERS."` SET `fb_id` = '".$uid."' WHERE `id` = '".$Exist['alruser']['id']."';");
session_start();
$SESSION        = new Session();
$SESSION->CreateSession($Exist['alruser']['id'], $Exist['alruser']['username'], $Exist['alruser']['id_planet'], $UNI, $Exist['alruser']['authlevel'], $Exist['alruser']['dpath']);
redirectTo("game.php?page=overview");
}

$Caracters = "aazertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN1234567890";
$Count = strlen($Caracters);
$Taille = 8;
$NewPass = "";
for($i = 0; $i < $Taille; $i ++) {
$CaracterBoucle = rand ( 0, $Count - 1 );
$NewPass .= substr ( $Caracters, $CaracterBoucle, 1 );
}

$UserName = $db->sql_escape($me['name']);
$UserIP = $_SERVER["REMOTE_ADDR"];
$UserPass = md5($NewPass);
$IfNameExist = false;
$i = "(1)";

while(!$IfNameExist)
{
$Exist['userv'] = $db->uniquequery("SELECT username FROM ".USERS." WHERE username = '".$UserName."' AND `universe` = '".$UNI."';");
$Exist['valid'] = $db->uniquequery("SELECT username FROM ".USERS_VALID." WHERE username = '".$UserName."' AND `universe` = '".$UNI."';");
if(!isset($Exist['userv']) && !isset($Exist['valid']))
$IfNameExist = true;
else
$UserName = $i.$UserName;
}

$SQL = "INSERT INTO ".USERS." SET ";
$SQL .= "`username` = '" .$db->sql_escape($UserName)."', ";
$SQL .= "`universe` = '" .$UNI."', ";
$SQL .= "`email` = '" . $UserMail . "', ";
$SQL .= "`email_2` = '" . $UserMail . "', ";
$SQL .= "`ip_at_reg` = '" . $UserIP . "', ";
$SQL .= "`id_planet` = '0', ";
$SQL .= "`onlinetime` = '".TIMESTAMP."', ";
$SQL .= "`register_time` = '".TIMESTAMP."', ";
$SQL .= "`password` = '" . $UserPass . "', ";
$SQL .= "`lang` = '".$LANG->GetUser()."', ";
$SQL .= "`dpath` = '".DEFAULT_THEME."', ";
$SQL .= "`darkmatter` = '".BUILD_FB_DARKMATTER."', ";
$SQL .= "`fb_id` = '" . $uid . "', ";
$SQL .= "`uctime`= '0';";
$db->query($SQL);

if($CONF['mail_active'] == 1)
{
$MailSubject = sprintf($LNG['reg_mail_reg_done'], $CONF['game_name']);
$MailRAW = file_get_contents("./language/".$CONF['lang']."/email/email_reg_done.txt");
$MailContent = sprintf($MailRAW, $UserName, $CONF['game_name']);
MailSend($UserMail, $UserName, $MailSubject, $MailContent);
$MailRAW = file_get_contents("./language/".$CONF['lang']."/email/email_lost_password.txt");
$MailContent = sprintf($MailRAW, $ExistMail['username'], $CONF['game_name'], $NewPass, "http://".$_SERVER['SERVER_NAME'].$_SERVER["PHP_SELF"]);
MailSend($UserMail, $UserName, $LNG['mail_title'], $MailContent);
}

$NewUser = $db->GetInsertID();

$LastSettedGalaxyPos = $CONF['LastSettedGalaxyPos'];
$LastSettedSystemPos = $CONF['LastSettedSystemPos'];
$LastSettedPlanetPos = $CONF['LastSettedPlanetPos'];
require_once(ROOT_PATH.'includes/functions/CreateOnePlanetRecord.php');
$PlanetID = false;

while ($PlanetID === false) {
$Planet = mt_rand(4, 12);
if ($LastSettedPlanetPos < 3) {
$LastSettedPlanetPos += 1;
} else {
if ($LastSettedSystemPos == MAX_SYSTEM_IN_GALAXY) {
$LastSettedGalaxyPos += 1;
$LastSettedSystemPos = 1;
$LastSettedPlanetPos = 1;
} else {
$LastSettedSystemPos += 1;
$LastSettedPlanetPos = 1;
}
}

$PlanetID = CreateOnePlanetRecord($LastSettedGalaxyPos, $LastSettedSystemPos, $Planet, $UNI, $NewUser, $UserPlanet, true);
}

$SQL = "UPDATE " .USERS." SET ";
$SQL .= "`id_planet` = '".$PlanetID."', ";
$SQL .= "`galaxy` = '".$LastSettedGalaxyPos."', ";
$SQL .= "`system` = '".$LastSettedSystemPos."', ";
$SQL .= "`planet` = '".$Planet."' ";
$SQL .= "WHERE ";
$SQL .= "`id` = '".$NewUser."' ";
$SQL .= "LIMIT 1;";
$SQL .= "INSERT INTO ".STATPOINTS." (`id_owner`, `id_ally`, `stat_type`, `tech_rank`, `tech_old_rank`, `tech_points`, `tech_count`, `build_rank`, `build_old_rank`, `build_points`, `build_count`, `defs_rank`, `defs_old_rank`, `defs_points`, `defs_count`, `fleet_rank`, `fleet_old_rank`, `fleet_points`, `fleet_count`, `total_rank`, `total_old_rank`, `total_points`, `total_count`) VALUES (".$NewUser.", 0, 1, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, 1, 0, 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0);";
$db->multi_query ( $SQL );

$from = $LNG ['welcome_message_from'];
$Subject = $LNG ['welcome_message_subject'];
$message = sprintf($LNG['welcome_message_content'], $CONF['game_name']);
SendSimpleMessage($NewUser, 1, $Time, 1, $from, $Subject, $message );

update_config(array('LastSettedGalaxyPos' => $LastSettedGalaxyPos, 'LastSettedSystemPos' => $LastSettedSystemPos, 'LastSettedPlanetPos' => $LastSettedPlanetPos, 'users_amount' => $CONF['users_amount'] + 1), false, $UNI);
session_start();
$SESSION        = new Session();
$SESSION->CreateSession($NewUser, $UserName, $PlanetID, $UNI);
redirectTo("game.php?page=overview");
}
break;
case 'lostpassword':
if ($mode == "send") {
$USERmail = request_var('email', '');
$Universe = request_var('universe', 0);
$ExistMail = $db->uniquequery("SELECT `username` FROM ".USERS." WHERE `email` = '".$db->sql_escape($USERmail)."' AND `universe` = '".$Universe."';");
if (empty($ExistMail['username'])) {
$template->message($LNG['mail_not_exist'], "index.php?page=lostpassword&lang=".$LANG->getUser(), 3, true);
} else {
$Caracters = "aazertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN1234567890";
$Count = strlen($Caracters);
$Taille = 8;
$NewPass = "";
for($i = 0; $i < $Taille; $i ++) {
$CaracterBoucle = rand ( 0, $Count - 1 );
$NewPass .= substr ( $Caracters, $CaracterBoucle, 1 );
}

$MailRAW = file_get_contents("./language/".$CONF['lang']."/email/email_lost_password.txt");
$MailContent = sprintf($MailRAW, $ExistMail['username'], $CONF['game_name'], $NewPass, "http://".$_SERVER['SERVER_NAME'].$_SERVER["PHP_SELF"]);

$Mail = MailSend($USERmail, $ExistMail['username'], $LNG['mail_title'], $MailContent);

if(true === true)
{
$db->query("UPDATE ".USERS." SET `password` ='" . md5($NewPass) . "' WHERE `username` = '".$ExistMail['username']."' AND `universe` = '".$Universe."';");
$template->message($LNG['mail_sended'], "./?lang=".$LANG->getUser(), 5, true);
} else {
$template->message($LNG['mail_sended_fail'], "./?lang=".$LANG->getUser(), 5, true);
}

}
} else {
$AvailableUnis[$CONF['uni']] = $CONF['game_name'].($CONF['game_disable'] == 0 ? $LNG['uni_closed'] : '');
$Query = $db->query("SELECT `uni`, `game_disable`, `game_name` FROM ".CONFIG." WHERE `uni` != '".$UNI."' ORDER BY `uni` ASC;");
while($Unis = $db->fetch_array($Query)) {
$AvailableUnis[$Unis['uni']] = $Unis['game_name'].($Unis['game_disable'] == 0 ? $LNG['uni_closed'] : '');
}
ksort($AvailableUnis);
$year = date(Y);
$asd = "xNova Revolution";
$template->assign_vars(array(
'email' => $LNG['email'],
'uni_reg' => $LNG['uni_reg'],
'send' => $LNG['send'],
'AvailableUnis' => $AvailableUnis,
'chose_a_uni' => $LNG['chose_a_uni'],
'lost_pass_title' => $LNG['lost_pass_title'],
'year' => $year,
'asd' => $asd,
));
$template->show('lostpassword.tpl');
}
break;
case 'reg' :
if ($CONF['reg_closed'] == 1){
$year = date(Y);
$asd = "xNova Revolution";
$template->assign_vars(array(
'closed' => $LNG['reg_closed'],
'info' => $LNG['info'],
'year' => $year,
'asd' => $asd,
));
$template->show('registry_closed.tpl');
exit;
}
switch ($mode) {
case 'send' :
$UserPass = request_var('password', '');
$UserPass2 = request_var('password2', '');
$UserName = request_var('character', '', UTF8_SUPPORT);
$UserPlanet = request_var('planet', '', UTF8_SUPPORT);
$UserEmail = request_var('email', '');
$UserEmail2 = request_var('email2', '');
$agbrules = request_var('rgt', '');
$UserLang = request_var('lang', '');
                $UserRace = request_var('race', '');
$Universe = request_var('universe', 0);

if ($CONF['capaktiv'] === '1') {
require_once('includes/libs/reCAPTCHA/recaptchalib.php');
$resp = recaptcha_check_answer($CONF['capprivate'], $_SERVER['REMOTE_ADDR'], $_REQUEST['recaptcha_challenge_field'], $_REQUEST['recaptcha_response_field']);
if (!$resp->is_valid)
$errors .= $LNG['wrong_captcha'];
}

$Exist['userv'] = $db->uniquequery("SELECT username, email FROM ".USERS." WHERE `universe` = '".$Universe."' AND (username = '".$db->sql_escape($UserName)."' OR email = '".$db->sql_escape($UserEmail)."');");
$Exist['valid'] = $db->uniquequery("SELECT username, email FROM ".USERS_VALID." WHERE `universe` = '".$Universe."' AND (username = '".$db->sql_escape($UserName)."' OR email = '".$db->sql_escape($UserEmail)."');");

$errors = '';
$errors    .= !ValidateAddress($UserEmail) ? $LNG['invalid_mail_adress'] : '';
$errors    .= empty($UserName) ? $LNG['empty_user_field'] : '';
$errors    .= empty($UserPlanet) ? $LNG['empty_planet_field'] : '';
$errors    .= !isset($UserPass{5}) ? $LNG['password_lenght_error'] : '';
$errors    .= $UserPass != $UserPass2 ? $LNG['different_passwords'] : '';
$errors    .= $UserEmail != $UserEmail2 ? $LNG['different_mails'] : '';
$errors    .= $agbrules != 'on' ? sprintf($LNG['terms_and_conditions'], $LANG->getUser()) : '';
$errors    .= (isset($Exist['userv']['username']) || isset($Exist['valid']['username']) && ($UserName == $Exist['userv']['username'] || $UserName == $Exist['valid']['username'])) ? $LNG['user_already_exists'] : '';
$errors    .= (isset($Exist['userv']['email']) || isset($Exist['valid']['email'])) && ($UserEmail == $Exist['userv']['email'] || $UserEmail == $Exist['valid']['email']) ? $LNG['mail_already_exists'] : '';

if (!CheckName($UserName))
$errors .= (UTF8_SUPPORT) ? $LNG['user_field_no_space'] : $LNG['user_field_no_alphanumeric'];

if (!CheckName($UserPlanet))
$errors .= (UTF8_SUPPORT) ? $LNG['planet_field_no_space'] : $LNG['planet_field_no_alphanumeric'];

if (!empty($errors)) {
$template->message($errors, '?page=reg&lang='.$LANG->getUser(), 3, true);
exit;
}

$md5newpass = md5($UserPass);

$clef = uniqid('2m');

$SQL = "INSERT INTO ".USERS_VALID." SET ";
$SQL .= "`username` = '".$db->sql_escape($UserName)."', ";
$SQL .= "`email` = '".$db->sql_escape($UserEmail)."', ";
$SQL .= "`lang` = '".$db->sql_escape($UserLang)."', ";
$SQL .= "`planet` = '".$db->sql_escape($UserPlanet)."', ";
$SQL .= "`date` = '".TIMESTAMP."', ";
$SQL .= "`cle` = '".$clef."', ";
$SQL .= "`universe` = '".$Universe."', ";
$SQL .= "`password` = '".$md5newpass."', ";
$SQL .= "`ip` = '".$_SERVER['REMOTE_ADDR']."'; ";
$db->query($SQL);

if($CONF['user_valid'] == 0 || $CONF['mail_active'] == 0) {
redirectTo("index.php?page=reg&mode=valid&lang=".$UserLang."&clef=".$clef);
} else {
$MailSubject = $LNG['reg_mail_message_pass'];
$MailRAW = file_get_contents("./language/".$UserLang."/email/email_vaild_reg.txt");
$MailContent = sprintf($MailRAW, $UserName, $CONF['game_name'], "http://".$_SERVER['SERVER_NAME'].$_SERVER["PHP_SELF"], $clef, $UserPass, $CONF['smtp_sendmail'], $UserLang);

MailSend($UserEmail, $UserName, $MailSubject, $MailContent);
$template->message($LNG['reg_completed'], '?lang='.$UserLang, 10, true);
}
break;
case 'valid' :
$pseudo = request_var('id', '');
$clef = request_var('clef', '');
$admin = request_var('admin', 0);
$Valider = $db->uniquequery("SELECT `username`, `password`, `email`, `ip`, `planet`, `lang`, `humain`, `tokra`, `goauld`, `asgard`, `universe` FROM ".USERS_VALID." WHERE `cle` = '".$db->sql_escape($clef)."';");
if(!isset($Valider))
redirectTo('index.php?page=reg');

$UserName = $Valider['username'];
$UserPass = $Valider['password'];
$UserMail = $Valider['email'];
$UserIP = $Valider['ip'];
$UserPlanet = $Valider['planet'];
$UserLang = $Valider['lang'];
                $UserRace = $_POST['race'];
$UserUni = $Valider['universe'];
$CONF = $db->uniquequery("SELECT `initial_fields`, `LastSettedGalaxyPos`, `LastSettedSystemPos`, `LastSettedPlanetPos`, `mail_active`, `mail_use`, `smail_path`, `smtp_host`, `smtp_port`, `smtp_user`, `smtp_pass`, `smtp_ssl`, `smtp_sendmail`, `game_name`, `users_amount`, `metal_basic_income`, `crystal_basic_income`, `deuterium_basic_income` FROM ".CONFIG." WHERE `uni` = ".$UserUni.";");

$SQL = "INSERT INTO " . USERS . " SET ";
$SQL .= "`username` = '".$UserName . "', ";
$SQL .= "`universe` = '".$UserUni . "', ";
$SQL .= "`email` = '".$UserMail."', ";
$SQL .= "`email_2` = '".$UserMail."', ";
$SQL .= "`lang` = '".$UserLang."', ";
                $SQL .= "`".$UserRace."` = '1', ";
$SQL .= "`ip_at_reg` = '".$UserIP."', ";
$SQL .= "`id_planet` = '0', ";
$SQL .= "`onlinetime` = '".TIMESTAMP."', ";
$SQL .= "`register_time` = '".TIMESTAMP. "', ";
$SQL .= "`password` = '".$UserPass."', ";
$SQL .= "`dpath` = '".DEFAULT_THEME."', ";
$SQL .= "`darkmatter` = '".BUILD_DARKMATTER."', ";
$SQL .= "`uctime`= '0';";
$db->query($SQL);
$NewUser = $db->GetInsertID();
if($CONF['mail_active'] == 1) {
$MailSubject = sprintf($LNG['reg_mail_reg_done'], $CONF['game_name']);
$MailRAW = file_get_contents("./language/".$UserLang."/email/email_reg_done.txt");
$MailContent = sprintf($MailRAW, $UserName, $CONF['game_name']);
MailSend($UserMail, $UserName, $MailSubject, $MailContent);
}
$LastSettedGalaxyPos = $CONF['LastSettedGalaxyPos'];
$LastSettedSystemPos = $CONF['LastSettedSystemPos'];
$LastSettedPlanetPos = $CONF['LastSettedPlanetPos'];
require_once(ROOT_PATH.'includes/functions/CreateOnePlanetRecord.php');
$PlanetID = false;

while ($PlanetID === false) {
$Planet = mt_rand(4, 12);
if ($LastSettedPlanetPos < 3) {
$LastSettedPlanetPos += 1;
} else {
if ($LastSettedSystemPos == MAX_SYSTEM_IN_GALAXY) {
$LastSettedGalaxyPos += 1;
$LastSettedSystemPos = 1;
$LastSettedPlanetPos = 1;
} else {
$LastSettedSystemPos += 1;
$LastSettedPlanetPos = 1;
}
}

$PlanetID = CreateOnePlanetRecord($LastSettedGalaxyPos, $LastSettedSystemPos, $Planet, $UserUni, $NewUser, $UserPlanet, true);
}

$SQL = "DELETE FROM ".USERS_VALID." WHERE `cle` = '".$db->sql_escape($clef)."';";
$SQL .= "UPDATE ".USERS." SET ";
$SQL .= "`id_planet` = '".$PlanetID."', ";
$SQL .= "`galaxy` = '".$LastSettedGalaxyPos."', ";
$SQL .= "`system` = '".$LastSettedSystemPos."', ";
$SQL .= "`planet` = '".$Planet."' ";
$SQL .= "WHERE ";
$SQL .= "`id` = '".$NewUser."' ";
$SQL .= "LIMIT 1;";
$SQL .= "INSERT INTO ".STATPOINTS." (`id_owner`, `id_ally`, `stat_type`, `universe`, `tech_rank`, `tech_old_rank`, `tech_points`, `tech_count`, `build_rank`, `build_old_rank`, `build_points`, `build_count`, `defs_rank`, `defs_old_rank`, `defs_points`, `defs_count`, `fleet_rank`, `fleet_old_rank`, `fleet_points`, `fleet_count`, `total_rank`, `total_old_rank`, `total_points`, `total_count`) VALUES (".$NewUser.", 0, 1, ".$UserUni.", '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0, '".($CONF ['users_amount'] + 1)."', '".($CONF ['users_amount'] + 1)."', 0, 0);";
$db->multi_query($SQL);

$from = $LNG['welcome_message_from'];
$Subject = $LNG['welcome_message_subject'];
$message = sprintf($LNG['welcome_message_content'], $CONF['game_name']);
SendSimpleMessage($NewUser, 1, $Time, 1, $from, $Subject, $message);

update_config(array('users_amount' => $CONF['users_amount'] + 1, 'LastSettedGalaxyPos' => $LastSettedGalaxyPos, 'LastSettedSystemPos' => $LastSettedSystemPos, 'LastSettedPlanetPos' => $LastSettedPlanetPos), false, $UserUni);
if ($admin == 1) {
echo sprintf($LNG['user_active'], $UserName);
} else {
session_start();
$SESSION        = new Session();
$SESSION->CreateSession($NewUser, $UserName, $PlanetID, $UserUni);

redirectTo("game.php?page=overview");
}
break;
default:
$AvailableUnis[$CONF['uni']] = $CONF['game_name'].($CONF['game_disable'] == 0 ? $LNG['uni_closed'] : '');
$Query = $db->query("SELECT `uni`, `game_disable`, `game_name` FROM ".CONFIG." WHERE `uni` != '".$UNI."' ORDER BY `uni` ASC;");
while($Unis = $db->fetch_array($Query)) {
$AvailableUnis[$Unis['uni']] = $Unis['game_name'].($Unis['game_disable'] == 0 ? $LNG['uni_closed'] : '');
}
ksort($AvailableUnis);
$year = date(Y);
    $asd = "xNova Revolution";
$template->assign_vars(array(
'server_message_reg' => $LNG['server_message_reg'],
'register_at_reg' => $LNG['register_at_reg'],
'user_reg' => $LNG['user_reg'],
'pass_reg' => $LNG['pass_reg'],
'pass2_reg' => $LNG['pass2_reg'],
'email_reg' => $LNG['email_reg'],
'email2_reg' => $LNG['email2_reg'],
'planet_reg' => $LNG['planet_reg'],
'lang_reg' => $LNG['lang_reg'],
                    'Race'                          => $LNG['Race'],
                    'id_race_1'                     => $LNG['id_race_1'],
                    'id_race_2'                     => $LNG['id_race_2'],
                    'id_race_3'                     => $LNG['id_race_3'],
                    'id_race_4'                     => $LNG['id_race_4'],
'captcha_reg' => $LNG['captcha_reg'],
'register_now' => $LNG['register_now'],
'accept_terms_and_conditions' => sprintf($LNG['accept_terms_and_conditions'], $LANG->getUser()),
'captcha_reload' => $LNG['captcha_reload'],
'captcha_help' => $LNG['captcha_help'],
'captcha_get_image' => $LNG['captcha_get_image'],
'captcha_reload' => $LNG['captcha_reload'],
'captcha_get_audio' => $LNG['captcha_get_audio'],
'AvailableUnis' => $AvailableUnis,
'AvailableLangs' => $LANG->getAllowedLangs(false),
'uni_reg' => $LNG['uni_reg'],
'chose_a_uni' => $LNG['chose_a_uni'],
'register' => $LNG['register'],
'send' => $LNG['send'],
'uni_closed' => $LNG['uni_closed'],
'year' => $year,
'asd' => $asd,
));
$template->show('registry_form.tpl');
break;
}
break;
case 'agb' :
$template->assign_vars(array(
'agb' => $LNG['agb'],
'agb_overview' => $LNG['agb_overview'],
));
$template->show('index_agb.tpl');
break;
case 'rules' :
$template->assign_vars(array(
'rules' => $LNG['rules'],
'rules_overview' => $LNG['rules_overview'],
'rules_info1' => sprintf($LNG['rules_info1'], $CONF['forum_url']),
'rules_info2' => $LNG['rules_info2'],
));
$template->show('index_rules.tpl');
break;
case 'screens':
$template->assign_vars(array(
'screenshots'           => $LNG['screenshots'],
));
$template->show('index_screens.tpl');
break;
case 'top100' :
$Universe = request_var('universe', 1);
$top = $db->query("SELECT * FROM ".TOPKB." WHERE `universe` = '".$Universe."' ORDER BY gesamtunits DESC LIMIT 100;");
while($data = $db->fetch_array($top)) {
$TopKBList[] = array(
'result' => $data['fleetresult'],
'time' => date("D d M H:i:s", $data['time']),
'units' => pretty_number($data['gesamtunits']),
'rid' => $data['rid'],
'attacker' => $data['angreifer'],
'defender' => $data['defender'],
'result' => $data['fleetresult'],
);
}

$AvailableUnis[$CONF['uni']] = $CONF['game_name'].($CONF['game_disable'] == 0 ? $LNG['uni_closed'] : '');
$Query = $db->query("SELECT `uni`, `game_disable`, `game_name` FROM ".CONFIG." WHERE `uni` != '".$UNI."' ORDER BY `uni` ASC;");
while($Unis = $db->fetch_array($Query)) {
$AvailableUnis[$Unis['uni']] = $Unis['game_name'].($Unis['game_disable'] == 0 ? $LNG['uni_closed'] : '');
}
ksort($AvailableUnis);

$template->assign_vars(array(
'AvailableUnis' => $AvailableUnis,
'ThisUni' => $ThisUni,
'tkb_units' => $LNG['tkb_units'],
'tkb_datum' => $LNG['tkb_datum'],
'tkb_owners' => $LNG['tkb_owners'],
'tkb_platz' => $LNG['tkb_platz'],
'tkb_top' => $LNG['tkb_top'],
'tkb_gratz' => $LNG['tkb_gratz'],
'tkb_legende' => $LNG['tkb_legende'],
'tkb_gewinner' => $LNG['tkb_gewinner'],
'tkb_verlierer' => $LNG['tkb_verlierer'],
'TopKBList' => $TopKBList,
));

$template->show('index_top100.tpl');
break;
case 'pranger' :
$Universe = request_var('universe', 1);
$PrangerRAW = $db->query("SELECT * FROM ".BANNED." WHERE `universe` = '".$Universe."' ORDER BY `id`;");

while($u = $db->fetch_array($PrangerRAW))
{
$PrangerList[] = array(
'player' => $u['who'],
'theme' => $u['theme'],
'from' => date("d. M Y H:i:s",$u['time']),
'to' => date("d. M Y H:i:s",$u['longer']),
'admin' => $u['author'],
'mail' => $u['email'],
'info' => sprintf($LNG['bn_writemail'], $u['author']),
);
}

$AvailableUnis[$CONF['uni']] = $CONF['game_name'].($CONF['game_disable'] == 0 ? $LNG['uni_closed'] : '');
$Query = $db->query("SELECT `uni`, `game_disable`, `game_name` FROM ".CONFIG." WHERE `uni` != '".$UNI."' ORDER BY `uni` ASC;");
while($Unis = $db->fetch_array($Query)) {
$AvailableUnis[$Unis['uni']] = $Unis['game_name'].($Unis['game_disable'] == 0 ? $LNG['uni_closed'] : '');
}
ksort($AvailableUnis);

$template->assign_vars(array(
'AvailableUnis' => $AvailableUnis,
'ThisUni' => $ThisUni,
'PrangerList' => $PrangerList,
'bn_no_players_banned' => $LNG['bn_no_players_banned'],
'bn_exists' => $LNG['bn_exists'],
'bn_players_banned' => $LNG['bn_players_banned'],
'bn_players_banned_list' => $LNG['bn_players_banned_list'],
'bn_player' => $LNG['bn_player'],
'bn_reason' => $LNG['bn_reason'],
'bn_from' => $LNG['bn_from'],
'bn_until' => $LNG['bn_until'],
'bn_by' => $LNG['bn_by'],
));

$template->show('index_pranger.tpl');
break;
case 'disclamer':
$template->assign_vars(array(
'disclamer' => $LNG['disclamer'],
'disclamer_name' => $LNG['disclamer_name'],
'disclamer_adress' => $LNG['disclamer_adress'],
'disclamer_tel' => $LNG['disclamer_tel'],
'disclamer_email' => $LNG['disclamer_email'],
));
$template->show('index_disclamer.tpl');
break;
case 'news' :
$NewsRAW = $db->query ("SELECT date,title,text,user FROM ".NEWS." ORDER BY id DESC;");
while ($NewsRow = $db->fetch_array($NewsRAW)) {
$NewsList[] = array(
'title' => $NewsRow['title'],
'from' => sprintf($LNG['news_from'], date("d. M Y H:i:s", $NewsRow['date']), $NewsRow['user']),
'text' => makebr($NewsRow['text']),
);
}
$template->assign_vars(array(
'NewsList' => $NewsList,
'news_overview' => $LNG['news_overview'],
'news_does_not_exist' => $LNG['news_does_not_exist'],
));

$template->show('index_news.tpl');
break;
default :
if ($_POST) {
$luser = request_var('username', '', UTF8_SUPPORT);
$lpass = request_var('password', '', UTF8_SUPPORT);
$luniv = request_var('universe', 1);
$login = $db->uniquequery("SELECT `id`, `username`, `dpath`, `authlevel`, `id_planet` FROM ".USERS." WHERE `username` = '".$db->sql_escape($luser)."' AND `universe` = '".$luniv."' AND `password` = '".md5($lpass)."';");

if (isset($login)) {
session_start();
$SESSION        = new Session();
$SESSION->CreateSession($login['id'], $login['username'], $login['id_planet'], $luniv, $login['authlevel'], $login['dpath']);

redirectTo("game.php?page=overview");
} else {
redirectTo('index.php?code=1');
}
} else {
$AvailableUnis[$CONF['uni']] = $CONF['game_name'].($CONF['game_disable'] == 0 ? $LNG['uni_closed'] : '');
$Query = $db->query("SELECT `uni`, `game_disable`, `game_name` FROM ".CONFIG." WHERE `uni` != '".$UNI."' ORDER BY `uni` ASC;");
while($Unis = $db->fetch_array($Query)) {
$AvailableUnis[$Unis['uni']] = $Unis['game_name'].($Unis['game_disable'] == 0 ? $LNG['uni_closed'] : '');
}
ksort($AvailableUnis);
$Code = request_var('code', 0);
if(!empty($Code)) {
$template->assign_vars(array(
'code' => $LNG['login_error_'.$Code],
));
}
$year = date(Y);
$asd = "xNova Revolution";
$template->assign_vars(array(
'AvailableUnis' => $AvailableUnis,
'welcome_to' => $LNG['welcome_to'],
'server_description' => sprintf($LNG['server_description'], $CONF['game_name']),
'server_infos' => $LNG['server_infos'],
'login' => $LNG['login'],
'login_info' => sprintf($LNG['login_info'], $LANG->getUser()),
'user' => $LNG['user'],
'pass' => $LNG['pass'],
'lostpassword' => $LNG['lostpassword'],
'register_now' => $LNG['register_now'],
'screenshots' => $LNG['screenshots'],
'chose_a_uni' => $LNG['chose_a_uni'],
'universe' => $LNG['universe'],
'year'     => $year,
'asd'                   => $asd,
));
$template->show('index_body.tpl');
}
break;
}
?>
vendredi 22 juin 2012

sheppard Messages : 169

quel qu'un pourrait l'adapté à 2moons 1.6.1?

jeudi 30 mai 2013

Répondre Pour répondre, tu dois d'abord t'inscrire rapidement sur Kommunauty. Rejoins-nous vite !