forked from halo-battle/game
Version 2007-11-09
This commit is contained in:
parent
d08fb34825
commit
e0f55450e1
87 changed files with 513 additions and 741 deletions
|
|
@ -32,11 +32,6 @@ if (isset($_POST['cons_sto']) || isset($_POST['cons_sonde']) || isset($_POST['co
|
|||
$unit = 1;
|
||||
$metal -= ($sa*1000);
|
||||
$cristal -= ($sa*800);
|
||||
|
||||
mysql_query("UPDATE planete SET unit_s='$unit', metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE planete SET cons_spatial='$sa', temps_spatial='$temps_caserne' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_close();
|
||||
@header("Location: chantier_spatial.php");
|
||||
}
|
||||
else echo "Pas assez de cristal !";
|
||||
}
|
||||
|
|
@ -49,11 +44,6 @@ if (isset($_POST['cons_sto']) || isset($_POST['cons_sonde']) || isset($_POST['co
|
|||
$unit = 2;
|
||||
$metal -= ($sa*4000);
|
||||
$cristal -= ($sa*3000);
|
||||
|
||||
mysql_query("UPDATE planete SET unit_s='$unit', metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE planete SET cons_spatial='$sa', temps_spatial='$temps_caserne' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_close();
|
||||
@header("Location: chantier_spatial.php");
|
||||
}
|
||||
else echo "Pas assez de cristal !";
|
||||
}
|
||||
|
|
@ -68,10 +58,6 @@ if (isset($_POST['cons_sto']) || isset($_POST['cons_sonde']) || isset($_POST['co
|
|||
$metal -= ($sa*9000);
|
||||
$cristal -= ($sa*9000);
|
||||
$hydrogene -= ($sa*1000);
|
||||
|
||||
mysql_query("UPDATE planete SET unit_s='$unit', metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE planete SET cons_spatial='$sa', temps_spatial='$temps_caserne' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
@header("Location: chantier_spatial.php");
|
||||
}
|
||||
else echo "Pas assez d'hydrogène !";
|
||||
}
|
||||
|
|
@ -88,10 +74,6 @@ if (isset($_POST['cons_sto']) || isset($_POST['cons_sonde']) || isset($_POST['co
|
|||
$metal -= ($sa*1000);
|
||||
$cristal -= ($sa*1200);
|
||||
$hydrogene -= ($sa*100);
|
||||
|
||||
mysql_query("UPDATE planete SET unit_s='$unit', metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE planete SET cons_spatial='$sa', temps_spatial='$temps_caserne' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
@header("Location: chantier_spatial.php");
|
||||
}
|
||||
else echo "Pas assez d'hydrogène !";
|
||||
}
|
||||
|
|
@ -108,10 +90,6 @@ if (isset($_POST['cons_sto']) || isset($_POST['cons_sonde']) || isset($_POST['co
|
|||
$metal -= ($sa*15000);
|
||||
$cristal -= ($sa*9000);
|
||||
$hydrogene -= ($sa*1000);
|
||||
|
||||
mysql_query("UPDATE planete SET unit_s='$unit', metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE planete SET cons_spatial='$sa', temps_spatial='$temps_caserne' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
@header("Location: chantier_spatial.php");
|
||||
}
|
||||
else echo "Pas assez d'hydrogène !";
|
||||
}
|
||||
|
|
@ -126,10 +104,6 @@ if (isset($_POST['cons_sto']) || isset($_POST['cons_sonde']) || isset($_POST['co
|
|||
$unit = 6;
|
||||
$metal -= ($sa*1700);
|
||||
$cristal -= ($sa*1220);
|
||||
|
||||
mysql_query("UPDATE planete SET unit_s='$unit', metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE planete SET cons_spatial='$sa', temps_spatial='$temps_caserne' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
@header("Location: chantier_spatial.php");
|
||||
}
|
||||
else echo "Pas assez de cristal !";
|
||||
}
|
||||
|
|
@ -142,11 +116,6 @@ if (isset($_POST['cons_sto']) || isset($_POST['cons_sonde']) || isset($_POST['co
|
|||
$unit = 7;
|
||||
$metal -= ($sa*5800);
|
||||
$cristal -= ($sa*1400);
|
||||
|
||||
mysql_query("UPDATE planete SET unit_s='$unit', metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'") or die ("erreur sql ".mysql_error());
|
||||
mysql_query("UPDATE planete SET cons_spatial='$sa', temps_spatial='$temps_caserne' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'") or die ("erreur sql ".mysql_error());
|
||||
mysql_close();
|
||||
@header("Location: chantier_spatial.php");
|
||||
}
|
||||
else echo "Pas assez de cristal !";
|
||||
}
|
||||
|
|
@ -161,10 +130,6 @@ if (isset($_POST['cons_sto']) || isset($_POST['cons_sonde']) || isset($_POST['co
|
|||
$metal -= ($sa*20000);
|
||||
$cristal -= ($sa*16000);
|
||||
$hydrogene -= ($sa*1600);
|
||||
|
||||
mysql_query("UPDATE planete SET unit_s='$unit', metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE planete SET cons_spatial='$sa', temps_spatial='$temps_caserne' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
@header("Location: chantier_spatial.php");
|
||||
}
|
||||
else echo "Pas assez d'hydrogène !";
|
||||
}
|
||||
|
|
@ -181,10 +146,6 @@ if (isset($_POST['cons_sto']) || isset($_POST['cons_sonde']) || isset($_POST['co
|
|||
$metal -= ($sa*26000);
|
||||
$cristal -= ($sa*16400);
|
||||
$hydrogene -= ($sa*1600);
|
||||
|
||||
mysql_query("UPDATE planete SET unit_s='$unit', metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE planete SET cons_spatial='$sa', temps_spatial='$temps_caserne' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
@header("Location: chantier_spatial.php");
|
||||
}
|
||||
else echo "Pas assez d'hydrogène !";
|
||||
}
|
||||
|
|
@ -201,10 +162,6 @@ if (isset($_POST['cons_sto']) || isset($_POST['cons_sonde']) || isset($_POST['co
|
|||
$metal -= ($sa*60000);
|
||||
$cristal -= ($sa*40000);
|
||||
$hydrogene -= ($sa*3000);
|
||||
|
||||
mysql_query("UPDATE planete SET unit_s='$unit', metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE planete SET cons_spatial='$sa', temps_spatial='$temps_caserne' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
@header("Location: chantier_spatial.php");
|
||||
}
|
||||
else echo "Pas assez d'hydrogène !";
|
||||
}
|
||||
|
|
@ -221,10 +178,6 @@ if (isset($_POST['cons_sto']) || isset($_POST['cons_sonde']) || isset($_POST['co
|
|||
$metal -= ($sa*500000);
|
||||
$cristal -= ($sa*400000);
|
||||
$hydrogene -= ($sa*250000);
|
||||
|
||||
mysql_query("UPDATE planete SET unit_s='$unit', metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE planete SET cons_spatial='$sa', temps_spatial='$temps_caserne' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
@header("Location: chantier_spatial.php");
|
||||
}
|
||||
else echo "Pas assez d'hydrogène !";
|
||||
}
|
||||
|
|
@ -233,6 +186,15 @@ if (isset($_POST['cons_sto']) || isset($_POST['cons_sonde']) || isset($_POST['co
|
|||
else echo "Pas assez de métal !";
|
||||
}
|
||||
else @header("Location: chantier_spatial.php");
|
||||
|
||||
if (isset($unit) && $unit != '') {
|
||||
if ($metal < 0 || $cristal < 0 || $hydrogene < 0 ) { }
|
||||
else {
|
||||
mysql_query("UPDATE planete SET unit_s='$unit', metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
mysql_query("UPDATE planete SET cons_spatial='$sa', temps_spatial='$temps_caserne' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
|
||||
@header("Location: chantier_spatial.php");
|
||||
}
|
||||
}
|
||||
mysql_close();
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue