diff --git a/htdocs/admin.php b/htdocs/admin.php
index 4b46b8c..89f2408 100644
--- a/htdocs/admin.php
+++ b/htdocs/admin.php
@@ -12,8 +12,10 @@ require_once(_FCORE."common.php");
//On vérifie si le client est connecté ou non sur le site
if (isset($sess) && isset($sess->values['connected']) && $sess->values['connected'] && !empty($sess->values['id']) && isset($sess->values['auth_level']) && $sess->values['auth_level'] >= 3 && !empty($sess->values['idPlan']) && $sess->values['id'] != "172") {
function infoPlan($galaxie, $ss, $pos, $info){
- $req = mysql_query("SELECT * FROM planete WHERE galaxie = '$galaxie' AND ss = '$ss' AND position= '$pos';");
- $resultat = mysql_fetch_array($req);
+ $base = new bdd();
+ $base->connexion();
+ $resultat = $base->unique_query("SELECT * FROM planete WHERE galaxie = '$galaxie' AND ss = '$ss' AND position= '$pos';");
+ $base->deconnexion();
return $resultat[$info];
}
@@ -45,7 +47,6 @@ if (isset($sess) && isset($sess->values['connected']) && $sess->values['connecte
$template->assign('tpsdejeu',$min.' min');
if (!isset($_GET['p'])) $_GET['p'] = '';
- $chapeau->connexion();
switch($_GET['p']){
case 'courrier': include(_FCORE."hb_game/jeu/admin/mail.php"); break;
case 'vip': include(_FCORE."hb_game/jeu/admin/ip.php"); break;
diff --git a/htdocs/cron/classement.php b/htdocs/cron/classement.php
index c716a6f..765ad73 100644
--- a/htdocs/cron/classement.php
+++ b/htdocs/cron/classement.php
@@ -5,6 +5,7 @@ if(!defined('INDEX')) define('INDEX', 1);
print 'Il est : '.date('d/m/Y H:i:s');
set_time_limit(0);
+ignore_user_abort(true);
$onyx = @file_get_contents('./../.onyx') or die("Configuration introuvable.");
define("_FCORE",'../'.trim($onyx));
@@ -126,7 +127,7 @@ while($recup_id = mysql_fetch_array($sql_1)) {
$POINTS_BATIMENTS = $POINTS_BATIMENTS / 1000;
// points flottes terrestres recherches batiments
- if ($recup_id['auth_level'] < 3 && $recup_id['mv'] >= 2) mysql_query("INSERT INTO `classement` VALUES (NULL, '$PSEUDO_USER', '$race', '$PT_RESSOURCES', '$POINTS_VAISSEAUX', '0', '$POINTS_TECHNO', '$POINTS_BATIMENTS')") or die (mysql_error());
+ if ($recup_id['auth_level'] < 3 && $recup_id['mv'] < 2) mysql_query("INSERT INTO `classement` VALUES (NULL, '$PSEUDO_USER', '$race', '$PT_RESSOURCES', '$POINTS_VAISSEAUX', '0', '$POINTS_TECHNO', '$POINTS_BATIMENTS')") or die (mysql_error());
mysql_query("UPDATE `user` SET `flotte` = '" . $POINTS_VAISSEAUX . "', `recherches` = '" . $POINTS_TECHNO . "', `batiments` = '" . $POINTS_BATIMENTS . "', `points` = '" . $PT_RESSOURCES . "' WHERE `pseudo` = '" . $PSEUDO_USER . "'") or die (mysql_error());
$metal = 0;
diff --git a/htdocs/index.php b/htdocs/index.php
index 09d7612..65a46f8 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -56,7 +56,6 @@ if (isset($sess) && isset($sess->values['connected']) && $sess->values['connecte
$queryPlanetes = $bdd->query("SELECT * FROM $table_planete WHERE id_user = '$id_user' ORDER BY id ASC;");
$queryPlanete = $bdd->unique_query("SELECT * FROM $table_planete WHERE id = '$idPlan'");
- $bdd->query("SELECT xid FROM $table_sessions WHERE active = '1'");
$bdd->deconnexion();
$enligne = $bdd->num_rows;
@@ -126,7 +125,6 @@ if (isset($sess) && isset($sess->values['connected']) && $sess->values['connecte
$template->assign('planete',$queryPlanete);
$template->assign('planetes',$queryPlanetes);
- $template->assign('enligne',$enligne);
$template->assign('nomsressources',$ressourc);
//Calcul du nombre de cases restantes
@@ -215,6 +213,9 @@ if (isset($sess) && isset($sess->values['connected']) && $sess->values['connecte
case 'operateur':
include(_FCORE."hb_game/jeu/operateur.php");
break;
+ case "pilori":
+ include(_FCORE."hb_game/jeu/pilori.php");
+ break;
case "conditions":
include(_FCORE."hb_game/jeu/conditions.php");
break;
@@ -426,6 +427,7 @@ else {
default:
$page = 'mini';
//header('Location: http://halo-battle.s-fr.com/?p=connexion');
+ //exit;
}
$template->display('cms/'.$page.'.tpl');
}
diff --git a/htdocs/sign.php b/htdocs/sign.php
index 09a7a80..8222ee6 100644
--- a/htdocs/sign.php
+++ b/htdocs/sign.php
@@ -5,61 +5,165 @@ $onyx = @file_get_contents('./.onyx') or die("Configuration introuvable.");
define("_FCORE",trim($onyx));
require_once(_FCORE."common.php");
-// Là, on défini le header de la page pour la transformer en image
-header ("Content-type: image/png");
-// Là, on crée notre image
-$_img = imagecreatefrompng(_FCORE."hb_game/signatures/userbarallicopygs1.png");
-// On défini maintenant les couleurs
-// Couleur de fond :
-//$arriere_plan = imagecolorallocate($_img, 0, 0, 0); // Au cas où on utiliserai pas d'image de fond, on utilise cette couleur là.
-// Autres couleurs :
-$blanc = imagecolorallocate($_img, 255, 255, 255); // Couleur du texte
-$rouge = imagecolorallocate($_img, 255, 0, 0); // Couleur du texte
+header ("Content-type: image/png");
$fontfile = _FCORE."hb_game/signatures/ARIAL.TTF";
-if (!isset($_GET['i']) || !is_numeric($_GET['i'])) $_GET['i'] = 0;
-$id = $_GET['i'];
+$id = gpc('i');
+if (!is_numeric($id)) $id = 0;
$bdd->connexion();
$bdd->escape($id);
-$joueur = $bdd->unique_query("SELECT $table_user.pseudo, $table_user.race, $table_user.place_points, $table_user.points, $table_user.batiments, $table_user.flotte, $table_alliances.tag, $table_alliances.nom FROM $table_user INNER JOIN $table_alliances ON $table_user.id_alliance = $table_alliances.id WHERE $table_user.id = $id;");
-if ($joueur == false) $joueur = $bdd->unique_query("SELECT pseudo, race, place_points, points, batiments, flotte FROM $table_user WHERE id = $id;");
+$joueur = $bdd->unique_query("SELECT $table_user.pseudo, $table_user.auth_level, $table_user.race, $table_user.place_points, $table_user.points, $table_user.batiments, $table_user.flotte, $table_alliances.tag, $table_alliances.nom FROM $table_user INNER JOIN $table_alliances ON $table_user.id_alliance = $table_alliances.id WHERE $table_user.id = $id;");
+if ($joueur == false) $joueur = $bdd->unique_query("SELECT pseudo, auth_level, race, place_points, points, batiments, flotte FROM $table_user WHERE id = $id;");
$nomjoueur = $joueur['pseudo'];
$raid = $bdd->unique_query("SELECT COUNT(id) AS nombre FROM $table_mail WHERE destinataire = '$nomjoueur' AND contenu LIKE 'Le combat contre % est termi%';");
$transport = $bdd->unique_query("SELECT COUNT(id) AS nombre FROM $table_mail WHERE contenu LIKE 'Les vaisseaux de $nomjoueur %';");
$bdd->deconnexion();
-if ($joueur['race'] == 'covenant') $_imgavatar = imagecreatefrompng(_FCORE."hb_game/signatures/covi.png");
-else $_imgavatar = imagecreatefrompng(_FCORE."hb_game/signatures/hum.png");
+$f = gpc('f');
+
+if ($joueur['race'] == 'covenant') {
+ switch($f){
+ case 1:
+ $img = 'userbarallicopygs1.png';
+ $_img = imagecreatefrompng(_FCORE."hb_game/signatures/".$img);
+ $entete = imagecolorallocate($_img, 255, 255, 255);
+ $contenu = imagecolorallocate($_img, 255, 255, 255);
+ $infos = array(
+ array(
+ imagecolorallocate($_img, 255, 255, 255),
+ separerNombres($raid['nombre'])
+ ),
+ array(
+ imagecolorallocate($_img, 255, 255, 255),
+ separerNombres($joueur['batiments'])
+ ),
+ array(
+ imagecolorallocate($_img, 255, 255, 255),
+ separerNombres($joueur['flotte'])
+ ),
+ array(
+ imagecolorallocate($_img, 255, 255, 255),
+ separerNombres($transport['nombre'])
+ )
+ );
+ break;
+ default:
+ $img = 'covenantuserbarus1.png';
+ $_img = imagecreatefrompng(_FCORE."hb_game/signatures/".$img);
+ $entete = imagecolorallocate($_img, 255, 255, 255);
+ $contenu = imagecolorallocate($_img, 0, 0, 0);
+ $infos = array(
+ array(
+ imagecolorallocate($_img, 0, 0, 0),
+ separerNombres($raid['nombre'])
+ ),
+ array(
+ imagecolorallocate($_img, 0, 0, 0),
+ separerNombres($joueur['flotte'])
+ ),
+ array(
+ imagecolorallocate($_img, 0, 0, 0),
+ separerNombres($transport['nombre'])
+ ),
+ array(
+ imagecolorallocate($_img, 0, 0, 0),
+ separerNombres($joueur['batiments'])
+ )
+ );
+ }
+ $_imgavatar = imagecreatefrompng(_FCORE."hb_game/signatures/covi.png");
+}
+else {
+ switch($f){
+ case 1:
+ $img = 'userbarallicopygs1.png';
+ $_img = imagecreatefrompng(_FCORE."hb_game/signatures/".$img);
+ $entete = imagecolorallocate($_img, 255, 255, 255);
+ $contenu = imagecolorallocate($_img, 255, 255, 255);
+ $infos = array(
+ array(
+ imagecolorallocate($_img, 255, 255, 255),
+ separerNombres($raid['nombre'])
+ ),
+ array(
+ imagecolorallocate($_img, 255, 255, 255),
+ separerNombres($joueur['batiments'])
+ ),
+ array(
+ imagecolorallocate($_img, 255, 255, 255),
+ separerNombres($joueur['flotte'])
+ ),
+ array(
+ imagecolorallocate($_img, 255, 255, 255),
+ separerNombres($transport['nombre'])
+ )
+ );
+ break;
+ default:
+ $img = 'humainuserbarhz2.png';
+ $_img = imagecreatefrompng(_FCORE."hb_game/signatures/".$img);
+ $entete = imagecolorallocate($_img, 255, 255, 255);
+ //$contenu = imagecolorallocate($_img, 160, 160, 0);
+ $contenu = imagecolorallocate($_img, 255, 255, 255);
+ $infos = array(
+ array(
+ imagecolorallocate($_img, 0, 0, 0),
+ separerNombres($raid['nombre'])
+ ),
+ array(
+ imagecolorallocate($_img, 255, 255, 255),
+ separerNombres($joueur['flotte'])
+ ),
+ array(
+ imagecolorallocate($_img, 255, 255, 255),
+ separerNombres($transport['nombre'])
+ ),
+ array(
+ imagecolorallocate($_img, 255, 255, 255),
+ separerNombres($joueur['batiments'])
+ )
+ );
+ }
+ $_imgavatar = imagecreatefrompng(_FCORE."hb_game/signatures/hum.png");
+}
+
+$blanc = imagecolorallocate($_img, 255, 255, 255);
+$noir = imagecolorallocate($_img, 0, 0, 0);
+$rouge = imagecolorallocate($_img, 255, 0, 0);
+$vert = imagecolorallocate($_img, 0, 255, 0);
+$bleu = imagecolorallocate($_img, 0, 0, 255);
+$jaune = imagecolorallocate($_img, 255, 255, 0);
if ($joueur == false) ImageTTFText($_img, 20, -20, 123, 17, $rouge, $fontfile, 'Joueur introuvable !');
else {
- ImageTTFText($_img, 12, 0, 45, 23, $blanc, $fontfile, ucfirst($joueur['pseudo']));
+ if ($joueur['auth_level'] > 4) ImageTTFText($_img, 12, 0, 45, 23, $vert, $fontfile, ucfirst($joueur['pseudo']));
+ elseif ($joueur['auth_level'] >= 1) ImageTTFText($_img, 12, 0, 45, 23, $jaune, $fontfile, ucfirst($joueur['pseudo']));
+ else ImageTTFText($_img, 12, 0, 45, 23, $entete, $fontfile, ucfirst($joueur['pseudo']));
+
+ ImageTTFText($_img, 12, 0, 255, 23, $entete, $fontfile, $config['serveur_name']);
if (isset($joueur['tag'])) {
- ImageTTFText($_img, 12, 0, 32, 45, $blanc, $fontfile, "Classement : ".separerNombres($joueur['place_points']).($joueur['place_points']==1?'er':'ème'));
- ImageTTFText($_img, 12, 0, 32, 62, $blanc, $fontfile, "Points : ".separerNombres($joueur['points']));
- ImageTTFText($_img, 12, 0, 32, 80, $blanc, $fontfile, "Alliance : [".$joueur['tag']."] ".substr($joueur['nom'],0,9).(strlen($joueur['nom'])>9?'...':''));
+ ImageTTFText($_img, 11, 0, 32, 47, $contenu, $fontfile, "Classement : ".separerNombres($joueur['place_points']).($joueur['place_points']==1?'er':'ème'));
+ ImageTTFText($_img, 11, 0, 32, 64, $contenu, $fontfile, "Points : ".separerNombres($joueur['points']));
+ ImageTTFText($_img, 11, 0, 32, 82, $contenu, $fontfile, "Alliance : [".$joueur['tag']."] ".substr($joueur['nom'],0,9).(strlen($joueur['nom'])>9?'...':''));
}
else {
- ImageTTFText($_img, 12, 0, 32, 52, $blanc, $fontfile, "Classement : ".separerNombres($joueur['place_points']).($joueur['place_points']==1?'er':'ème'));
- ImageTTFText($_img, 12, 0, 32, 72, $blanc, $fontfile, "Points : ".separerNombres($joueur['points']));
+ ImageTTFText($_img, 11, 0, 32, 55, $contenu, $fontfile, "Classement : ".separerNombres($joueur['place_points']).($joueur['place_points']==1?'er':'ème'));
+ ImageTTFText($_img, 11, 0, 32, 75, $contenu, $fontfile, "Points : ".separerNombres($joueur['points']));
}
- ImageTTFText($_img, 12, 0, 275, 52, $blanc, $fontfile, $raid['nombre']);
- ImageTTFText($_img, 12, 0, 275, 78, $blanc, $fontfile, $joueur['batiments']);
- ImageTTFText($_img, 12, 0, 355, 52, $blanc, $fontfile, $joueur['flotte']);
- ImageTTFText($_img, 12, 0, 355, 78, $blanc, $fontfile, $transport['nombre']);
+ ImageTTFText($_img, 12, 0, 272, 51, $infos[0][0], $fontfile, $infos[0][1]);
+ ImageTTFText($_img, 12, 0, 272, 78, $infos[1][0], $fontfile, $infos[1][1]);
+ ImageTTFText($_img, 12, 0, 355, 50, $infos[2][0], $fontfile, $infos[2][1]);
+ ImageTTFText($_img, 12, 0, 355, 78, $infos[3][0], $fontfile, $infos[3][1]);
}
imagecopy($_img, $_imgavatar, 435, 0, 0, 0, 98, 100);
imagealphablending($_img, false);
imagesavealpha($_img, true);
-imagealphablending($_imgavatar, false);
-imagesavealpha($_imgavatar, true);
-
imagepng($_img);
?>
\ No newline at end of file
diff --git a/htdocs/templates/csnu.css b/htdocs/templates/csnu.css
index 12f4672..4ce22c9 100644
--- a/htdocs/templates/csnu.css
+++ b/htdocs/templates/csnu.css
@@ -567,10 +567,6 @@ font-style: normal;
#corps .border_top, #corps .border_bt
{
-margin: 0;
-padding: 0;
-height: 9px;
-width: 680px;
}
#corps table
diff --git a/onyx/common.php b/onyx/common.php
index 06dcc70..63268e9 100644
--- a/onyx/common.php
+++ b/onyx/common.php
@@ -70,8 +70,11 @@ xtdi = ""; //implication degree
$bdd = new bdd();
$bdd->connexion();
-$bdd->query("SELECT id FROM $table_user WHERE race = 'covenant';"); $nbcovie = $bdd->num_rows;
-$bdd->query("SELECT id FROM $table_user WHERE race = 'humain';"); $nbhumain = $bdd->num_rows;
+$nbcovie = $bdd->unique_query("SELECT COUNT(id) AS covenants FROM $table_user WHERE race = 'covenant';");
+$nbhumain = $bdd->unique_query("SELECT COUNT(id) AS humains FROM $table_user WHERE race = 'humain';");
+
+//Nombre de joueur(s) en ligne ^^
+$enligne = $bdd->unique_query("SELECT COUNT(xid) AS enligne FROM sessions WHERE active=1 AND var_session !='';");
//Bandeau d'informations
$infos = $bdd->query("SELECT * FROM $table_infoshead");
@@ -81,5 +84,6 @@ $bdd->deconnexion();
//Affichage du header
$template->assign('infos',$infos);
$template->assign('nbinfos',$bdd->num_rows-1);
-$template->assign('count',array('humains' => $nbhumain, 'covenants' => $nbcovie, 'serveurs' => 'cette'));
+$template->assign('enligne',$enligne['enligne']);
+$template->assign('count',array('humains' => $nbhumain['humains'], 'covenants' => $nbcovie['covenants'], 'serveurs' => 'cette'));
?>
\ No newline at end of file
diff --git a/onyx/config.xconf b/onyx/config.xconf
index aaf25c5..d831e4d 100644
--- a/onyx/config.xconf
+++ b/onyx/config.xconf
@@ -7,6 +7,7 @@ url_rewriting : "1"
session: "1"
session_time: "1000"
session_name: "hbsession"
+serveur_name: "Alpha"
locales: "fr_FR"
lang: "FRA"
diff --git a/onyx/hb_game/jeu/admin/flottes.php b/onyx/hb_game/jeu/admin/flottes.php
index a4a3c00..302ae29 100644
--- a/onyx/hb_game/jeu/admin/flottes.php
+++ b/onyx/hb_game/jeu/admin/flottes.php
@@ -6,6 +6,7 @@ $titre = 'Vérification flottes';
//Vérification des flottes
if (!isset($_GET['ceil'])) $_GET['ceil'] = 5000;
+$chapeau->connexion();
$req = mysql_query("SELECT * FROM `$table_flottes` ORDER BY `start_time` DESC");
$tableau = array();
while($resultat = mysql_fetch_array($req)) {
diff --git a/onyx/hb_game/jeu/admin/ip.php b/onyx/hb_game/jeu/admin/ip.php
index f4ccaa6..f237ae3 100644
--- a/onyx/hb_game/jeu/admin/ip.php
+++ b/onyx/hb_game/jeu/admin/ip.php
@@ -3,21 +3,34 @@ if(!defined('INDEX')) { header('Location: ../'); exit; }
$pagea = 'vip';
$titre = 'Vérification IP';
+$timelimit = date('Y-m-d', mktime(0, 0, 0, date("m"), date("d"), date("Y"))); //2008-06-17 18:15:00
$chapeau->connexion();
-if (isset($_GET['ip'])) $req = mysql_query("SELECT * FROM $table_registre_identification WHERE ip = '".$_GET['ip']."' ORDER BY ip ASC;");
-elseif (isset($_GET['util'])) $req = mysql_query("SELECT * FROM $table_registre_identification WHERE id_util = '".$_GET['util']."' ORDER BY ip ASC;");
-elseif (isset($_GET['tri'])) $req = mysql_query("SELECT * FROM $table_registre_identification ORDER BY ".$_GET['tri']." ASC;");
-else $req = mysql_query("SELECT * FROM $table_registre_identification ORDER BY ip ASC;");
+$page = gpc('v');
+if (empty($page) || !is_numeric($page)) $page = 0;
+
+$act = gpc('act');
+if ($act == 'multiok') $chapeau->query("UPDATE $table_user SET multi = '1' WHERE id = ".$_GET['util'].";");
+
+if (isset($_GET['ip'])) $req = mysql_query("SELECT R.id, R.id_util, R.time, R.ip, U.pseudo, U.mv, U.multi FROM $table_registre_identification R INNER JOIN $table_user U ON R.id_util = U.id WHERE ip = '".$_GET['ip']."' ORDER BY ip ASC;");
+elseif (isset($_GET['util']) && isset($_GET['comp'])) $req = mysql_query("SELECT R.id, R.id_util, R.time, R.ip, U.pseudo, U.mv, U.multi FROM $table_registre_identification R INNER JOIN $table_user U ON R.id_util = U.id WHERE id_util = ".$_GET['util']." OR id_util = ".$_GET['comp']." ORDER BY ip ASC;");
+elseif (isset($_GET['util'])) $req = mysql_query("SELECT R.id, R.id_util, R.time, R.ip, U.pseudo, U.mv, U.multi FROM $table_registre_identification R INNER JOIN $table_user U ON R.id_util = U.id WHERE id_util = '".$_GET['util']."' ORDER BY ip ASC;");
+elseif (isset($_GET['tri'])) $req = mysql_query("SELECT R.id, R.id_util, R.time, R.ip, U.pseudo, U.mv, U.multi FROM $table_registre_identification R INNER JOIN $table_user U ON R.id_util = U.id ORDER BY ".$_GET['tri']." ASC;");
+else $req = mysql_query("SELECT R.id, R.id_util, R.time, R.ip, U.pseudo, U.mv, U.multi FROM $table_registre_identification R INNER JOIN $table_user U ON R.id_util = U.id WHERE R.time > '$timelimit 00:00:00' ORDER BY R.ip ASC LIMIT ".($page*75).",75;");
+//SELECT last_ip,COUNT(*) FROM user GROUP BY last_ip HAVING COUNT(*)>1
+$nbpage = $chapeau->unique_query("SELECT COUNT(id) AS nb FROM $table_registre_identification WHERE time > '$timelimit 00:00:00';");
$chapeau->deconnexion();
$anc = array('ip' => 0, 'id_util' => 0);
$tableau = array();
while($resultat = mysql_fetch_array($req)) {
- if ($anc['ip'] == $resultat['ip'] && $anc['id_util'] != $resultat['id_util']) $color = 'FF0000';
- elseif ($anc['ip'] == $resultat['ip']) $color = 'DFBF00';
+ if ($resultat['mv'] == 3) $color = 'DFBF00';
+ elseif ($resultat['multi'] == 1 && $anc['ip'] == $resultat['ip'] && $anc['id_util'] != $resultat['id_util']) $color = 'EE66EE';
+ elseif ($anc['ip'] == $resultat['ip'] && $anc['id_util'] != $resultat['id_util']) $color = 'FF0000';
else $color = false;
- $tableau[] = array($resultat['ip'], gethostbyaddr($resultat['ip']), $resultat['id_util'], trouvNom($resultat['id_util']), $resultat['time'], $resultat['commodo'], $color);
+ $tableau[] = array($resultat['ip'], gethostbyaddr($resultat['ip']), $resultat['id_util'], $resultat['pseudo'], $resultat['time'], $resultat['mv'], $color);
$anc = $resultat;
}
$template->assign('ips', $tableau);
+$template->assign('numpage', $page);
+$template->assign('nbpage', floor($nbpage['nb']/75));
?>
\ No newline at end of file
diff --git a/onyx/hb_game/jeu/admin/joueur.php b/onyx/hb_game/jeu/admin/joueur.php
index 28f55a2..dbbc804 100644
--- a/onyx/hb_game/jeu/admin/joueur.php
+++ b/onyx/hb_game/jeu/admin/joueur.php
@@ -1,7 +1,7 @@
assign('linkpage', 'vjoueurs');
diff --git a/onyx/hb_game/jeu/admin/prendre_controle.php b/onyx/hb_game/jeu/admin/prendre_controle.php
index cb614ef..a30138e 100644
--- a/onyx/hb_game/jeu/admin/prendre_controle.php
+++ b/onyx/hb_game/jeu/admin/prendre_controle.php
@@ -1,6 +1,6 @@
assign('linkpage', 'cjoueurs');
diff --git a/onyx/hb_game/jeu/admin/sanction_joueur.php b/onyx/hb_game/jeu/admin/sanction_joueur.php
index 05559ca..e993a36 100644
--- a/onyx/hb_game/jeu/admin/sanction_joueur.php
+++ b/onyx/hb_game/jeu/admin/sanction_joueur.php
@@ -5,21 +5,23 @@ $pagea = 'erreur';
$template->assign('linkpage', 'sjoueurs');
-if (!empty($_GET['id']) && !empty($_GET['sanc']) && !empty($_GET['raisonmv'])) {
+if (!empty($_GET['id']) && !empty($_GET['sanc']) && (!empty($_GET['raisonmv']) || $_GET['sanc'] < 0)) {
$raisonmv = $_GET['raisonmv'];
$id_plan = $_GET['id'];
$chapeau->connexion();
$chapeau->escape($raisonmv);
$chapeau->escape($id_plan);
- if ($_GET['sanc'] == 'definitif' || $_GET['sanc'] == 'définitif') {
- $chapeau->query("UPDATE $table_user SET mv = '3', raisonmv = '$raisonmv' WHERE id = '$id_plan';");
+ if ($_GET['sanc'] == 'definitif' || $_GET['sanc'] == 'définitif' || $_GET['sanc'] == 'd') {
+ $chapeau->query("UPDATE $table_user SET mv = '3', raisonmv = '$raisonmv', operateurmv = '$id_user' WHERE id = '$id_plan';");
$chapeau->deconnexion();
+
+ $template->assign('message', 'Le joueur a été banni définitivement !');
}
else {
$sanc = $_GET['sanc'];
$time = time() + $_GET['sanc'] * 86400 - 259200;
- $chapeau->query("UPDATE $table_user SET mv = '2', last_visite = '$time', raisonmv = '$raisonmv' WHERE id = '$id_plan';");
+ $chapeau->query("UPDATE $table_user SET mv = '2', last_visite = '$time', raisonmv = '$raisonmv', operateurmv = '$id_user' WHERE id = '$id_plan';");
$chapeau->deconnexion();
$template->assign('message', 'Le joueur a été placé en mode vacances !');
diff --git a/onyx/hb_game/jeu/admin/supprimer_joueur.php b/onyx/hb_game/jeu/admin/supprimer_joueur.php
index 3a58143..57c3bc7 100644
--- a/onyx/hb_game/jeu/admin/supprimer_joueur.php
+++ b/onyx/hb_game/jeu/admin/supprimer_joueur.php
@@ -10,11 +10,15 @@ if ($sess->values['auth_level'] >= 5 && !empty($_GET['id'])) {
$chapeau->connexion();
$chapeau->escape($id);
$req = $chapeau->unique_query("SELECT * FROM $table_user WHERE id = '$id';");
+ $chapeau->deconnexion();
if ($req) {
- $chapeau->query("DELETE FROM $table_mail WHERE destinataire = '".trouvNom($id)."';");
+ $nom = trouvNom($id);
+ $chapeau->connexion();
+ $chapeau->escape($nom);
+ $chapeau->query("DELETE FROM $table_mail WHERE destinataire = '$nom';");
+ $chapeau->query("DELETE FROM $table_user WHERE id = '$id';");
$chapeau->query("DELETE FROM $table_flottes WHERE id_user = '$id';");
$chapeau->query("DELETE FROM $table_planete WHERE id_user = '$id';");
- $chapeau->query("DELETE FROM $table_user WHERE id = '$id';");
$chapeau->deconnexion();
$template->assign('message', 'Le joueur a été supprimé du jeu ainsi que toutes les données le concernant !');
}
diff --git a/onyx/hb_game/jeu/admin/version.php b/onyx/hb_game/jeu/admin/version.php
index 0f3a664..9ff0da6 100644
--- a/onyx/hb_game/jeu/admin/version.php
+++ b/onyx/hb_game/jeu/admin/version.php
@@ -37,7 +37,9 @@ elseif (!empty($_GET['i'])) {
header('Location: admin.php?p=version');
exit;
}
+ $chapeau->connexion();
$req = $chapeau->unique_query("SELECT * FROM $table_version WHERE id = '$id';");
+ $chapeau->deconnexion();
$template->assign('mod', $req);
$template->assign('id', $id);
$pagea = 'version_add';
diff --git a/onyx/hb_game/jeu/alliances.php b/onyx/hb_game/jeu/alliances.php
index 02b1ca4..e5e443a 100644
--- a/onyx/hb_game/jeu/alliances.php
+++ b/onyx/hb_game/jeu/alliances.php
@@ -49,6 +49,7 @@ if (!empty($queryUser['id_alliance']) && $queryUser['id_grade_alliance'] != -1 &
$i = floor($_GET['i']);
$alliId = $alliance['id'];
$bdd->connexion();
+ $bdd->escape($i);
$bdd->query("DELETE FROM $table_alliances_chat WHERE id = '$i' AND id_alliance = '$alliId';");
$bdd->deconnexion();
header('Location: ?p=alliances&q=adm_chat#chat');
@@ -68,18 +69,22 @@ if (!empty($queryUser['id_alliance']) && $queryUser['id_grade_alliance'] != -1 &
elseif ($_GET['q'] == 'adm_grades' && $access['membre']) {
if (isset($_GET['a']) && $_GET['a'] = 'add') {
if (!empty($_POST['nom']) && isset($_POST['description'])) {
- $nom = mysql_real_escape_string($_POST['nom']);
- $description = mysql_real_escape_string($_POST['description']);
+ $nom = $_POST['nom'];
+ $description = $_POST['description'];
if (!empty($_POST['id'])) {
$id = $_POST['id'];
$bdd->connexion();
$bdd->escape($id);
+ $bdd->escape($nom);
+ $bdd->escape($description);
@$bdd->query("UPDATE $table_alliances_grade SET nom = '$nom', description = '$description', gest_chat = '".ceil($_POST['gest_chat'])."', gest_rang = '".ceil($_POST['gest_rang'])."', gest_membre = '".ceil($_POST['gest_membre'])."', gest_ecriture = '".ceil($_POST['gest_ecriture'])."', gest_admin = '".ceil($_POST['gest_alliance'])."' WHERE id = '$id' AND id_alliance = '".$alliance['id']."';");
$bdd->deconnexion();
}
else {
$bdd->connexion();
+ $bdd->escape($nom);
+ $bdd->escape($description);
@$bdd->query("INSERT INTO $table_alliances_grade VALUES (NULL, '".$alliance['id']."', '$nom', '$description', '".ceil($_POST['gest_chat'])."', '".ceil($_POST['gest_rang'])."', '".ceil($_POST['gest_membre'])."', '".ceil($_POST['gest_ecriture'])."', '".ceil($_POST['gest_alliance'])."');");
$bdd->deconnexion();
}
@@ -100,7 +105,9 @@ if (!empty($queryUser['id_alliance']) && $queryUser['id_grade_alliance'] != -1 &
else {
$page = 'alliance_adm_grades';
$alliId = $alliance['id'];
+ $bdd->connexion();
$grades = $bdd->query("SELECT * FROM $table_alliances_grade WHERE id_alliance = '$alliId' ORDER BY nom ASC;");
+ $bdd->deconnexion();
$template->assign('grades', $grades);
}
}
@@ -108,11 +115,12 @@ if (!empty($queryUser['id_alliance']) && $queryUser['id_grade_alliance'] != -1 &
if (isset($_GET['t']) && $_GET['t'] == 'presentation') $mod = 'presentation';
else $mod = 'interne';
if (!empty($_POST['type']) && isset($_POST['textarea'])) {
- $mod = mysql_real_escape_string($_POST['type']);
+ $mod = $_POST['type'];
$text = $_POST['textarea'];
$alliId = $alliance['id'];
$bdd->connexion();
$bdd->escape($text);
+ $bdd->escape($mod);
$bdd->query("UPDATE $table_alliances SET $mod = '$text' WHERE id = '$alliId';");
$bdd->deconnexion();
header('Location: ?p=alliances&q=adm_ecrits&t='.$mod);
@@ -200,8 +208,10 @@ if (!empty($queryUser['id_alliance']) && $queryUser['id_grade_alliance'] != -1 &
$template->display('game/erreur.tpl');
exit;
}
+ $fondateur = $_POST['fondateur'];
$bdd->connexion();
- $bdd->query("UPDATE $table_alliances SET fondateur = '".mysql_real_escape_string($_POST['fondateur'])."' WHERE id = '".$alliance['id']."'");
+ $bdd->escape($fondateur);
+ $bdd->query("UPDATE $table_alliances SET fondateur = '$fondateur' WHERE id = '".$alliance['id']."'");
$bdd->deconnexion();
$recharg = true;
}
@@ -236,12 +246,15 @@ if (!empty($queryUser['id_alliance']) && $queryUser['id_grade_alliance'] != -1 &
$user = floor($_POST['user']);
$grade = floor($_POST['grade']);
$bdd->connexion();
+ $bdd->escape($grade);
+ $bdd->escape($user);
$bdd->query("UPDATE $table_user SET id_grade_alliance = '".$grade."' WHERE id = '".$user."' AND id_alliance = '".$alliance['id']."';");
$bdd->deconnexion();
}
elseif (!empty($_GET['u'])) {
$user = floor($_GET['u']);
$bdd->connexion();
+ $bdd->escape($user);
$bdd->query("UPDATE $table_user SET id_grade_alliance = '0', id_alliance = '0' WHERE id = '".$user."' AND id_alliance = '".$alliance['id']."';");
$bdd->deconnexion();
//TODO Envoyer un message au joueur renvoyé
@@ -249,6 +262,7 @@ if (!empty($queryUser['id_alliance']) && $queryUser['id_grade_alliance'] != -1 &
elseif (!empty($_GET['accept'])) {
$user = floor($_GET['accept']);
$bdd->connexion();
+ $bdd->escape($user);
$verif = $bdd->unique_query("SELECT * FROM $table_alliances_attente WHERE id_alliance = '".$alliance['id']."' AND id_membre = '$user';");
if ($verif) {
$bdd->query("UPDATE $table_user SET id_grade_alliance = '0', id_alliance = '".$alliance['id']."' WHERE id = '".$user."' AND id_alliance = '0';");
@@ -260,6 +274,7 @@ if (!empty($queryUser['id_alliance']) && $queryUser['id_grade_alliance'] != -1 &
elseif (!empty($_GET['refus'])) {
$user = floor($_GET['refus']);
$bdd->connexion();
+ $bdd->escape($user);
$bdd->query("DELETE FROM $table_alliances_attente WHERE id_membre = '$user' AND id_alliance = '".$alliance['id']."';");
$bdd->deconnexion();
//TODO Envoyer un message au joueur renvoyé
@@ -351,10 +366,12 @@ else {
if ($_GET['q'] == 'search' && !empty($_POST['by']) && isset($_POST['search'])) {
$page = 'alliance_nm_search';
- $by = mysql_real_escape_string($_POST['by']);
- $search = mysql_real_escape_string($_POST['search']);
+ $by = $_POST['by'];
+ $search = $_POST['search'];
$bdd->connexion();
+ $bdd->escape($by);
+ $bdd->escape($search);
$recherche = $bdd->query("SELECT * FROM $table_alliances WHERE $by LIKE '%$search%' ORDER BY nom ASC;");
$bdd->deconnexion();
$template->assign('recherches', $recherche);
@@ -371,7 +388,7 @@ else {
$grade = $bdd->unique_query("SELECT * FROM $table_alliances_grade WHERE id = '".$membres[$i]['id_grade_alliance']."';");
$membres[$i]['grade_alliance'] = $grade['nom'];
}
- $bdd->connexion();
+ $bdd->deconnexion();
$template->assign('membres', $membres);
$template->assign('i', $_GET['i']);
}
@@ -402,7 +419,9 @@ else {
$bdd->escape($id);
$alliance = $bdd->unique_query("SELECT * FROM $table_alliances WHERE id = '$id';");
if (!empty($_POST['message'])) {
- $bdd->query("INSERT INTO $table_alliances_attente VALUES (NULL, '".$alliance['id']."', '".$id_user."', '".$queryUser['pseudo']."', '".time()."', '".mysql_real_escape_string($_POST['message'])."');");
+ $message = $_POST['message'];
+ $bdd->escape($message);
+ $bdd->query("INSERT INTO $table_alliances_attente VALUES (NULL, '".$alliance['id']."', '".$id_user."', '".$queryUser['pseudo']."', '".time()."', '$message');");
$bdd->deconnexion();
$template->assign('message','Votre candidature a été envoyée avec succès à l\'alliance : '.$alliance['nom']);
$template->assign('couleur','green');
@@ -507,14 +526,14 @@ else {
exit;
}
elseif (strlen($tag) > 5) {
- $template->assign('message','Le nom d\'alliance que vous avez choisit est trop long.');
+ $template->assign('message','Le tag d\'alliance que vous avez choisit est trop long.');
$template->assign('script','');
$template->assign('couleur','red');
$template->display('game/erreur.tpl');
exit;
}
elseif (strlen($tag) < 3) {
- $template->assign('message','Le nom d\'alliance que vous avez choisit est trop court.');
+ $template->assign('message','Le tag d\'alliance que vous avez choisit est trop court.');
$template->assign('script','');
$template->assign('couleur','red');
$template->display('game/erreur.tpl');
diff --git a/onyx/hb_game/jeu/classement.php b/onyx/hb_game/jeu/classement.php
index d890495..0dc32fd 100644
--- a/onyx/hb_game/jeu/classement.php
+++ b/onyx/hb_game/jeu/classement.php
@@ -24,7 +24,7 @@ $nbppage = 100;
if (isset($_GET['c']) && is_numeric($_GET['c']) && $_GET['c'] > 0) $pageClassement = floor($_GET['c']/($nbppage+1))+1;
$pageClassementN = ($pageClassement-1) * $nbppage;
-$nbpages = ceil(($nbhumain+$nbcovie)/$nbppage);
+$nbpages = ceil(($nbhumain['humains']+$nbcovie['covenants'])/$nbppage);
if ($pageClassement > $nbpages) $pageClassement = $nbpages;
$TEMP_pages = '';
$template->assign('q', $TEMP_pages);
-//$result = mysql_query("SELECT * FROM `classement` ORDER BY `classement`.`$export` DESC LIMIT $pageClassementN, $nbppage");
$template->assign('t', $TypeSearch);
diff --git a/onyx/hb_game/jeu/description.php b/onyx/hb_game/jeu/description.php
index a059176..63acd37 100644
--- a/onyx/hb_game/jeu/description.php
+++ b/onyx/hb_game/jeu/description.php
@@ -72,6 +72,11 @@ function tableauProd($ibat,$nivo){
else return $return;
}
+if (empty($_GET['r']) || ($_GET['r'] != 'humain' && $_GET['r'] != 'covenant')) $_GET['r'] = $queryUser['race'];
+$race = $_GET['r'];
+if ($race != $queryUser['race']) include(_FCORE."hb_game/noms.php");
+$template->assign('raceAff', $race);
+
if (isset($_GET['b']) && is_numeric($_GET['b']) && $_GET['b'] < count($batiment)) {
$template->assign('type', 'batiments');
$t = $_GET['b'];
diff --git a/onyx/hb_game/jeu/envoyer.php b/onyx/hb_game/jeu/envoyer.php
index e09cec2..eea7854 100644
--- a/onyx/hb_game/jeu/envoyer.php
+++ b/onyx/hb_game/jeu/envoyer.php
@@ -4,34 +4,40 @@ $page = 'envoyer';
$titre = 'Envoyer un message';
if (!empty($_POST['objet']) && !empty($_POST['nom']) && !empty($_POST['message'])) {
- $util = htmlentities($_POST['nom']);
- $bdd->connexion();
- $bdd->escape($util);
- if ($bdd->unique_query("SELECT pseudo FROM $table_user WHERE pseudo = '$util';")) {
- $message = htmlspecialchars($_POST['message']);
- $objet = htmlspecialchars($_POST['objet']);
- $pseudo = $queryUser["pseudo"];
- $time = time();
- $bdd->escape($message);
- $bdd->escape($objet);
- $bdd->escape($pseudo);
- $bdd->query("INSERT INTO $table_mail VALUES(NULL, '1', '$util', '$pseudo', '$objet', '$message', '$time');");
- $bdd->deconnexion();
+ $utils = explode(';', $_POST['nom']);
+ $nbutil = count($utils);
- $template->assign('message','Votre message a été envoyé avec succès.');
- $template->assign('script','');
- $template->assign('couleur','green');
- $template->display('game/erreur.tpl');
- exit;
- }
- else {
- $bdd->deconnexion();
- $template->assign('message','Impossible de trouver le destinataire du message.');
- $template->assign('script','');
- $template->assign('couleur','red');
- $template->display('game/erreur.tpl');
- exit;
+ $time = time();
+ $message = htmlspecialchars($_POST['message']);
+ $objet = htmlspecialchars($_POST['objet']);
+ $bdd->connexion();
+ $bdd->escape($message);
+ $bdd->escape($objet);
+ $bdd->escape($pseudo);
+
+ for($i = 0; $i < $nbutil; $i++){
+ $util = trim(htmlentities($utils[$i]));
+ if (empty($util)) continue;
+ $bdd->escape($util);
+ if ($bdd->unique_query("SELECT pseudo FROM $table_user WHERE pseudo = '$util';")) {
+ $pseudo = $queryUser["pseudo"];
+ $bdd->query("INSERT INTO $table_mail VALUES(NULL, '1', '$util', '$pseudo', '$objet', '$message', '$time');");
+ }
+ else {
+ $bdd->deconnexion();
+ $template->assign('message','Impossible de trouver l\'un des destinataire du message : '.$util);
+ $template->assign('script','');
+ $template->assign('couleur','red');
+ $template->display('game/erreur.tpl');
+ exit;
+ }
}
+ $bdd->deconnexion();
+ $template->assign('message','Votre message a été envoyé avec succès.');
+ $template->assign('script','');
+ $template->assign('couleur','green');
+ $template->display('game/erreur.tpl');
+ exit;
}
if (isset($_GET['d'])) $template->assign('destinataire', htmlentities($_GET['d']));
diff --git a/onyx/hb_game/jeu/flotte.php b/onyx/hb_game/jeu/flotte.php
index 2b4fcbb..cd49091 100644
--- a/onyx/hb_game/jeu/flotte.php
+++ b/onyx/hb_game/jeu/flotte.php
@@ -248,7 +248,8 @@ if (!empty($_POST['cds']) && !empty($_POST['nomflotte']) && isset($_POST['amas']
$contenu_cristal = $_POST['cristal']; $bdd->escape($contenu_cristal); $plan_cristal = $queryPlanete['cristal'] - $contenu_cristal;
$contenu_hydrogene = $_POST['hydrogene']; $bdd->escape($contenu_hydrogene); $plan_hydrogene = $queryPlanete['hydrogene'] - $contenu_hydrogene - $conso;
$contenu_max = $sess->values['flcontenu'];
- if ($contenu_metal + $contenu_cristal + $contenu_hydrogene + $conso > $contenu_max && ($contenu_metal + $contenu_cristal + $contenu_hydrogene != 0 || $mission != 5)) {
+ //if ( && ( || $mission != 5)) {
+ if ($contenu_metal + $contenu_cristal + $contenu_hydrogene + $conso > $contenu_max && $contenu_metal + $contenu_cristal + $contenu_hydrogene != 0) {
$template->assign('message','Vous ne pouvez pas embarquer autant de ressources, les cales débordent.');
$template->assign('script','');
$template->assign('couleur','red');
diff --git a/onyx/hb_game/jeu/njoueur.php b/onyx/hb_game/jeu/njoueur.php
index 3789945..9179b3a 100644
--- a/onyx/hb_game/jeu/njoueur.php
+++ b/onyx/hb_game/jeu/njoueur.php
@@ -5,17 +5,23 @@ if (!empty($_GET['cds'])) {
if (!empty($_GET['nom']) && !empty($_GET['race']) && !empty($_GET['mdp']) && !empty($_GET['mail']) && !empty($_GET['ti']) && isset($_GET['placement'])) {
file_log('inscription : login = '.$_POST['HB_login'].' ; password = '.$_POST['HB_password'], 1);
if ($_GET['cds'] == sha1($_GET['nom'].'$'.$_GET['race'].'£'.$_GET['mdp'].'#'.$_GET['mail'].'ß'.$_GET['ti'].'Ó'.$_SERVER['HTTP_USER_AGENT'].'♀☻'.$_SERVER['REMOTE_ADDR'].$_GET['placement'])) {
+ $pseudo = $_GET['nom'];
+ $mdp = $_GET['mdp'];
+ $race = $_GET['race'];
+ $mail = $_GET['mail'];
+ $ti = $_GET['ti'];
+
$base = new bdd();
$base->connexion();
$base->db();
- $pseudo = mysql_real_escape_string($_GET['nom']);
- $mdp = mysql_real_escape_string($_GET['mdp']);
- $race = mysql_real_escape_string($_GET['race']);
- $mail = mysql_real_escape_string($_GET['mail']);
- $ti = mysql_real_escape_string($_GET['ti']);
+ $base->escape($pseudo);
+ $base->escape($mdp);
+ $base->escape($race);
+ $base->escape($mail);
+ $base->escape($ti);
- $base->query("SELECT * FROM user WHERE pseudo = '$pseudo' ORDER BY id DESC;");
+ $base->query("SELECT * FROM $table_user WHERE pseudo = '$pseudo' ORDER BY id DESC;");
if ($base->num_rows) {
$template->assign('message','Votre compte est déjà créé sur ce serveur !');
$template->assign('couleur','red');
@@ -24,12 +30,12 @@ if (!empty($_GET['cds'])) {
}
//Création de l'utilisateur
- $base->query("INSERT INTO user (pseudo, mdp, race, mail, last_ip, time_inscription) VALUES ('$pseudo', '$mdp', '$race', '$mail', '".$_SERVER['REMOTE_ADDR']."', '".time()."');");
+ $base->query("INSERT INTO $table_user (pseudo, mdp, race, mail, last_ip, time_inscription) VALUES ('$pseudo', '$mdp', '$race', '$mail', '".$_SERVER['REMOTE_ADDR']."', '".time()."');");
//Création des bases de la planète
$image = mt_rand(1,15);
$cases = 225;
- $queryUser = $base->query("SELECT * FROM user WHERE pseudo = '$pseudo' ORDER BY id DESC;");
+ $queryUser = $base->query("SELECT * FROM $table_user WHERE pseudo = '$pseudo' ORDER BY id DESC;");
$id_user = $queryUser[0]['id'];
$time = time();
@@ -42,15 +48,17 @@ if (!empty($_GET['cds'])) {
$pos = mt_rand(1, MAX_PLANETE);
//Test pour savoir si la planète est déjà habitée
- $base->query("SELECT id FROM planete WHERE galaxie='$galaxie' AND ss='$ss' AND position='$pos'");
+ $base->query("SELECT id FROM $table_planete WHERE galaxie='$galaxie' AND ss='$ss' AND position='$pos'");
if($base->num_rows) $planete_trouvee = false;
else $planete_trouvee = true;
}
- $base->query("INSERT INTO planete (id_user, nom_planete, galaxie, ss, position, image, cases, timestamp, metal, cristal, hash_planete) VALUES ('$id_user', 'Planète mère', '$galaxie', '$ss', '$pos', '$image', '$cases', '$time', '1000', '700', SHA1(CONCAT('g',planete.galaxie,'s',planete.ss,'p',planete.position)))");
+ $base->query("INSERT INTO $table_planete (id_user, nom_planete, galaxie, ss, position, image, cases, timestamp, metal, cristal, hash_planete) VALUES ('$id_user', 'Planète mère', '$galaxie', '$ss', '$pos', '$image', '$cases', '$time', '1000', '700', SHA1(CONCAT('g',planete.galaxie,'s',planete.ss,'p',planete.position)))");
}
else {
- $placement_joueur = $base->unique_query("SELECT * FROM user WHERE pseudo = '".mysql_real_escape_string($_GET["placement"])."'");
+ $placement = $_GET["placement"];
+ $base->escape($placement);
+ $placement_joueur = $base->unique_query("SELECT * FROM $table_user WHERE pseudo = '$placement';");
if (!$placement_joueur && !isset($sess->values['forceInscript'])) {
$sess->values['forceInscript'] = true;
$sess->put();
@@ -60,7 +68,7 @@ if (!empty($_GET['cds'])) {
exit;
}
if (!isset($sess->values['forceInscript'])) {
- $placement_planetes = $base->query("SELECT * FROM planete WHERE id_user = '".$placement_joueur["id"]."'");
+ $placement_planetes = $base->query("SELECT * FROM $table_planete WHERE id_user = '".$placement_joueur["id"]."'");
$planete_trouvee = false;
$decale = 0;
while (!$planete_trouvee) {
@@ -69,7 +77,7 @@ if (!empty($_GET['cds'])) {
$ss = $placement_planetes[$i]['ss'] + $decale;
if ($ss >= MAX_SYSTEME) break;
for ($j = 1; $j <= MAX_PLANETE ; $j++) {
- $base->query("SELECT * FROM planete WHERE galaxie='$galaxie' AND ss='$ss' AND position='$j'");
+ $base->query("SELECT * FROM $table_planete WHERE galaxie='$galaxie' AND ss='$ss' AND position='$j'");
if(!$base->num_rows) {
$planete_trouvee = true;
$blk_galaxie = $galaxie;
@@ -94,12 +102,12 @@ if (!empty($_GET['cds'])) {
$blk_pos = mt_rand(1, MAX_PLANETE);
//Test pour savoir si la planète est déjà habitée
- $base->query("SELECT id FROM planete WHERE galaxie='$blk_galaxie' AND ss='$blk_ss' AND position='$blk_pos'");
+ $base->query("SELECT id FROM $table_planete WHERE galaxie='$blk_galaxie' AND ss='$blk_ss' AND position='$blk_pos'");
if($base->num_rows) $planete_trouvee = false;
else $planete_trouvee = true;
}
}
- $base->query("INSERT INTO planete (id_user, nom_planete, galaxie, ss, position, image, cases, timestamp, metal, cristal, hash_planete) VALUES ('$id_user', 'Planète mère', '$blk_galaxie', '$blk_ss', '$blk_pos', '$image', '$cases', '$time', '1000', '700', SHA1(CONCAT('g',planete.galaxie,'s',planete.ss,'p',planete.position)))");
+ $base->query("INSERT INTO $table_planete (id_user, nom_planete, galaxie, ss, position, image, cases, timestamp, metal, cristal, hash_planete) VALUES ('$id_user', 'Planète mère', '$blk_galaxie', '$blk_ss', '$blk_pos', '$image', '$cases', '$time', '1000', '700', SHA1(CONCAT('g',planete.galaxie,'s',planete.ss,'p',planete.position)))");
}
$base->deconnexion();
diff --git a/onyx/hb_game/jeu/oubliemdp.php b/onyx/hb_game/jeu/oubliemdp.php
index 5445b45..67da9a8 100644
--- a/onyx/hb_game/jeu/oubliemdp.php
+++ b/onyx/hb_game/jeu/oubliemdp.php
@@ -70,7 +70,7 @@ if (isset($_POST['HB_pseudo']) && isset($_POST['HB_mail']) && isset($_POST['HB_c
$mail->AddAddress($HB_mail);
$mail->AddReplyTo('no-reply@halo-battle.s-fr.com');
$mail->Subject='Halo-Battle :: Reinitialisation du mot de passe';
- $mail->Body='
Bonjour '.$HB_pseudo.',
Vous recevez ce mail suite à votre demande de réinitialisation de mot de passe. Pour confirmer votre réinitialisation de mot de passe et ainsi pouvoir de nouveau accéder au jeu, cliquez sur le lien ci-après :
'.$_SERVER['HTTP_HOST'].'?p=oubliemdp&i='.$passNOUV.'&n='.$HB_pseudo.'
Votre nouveau mot de passe est : '.$code.'
A bientôt dans Halo-Battle,
Le staff
Bonjour '.$HB_pseudo.',
Vous recevez ce mail suite à votre demande de réinitialisation de mot de passe. Pour confirmer votre réinitialisation de mot de passe et ainsi pouvoir de nouveau accéder au jeu, cliquez sur le lien ci-après :
http://'.$_SERVER['HTTP_HOST'].'?p=oubliemdp&i='.$passNOUV.'&n='.$HB_pseudo.'
Votre nouveau mot de passe est : '.$code.'
A bientôt dans Halo-Battle,
Le staff
diff --git a/onyx/templates/templates/admin/print_choixU.tpl b/onyx/templates/templates/admin/print_choixU.tpl
index fdd6379..cf68841 100644
--- a/onyx/templates/templates/admin/print_choixU.tpl
+++ b/onyx/templates/templates/admin/print_choixU.tpl
@@ -1,5 +1,6 @@
{include file='game/header.tpl'}
+ {$titre}
| |
| Véhicules/Défenses | Technologies nécessaires (niveau actuel) |
|---|---|
| {$unite.nom} ({$unite.niveau}) : | {$unite.etat} |
| {$unite.nom} ({$unite.niveau}) : | {$unite.etat} |