Version 0.9a
This commit is contained in:
parent
d5c122a2c5
commit
59fbc7104e
141 changed files with 8686 additions and 1156 deletions
130
pages/anul_tec.php
Normal file
130
pages/anul_tec.php
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
<?php
|
||||
session_start();
|
||||
|
||||
$id=$_SESSION['id'];
|
||||
$galaxy=$_SESSION['galaxy'];
|
||||
$ss=$_SESSION['ss'];
|
||||
$pos=$_SESSION['pos'];
|
||||
$race=$_SESSION['race'];
|
||||
|
||||
require('bdd.php');
|
||||
require('../connectBDD.php');
|
||||
|
||||
if ($_GET['tec'] == 1) {
|
||||
$n=($informatique-1);
|
||||
$cristal += ceil(pow(2,$n)*500);
|
||||
$hydrogene += ceil(pow(2,$n)*150);
|
||||
$temps_t = 0;
|
||||
$tec = 0;
|
||||
mysql_query("UPDATE planete SET cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
|
||||
}
|
||||
else if ($_GET['tec'] == 2) {
|
||||
$n=($detection-1);
|
||||
$metal += ceil(pow(2,$n)*500);
|
||||
$cristal += ceil(pow(2,$n)*750);
|
||||
$hydrogene += ceil(pow(2,$n)*100);
|
||||
$temps_t = 0;
|
||||
$tec = 0;
|
||||
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
|
||||
}
|
||||
else if ($_GET['tec'] == 3) {
|
||||
$n=($armement-1);
|
||||
$metal += ceil(pow(2,$n)*2500);
|
||||
$cristal += ceil(pow(2,$n)*500);
|
||||
$temps_t = 0;
|
||||
$tec = 0;
|
||||
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
|
||||
}
|
||||
else if ($_GET['tec'] == 4) {
|
||||
$n=($blindage-1);
|
||||
$metal += ceil(pow(2,$n)*4000);
|
||||
$cristal += ceil(pow(2,$n)*1500);
|
||||
$temps_t = 0;
|
||||
$tec = 0;
|
||||
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
|
||||
}
|
||||
else if ($_GET['tec'] == 5) {
|
||||
$n=($energie_t-1);
|
||||
$metal += ceil(pow(2,$n)*2000);
|
||||
$cristal += ceil(pow(2,$n)*1500);
|
||||
$hydrogene += ceil(pow(2,$n)*300);
|
||||
$temps_t = 0;
|
||||
$tec = 0;
|
||||
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
|
||||
}
|
||||
else if ($_GET['tec'] == 6) {
|
||||
$n=($reacteur-1);
|
||||
$metal += ceil(pow(2,$n)*1400);
|
||||
$cristal += ceil(pow(2,$n)*400);
|
||||
$temps_t = 0;
|
||||
$tec = 0;
|
||||
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
|
||||
}
|
||||
else if ($_GET['tec'] == 7) {
|
||||
$n=($reacteur_f-1);
|
||||
$metal += ceil(pow(2,$n)*3000);
|
||||
$cristal += ceil(pow(2,$n)*2100);
|
||||
$hydrogene += ceil(pow(2,$n)*750);
|
||||
$temps_t = 0;
|
||||
$tec = 0;
|
||||
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
|
||||
}
|
||||
else if ($_GET['tec'] == 8) {
|
||||
$n=($reacteur_ff-1);
|
||||
$metal += ceil(pow(2,$n)*5000);
|
||||
$cristal += ceil(pow(2,$n)*4000);
|
||||
$hydrogene += ceil(pow(2,$n)*1500);
|
||||
$temps_t = 0;
|
||||
$tec = 0;
|
||||
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
|
||||
}
|
||||
else if ($_GET['tec'] == 9) {
|
||||
$n=($medecine-1);
|
||||
$metal += ceil(pow(2,$n)*800);
|
||||
$cristal += ceil(pow(2,$n)*1000);
|
||||
$temps_t = 0;
|
||||
$tec = 0;
|
||||
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
|
||||
}
|
||||
else if ($_GET['tec'] == 10) {
|
||||
$n=($tactique-1);
|
||||
$metal += ceil(pow(2,$n)*2600);
|
||||
$cristal += ceil(pow(2,$n)*2600);
|
||||
$temps_t = 0;
|
||||
$tec = 0;
|
||||
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
|
||||
}
|
||||
else if ($_GET['tec'] == 11) {
|
||||
$n=($developpement-1);
|
||||
$metal += ceil(pow(2,$n)*10000);
|
||||
$cristal += ceil(pow(2,$n)*10000);
|
||||
$hydrogene += ceil(pow(2,$n)*5000);
|
||||
$temps_t = 0;
|
||||
$tec = 0;
|
||||
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
|
||||
}
|
||||
else if ($_GET['tec'] == 12) {
|
||||
$n=($spartan-1);
|
||||
$metal += ceil(pow(3,$n)*5200);
|
||||
$cristal += ceil(pow(3,$n)*4250);
|
||||
$hydrogene += ceil(pow(3,$n)*850);
|
||||
$temps_t = 0;
|
||||
$tec = 0;
|
||||
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
|
||||
}
|
||||
|
||||
mysql_close();
|
||||
@header("Location: laboratoire.php");
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue