| 1 |
/*************************************************************************** |
/* SPDX-License-Identifier: GPL-3.0-or-later */ |
| 2 |
article_del.c - description |
/* |
| 3 |
------------------- |
* article_del |
| 4 |
copyright : (C) 2004-2025 by Leaflet |
* - user interactive feature to delete article |
| 5 |
email : leaflet@leafok.com |
* |
| 6 |
***************************************************************************/ |
* Copyright (C) 2004-2025 Leaflet <leaflet@leafok.com> |
| 7 |
|
*/ |
|
/*************************************************************************** |
|
|
* * |
|
|
* This program is free software; you can redistribute it and/or modify * |
|
|
* it under the terms of the GNU General Public License as published by * |
|
|
* the Free Software Foundation; either version 3 of the License, or * |
|
|
* (at your option) any later version. * |
|
|
* * |
|
|
***************************************************************************/ |
|
| 8 |
|
|
| 9 |
#include "article_del.h" |
#include "article_del.h" |
| 10 |
#include "database.h" |
#include "database.h" |
|
#include "log.h" |
|
| 11 |
#include "io.h" |
#include "io.h" |
| 12 |
|
#include "log.h" |
| 13 |
#include "screen.h" |
#include "screen.h" |
| 14 |
#include "user_priv.h" |
#include "user_priv.h" |
| 15 |
#include <ctype.h> |
#include <ctype.h> |
| 36 |
{ |
{ |
| 37 |
clearscr(); |
clearscr(); |
| 38 |
moveto(1, 1); |
moveto(1, 1); |
| 39 |
prints("该文章无法被删除,请联系版主。"); |
prints("璇ユ枃绔犳棤娉曡鍒犻櫎锛岃鑱旂郴鐗堜富銆"); |
| 40 |
press_any_key(); |
press_any_key(); |
| 41 |
|
|
| 42 |
return 0; |
return 0; |
| 44 |
|
|
| 45 |
clearscr(); |
clearscr(); |
| 46 |
moveto(1, 1); |
moveto(1, 1); |
| 47 |
prints("真的要删除文章?(Y)是, (N)否 [N]: "); |
prints("鐪熺殑瑕佸垹闄ゆ枃绔狅紵(Y)鏄, (N)鍚 [N]: "); |
| 48 |
iflush(); |
iflush(); |
| 49 |
|
|
| 50 |
for (ch = 0; !SYS_server_exit; ch = igetch_t(MAX_DELAY_TIME)) |
for (ch = 0; !SYS_server_exit; ch = igetch_t(BBS_max_user_idle_time)) |
| 51 |
{ |
{ |
| 52 |
switch (toupper(ch)) |
switch (toupper(ch)) |
| 53 |
{ |
{ |
| 55 |
case KEY_TIMEOUT: |
case KEY_TIMEOUT: |
| 56 |
goto cleanup; |
goto cleanup; |
| 57 |
case CR: |
case CR: |
|
igetch_reset(); |
|
| 58 |
case KEY_ESC: |
case KEY_ESC: |
| 59 |
case 'N': |
case 'N': |
| 60 |
return 0; |
return 0; |
| 127 |
|
|
| 128 |
clearscr(); |
clearscr(); |
| 129 |
moveto(1, 1); |
moveto(1, 1); |
| 130 |
prints("该文章已被删除,请稍后刷新列表。"); |
prints("璇ユ枃绔犲凡琚垹闄わ紝璇风◢鍚庡埛鏂板垪琛ㄣ"); |
| 131 |
press_any_key(); |
press_any_key(); |
| 132 |
|
|
| 133 |
goto cleanup; |
goto cleanup; |
| 137 |
{ |
{ |
| 138 |
clearscr(); |
clearscr(); |
| 139 |
moveto(1, 1); |
moveto(1, 1); |
| 140 |
prints("该文章无法被删除,请联系版主。"); |
prints("璇ユ枃绔犳棤娉曡鍒犻櫎锛岃鑱旂郴鐗堜富銆"); |
| 141 |
press_any_key(); |
press_any_key(); |
| 142 |
|
|
| 143 |
goto cleanup; |
goto cleanup; |
| 221 |
|
|
| 222 |
clearscr(); |
clearscr(); |
| 223 |
moveto(1, 1); |
moveto(1, 1); |
| 224 |
prints("删除成功,请在%d秒后刷新列表。", BBS_section_list_load_interval); |
prints("鍒犻櫎鎴愬姛锛岃鍦%d绉掑悗鍒锋柊鍒楄〃銆", BBS_section_list_load_interval); |
| 225 |
press_any_key(); |
press_any_key(); |
| 226 |
ret = 1; // Success |
ret = 1; // Success |
| 227 |
|
|