forked from halo-battle/game
Version 1.9a
This commit is contained in:
parent
5f81f76b17
commit
d028822d0b
437 changed files with 27543 additions and 81793 deletions
|
|
@ -3,6 +3,7 @@ define("INDEX", 1);
|
|||
$chrono_start = microtime();
|
||||
$onyx = @file_get_contents('./.onyx') or die("Configuration introuvable.");
|
||||
define("_FCORE",trim($onyx));
|
||||
define("xCSRF",true);
|
||||
require_once(_FCORE."common.php");
|
||||
|
||||
$id = gpc('i');
|
||||
|
|
@ -13,11 +14,11 @@ $s = gpc('s');
|
|||
|
||||
header ("Content-type: image/png");
|
||||
|
||||
if (file_exists(_FCORE."hb_game/signatures/cache/".$id.".".$f.$s.".sign") && time() - filemtime(_FCORE."hb_game/signatures/cache/".$id.".".$f.$s.".sign") < $config['cache']['signatures']) {
|
||||
readfile(_FCORE."hb_game/signatures/cache/".$id.".".$f.$s.".sign");
|
||||
if (file_exists(_FCORE."hb_game/cache/signatures/".$id.".".$f.$s.".sign") && time() - filemtime(_FCORE."../game/cache/signatures/".$id.".".$f.$s.".sign") < $config['cache']['signatures']) {
|
||||
readfile(_FCORE."../game/cache/signatures/".$id.".".$f.$s.".sign");
|
||||
}
|
||||
else {
|
||||
$fontfile = _FCORE."hb_game/signatures/ARIAL.TTF";
|
||||
$fontfile = _FCORE."../game/signatures/ARIAL.TTF";
|
||||
|
||||
$bdd->connexion();
|
||||
$bdd->escape($id);
|
||||
|
|
@ -32,7 +33,7 @@ else {
|
|||
switch($s){
|
||||
case 1:
|
||||
$img = 'mixte1userbarju7.png';
|
||||
$_img = imagecreatefrompng(_FCORE."hb_game/signatures/".$img);
|
||||
$_img = imagecreatefrompng(_FCORE."../game/signatures/".$img);
|
||||
$entete = imagecolorallocate($_img, 255, 255, 255);
|
||||
$contenu = imagecolorallocate($_img, 255, 255, 255);
|
||||
$infos = array(
|
||||
|
|
@ -56,7 +57,7 @@ else {
|
|||
break;
|
||||
default:
|
||||
$img = 'mixte1userbarju7.png';
|
||||
$_img = imagecreatefrompng(_FCORE."hb_game/signatures/".$img);
|
||||
$_img = imagecreatefrompng(_FCORE."../game/signatures/".$img);
|
||||
$entete = imagecolorallocate($_img, 255, 255, 255);
|
||||
$contenu = imagecolorallocate($_img, 255, 255, 255);
|
||||
$infos = array(
|
||||
|
|
@ -78,14 +79,14 @@ else {
|
|||
)
|
||||
);
|
||||
}
|
||||
if ($joueur['race'] == 'covenant') $_imgavatar = imagecreatefrompng(_FCORE."hb_game/signatures/covi.png");
|
||||
else $_imgavatar = imagecreatefrompng(_FCORE."hb_game/signatures/hum.png");
|
||||
if ($joueur['race'] == 'covenant') $_imgavatar = imagecreatefrompng(_FCORE."../game/signatures/covi.png");
|
||||
else $_imgavatar = imagecreatefrompng(_FCORE."../game/signatures/hum.png");
|
||||
}
|
||||
elseif ($joueur['race'] == 'covenant') {
|
||||
switch($f){
|
||||
case 1:
|
||||
$img = 'userbarallicopygs1.png';
|
||||
$_img = imagecreatefrompng(_FCORE."hb_game/signatures/".$img);
|
||||
$_img = imagecreatefrompng(_FCORE."../game/signatures/".$img);
|
||||
$entete = imagecolorallocate($_img, 255, 255, 255);
|
||||
$contenu = imagecolorallocate($_img, 255, 255, 255);
|
||||
$infos = array(
|
||||
|
|
@ -109,7 +110,7 @@ else {
|
|||
break;
|
||||
default:
|
||||
$img = 'covenantuserbarus1.png';
|
||||
$_img = imagecreatefrompng(_FCORE."hb_game/signatures/".$img);
|
||||
$_img = imagecreatefrompng(_FCORE."../game/signatures/".$img);
|
||||
$entete = imagecolorallocate($_img, 255, 255, 255);
|
||||
$contenu = imagecolorallocate($_img, 0, 0, 0);
|
||||
$infos = array(
|
||||
|
|
@ -131,13 +132,13 @@ else {
|
|||
)
|
||||
);
|
||||
}
|
||||
$_imgavatar = imagecreatefrompng(_FCORE."hb_game/signatures/covi.png");
|
||||
$_imgavatar = imagecreatefrompng(_FCORE."../game/signatures/covi.png");
|
||||
}
|
||||
else {
|
||||
switch($f){
|
||||
case 1:
|
||||
$img = 'userbarallicopygs1.png';
|
||||
$_img = imagecreatefrompng(_FCORE."hb_game/signatures/".$img);
|
||||
$_img = imagecreatefrompng(_FCORE."../game/signatures/".$img);
|
||||
$entete = imagecolorallocate($_img, 255, 255, 255);
|
||||
$contenu = imagecolorallocate($_img, 255, 255, 255);
|
||||
$infos = array(
|
||||
|
|
@ -161,7 +162,7 @@ else {
|
|||
break;
|
||||
default:
|
||||
$img = 'humainuserbarhz2.png';
|
||||
$_img = imagecreatefrompng(_FCORE."hb_game/signatures/".$img);
|
||||
$_img = imagecreatefrompng(_FCORE."../game/signatures/".$img);
|
||||
$entete = imagecolorallocate($_img, 255, 255, 255);
|
||||
//$contenu = imagecolorallocate($_img, 160, 160, 0);
|
||||
$contenu = imagecolorallocate($_img, 255, 255, 255);
|
||||
|
|
@ -184,7 +185,7 @@ else {
|
|||
)
|
||||
);
|
||||
}
|
||||
$_imgavatar = imagecreatefrompng(_FCORE."hb_game/signatures/hum.png");
|
||||
$_imgavatar = imagecreatefrompng(_FCORE."../game/signatures/hum.png");
|
||||
}
|
||||
|
||||
$blanc = imagecolorallocate($_img, 255, 255, 255);
|
||||
|
|
@ -196,7 +197,7 @@ else {
|
|||
|
||||
if ($joueur == false) {
|
||||
ImageTTFText($_img, 20, -20, 123, 17, $rouge, $fontfile, 'Joueur introuvable !');
|
||||
if (file_exists(_FCORE."hb_game/signatures/cache/".$id.".".$f.$s.".sign")) unlink(_FCORE."hb_game/signatures/cache/".$id.".".$f.$s.".sign");
|
||||
if (file_exists(_FCORE."../game/cache/signatures/".$id.".".$f.$s.".sign")) unlink(_FCORE."../game/cache/signatures/".$id.".".$f.$s.".sign");
|
||||
}
|
||||
else {
|
||||
if ($joueur['auth_level'] > 4) ImageTTFText($_img, 12, 0, 45, 23, $vert, $fontfile, ucfirst($joueur['pseudo']));
|
||||
|
|
@ -227,8 +228,8 @@ else {
|
|||
|
||||
if ($joueur == false) imagepng($_img);
|
||||
else {
|
||||
imagepng($_img, _FCORE."hb_game/signatures/cache/".$id.".".$f.$s.".sign");
|
||||
readfile(_FCORE."hb_game/signatures/cache/".$id.".".$f.$s.".sign");
|
||||
imagepng($_img, _FCORE."../game/cache/signatures/".$id.".".$f.$s.".sign");
|
||||
readfile(_FCORE."../game/cache/signatures/".$id.".".$f.$s.".sign");
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue