Version 1.7i

This commit is contained in:
nemunaire 2008-11-16 12:00:00 +01:00
commit ba5e741c99
136 changed files with 2561 additions and 2105 deletions

View file

@ -6,6 +6,7 @@
*
*/
class Rapport{
var $table = 'mail';
var $type = 0;
var $var = array();
var $utilA = 0;
@ -18,6 +19,9 @@ class Rapport{
* @access protected
*/
function Rapport($type, $utilA, $utilB, $time){
global $table_mail;
$this->table = $table_mail;
$this->type = $type;
$this->utilA = $utilA;
$this->utilB = $utilB;
@ -91,9 +95,11 @@ class Rapport{
}
$titreB = 'Rapport de contre-espionnage';
$rapportB = 'Nous vennons 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 '.trouvNom($this->utilA);
$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 '.trouvNom($this->utilA);
$temps = $this->timestamp;
$utilA = trouvNom($this->utilA);
$utilB = trouvNom($this->utilB);
$db = new bdd();
$db->connexion();
@ -101,8 +107,10 @@ class Rapport{
$db->escape($titreB);
$db->escape($rapportA);
$db->escape($rapportB);
$db->query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilA)."', '', '$titreA', '$rapportA', '$temps')");
$db->query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilB)."', '', '$titreB', '$rapportB', '$temps')");
$db->escape($utilA);
$db->escape($utilB);
$db->query("INSERT INTO ".$this->table." VALUES('', '1', '$utilA', '', '$titreA', '$rapportA', '$temps')");
$db->query("INSERT INTO ".$this->table." VALUES('', '1', '$utilB', '', '$titreB', '$rapportB', '$temps')");
$db->deconnexion();
}
@ -120,14 +128,19 @@ class Rapport{
$rapportB = 'Les vaisseaux de '.trouvNom($this->utilA).' ont déposé '.$this->var[1][0].' de '.$ressourc[0].', '.$this->var[1][1].' de '.$ressourc[1].' et '.$this->var[1][2].' d\''.$ressourc[2].' sur '.$this->var[0]['nom_planete'].'['.$this->var[0]['galaxie'].':'.$this->var[0]['ss'].':'.$this->var[0]['position'].']</b><br /><br />';
$temps = $this->timestamp;
$utilA = trouvNom($this->utilA);
$utilB = trouvNom($this->utilB);
$db = new bdd();
$db->connexion();
$db->escape($titre);
$db->escape($rapportA);
$db->escape($rapportB);
$db->query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilA)."', '', '$titre', '$rapportA', '$temps')");
$db->query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilB)."', '', '$titre', '$rapportB', '$temps')");
$db->escape($utilA);
$db->escape($utilB);
$db->query("INSERT INTO ".$this->table." VALUES('', '1', '$utilA', '', '$titre', '$rapportA', '$temps')");
if ($utilA != $utilB) $db->query("INSERT INTO ".$this->table." VALUES('', '1', '$utilB', '', '$titre', '$rapportB', '$temps')");
$db->deconnexion();
}
@ -138,12 +151,14 @@ class Rapport{
else $rapport = 'Nous n\'avons pas pu coloniser la planète ['.$this->var[0][0].':'.$this->var[0][1].':'.$this->var[0][2].'] car lorsque nous sommes arrivé sur place, elle était déjà colonisée.';
$temps = $this->timestamp;
$utilA = trouvNom($this->utilA);
$db = new bdd();
$db->connexion();
$db->escape($titre);
$db->escape($rapport);
$db->query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilA)."', '', '$titre', '$rapport', '$temps')");
$db->escape($utilA);
$db->query("INSERT INTO ".$this->table." VALUES('', '1', '$utilA', '', '$titre', '$rapport', '$temps')");
$db->deconnexion();
}
@ -153,12 +168,14 @@ class Rapport{
$rapport = 'Vos vaisseaux récoltent '.$this->var[1][0].' de '.$ressourc[0].' et '.$this->var[1][1].' de '.$ressourc[1].' sur '.$this->var[0]['nom_planete'].'['.$this->var[0]['galaxie'].':'.$this->var[0]['ss'].':'.$this->var[0]['position'].']</b><br /><br />';
$temps = $this->timestamp;
$utilA = trouvNom($this->utilA);
$db = new bdd();
$db->connexion();
$db->escape($titre);
$db->escape($rapport);
$db->query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilA)."', '', '$titre', '$rapport', '$temps')");
$db->escape($utilA);
$db->query("INSERT INTO ".$this->table." VALUES('', '1', '$utilA', '', '$titre', '$rapport', '$temps')");
$db->deconnexion();
}
@ -229,6 +246,7 @@ class Rapport{
$rapportB->assign('termine', $this->var[6][0]);
$rapportB->assign('attaquantG', $this->var[6][1]);
$rapportB->assign('matchnul', $this->var[6][2]);
$rapportB->assign('pillage', $this->var[11]);
$rapportB->assign('vaisBC', $nomvais_bc);
@ -254,6 +272,8 @@ class Rapport{
$titreA = 'Combat contre '.$this->var[4]['pseudo'];
$titreB = 'Combat contre '.$this->var[5]['pseudo'];
$temps = $this->timestamp;
$utilA = trouvNom($this->utilA);
$utilB = trouvNom($this->utilB);
$db = new bdd();
$db->connexion();
@ -261,8 +281,10 @@ class Rapport{
$db->escape($titreB);
$db->escape($rapportA);
$db->escape($rapportB);
$db->query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilA)."', '', '$titreA', '$rapportA', '$temps')");
$db->query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilB)."', '', '$titreB', '$rapportB', '$temps')");
$db->escape($utilA);
$db->escape($utilB);
$db->query("INSERT INTO ".$this->table." VALUES('', '1', '$utilA', '', '$titreA', '$rapportA', '$temps')");
$db->query("INSERT INTO ".$this->table." VALUES('', '1', '$utilB', '', '$titreB', '$rapportB', '$temps')");
$db->deconnexion();
}
@ -293,7 +315,7 @@ class Rapport{
$rapportA->assign('pillage', $this->var[11]);
$rapportA->assign('debris', $this->var[12]);
$rapportA->assign('infoPLUS', $this->var[14]);
$rapportA->assign('infoPLUS2', $this->var[15]);
//$rapportA->assign('infoPLUS2', $this->var[15]);
$rapportA->assign('page', 'simulation');
$rapportA->assign('enligne', $this->var[13][0]);
@ -333,7 +355,9 @@ class Rapport{
$db->connexion();
$db->escape($titreA);
$db->escape($rapportA);
$db->query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilA)."', '', '$titreA', '$rapportA', '$temps')");
$utilA = trouvNom($this->utilA);
$db->escape($utilA);
$db->query("INSERT INTO ".$this->table." VALUES('', '1', '$utilA', '', '$titreA', '$rapportA', '$temps')");
$db->deconnexion();
}
@ -348,7 +372,9 @@ class Rapport{
$db->connexion();
$db->escape($titreA);
$db->escape($rapportA);
$db->query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilA)."', '', '$titreA', '$rapportA', '$temps')");
$utilA = trouvNom($this->utilA);
$db->escape($utilA);
$db->query("INSERT INTO ".$this->table." VALUES('', '1', '$utilA', '', '$titreA', '$rapportA', '$temps')");
$db->deconnexion();
}
}