Файл: DARK WARS/dark_war/class/put_artefact.class.php
Строк: 23
<?php
class put_artefact {
private $w;
private $h;
private $name;
private $img;
private $type;
function put($w, $h, $name, $img, $type) {
$this->w = $w;
$this->h = $h;
$this->name = $name;
$this->img = $img;
$this->type = $type;
$this->active();
}
function active() {
if (is_file(H."/dark_war/files/players_here/$this->name.jpg")) {
$img = @imagecreatefromjpeg(H."/dark_war/files/players_here/$this->name.jpg");
} else {
$img = @imagecreatefromjpeg(H."/dark_war/files/players_here/0.jpg");
}
$screen = @imagecreatefrompng(H."/dark_war/all_img/weapon_shop/{$this->type}/$this->img.png");
if ($this->img == 0) {
imagecopy($img,$screen,$this->w,$this->h,0,0,42,39);
} else {
imagecopy($img,$screen,$this->w,$this->h,0,0,40,37);
}
imagejpeg($img,H."/dark_war/files/players_here/$this->name.jpg",100);
}
function off($w, $h, $name, $img, $type) {
$this->w = $w;
$this->h = $h;
$this->name = $name;
$this->img = $img;
$this->type = $type;
$this->active();
}
}
?>