1 #include "../../../include/http/pages/insertedfilespage.h"
\r
2 #include "../../../include/stringfunctions.h"
\r
3 #include "../../../include/option.h"
\r
9 const std::string InsertedFilesPage::GeneratePage(const std::string &method, const std::map<std::string,std::string> &queryvars)
\r
11 std::string content="<h2>Inserted Files</h2>";
\r
13 SQLite3DB::Statement st=m_db->Prepare("SELECT Key,FileName,Size FROM tblFileInserts WHERE Key IS NOT NULL ORDER BY FileName");
\r
16 std::string node="localhost";
\r
17 Option::Instance()->Get("FCPHost",node);
\r
19 while(st.RowReturned())
\r
22 std::string filename="";
\r
23 std::string sizestr="";
\r
25 st.ResultText(0,key);
\r
26 st.ResultText(1,filename);
\r
27 st.ResultText(2,sizestr);
\r
29 content+="<a href=\"http://"+node+":8888/"+StringFunctions::UriEncode(key)+"\">"+SanitizeOutput(filename)+"</a> - "+sizestr+" bytes";
\r
35 return "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n"+StringFunctions::Replace(m_template,"[CONTENT]",content);
\r
38 const bool InsertedFilesPage::WillHandleURI(const std::string &uri)
\r
40 if(uri.find("insertedfiles.")!=std::string::npos)
\r