From 3f4f393c98e7bc3b2853c699a67a9f5fc2e7d20a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 30 May 2005 06:55:25 +0000 Subject: r7092: added some js for formatting table results in a nicer fashion (This used to be commit 5f91db4d60a5b5b03b1b14d1348f9db6807ab18b) --- swat/esptest/ldb.esp | 44 +++++--------------------------------------- 1 file changed, 5 insertions(+), 39 deletions(-) (limited to 'swat/esptest') 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 @@

Samba4 ldb test

-
-
-
- -<% -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] + "
\n"); - } - } else { - write(j + "=" + r[j] + "
\n"); - } - } - write("

"); - } -} - -%> - -Trying a attribute constrained search on samdb:

+

An attribute constrained search

<% 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:

+

An unconstrained search

<% var dbfile = lpGet("sam database"); res = ldbSearch(dbfile, "(objectClass=user)"); -showLdbRes(res); +multi_table(res, "dn"); %> -and a bad search
+

A search with bad arguments

<% res = ldbSearch("foo"); -- cgit