| 34 |
CDBVariant dbVar; |
CDBVariant dbVar; |
| 35 |
CString sql,out,cmd; |
CString sql,out,cmd; |
| 36 |
char temp[256]; |
char temp[256]; |
| 37 |
|
HANDLE hThreadCurrent; |
| 38 |
long u_online,u_anonymous,u_total; |
long u_online,u_anonymous,u_total; |
| 39 |
|
|
| 40 |
try |
try |
| 41 |
{ |
{ |
| 42 |
|
hThreadCurrent = GetCurrentThread(); |
| 43 |
|
|
| 44 |
u_online = 0; |
u_online = 0; |
| 45 |
sql = "select SID as cc from user_online group by SID"; |
sql = "select SID as cc from user_online group by SID"; |
| 46 |
RS.Open(CRecordset::snapshot,sql,CRecordset::forwardOnly | CRecordset::readOnly); |
RS.Open(CRecordset::snapshot,sql,CRecordset::forwardOnly | CRecordset::readOnly); |
| 81 |
"注册用户数[\033[36m%ld\033[32m]\r\n" |
"注册用户数[\033[36m%ld\033[32m]\r\n" |
| 82 |
"\033[1;37m本站目前尚未开设telnet服务 请使用Web方式访问\r\n\r\n" |
"\033[1;37m本站目前尚未开设telnet服务 请使用Web方式访问\r\n\r\n" |
| 83 |
"\033[1;32m http://%s \033[m\r\n", |
"\033[1;32m http://%s \033[m\r\n", |
| 84 |
this->innd_name,u_online,MAX_THREAD,u_anonymous,u_total, |
this->innd_name,u_online,MAX_CLIENT,u_anonymous,u_total, |
| 85 |
this->innd_server,this->innd_server); |
this->innd_server,this->innd_server); |
| 86 |
|
|
| 87 |
this->s_send(out); |
this->s_send(out); |
| 88 |
while(!this->thread_terminate) |
while(!this->thread_terminate) |
| 89 |
{ |
{ |
| 90 |
|
this->GetParentThread()->GetThreadPool()->SetThreadStatus(hThreadCurrent,thread_pool::S_WAITING); |
| 91 |
|
|
| 92 |
if (this->s_receive(out) == 0) //Connection closed |
if (this->s_receive(out) == 0) //Connection closed |
| 93 |
break; |
break; |
| 94 |
out.Trim(); |
out.Trim(); |
| 95 |
|
|
| 96 |
|
this->GetParentThread()->GetThreadPool()->SetThreadStatus(hThreadCurrent,thread_pool::S_WORKING); |
| 97 |
|
|
| 98 |
if (sscanf(out,"%20s",temp) ==1) |
if (sscanf(out,"%20s",temp) ==1) |
| 99 |
cmd = strupr(temp); |
cmd = strupr(temp); |
| 100 |
else |
else |