Initialize();\r
}\r
\r
-SiteInserter::SiteInserter(FCPv2 *fcp):IIndexInserter<long>(fcp)\r
+SiteInserter::SiteInserter(FCPv2::Connection *fcp):IIndexInserter<long>(fcp)\r
{\r
Initialize();\r
}\r
{\r
std::string content="";\r
\r
- content+="<h3>My last few posts</h3>";\r
-\r
SQLite3DB::Statement boardst=m_db->Prepare("SELECT tblBoard.BoardName FROM tblBoard INNER JOIN tblMessageBoard ON tblBoard.BoardID=tblMessageBoard.BoardID WHERE tblMessageBoard.MessageID=? ORDER BY tblBoard.BoardName COLLATE NOCASE;");\r
SQLite3DB::Statement st=m_db->Prepare("SELECT tblMessage.Body, tblMessage.Subject, tblMessage.MessageID FROM tblMessage INNER JOIN tblIdentity ON tblMessage.IdentityID=tblIdentity.IdentityID INNER JOIN tblLocalIdentity ON tblIdentity.PublicKey=tblLocalIdentity.PublicKey WHERE tblLocalIdentity.LocalIdentityID=? ORDER BY tblMessage.MessageDate DESC, tblMessage.MessageTime DESC LIMIT 0,10;");\r
st.Bind(0,localidentityid);\r
if((*i)!="" && (*i).find("index.htm")==std::string::npos && (*i).find("trustlist.htm")==std::string::npos && (*i).find("files.htm")==std::string::npos)\r
{\r
filename=(*i);\r
- infile=fopen(filename.c_str(),"r+b");\r
+ infile=fopen(filename.c_str(),"rb");\r
if(infile)\r
{\r
fseek(infile,0,SEEK_END);\r
st.Bind(1,Poco::DateTimeFormatter::format(date,"%Y-%m-%d %H:%M:%S"));\r
st.Step();\r
\r
- content+="<table>";\r
- content+="<tr><th colspan=\"5\">";\r
+ content+="<table class=\"trustlist\">";\r
+ content+="<tr class=\"title\"><thcolspan=\"5\">";\r
content+="Trust List of "+SanitizeOutput(name);\r
content+="</th></tr>";\r
- content+="<tr><td></td><th>Message Trust</th><th>Message Comment</th><th>Trust List Trust</th><th>Trust Comment</th></tr>";\r
+ content+="<tr class=\"headings\"><th></th><th>Message Trust</th><th>Message Comment</th><th>Trust List Trust</th><th>Trust Comment</th></tr>";\r
while(st.RowReturned())\r
{\r
std::string idname="";\r
content+="<tr>";\r
if(freesiteedition!="")\r
{\r
- content+="<td><a href=\""+uskkey+"\">"+SanitizeOutput(CreateShortIdentityName(idname,publickey))+"</a></td>";\r
+ content+="<td><div><a href=\""+uskkey+"\">"+SanitizeOutput(CreateShortIdentityName(idname,publickey))+"</a></div></td>";\r
}\r
else\r
{\r
- content+="<td>"+SanitizeOutput(CreateShortIdentityName(idname,publickey))+"</td>";\r
+ content+="<td><div>"+SanitizeOutput(CreateShortIdentityName(idname,publickey))+"</div></td>";\r
}\r
content+="<td "+GetClassString(messagetrust)+">"+messagetrust+"</td>";\r
content+="<td>"+SanitizeOutput(messagetrustcomment)+"</td>";\r
\r
st.Step();\r
}\r
+ content+="</table>";\r
\r
return StringFunctions::Replace(htmltemplate,"[CONTENT]",content);\r
\r
}\r
}\r
\r
-const bool SiteInserter::HandlePutFailed(FCPMessage &message)\r
+const bool SiteInserter::HandlePutFailed(FCPv2::Message &message)\r
{\r
std::vector<std::string> idparts;\r
long localidentityid;\r
return true;\r
}\r
\r
-const bool SiteInserter::HandlePutSuccessful(FCPMessage &message)\r
+const bool SiteInserter::HandlePutSuccessful(FCPv2::Message &message)\r
{\r
std::vector<std::string> idparts;\r
std::vector<std::string> uriparts;\r
\r
const bool SiteInserter::StartInsert(const long &localidentityid)\r
{\r
- FCPMessage message;\r
+ FCPv2::Message message;\r
std::string localidentityidstr="";\r
std::string sizestr="";\r
std::string uskkey="";\r
filenum++;\r
}\r
\r
- m_fcp->SendMessage(message);\r
+ m_fcp->Send(message);\r
\r
// send data of each page\r
for(std::map<std::string,std::string>::iterator pagei=pages.begin(); pagei!=pages.end(); pagei++)\r
{\r
- m_fcp->SendRaw(&(*pagei).second[0],(*pagei).second.size());\r
+ m_fcp->Send(std::vector<char>((*pagei).second.begin(),(*pagei).second.end()));\r
}\r
\r
m_inserting.push_back(localidentityid);\r