From afddecb2830f6afa73f869e120002d12803b3266 Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 7 Aug 2019 22:12:46 +1000 Subject: More account manager. Select with more parameters. Tables, with member accounts. Print the query values. --- .../Server/Handlers/Web/WebServerInConnector.cs | 65 +++++++++++++++++++--- 1 file changed, 56 insertions(+), 9 deletions(-) (limited to 'OpenSim/Server/Handlers/Web') diff --git a/OpenSim/Server/Handlers/Web/WebServerInConnector.cs b/OpenSim/Server/Handlers/Web/WebServerInConnector.cs index 568b7d6..1dedfa3 100644 --- a/OpenSim/Server/Handlers/Web/WebServerInConnector.cs +++ b/OpenSim/Server/Handlers/Web/WebServerInConnector.cs @@ -143,7 +143,7 @@ namespace OpenSim.Server.Handlers.Web foreach (DictionaryEntry h in headers) m_log.InfoFormat("[WEB SERVICE]: {0} method path {1} header {2} = {3}", method, reqpath, (string) h.Key, (string) h.Value); foreach (String q in query) - m_log.InfoFormat("[WEB SERVICE]: {0} method path {1} query {2}", method, reqpath, q); + m_log.InfoFormat("[WEB SERVICE]: {0} method path {1} query {2} value {3}", method, reqpath, q, (string) request[q]); reply["int_response_code"] = 200; if ("GET" == method) @@ -214,14 +214,12 @@ namespace OpenSim.Server.Handlers.Web } else if ("list" == fields["doit"].ToString()) { - List< Hashtable > rows = m_database.Select("GridUser", "Login > UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(now()) - 2419200))"); - foreach (Hashtable row in rows) - { - string line = ""; - foreach (DictionaryEntry c in row) - line = line + " | " + (string) c.Value; - m_log.Info("[MariaDB RAW]: " + line); - } + List< Hashtable > rows = m_database.Select("UserAccounts", + "CONCAT(FirstName,' ',LastName) as Name,UserTitle as Title,UserLevel as Level,UserFlags as Flags,PrincipalID as UUID", + "", "Name"); + reply["str_response_string"] = "
" + button("my account") + "
"; } else { @@ -281,8 +279,10 @@ namespace OpenSim.Server.Handlers.Web + form("account.html", fields["token"].ToString(), hidden("firstName", fields["firstName"].ToString()) + hidden("lastName", fields["lastName"].ToString()) +// + hidden("UUID", fields["UUID"].ToString()) + text("email", "email", "email", fields["email"].ToString(), 0, false) + text("password", "password", "password", "", 14, false) +// + text("title", "text", "title", fields["title"].ToString(), 0, false) + select("type", "type", option("", false) + option("approved", true) @@ -303,6 +303,53 @@ namespace OpenSim.Server.Handlers.Web { return "\n \n" + s + " | "; + tbl = tbl + line + "|
---|---|
" + address + row[s] + addrend + " | "; + else + line = line + "" + row[s] + " | "; + } + tbl = tbl + line + "