version 0.1.14
[fms.git] / src / http / pages / createidentitypage.cpp
index 2c55c02..c28fa64 100644 (file)
@@ -1,5 +1,6 @@
 #include "../../../include/http/pages/createidentitypage.h"\r
 #include "../../../include/stringfunctions.h"\r
+#include "../../../include/datetime.h"\r
 \r
 #ifdef XMEM\r
        #include <xmem.h>\r
@@ -11,8 +12,10 @@ const std::string CreateIdentityPage::GeneratePage(const std::string &method, co
 \r
        if(queryvars.find("formaction")!=queryvars.end() && (*queryvars.find("formaction")).second=="create")\r
        {\r
-               SQLite3DB::Statement st=m_db->Prepare("INSERT INTO tblLocalIdentity(Name,PublishTrustList) VALUES(?,'true');");\r
+               SQLite3DB::Statement st=m_db->Prepare("INSERT INTO tblLocalIdentity(Name,PublishTrustList,DateCreated) VALUES(?,'true',?);");\r
                std::string name="";\r
+               DateTime date;\r
+               date.SetToGMTime();\r
 \r
                if(queryvars.find("name")!=queryvars.end())\r
                {\r
@@ -20,6 +23,7 @@ const std::string CreateIdentityPage::GeneratePage(const std::string &method, co
                }\r
 \r
                st.Bind(0,name);\r
+               st.Bind(1,date.Format("%Y-%m-%d %H:%M:%S"));\r
                st.Step();\r
 \r
                content+="<h2>Created Identity</h2>";\r