27 lines
732 B
PHP
27 lines
732 B
PHP
<?php
|
|
|
|
use Core\Db;
|
|
use User\UserIp;
|
|
|
|
class Delo
|
|
{
|
|
/**
|
|
* Запись в личное дело персонажа.
|
|
* @param int $uid
|
|
* @param string $dop
|
|
* @param string $text
|
|
* @param string $from
|
|
* @param float $moneyOut
|
|
* @param int $type
|
|
* @return void
|
|
*/
|
|
public static function add(int $type, string $from, int $uid, string $text, float $moneyOut = 0, string $dop = '')
|
|
{
|
|
$sql = 'insert into users_delo (uid, dop, time, city, text, login, `delete`, no_right, ip, moneyOut, type) values (?,?,unix_timestamp(),?,?,?,0,?,?,?,?)';
|
|
Db::sql($sql, [
|
|
$uid, $dop, 'capitalcity', $text, $from, '', UserIp::get(), $moneyOut, $type,
|
|
]);
|
|
}
|
|
}
|
|
|