coeff_bat[0] = floor($_POST['coeff_metal'])/100; if (isset($_POST['coeff_cristal'])) $planete->coeff_bat[1] = floor($_POST['coeff_cristal'])/100; if (isset($_POST['coeff_hydrogene'])) $planete->coeff_bat[2] = floor($_POST['coeff_hydrogene'])/100; $planete->coeff_bat[3] = floor($_POST['coeff_cs'])/100; if (isset($_POST['coeff_ce'])) $planete->coeff_bat[4] = floor($_POST['coeff_ce'])/100; $planete->addModif("coeff_bat"); redirection('?p=ressources'); } $tablo = $planete->production(3600, true); $template->assign('ressources_prod', $tablo[1]); $template->assign('ressources_conso', $tablo[2]); $template->assign('ressources_coef', $tablo[0]); $template->assign('ressources_silo', array($planete->batiments[10], pow(2, $planete->batiments[10]) * 100000)); $template->assign('ressources_toto', array($tablo[1][2] - $tablo[2][3], '(0)')); $template->assign('ressources_tab', array(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)); ?>