forked from halo-battle/game
Version 1.5a
This commit is contained in:
parent
a66ed9797b
commit
58928889ed
79 changed files with 4932 additions and 332 deletions
|
|
@ -100,6 +100,52 @@ class Rapport{
|
|||
mysql_query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilB)."', '', '$titreB', '$rapportB', '$temps')");
|
||||
}
|
||||
|
||||
function sendTransport(){
|
||||
include_once('includes/function.php');
|
||||
$titre = 'Transport vers '.$this->var[0]['nom_planete'].' ['.$this->var[0]['galaxie'].':'.$this->var[0]['ss'].':'.$this->var[0]['position'].']';
|
||||
|
||||
$race = trouvInfo($this->utilA, 'race');
|
||||
include('includes/noms.php');
|
||||
$rapportA = 'Vos vaisseaux 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 />';
|
||||
|
||||
$race = trouvInfo($this->utilB, 'race');
|
||||
include('includes/noms.php');
|
||||
$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 />';
|
||||
|
||||
$titre = mysql_real_escape_string($titre);
|
||||
$rapportA = mysql_real_escape_string($rapportA);
|
||||
$rapportB = mysql_real_escape_string($rapportB);
|
||||
$temps = $this->timestamp;
|
||||
|
||||
mysql_query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilA)."', '', '$titre', '$rapportA', '$temps')");
|
||||
mysql_query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilB)."', '', '$titre', '$rapportB', '$temps')");
|
||||
}
|
||||
|
||||
function sendColonisation(){
|
||||
include_once('includes/function.php');
|
||||
$titre = 'Colonisation de ['.$this->var[0][0].':'.$this->var[0][1].':'.$this->var[0][2].']';
|
||||
if ($this->var[1]) $rapport = 'Votre vaisseau a atteint la planète ['.$this->var[0][0].':'.$this->var[0][1].':'.$this->var[0][2].'] et commence la colonisation.';
|
||||
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.';
|
||||
|
||||
$titre = mysql_real_escape_string($titre);
|
||||
$rapport = mysql_real_escape_string($rapport);
|
||||
$temps = $this->timestamp;
|
||||
|
||||
mysql_query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilA)."', '', '$titre', '$rapport', '$temps')");
|
||||
}
|
||||
|
||||
function sendRecyclage(){
|
||||
include_once('includes/function.php');
|
||||
$titre = 'Recyclage de '.$this->var[0]['nom_planete'].' ['.$this->var[0]['galaxie'].':'.$this->var[0]['ss'].':'.$this->var[0]['position'].']';
|
||||
$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 />';
|
||||
|
||||
$titre = mysql_real_escape_string($titre);
|
||||
$rapport = mysql_real_escape_string($rapport);
|
||||
$temps = $this->timestamp;
|
||||
|
||||
mysql_query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilA)."', '', '$titre', '$rapport', '$temps')");
|
||||
}
|
||||
|
||||
function sendCombat(){
|
||||
include('includes/vars.php');
|
||||
include_once('includes/function.php');
|
||||
|
|
@ -137,6 +183,8 @@ class Rapport{
|
|||
|
||||
$rapportA->assign('vaisBC', $nomvais_bc);
|
||||
$rapportA->assign('vaisPV', $nomvais_pv);
|
||||
$rapportA->assign('defBC', $defense_bc);
|
||||
$rapportA->assign('defPV', $defense_pv);
|
||||
$rapportA->assign('nextTour', $this->var[10]);
|
||||
|
||||
$race = trouvInfo($this->utilA, 'race');
|
||||
|
|
@ -169,6 +217,8 @@ class Rapport{
|
|||
|
||||
$rapportB->assign('vaisBC', $nomvais_bc);
|
||||
$rapportB->assign('vaisPV', $nomvais_pv);
|
||||
$rapportB->assign('defBC', $defense_bc);
|
||||
$rapportB->assign('defPV', $defense_pv);
|
||||
$rapportB->assign('nextTour', $this->var[10]);
|
||||
|
||||
$race = trouvInfo($this->utilA, 'race');
|
||||
|
|
@ -195,6 +245,60 @@ class Rapport{
|
|||
mysql_query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilB)."', '', '$titreB', '$rapportB', '$temps')");
|
||||
}
|
||||
|
||||
function show(){
|
||||
include('includes/vars.php');
|
||||
include_once('includes/function.php');
|
||||
require_once(SMARTY_DIR."Smarty.class.php");
|
||||
|
||||
$rapportA = new Smarty();
|
||||
|
||||
$rapportA->template_dir = _FCORE.'templates/templates/';
|
||||
$rapportA->compile_dir = _FCORE.'templates/templates_c/';
|
||||
$rapportA->config_dir = _FCORE.'templates/configs/';
|
||||
$rapportA->cache_dir = _FCORE.'templates/cache/';
|
||||
|
||||
$rapportA->assign('tour', $this->var[3]);
|
||||
$rapportA->assign('EN', $this->var[4]);
|
||||
$rapportA->assign('flotte', $this->var[5]);
|
||||
$rapportA->assign('vaisseaux1', $this->var[0]);
|
||||
$rapportA->assign('vaisseaux2', $this->var[1]);
|
||||
$rapportA->assign('defenses1', $this->var[2]);
|
||||
$rapportA->assign('vaisseaux3', $this->var[7]);
|
||||
$rapportA->assign('vaisseaux4', $this->var[8]);
|
||||
$rapportA->assign('defenses2', $this->var[9]);
|
||||
|
||||
$rapportA->assign('termine', $this->var[6][0]);
|
||||
$rapportA->assign('attaquantG', $this->var[6][1]);
|
||||
$rapportA->assign('pillage', $this->var[11]);
|
||||
$rapportA->assign('debris', $this->var[12]);
|
||||
|
||||
$rapportA->assign('page', 'simulation');
|
||||
$rapportA->assign('enligne', $this->var[13][0]);
|
||||
$rapportA->assign('infos', $this->var[13][1]);
|
||||
$rapportA->assign('nbinfos', $this->var[13][2]);
|
||||
$rapportA->assign('count', $this->var[13][3]);
|
||||
$rapportA->assign('version', $this->var[13][4]);
|
||||
$rapportA->assign('tpsdejeu', $this->var[13][5]);
|
||||
|
||||
$rapportA->assign('vaisBC', $nomvais_bc);
|
||||
$rapportA->assign('vaisPV', $nomvais_pv);
|
||||
$rapportA->assign('defBC', $defense_bc);
|
||||
$rapportA->assign('defPV', $defense_pv);
|
||||
$rapportA->assign('nextTour', $this->var[10]);
|
||||
|
||||
$race = trouvInfo($this->utilA, 'race');
|
||||
include('includes/noms.php');
|
||||
$rapportA->assign('ressources', $ressourc);
|
||||
$rapportA->assign('nomvaisAT', $nomvaisa);
|
||||
$rapportA->assign('nomvaisEN', $nomvaisa);
|
||||
array_splice($nomterra, 0, 8);
|
||||
$rapportA->assign('nomdefEN', $nomterra);
|
||||
$rapportA->assign('race', $race);
|
||||
|
||||
return $rapportA->fetch('game/SIMrapport_combat.tpl');
|
||||
return $rapportA;
|
||||
}
|
||||
|
||||
function sendAlliance(){
|
||||
include_once('includes/function.php');
|
||||
$titreA = 'Déclaration officielle de votre alliance !';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue