Переезд функции repexp; Переезд классов User в неймспейс.

This commit is contained in:
2023-04-15 22:52:33 +03:00
parent ec11709a86
commit 2d63efd915
29 changed files with 339 additions and 233 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace User;
use Core\Db;
class Effects
{
/** Äàòü èãðîêó ýôôåêò.
* @param int $uid id èãðîêà
* @param int $id id ýôôåêòà
* @return void
*/
public static function addById(int $uid, int $id)
{
$eff = Db::getRow('select mname, mdata, oneType, id2 from eff_main where id2 = ?', [$id]);
if (!$eff['id2']) {
return;
}
Db::sql(
'insert into eff_users (overType, id_eff, uid, name, timeUse, data) values (?,?,?,?,unix_timestamp(),?)',
[$eff['oneType'], $eff['id2'], $uid, $eff['mname'], $eff['mdata']]
);
}
}