--- innwebd/base_active.cpp 2004/07/03 05:21:57 1.1 +++ innwebd/base_active.cpp 2005/02/26 16:10:25 1.7 @@ -1,10 +1,10 @@ /*******************************************************/ /* */ -/* LeafOK Innd */ -/* Copyright (C) LeafOK.com, 2003-2004 */ +/* LeafOK Innbbsd */ +/* Copyright (C) LeafOK.com, 2003-2005 */ /* */ /* Programmed by Leaf */ -/* E-mail:leaf@leafok.com QQ:6049044 */ +/* E-mail:leaflet@leafok.com QQ:6049044 */ /* */ /* http://bbs.leafok.com */ /* http://bbs.leafok.net */ @@ -476,7 +476,7 @@ int base_active::get_cancel(const char* if (i >= step || cur_art_id >= art_end || rec_count >= step*10) { //Delete article - sql.Format("select AID from innd_logfile where msg_id in (%s" + sql.Format("select AID from innd_log where msg_id in (%s" ") and op='I' and cancel=0",msg_id_list); RS.Open(CRecordset::snapshot,sql,CRecordset::forwardOnly | CRecordset::readOnly); @@ -533,11 +533,10 @@ int base_active::post_article(const char { //Begin post sql.Format("select bbs.*,innd_conf.group,innd_todo.ID,innd_todo.SID as doSID," - "user_list.username,subdate(bbs.sub_dt, interval '8' hour)" + "subdate(bbs.sub_dt, interval '8' hour)" " as sub_gmt from innd_todo inner join innd_conf on" " innd_todo.server=innd_conf.server and innd_todo.SID=innd_conf.SID left join bbs on" - " innd_todo.AID=bbs.AID inner join user_list on" - " bbs.UID=user_list.UID where innd_conf.out=1 and" + " innd_todo.AID=bbs.AID where innd_conf.out=1 and" " innd_conf.passive_mode=0 and innd_conf.server='%s' and" " bbs.visible and innd_todo.op='P' order by bbs.AID",news_server); @@ -617,7 +616,7 @@ int base_active::post_article(const char if (out.Left(3) == "240") // Post successfully { - sql.Format("insert delayed into innd_logfile (AID,art_id,msg_id,op) " + sql.Format("insert delayed into innd_log (AID,art_id,msg_id,op) " "values(%ld,0,'%s','O')",aid,msg_id); this->Db.ExecuteSQL(sql); @@ -652,16 +651,15 @@ int base_active::post_cancel(const char* try { //Begin post - sql.Format("select bbs.nickname,innd_todo.ID,innd_conf.group,innd_todo.SID as doSID," - "user_list.username,innd_todo.AID," + sql.Format("select bbs.username,bbs.nickname,innd_todo.ID,innd_conf.group," + "innd_todo.SID as doSID,innd_todo.AID," "subdate(innd_todo.dt,interval '8' hour) as dt," - "innd_logfile.msg_id from innd_todo inner join innd_conf on" + "innd_log.msg_id from innd_todo inner join innd_conf on" " innd_todo.server=innd_conf.server and innd_todo.SID=innd_conf.SID left join bbs on" - " innd_todo.AID=bbs.AID inner join user_list on" - " bbs.UID=user_list.UID inner join innd_logfile on" - " innd_todo.AID=innd_logfile.AID where innd_conf.out=1 and" + " innd_todo.AID=bbs.AID inner join innd_log on" + " innd_todo.AID=innd_log.AID where innd_conf.out=1 and" " innd_conf.passive_mode=0 and innd_conf.server='%s' and" - " innd_todo.op='C' and innd_logfile.cancel=0 order by innd_todo.AID",news_server); + " innd_todo.op='C' and innd_log.cancel=0 order by innd_todo.AID",news_server); RS.Open(CRecordset::snapshot,sql,CRecordset::forwardOnly | CRecordset::readOnly); @@ -720,7 +718,7 @@ int base_active::post_cancel(const char* if (out.Left(3) == "240") // Post successfully { - sql.Format("update innd_logfile set cancel=1 where msg_id='%s'",cancel_msg_id); + sql.Format("update innd_log set cancel=1 where msg_id='%s'",cancel_msg_id); this->Db.ExecuteSQL(sql); sql.Format("delete from innd_todo where ID=%ld",id); @@ -919,11 +917,10 @@ int base_active::ihave_article(const cha { //Begin ihave sql.Format("select bbs.*,innd_todo.ID,innd_conf.group,innd_todo.SID as doSID," - "user_list.username,subdate(bbs.sub_dt, interval '8' hour)" + "subdate(bbs.sub_dt, interval '8' hour)" " as sub_gmt from innd_todo inner join innd_conf on" " innd_todo.server=innd_conf.server and innd_todo.SID=innd_conf.SID left join bbs on" - " innd_todo.AID=bbs.AID inner join user_list on" - " bbs.UID=user_list.UID where innd_conf.out=1 and" + " innd_todo.AID=bbs.AID where innd_conf.out=1 and" " innd_conf.passive_mode=1 and innd_conf.server='%s' and" " bbs.visible and innd_todo.op='P' order by bbs.AID",news_server); @@ -1003,7 +1000,7 @@ int base_active::ihave_article(const cha if (out.Left(3) == "235") // Ihave successfully { - sql.Format("insert delayed into innd_logfile (AID,art_id,msg_id,op) " + sql.Format("insert delayed into innd_log (AID,art_id,msg_id,op) " "values(%ld,0,'%s','O')",aid,msg_id); this->Db.ExecuteSQL(sql); @@ -1045,16 +1042,15 @@ int base_active::ihave_cancel(const char try { //Begin ihave - sql.Format("select bbs.nickname,innd_todo.ID,innd_conf.group,innd_todo.SID as doSID," - "user_list.username,innd_todo.AID," + sql.Format("select bbs.username,bbs.nickname,innd_todo.ID,innd_conf.group," + "innd_todo.SID as doSID,innd_todo.AID," "subdate(innd_todo.dt,interval '8' hour) as dt," - "innd_logfile.msg_id from innd_todo inner join innd_conf on" + "innd_log.msg_id from innd_todo inner join innd_conf on" " innd_todo.server=innd_conf.server and innd_todo.SID=innd_conf.SID left join bbs on" - " innd_todo.AID=bbs.AID inner join user_list on" - " bbs.UID=user_list.UID inner join innd_logfile on" - " innd_todo.AID=innd_logfile.AID where innd_conf.out=1 and" + " innd_todo.AID=bbs.AID inner join innd_log on" + " innd_todo.AID=innd_log.AID where innd_conf.out=1 and" " innd_conf.passive_mode=1 and innd_conf.server='%s' and" - " innd_todo.op='C' and innd_logfile.cancel=0 order by innd_todo.AID",news_server); + " innd_todo.op='C' and innd_log.cancel=0 order by innd_todo.AID",news_server); RS.Open(CRecordset::snapshot,sql,CRecordset::forwardOnly | CRecordset::readOnly); @@ -1113,7 +1109,7 @@ int base_active::ihave_cancel(const char if (out.Left(3) == "235") // Ihave successfully { - sql.Format("update innd_logfile set cancel=1 where msg_id='%s'",cancel_msg_id); + sql.Format("update innd_log set cancel=1 where msg_id='%s'",cancel_msg_id); this->Db.ExecuteSQL(sql); sql.Format("delete from innd_todo where ID=%ld",id); @@ -1217,7 +1213,7 @@ bool base_active::check_todo_list(void) try { - syslog << logfile::log_head << "Searching article to send ..." << endl; +// syslog << logfile::log_head << "Searching article to send ..." << endl; sql = "select count(*) as cc from innd_todo"; @@ -1275,7 +1271,7 @@ DWORD base_active::SendThread(LPVOID pPa delete(p); base_active::uThreadCount--; - syslog << logfile::log_head << "Delete send thread ... OK" << endl; +// syslog << logfile::log_head << "Delete send thread ... OK" << endl; } catch(CException* e) {