| 35 |
int bbs_info() |
int bbs_info() |
| 36 |
{ |
{ |
| 37 |
prints("欢迎光临 \033[1;33m%s \033[32m[%s] \033[37m( %s )\r\n", |
prints("欢迎光临 \033[1;33m%s \033[32m[%s] \033[37m( %s )\r\n", |
| 38 |
BBS_name, BBS_server, app_version); |
BBS_name, BBS_server, APP_NAME_VER); |
| 39 |
|
|
| 40 |
return iflush(); |
return iflush(); |
| 41 |
} |
} |
| 153 |
u_anonymous++; |
u_anonymous++; |
| 154 |
|
|
| 155 |
// Display logo |
// Display logo |
| 156 |
display_file_ex(DATA_WELCOME, 1, 0); |
display_file(DATA_WELCOME, 1, 2); |
| 157 |
|
|
| 158 |
// Display welcome message |
// Display welcome message |
| 159 |
prints("\r\033[1;35m欢迎光临\033[33m 【 %s 】 \033[35mBBS\r\n" |
prints("\r\033[1;35m欢迎光临\033[33m 【 %s 】 \033[35mBBS\r\n" |
| 161 |
"匿名游客[\033[36m%d\033[32m] " |
"匿名游客[\033[36m%d\033[32m] " |
| 162 |
"注册用户数[\033[36m%d/%d\033[32m]\r\n" |
"注册用户数[\033[36m%d/%d\033[32m]\r\n" |
| 163 |
"从 [\033[36m%s\033[32m] 起,最高人数记录:" |
"从 [\033[36m%s\033[32m] 起,最高人数记录:" |
| 164 |
"[\033[36m%d\033[32m],累计访问人次:[\033[36m%d\033[32m]\r\n", |
"[\033[36m%d\033[32m],累计访问人次:[\033[36m%d\033[32m]\033[m\r\n", |
| 165 |
BBS_name, u_online, BBS_max_client, u_anonymous, u_total, |
BBS_name, u_online, BBS_max_client, u_anonymous, u_total, |
| 166 |
BBS_max_user, BBS_start_dt, max_u_online, u_login_count); |
BBS_max_user, BBS_start_dt, max_u_online, u_login_count); |
| 167 |
|
|
| 168 |
|
iflush(); |
| 169 |
|
|
| 170 |
return 0; |
return 0; |
| 171 |
} |
} |
| 172 |
|
|
| 177 |
return -1; |
return -1; |
| 178 |
} |
} |
| 179 |
|
|
| 180 |
display_file_ex(DATA_GOODBYE, 1, 1); |
display_file(DATA_GOODBYE, 1, 1); |
| 181 |
|
|
| 182 |
log_std("User logout\n"); |
log_common("User logout\n"); |
| 183 |
|
|
| 184 |
return 0; |
return 0; |
| 185 |
} |
} |
| 298 |
} |
} |
| 299 |
|
|
| 300 |
// User login |
// User login |
| 301 |
if (bbs_login(db) < 0) |
if (SSH_v2) |
| 302 |
|
{ |
| 303 |
|
prints("\033[1m%s 欢迎使用ssh方式访问 \033[1;33m按任意键继续...\033[m", BBS_username); |
| 304 |
|
iflush(); |
| 305 |
|
igetch_t(MAX_DELAY_TIME); |
| 306 |
|
} |
| 307 |
|
else if (bbs_login(db) < 0) |
| 308 |
{ |
{ |
| 309 |
goto cleanup; |
goto cleanup; |
| 310 |
} |
} |
| 311 |
|
|
| 312 |
clearscr(); |
clearscr(); |
| 313 |
|
|
| 314 |
// BBS Top 10 |
// BBS Top 10 |
| 315 |
display_file_ex(VAR_BBS_TOP, 1, 1); |
display_file(VAR_BBS_TOP, 1, 1); |
| 316 |
|
|
| 317 |
// Main |
// Main |
| 318 |
bbs_center(); |
bbs_center(); |