version 0.1.13
[fms.git] / src / http / pages / peertrustpage.cpp
index 667595d..48a19e8 100644 (file)
@@ -91,8 +91,22 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s
                                StringFunctions::Convert(ltlt[i],localtrustlisttrust);\r
                                StringFunctions::Convert(identityids[i],identityid);\r
 \r
-                               update.Bind(0,localmessagetrust);\r
-                               update.Bind(1,localtrustlisttrust);\r
+                               if(lmt[i]!="")\r
+                               {\r
+                                       update.Bind(0,localmessagetrust);\r
+                               }\r
+                               else\r
+                               {\r
+                                       update.Bind(0);\r
+                               }\r
+                               if(ltlt[i]!="")\r
+                               {\r
+                                       update.Bind(1,localtrustlisttrust);\r
+                               }\r
+                               else\r
+                               {\r
+                                       update.Bind(1);\r
+                               }\r
                                update.Bind(2,identityid);\r
                                update.Step();\r
                                update.Reset();\r
@@ -144,7 +158,7 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s
        content+="Message Trust is how much you trust the identity to post good messages. Trust List Trust is how much weight you want the trust list of that identity to have when calculating the total. The local trust levels are set by you, and the peer trust levels are calculated by a weighted average using other identities' trust lists.";\r
        content+="<div style=\"text-align:center;\">";\r
        content+="<form name=\"frmsearch\" method=\"POST\" action=\"peertrust.htm\">";\r
-       content+="<input type=\"text\" name=\"namesearch\">";\r
+       content+="<input type=\"text\" name=\"namesearch\" value=\""+SanitizeOutput(namesearch)+"\">";\r
        content+="<input type=\"submit\" value=\"Search\">";\r
        content+="</form>";\r
        content+="</div>";\r
@@ -279,7 +293,7 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s
                content+="</tr>";\r
        }\r
 \r
-       content+="<tr><td colspan=\"5\"><input type=\"submit\" value=\"Update Trust\"></td></tr>";\r
+       content+="<tr><td colspan=\"5\"><center><input type=\"submit\" value=\"Update Trust\"></center></td></tr>";\r
        content+="</table>";\r
        content+="</form>";\r
 \r