Старт переноса showinf_pers(); в класс (fuck!_)
This commit is contained in:
parent
0bb5c9264a
commit
deb4e20894
@ -48,6 +48,7 @@ class User
|
|||||||
$dressed_items = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->id)->fetch_object_array();
|
$dressed_items = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->id)->fetch_object_array();
|
||||||
foreach ($dressed_items as $key=>$value) {
|
foreach ($dressed_items as $key=>$value) {
|
||||||
$dressed_items_array[$dressed_items['dressed_slot']][$key] = $value;
|
$dressed_items_array[$dressed_items['dressed_slot']][$key] = $value;
|
||||||
|
$dressed_items_object[$dressed_items['dressed_slot']]->$key = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo <<<USERINFO
|
echo <<<USERINFO
|
||||||
@ -67,7 +68,14 @@ USERINFO;
|
|||||||
if (isset($dressed_items_array[4])) {
|
if (isset($dressed_items_array[4])) {
|
||||||
echo "На пузе — " .$dressed_items_array[4]['name'].PHP_EOL;
|
echo "На пузе — " .$dressed_items_array[4]['name'].PHP_EOL;
|
||||||
}
|
}
|
||||||
var_dump($dressed_items_array);
|
if (isset($dressed_items_object[1])) {
|
||||||
|
echo "!В руке — " .$dressed_items_array[1]->name.PHP_EOL;
|
||||||
|
}
|
||||||
|
if (isset($dressed_items_object[4])) {
|
||||||
|
echo "!На пузе — " .$dressed_items_array[4]->name.PHP_EOL;
|
||||||
|
}
|
||||||
|
var_dump($dressed_items_array).PHP_EOL;
|
||||||
|
var_dump($dressed_items_object).PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user