Вход Регистрация
Файл: pages/render/itemImage.php
Строк: 19
<?php
// Physical module map v50.6: public URL stays clean while code lives in /pages.
if (!defined('GAME_ROOT')) define('GAME_ROOT'dirname(__DIR__2));
chdir(GAME_ROOT);
if (
PHP_SAPI !== 'cli') { $_SERVER['PHP_SELF']='/itemImage.php'$_SERVER['SCRIPT_NAME']='/itemImage.php'; }

/* Обновление игры под PHP 8.4 / PDO и усиление безопасности: by Метриум (Стэлп) */

include './system/functions.php';


    
header('content-type: image/jpeg');
         
       
$id max(0,(int)($_GET['id'] ?? 0));
       
$file GAME_ROOT.'/images/items/'.$id.'.png';
       if(
$id || !is_file($file)){ http_response_code(404); exit; }
       
$image = @imageCreateFromPng($file);
       if(!
$image){ http_response_code(404); exit; }
       
$smith max(0,(int)($_GET['smith'] ?? 0));

    
/*if($smith) {

    if($smith > 0 && $smith < 4) {
      $_smith = 1;
    }

    if($smith == 20) {
      $_smith = 7;
    }
    
    $smith_image
           = imageCreateFromPng('./images/items/smith/'.$_smith.'.png');
              
             imagecopy($image, $smith_image, 0, 0, 0, 0, 50, 50);

    }*/
    
imageJpeg($image);

?>
Онлайн: 2
Реклама