diff options
Diffstat (limited to 'swat/esptest/ldb.esp')
-rw-r--r-- | swat/esptest/ldb.esp | 44 |
1 files changed, 5 insertions, 39 deletions
diff --git a/swat/esptest/ldb.esp b/swat/esptest/ldb.esp index 1bc75bce73..385a8918c6 100644 --- a/swat/esptest/ldb.esp +++ b/swat/esptest/ldb.esp @@ -2,60 +2,26 @@ <h1>Samba4 ldb test</h1> -<form name="LdbTest" method="post" action="@@request['SCRIPT_NAME']"> - <input name="submit" type="submit" value="Cancel" /><br /> -</form> - -<% -if (request['REQUEST_METHOD'] == "POST") { - /* if they cancelled then take them back to the list of tests */ - if (form['submit'] == "Cancel") { - redirect("/"); - } -} - -/* - hmm, this gets fairly involved ... -*/ -function showLdbRes(res) { - for (i in res) { - var r = res[i]; - for (j in r) { - var a = r[j]; - if (typeof(a) == "object") { - for (k in a) { - write(j + "[" + k + "]=" + a[k] + "<br />\n"); - } - } else { - write(j + "=" + r[j] + "<br />\n"); - } - } - write("<p>"); - } -} - -%> - -Trying a attribute constrained search on samdb:<p> +<h3>An attribute constrained search</h3> <% var dbfile = lpGet("sam database"); var attrs = new Array("name", "dnsDomain", "objectSid", "dn"); res = ldbSearch(dbfile, "(objectClass=domain)", attrs); -showLdbRes(res); +multi_table(res, "dn"); %> -and now an unconstrained search:<p> +<h3>An unconstrained search</h3> <% var dbfile = lpGet("sam database"); res = ldbSearch(dbfile, "(objectClass=user)"); -showLdbRes(res); +multi_table(res, "dn"); %> -and a bad search<br> +<h3>A search with bad arguments</h3> <% res = ldbSearch("foo"); |