forked from halo-battle/game
Version 1.5
This commit is contained in:
parent
083eb365c5
commit
a66ed9797b
157 changed files with 29787 additions and 3531 deletions
|
|
@ -100,10 +100,105 @@ class Rapport{
|
|||
mysql_query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilB)."', '', '$titreB', '$rapportB', '$temps')");
|
||||
}
|
||||
|
||||
function sendCombat(){
|
||||
include('includes/vars.php');
|
||||
include_once('includes/function.php');
|
||||
require_once(SMARTY_DIR."Smarty.class.php");
|
||||
|
||||
$rapportA = new Smarty();
|
||||
$rapportB = 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/';
|
||||
|
||||
$rapportB->template_dir = _FCORE.'templates/templates/';
|
||||
$rapportB->compile_dir = _FCORE.'templates/templates_c/';
|
||||
$rapportB->config_dir = _FCORE.'templates/configs/';
|
||||
$rapportB->cache_dir = _FCORE.'templates/cache/';
|
||||
|
||||
$this->var[4]['pseudo'] = trouvNom($this->var[4]['id_user']);
|
||||
$this->var[5]['pseudo'] = trouvNom($this->var[5]['id_user']);
|
||||
|
||||
$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('vaisBC', $nomvais_bc);
|
||||
$rapportA->assign('vaisPV', $nomvais_pv);
|
||||
$rapportA->assign('nextTour', $this->var[10]);
|
||||
|
||||
$race = trouvInfo($this->utilA, 'race');
|
||||
include('includes/noms.php');
|
||||
$rapportA->assign('ressources', $ressourc);
|
||||
$rapportA->assign('nomvaisAT', $nomvaisa);
|
||||
|
||||
$race = trouvInfo($this->var[4]['id_user'], 'race');
|
||||
include('includes/noms.php');
|
||||
$rapportA->assign('nomvaisEN', $nomvaisa);
|
||||
array_splice($nomterra, 0, 8);
|
||||
$rapportA->assign('nomdefEN', $nomterra);
|
||||
|
||||
$rapportA = $rapportA->fetch('game/ATrapport_combat.tpl');
|
||||
|
||||
|
||||
$rapportB->assign('tour', $this->var[3]);
|
||||
$rapportB->assign('EN', $this->var[4]);
|
||||
$rapportB->assign('flotte', $this->var[5]);
|
||||
$rapportB->assign('vaisseaux1', $this->var[0]);
|
||||
$rapportB->assign('vaisseaux2', $this->var[1]);
|
||||
$rapportB->assign('defenses1', $this->var[2]);
|
||||
$rapportB->assign('vaisseaux3', $this->var[7]);
|
||||
$rapportB->assign('vaisseaux4', $this->var[8]);
|
||||
$rapportB->assign('defenses2', $this->var[9]);
|
||||
|
||||
$rapportB->assign('termine', $this->var[6][0]);
|
||||
$rapportB->assign('attaquantG', $this->var[6][1]);
|
||||
$rapportB->assign('pillage', $this->var[11]);
|
||||
|
||||
$rapportB->assign('vaisBC', $nomvais_bc);
|
||||
$rapportB->assign('vaisPV', $nomvais_pv);
|
||||
$rapportB->assign('nextTour', $this->var[10]);
|
||||
|
||||
$race = trouvInfo($this->utilA, 'race');
|
||||
include('includes/noms.php');
|
||||
$rapportB->assign('ressources', $ressourc);
|
||||
$rapportB->assign('nomvaisAT', $nomvaisa);
|
||||
|
||||
$race = trouvInfo($this->var[4]['id_user'], 'race');
|
||||
include('includes/noms.php');
|
||||
$rapportB->assign('nomvaisEN', $nomvaisa);
|
||||
array_splice($nomterra, 0, 8);
|
||||
$rapportB->assign('nomdefEN', $nomterra);
|
||||
|
||||
$rapportB = $rapportB->fetch('game/ENrapport_combat.tpl');
|
||||
|
||||
|
||||
$titreA = mysql_real_escape_string('Combat contre '.$this->var[4]['pseudo']);
|
||||
$rapportA = mysql_real_escape_string($rapportA);
|
||||
$titreB = mysql_real_escape_string('Combat contre '.$this->var[5]['pseudo']);
|
||||
$rapportB = mysql_real_escape_string($rapportB);
|
||||
$temps = $this->timestamp;
|
||||
|
||||
mysql_query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilA)."', '', '$titreA', '$rapportA', '$temps')");
|
||||
mysql_query("INSERT INTO mail VALUES('', '1', '".trouvNom($this->utilB)."', '', '$titreB', '$rapportB', '$temps')");
|
||||
}
|
||||
|
||||
function sendAlliance(){
|
||||
include_once('includes/function.php');
|
||||
$titreA = 'Déclaration officielle de votre alliance !';
|
||||
$rapportA = 'Félicitations, votre alliance a recueilli suffisament de signature, sa déclaration est maintenant officielle !<br /><br />Vous pouvez dès maintenant administrer votre alliance en vous randant sur la page Alliance.';
|
||||
$rapportA = 'Félicitations, votre alliance a recueilli suffisament de signature, sa déclaration est maintenant officielle !<br /><br />Vous pouvez dès maintenant administrer votre alliance en vous rendant sur la page Alliance.';
|
||||
|
||||
$titreA = mysql_real_escape_string($titreA);
|
||||
$rapportA = mysql_real_escape_string($rapportA);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue