battles/models/EffectsModel.php
Igor Barkov (iwork) 2fa110c275 EEEEEE! ))
2020-07-07 16:15:58 +03:00

38 lines
986 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* Author: lopiu
* Date: 05.07.2020
* Time: 23:32
*/
class EffectsModel
{
protected $DB;
const EFFECT_HIDEUSERINFO = 5; // Обезлик
public function __construct(int $user_id) {
try {
$this->DB = db::c()->query('SELECT * FROM users_effects WHERE owner_id = ?i', $user_id);
} catch (Exception $e) {echo '<div class="debug">class EffectsModel: Не могу подключиться к таблице effects!</div>';}
}
private function getEffects($user_id)
{
}
/**
* Проверка обезличен ли персонаж.
* @return int date() до конца эффекта или 0.
*/
public function getHideUserInfoStatus()
{
if ($this->DB) {
while ($row = $this->DB->fetch_object()) {
if ($row->type == self::EFFECT_HIDEUSERINFO) {
return $row->time;
}
}
}
return 0;
}
}