Version 1.7l
This commit is contained in:
parent
ba5e741c99
commit
aea537909a
42 changed files with 718 additions and 131 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
162
htdocs/sign.php
162
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 '<b>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);
|
||||
?>
|
||||
|
|
@ -567,10 +567,6 @@ font-style: normal;
|
|||
|
||||
#corps .border_top, #corps .border_bt
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 9px;
|
||||
width: 680px;
|
||||
}
|
||||
|
||||
#corps table
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue