projects
/
fms.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
version 0.3.29
[fms.git]
/
include
/
http
/
ipagehandler.h
diff --git
a/include/http/ipagehandler.h
b/include/http/ipagehandler.h
index
745f727
..
d0c5856
100644
(file)
--- a/
include/http/ipagehandler.h
+++ b/
include/http/ipagehandler.h
@@
-2,6
+2,7
@@
#define _ipagehandler_
\r
\r
#include "../ilogger.h"
\r
#define _ipagehandler_
\r
\r
#include "../ilogger.h"
\r
+#include "../idatabase.h"
\r
\r
#include <Poco/Net/HTTPRequestHandler.h>
\r
#include <Poco/Net/HTTPServerRequest.h>
\r
\r
#include <Poco/Net/HTTPRequestHandler.h>
\r
#include <Poco/Net/HTTPServerRequest.h>
\r
@@
-12,13
+13,13
@@
#include <map>
\r
#include <vector>
\r
\r
#include <map>
\r
#include <vector>
\r
\r
-class IPageHandler:public Poco::Net::HTTPRequestHandler,public ILogger
\r
+class IPageHandler:public Poco::Net::HTTPRequestHandler,public ILogger
,public IDatabase
\r
{
\r
public:
\r
{
\r
public:
\r
- IPageHandler(
)
{}
\r
- IPageHandler(
const std::string &templatestr) { m_template=templatestr;
}
\r
+ IPageHandler(
SQLite3DB::DB *db):IDatabase(db)
{}
\r
+ IPageHandler(
SQLite3DB::DB *db, const std::string &templatestr, const std::string &pagename):IDatabase(db),m_template(templatestr),m_pagename(pagename) {
}
\r
virtual ~IPageHandler() {}
\r
virtual ~IPageHandler() {}
\r
- virtual const bool WillHandleURI(const std::string &uri)
=0
;
\r
+ virtual const bool WillHandleURI(const std::string &uri);
\r
\r
virtual IPageHandler *New()=0; // returns a new instance of the object
\r
\r
\r
virtual IPageHandler *New()=0; // returns a new instance of the object
\r
\r
@@
-34,10
+35,16
@@
protected:
\r
void CreateQueryVarMap(Poco::Net::HTTPServerRequest &request, std::map<std::string,std::string> &vars);
\r
\r
\r
void CreateQueryVarMap(Poco::Net::HTTPServerRequest &request, std::map<std::string,std::string> &vars);
\r
\r
+ const std::string CreateFormPassword();
\r
+ const bool ValidateFormPassword(const std::map<std::string,std::string> &vars);
\r
+
\r
// replaces html elements with encoded characters (i.e. < becomes <)
\r
const std::string SanitizeOutput(const std::string &input);
\r
// replaces html elements with encoded characters (i.e. < becomes <)
\r
const std::string SanitizeOutput(const std::string &input);
\r
+ // don't replace space with , because browser might convert to unicode non breaking space character
\r
+ const std::string SanitizeTextAreaOutput(const std::string &input);
\r
\r
std::string m_template;
\r
\r
std::string m_template;
\r
+ std::string m_pagename;
\r
\r
};
\r
\r
\r
};
\r
\r