} } else { if ($action == 'changesex') { if (!$config['chars_changesex_enable']) { output_message('alert', 'Смена пола персонажей запрещена!' . '<meta http-equiv=refresh content="2;url=index.php?n=account&sub=chars">'); } else { if ($timediffh < $config['chars_changesex_hdiff'] and !$isadmin) { $timenext = $timeaction + 3600 * $config['chars_changesex_hdiff']; $timenextf = date('Y-m-d H:i:s', $timenext); output_message('alert', 'Слишком часто меняете пол! <br /> Следующая смена возможна: ' . $timenextf . '<meta http-equiv=refresh content="2;url=index.php?n=account&sub=chars">'); } else { if ($my_char->money < $config['chars_changesex_cost'] and !$isadmin) { output_message('alert', 'Недостаточно средств для смены пола персонажа!<br />Есть: ' . money($my_char->money) . '<br />Нужно: ' . money($config['chars_rename_cost']) . '<meta http-equiv=refresh content="2;url=index.php?n=account&sub=chars">'); } else { $WSDB->query("INSERT INTO `mwfe3_character_actions` \n (`guid`, `account`, `action`, `timeaction`, `data`) \n VALUES\n (?d,?d,?,?,?);", $my_char->guid, $user['id'], $action, $timecurrf, $my_char->sqlinfo['data']); $my_char->ChangeGender($mangos_field, $char_models); $my_char->MoneyAdd(-$config['chars_changesex_cost'], $mangos_field); $WSDB->query("UPDATE `characters` SET ?a WHERE account=?d and `guid`=?d LIMIT 1", $my_char->sqlinfo, $user['id'], $my_char->guid); output_message('notice', 'Операция по смене пола прошла успешно!' . '<meta http-equiv=refresh content="2;url=index.php?n=account&sub=chars">'); } } } } else { if ($action == 'changesexfix') { $WSDB->query("INSERT INTO `mwfe3_character_actions` \n (`guid`, `account`, `action`, `timeaction`, `data`) \n VALUES\n (?d,?d,?,?,?);", $my_char->guid, $user['id'], $action, $timecurrf, $my_char->sqlinfo['data']); $my_char->ChangeGenderFix($mangos_field, $char_models); $WSDB->query("UPDATE `characters` SET `data`=?a WHERE account=?d and `guid`=?d LIMIT 1", $my_char->sqlinfo, $user['id'], $my_char->guid); output_message('notice', 'Фикс после смены пола персонажа выполнен успешно!' . '<meta http-equiv=refresh content="2;url=index.php?n=account&sub=chars">'); } else { if ($action == 'move') { output_message('notice', 'Перемещение!');