battles/classes/showpers.php

45 lines
1.5 KiB
PHP
Raw Normal View History

2018-03-31 14:02:17 +00:00
<?php
/**
* Copyright (c) 2018.
* Author: Igor Barkov <lopar.4ever@gmail.com>
* Project name: Battles-Game
*/
class showpers
{
private $pers_data;
private $weared_items;
private function __construct($id)
{
if (!$this->pers_data) {
$query = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $id)->fetch_assoc();
$this->pers_data = $query;
}
if (!$this->weared_items) {
$query = db::c()->query('SELECT `name`, `img`, `type` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 1', $id);
$this->weared_items = $query;
}
}
private function dgfs()
{
$w_items['sergi'] = $this->pers_data['sergi'];
$w_items['kulon'] = $this->pers_data['kulon'];
$w_items['weap'] = $this->pers_data['weap'];
$w_items['bron'] = $this->pers_data['bron'];
$w_items['r1'] = $this->pers_data['r1'];
$w_items['r2'] = $this->pers_data['r2'];
$w_items['r3'] = $this->pers_data['r3'];
$w_items['helm'] = $this->pers_data['helm'];
$w_items['perchi'] = $this->pers_data['perchi'];
$w_items['shit'] = $this->pers_data['shit'];
$w_items['boots'] = $this->pers_data['boots'];
$w_items['rubax'] = $this->pers_data['rubax'];
$w_items['plaw'] = $this->pers_data['plaw'];
$w_items['rune1'] = $this->pers_data['rune1'];
$w_items['rune2'] = $this->pers_data['rune2'];
$w_items['rune3'] = $this->pers_data['rune3'];
}
}