| 18 |
#include "bbs.h" |
#include "bbs.h" |
| 19 |
#include "common.h" |
#include "common.h" |
| 20 |
#include "io.h" |
#include "io.h" |
| 21 |
|
#include "database.h" |
| 22 |
#include <mysql.h> |
#include <mysql.h> |
| 23 |
#include <regex.h> |
#include <regex.h> |
| 24 |
|
|
| 50 |
"×¢²áÇëÊäÈë`\033[1;31mnew\033[m'): "); |
"×¢²áÇëÊäÈë`\033[1;31mnew\033[m'): "); |
| 51 |
iflush (); |
iflush (); |
| 52 |
|
|
| 53 |
str_input (username, 19, 0); |
str_input (username, 19, DOECHO); |
| 54 |
count++; |
count++; |
| 55 |
|
|
| 56 |
if (strcmp (username, "guest") == 0) |
if (strcmp (username, "guest") == 0) |
| 64 |
if (user_register () == 0) |
if (user_register () == 0) |
| 65 |
return 0; |
return 0; |
| 66 |
else |
else |
| 67 |
return -2; |
return -2; |
| 68 |
} |
} |
| 69 |
|
|
| 70 |
if (strlen (username) > 0) |
if (strlen (username) > 0) |
| 73 |
prints ("\033[1;37mÇëÊäÈëÃÜÂë\033[m: "); |
prints ("\033[1;37mÇëÊäÈëÃÜÂë\033[m: "); |
| 74 |
iflush (); |
iflush (); |
| 75 |
|
|
| 76 |
str_input (password, 19, 1); |
str_input (password, 19, NOECHO); |
| 77 |
|
|
| 78 |
ok = (check_user (username, password) == 0); |
ok = (check_user (username, password) == 0); |
| 79 |
} |
} |