X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=src%2Fhttp%2Fpages%2Fcreateidentitypage.cpp;h=c28fa64489a74ff62b8a764234b97acafe1090fd;hp=2c55c02c8b34320ece8fb5a064d133187018b6e6;hb=4430e7762844c66428b6f822288beb71b7f82b95;hpb=ee580d19b7920904587e18d72a3465d52eab6204 diff --git a/src/http/pages/createidentitypage.cpp b/src/http/pages/createidentitypage.cpp index 2c55c02..c28fa64 100644 --- a/src/http/pages/createidentitypage.cpp +++ b/src/http/pages/createidentitypage.cpp @@ -1,5 +1,6 @@ #include "../../../include/http/pages/createidentitypage.h" #include "../../../include/stringfunctions.h" +#include "../../../include/datetime.h" #ifdef XMEM #include @@ -11,8 +12,10 @@ const std::string CreateIdentityPage::GeneratePage(const std::string &method, co if(queryvars.find("formaction")!=queryvars.end() && (*queryvars.find("formaction")).second=="create") { - SQLite3DB::Statement st=m_db->Prepare("INSERT INTO tblLocalIdentity(Name,PublishTrustList) VALUES(?,'true');"); + SQLite3DB::Statement st=m_db->Prepare("INSERT INTO tblLocalIdentity(Name,PublishTrustList,DateCreated) VALUES(?,'true',?);"); std::string name=""; + DateTime date; + date.SetToGMTime(); if(queryvars.find("name")!=queryvars.end()) { @@ -20,6 +23,7 @@ const std::string CreateIdentityPage::GeneratePage(const std::string &method, co } st.Bind(0,name); + st.Bind(1,date.Format("%Y-%m-%d %H:%M:%S")); st.Step(); content+="

Created Identity

";