X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fhttp%2Fpages%2Fpeertrustpage.cpp;h=91d960fc79a40feea00680fa963f7f2b72efd8ae;hb=f2545574af789b63fc655decfe31a3d9f1b30504;hp=92f804cdec64667fb9708bb10e602c794633d0b6;hpb=dec33c63afafabf83c3039e916725cac6faef9b3;p=fms.git diff --git a/src/http/pages/peertrustpage.cpp b/src/http/pages/peertrustpage.cpp index 92f804c..91d960f 100644 --- a/src/http/pages/peertrustpage.cpp +++ b/src/http/pages/peertrustpage.cpp @@ -23,7 +23,7 @@ const std::string PeerTrustPage::BuildQueryString(const long startrow, const std { returnval+="&"; } - returnval+="namesearch="+namesearch; + returnval+="namesearch="+StringFunctions::UriEncode(namesearch); } if(sortby!="") @@ -148,7 +148,7 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s } } - if(localidentityid!=-1 && queryvars.find("formaction")!=queryvars.end() && (*queryvars.find("formaction")).second=="update") + if(localidentityid!=-1 && queryvars.find("formaction")!=queryvars.end() && (*queryvars.find("formaction")).second=="update" && ValidateFormPassword(queryvars)) { std::vector identityids; std::vector oldlmt; @@ -261,14 +261,14 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s // search drop down content+="
"; - content+="
"; + content+=""; content+=""; content+=""; content+="
"; content+="
"; content+="
"; - content+="
"; + content+=""; content+="Load Trust List of "; content+=CreateLocalIdentityDropDown("localidentityid",localidentityid); content+=""; @@ -276,6 +276,7 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s content+="
"; content+=""; + content+=CreateFormPassword(); content+=""; content+=""; content+=""; @@ -284,19 +285,19 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s content+=""; } content+=""; - content+=""; - content+=""; + content+=""; + content+=""; content+=""; - content+=""; - content+=""; + content+=""; + content+=""; content+=""; - content+=""; - content+=""; + content+=""; + content+=""; content+="\r\n"; // get count of identities we are showing sql="SELECT COUNT(*) FROM tblIdentity LEFT JOIN tblIdentityTrust ON tblIdentity.IdentityID=tblIdentityTrust.IdentityID "; - sql+="WHERE tblIdentity.Hidden='false' AND tblIdentityTrust.LocalIdentityID=?"; + sql+="WHERE tblIdentityTrust.LocalIdentityID=? AND tblIdentity.Hidden='false'"; if(namesearch!="") { sql+=" AND (Name LIKE '%' || ? || '%' OR PublicKey LIKE '%' || ? || '%')"; @@ -315,7 +316,7 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s sql="SELECT tblIdentity.IdentityID,Name,tblIdentityTrust.LocalMessageTrust,PeerMessageTrust,tblIdentityTrust.LocalTrustListTrust,PeerTrustListTrust,PublicKey,tblIdentityTrust.MessageTrustComment,tblIdentityTrust.TrustListTrustComment,COUNT(MessageID) AS 'MessageCount',tblIdentity.PublishTrustList "; sql+="FROM tblIdentity LEFT JOIN tblIdentityTrust ON tblIdentity.IdentityID=tblIdentityTrust.IdentityID LEFT JOIN tblMessage ON tblIdentity.IdentityID=tblMessage.IdentityID "; - sql+="WHERE tblIdentity.Hidden='false' AND tblIdentityTrust.LocalIdentityID=?"; + sql+="WHERE tblIdentityTrust.LocalIdentityID=? AND tblIdentity.Hidden='false'"; if(namesearch!="") { sql+=" AND (Name LIKE '%' || ? || '%' OR PublicKey LIKE '%' || ? || '%')"; @@ -424,7 +425,7 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s if(startrow>0) { StringFunctions::Convert(startrow-rowsperpage,tempstr); - content+=""; + content+=""; cols+=3; } if(startrow+rowsperpageNext Page -->"; + content+=""; } content+=""; } @@ -483,15 +484,3 @@ const std::string PeerTrustPage::ReverseSort(const std::string &sortname, const return currentsortorder; } } - -const bool PeerTrustPage::WillHandleURI(const std::string &uri) -{ - if(uri.find("peertrust.")!=std::string::npos) - { - return true; - } - else - { - return false; - } -}
NameLocal Message Trust
NameLocal Message TrustMessage CommentPeer Message TrustLocal Trust List TrustPeer Message TrustLocal Trust List TrustTrust CommentPeer Trust List TrustMessage CountPeer Trust List TrustMessage Count
<-- Previous Page<-- Previous PageNext Page -->