/[LeafOK_CVS]/lbbs/src/bbs_main.c
ViewVC logotype

Diff of /lbbs/src/bbs_main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.53 by sysadm, Sun May 25 06:53:29 2025 UTC Revision 1.54 by sysadm, Mon May 26 02:56:59 2025 UTC
# Line 28  Line 28 
28  #include <unistd.h>  #include <unistd.h>
29  #include <time.h>  #include <time.h>
30  #include <string.h>  #include <string.h>
31    #include <stdlib.h>
32    
33  int bbs_info()  int bbs_info()
34  {  {
# Line 57  int bbs_welcome(MYSQL *db) Line 58  int bbs_welcome(MYSQL *db)
58                           BBS_user_off_line);                           BBS_user_off_line);
59          if (mysql_query(db, sql) != 0)          if (mysql_query(db, sql) != 0)
60          {          {
61                  log_error("Query user_online failed\n");                  log_error("Query user_online error: %s\n", mysql_error(db));
62                  return -2;                  return -2;
63          }          }
64          if ((rs = mysql_store_result(db)) == NULL)          if ((rs = mysql_store_result(db)) == NULL)
# Line 78  int bbs_welcome(MYSQL *db) Line 79  int bbs_welcome(MYSQL *db)
79                           BBS_user_off_line);                           BBS_user_off_line);
80          if (mysql_query(db, sql) != 0)          if (mysql_query(db, sql) != 0)
81          {          {
82                  log_error("Query user_online failed\n");                  log_error("Query user_online error: %s\n", mysql_error(db));
83                  return -2;                  return -2;
84          }          }
85          if ((rs = mysql_store_result(db)) == NULL)          if ((rs = mysql_store_result(db)) == NULL)
# Line 95  int bbs_welcome(MYSQL *db) Line 96  int bbs_welcome(MYSQL *db)
96          snprintf(sql, sizeof(sql), "SELECT COUNT(UID) AS cc FROM user_list WHERE enable");          snprintf(sql, sizeof(sql), "SELECT COUNT(UID) AS cc FROM user_list WHERE enable");
97          if (mysql_query(db, sql) != 0)          if (mysql_query(db, sql) != 0)
98          {          {
99                  log_error("Query user_list failed\n");                  log_error("Query user_list error: %s\n", mysql_error(db));
100                  return -2;                  return -2;
101          }          }
102          if ((rs = mysql_store_result(db)) == NULL)          if ((rs = mysql_store_result(db)) == NULL)
# Line 112  int bbs_welcome(MYSQL *db) Line 113  int bbs_welcome(MYSQL *db)
113          snprintf(sql, sizeof(sql), "SELECT ID FROM user_login_log ORDER BY ID LIMIT 1");          snprintf(sql, sizeof(sql), "SELECT ID FROM user_login_log ORDER BY ID LIMIT 1");
114          if (mysql_query(db, sql) != 0)          if (mysql_query(db, sql) != 0)
115          {          {
116                  log_error("Query user_login_log failed\n");                  log_error("Query user_login_log error: %s\n", mysql_error(db));
117                  return -2;                  return -2;
118          }          }
119          if ((rs = mysql_store_result(db)) == NULL)          if ((rs = mysql_store_result(db)) == NULL)


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1