diff --git a/onyx2/include/Class/rapport.php b/onyx2/include/Class/rapport.php
index fded6c6..9226a5e 100644
--- a/onyx2/include/Class/rapport.php
+++ b/onyx2/include/Class/rapport.php
@@ -96,10 +96,6 @@ class Rapport
$this->rapportA .= "
";
}
- //Flottes en orbite
- if ($this->var[2] > 3) {
- }
-
//Flottes au sol
if ($this->var[2] > 4) {
$this->rapportA .= "
Nombre | Vaisseaux |
";
@@ -121,6 +117,16 @@ class Rapport
}
}
+ //On envoit le rapport d'espionnage
+ $temps = $this->timestamp;
+ $db = new BDD();
+ $db->escape($this->titreA);
+ $db->escape($this->rapportA);
+
+ $db->query("INSERT INTO ".$this->table." (destinataire, sujet, contenu, temps) VALUES(".$this->utilA->id_user.", '$this->titreA', '$this->rapportA', '$temps');");
+ $db->deconnexion();
+
+ //On envoit le rapport de cdontre-espionnage
if ($this->var[3] >= 1) {
$this->titreB = "Rapport de contre-espionnage";
if (!isset($this->var[0]->nom_planete)) {
@@ -128,8 +134,15 @@ class Rapport
} else {
$this->rapportB = "Nous venons d'apprendre que notre planète : ".$this->var[0]->nom_planete."[".$this->var[0]->galaxie.":".$this->var[0]->ss.":".$this->var[0]->position."] a été la cible d'un espionnage de la part de ".$this->utilA->pseudo;
}
+
+ $temps = $this->timestamp;
+ $db = new BDD();
+ $db->escape($this->titreB);
+ $db->escape($this->rapportB);
+
+ $db->query("INSERT INTO ".$this->table." (destinataire, sujet, contenu, temps) VALUES(".$this->utilB->id_user.", '$this->titreB', '$this->rapportB', '$temps');");
+ $db->deconnexion();
}
- $this->rapportA = $this->rapportA;
}
public function sendTransport()