public function accountCreate($dataAccountXCreate) {
$sql = "INSERT INTO `accounts` SET ";
$sql .= "account_email= '" . $this->db->escape($dataAccountXCreate['account_email']) . "', ";
$sql .= "account_password = '" . $this->db->escape($dataAccountXCreate['account_password']) . "', ";
$sql .= "account_firstname = '" . $this->db->escape($dataAccountXCreate['account_firstname']) . "', ";
$sql .= "account_lastname = '" . $this->db->escape($dataAccountXCreate['account_lastname']) . "', ";
$sql .= "account_status = '" . (int)$dataAccountXCreate['account_status'] . "', ";
$sql .= "account_balance = '" . (float)$dataAccountXCreate['account_balance'] . "', ";
$sql .= "account_access_level = '" . (int)$dataAccountXCreate['account_access_level'] . "', ";
$sql .= "account_server = '" . (int)$dataAccountXCreate['account_server'] . "', ";
$sql .= "account_create = NOW()";
$this->db->query($sql);
return $this->db->getLastId();
}
$firstname = @$this->request->post['login'];
//$lastname = @$this->request->post['lastname'];
$lastname = "Фамилия";
$email = @$this->request->post['email'];
$password = @$this->request->post['password'];
$dataAccountXCreateb = [
'account_email' => $email,
'account_password' => md5($password),
'account_firstname' => "Имя",
'account_lastname' => "Фамилия",
'account_status' => 1,
'account_balance' => 0,
'account_access_level' => 1,
'account_server' => 1
];
$this->accountsModel->accountCreate($dataAccountXCreateb);