| 8 |
* Author: ytht <2391669999@qq.com> |
* Author: ytht <2391669999@qq.com> |
| 9 |
*/ |
*/ |
| 10 |
|
|
| 11 |
|
#ifdef HAVE_CONFIG_H |
| 12 |
|
#include "config.h" |
| 13 |
|
#endif |
| 14 |
|
|
| 15 |
#include "bbs.h" |
#include "bbs.h" |
| 16 |
|
#include "bwf.h" |
| 17 |
#include "database.h" |
#include "database.h" |
| 18 |
#include "editor.h" |
#include "editor.h" |
| 19 |
#include "io.h" |
#include "io.h" |
| 27 |
#include <stdlib.h> |
#include <stdlib.h> |
| 28 |
#include <sys/param.h> |
#include <sys/param.h> |
| 29 |
|
|
|
#define BBS_user_intro_line_len 256 |
|
|
|
|
| 30 |
int user_intro_edit(int uid) |
int user_intro_edit(int uid) |
| 31 |
{ |
{ |
| 32 |
MYSQL *db = NULL; |
MYSQL *db = NULL; |
| 106 |
goto cleanup; |
goto cleanup; |
| 107 |
} |
} |
| 108 |
|
|
| 109 |
|
if (check_badwords(intro, '*') < 0) |
| 110 |
|
{ |
| 111 |
|
log_error("check_badwords(introduction) error\n"); |
| 112 |
|
ret = -3; |
| 113 |
|
goto cleanup; |
| 114 |
|
} |
| 115 |
|
|
| 116 |
lml_render(intro, intro_f, sizeof(intro_f), SCREEN_COLS, 0); |
lml_render(intro, intro_f, sizeof(intro_f), SCREEN_COLS, 0); |
| 117 |
|
|
| 118 |
lines = split_data_lines(intro_f, SCREEN_COLS + 1, line_offsets, BBS_user_intro_max_line + 2, 1, NULL); |
lines = split_data_lines(intro_f, SCREEN_COLS + 1, line_offsets, BBS_user_intro_max_line + 2, 1, NULL); |
| 134 |
press_any_key(); |
press_any_key(); |
| 135 |
goto cleanup; |
goto cleanup; |
| 136 |
case 'E': |
case 'E': |
| 137 |
|
ch = 'E'; |
| 138 |
continue; |
continue; |
| 139 |
default: // Invalid selection |
default: // Invalid selection |
| 140 |
continue; |
continue; |