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

Diff of /lbbs/src/screen.c

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

Revision 1.87 by sysadm, Sun Jun 1 14:32:41 2025 UTC Revision 1.88 by sysadm, Thu Jun 5 11:48:35 2025 UTC
# Line 547  int show_bottom(const char *msg) Line 547  int show_bottom(const char *msg)
547          int msg_len;          int msg_len;
548          int len;          int len;
549          int len_username;          int len_username;
550            char str_tm_online[LINE_BUFFER_LEN];
551    
552          get_time_str(str_time, sizeof(str_time));          get_time_str(str_time, sizeof(str_time));
553    
# Line 564  int show_bottom(const char *msg) Line 565  int show_bottom(const char *msg)
565    
566          time_online = time(0) - BBS_login_tm;          time_online = time(0) - BBS_login_tm;
567          tm_online = gmtime(&time_online);          tm_online = gmtime(&time_online);
568            if (tm_online->tm_mday > 1)
569            {
570                    snprintf(str_tm_online, sizeof(str_tm_online),
571                                    "\033[36m%2d\033[33m天\033[36m%2d\033[33m时",
572                                    tm_online->tm_mday - 1, tm_online->tm_hour);
573            }
574            else
575            {
576                    snprintf(str_tm_online, sizeof(str_tm_online),
577                                    "\033[36m%2d\033[33m时\033[36m%2d\033[33m分",
578                                    tm_online->tm_hour, tm_online->tm_min);
579            }
580    
581          moveto(SCREEN_ROWS, 0);          moveto(SCREEN_ROWS, 0);
582          clrtoeol();          clrtoeol();
583          prints("\033[1;44;33m时间[\033[36m%s\033[33m]%s%*s \033[33m帐号[\033[36m%s\033[33m]"          prints("\033[1;44;33m时间[\033[36m%s\033[33m]%s%*s \033[33m帐号[\033[36m%s\033[33m][%s\033[33m]\033[m",
584                     "[\033[36m%1d\033[33m天\033[36m%2d\033[33m时\033[36m%2d\033[33m分]\033[m",                     str_time, msg_f, 38 - msg_len - len_username, "", BBS_username, str_tm_online);
                    str_time, msg_f, 35 - msg_len - len_username, "", BBS_username,  
                    tm_online->tm_mday - 1, tm_online->tm_hour, tm_online->tm_min);  
585    
586          return 0;          return 0;
587  }  }


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

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