| 16 |
|
|
| 17 |
#include "article_del.h" |
#include "article_del.h" |
| 18 |
#include "database.h" |
#include "database.h" |
|
#include "log.h" |
|
| 19 |
#include "io.h" |
#include "io.h" |
| 20 |
|
#include "log.h" |
| 21 |
#include "screen.h" |
#include "screen.h" |
| 22 |
#include "user_priv.h" |
#include "user_priv.h" |
| 23 |
#include <ctype.h> |
#include <ctype.h> |
| 44 |
{ |
{ |
| 45 |
clearscr(); |
clearscr(); |
| 46 |
moveto(1, 1); |
moveto(1, 1); |
| 47 |
prints("该文章无法被删除,请联系版主。"); |
prints("璇ユ枃绔犳棤娉曡鍒犻櫎锛岃鑱旂郴鐗堜富銆"); |
| 48 |
press_any_key(); |
press_any_key(); |
| 49 |
|
|
| 50 |
return 0; |
return 0; |
| 52 |
|
|
| 53 |
clearscr(); |
clearscr(); |
| 54 |
moveto(1, 1); |
moveto(1, 1); |
| 55 |
prints("真的要删除文章?(Y)是, (N)否 [N]: "); |
prints("鐪熺殑瑕佸垹闄ゆ枃绔狅紵(Y)鏄, (N)鍚 [N]: "); |
| 56 |
iflush(); |
iflush(); |
| 57 |
|
|
| 58 |
for (ch = 0; !SYS_server_exit; ch = igetch_t(MAX_DELAY_TIME)) |
for (ch = 0; !SYS_server_exit; ch = igetch_t(MAX_DELAY_TIME)) |
| 59 |
{ |
{ |
| 60 |
switch (toupper(ch)) |
switch (toupper(ch)) |
| 61 |
{ |
{ |
| 62 |
|
case KEY_NULL: |
| 63 |
|
case KEY_TIMEOUT: |
| 64 |
|
goto cleanup; |
| 65 |
case CR: |
case CR: |
| 66 |
igetch_reset(); |
igetch_reset(); |
| 67 |
case KEY_ESC: |
case KEY_ESC: |
| 76 |
break; |
break; |
| 77 |
} |
} |
| 78 |
|
|
| 79 |
|
if (SYS_server_exit) // Do not save data on shutdown |
| 80 |
|
{ |
| 81 |
|
goto cleanup; |
| 82 |
|
} |
| 83 |
|
|
| 84 |
db = db_open(); |
db = db_open(); |
| 85 |
if (db == NULL) |
if (db == NULL) |
| 86 |
{ |
{ |
| 136 |
|
|
| 137 |
clearscr(); |
clearscr(); |
| 138 |
moveto(1, 1); |
moveto(1, 1); |
| 139 |
prints("该文章已被删除,请稍后刷新列表。"); |
prints("璇ユ枃绔犲凡琚垹闄わ紝璇风◢鍚庡埛鏂板垪琛ㄣ"); |
| 140 |
press_any_key(); |
press_any_key(); |
| 141 |
|
|
| 142 |
goto cleanup; |
goto cleanup; |
| 146 |
{ |
{ |
| 147 |
clearscr(); |
clearscr(); |
| 148 |
moveto(1, 1); |
moveto(1, 1); |
| 149 |
prints("该文章无法被删除,请联系版主。"); |
prints("璇ユ枃绔犳棤娉曡鍒犻櫎锛岃鑱旂郴鐗堜富銆"); |
| 150 |
press_any_key(); |
press_any_key(); |
| 151 |
|
|
| 152 |
goto cleanup; |
goto cleanup; |
| 230 |
|
|
| 231 |
clearscr(); |
clearscr(); |
| 232 |
moveto(1, 1); |
moveto(1, 1); |
| 233 |
prints("删除成功,请在%d秒后刷新列表。", BBS_section_list_load_interval); |
prints("鍒犻櫎鎴愬姛锛岃鍦%d绉掑悗鍒锋柊鍒楄〃銆", BBS_section_list_load_interval); |
| 234 |
press_any_key(); |
press_any_key(); |
| 235 |
ret = 1; // Success |
ret = 1; // Success |
| 236 |
|
|