File: search_form.inc

package info (click to toggle)
openldap2 2.0.23-6.3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,816 kB
  • ctags: 6,366
  • sloc: ansic: 86,391; sh: 9,816; makefile: 1,270; cpp: 1,107; sql: 838; php: 700; perl: 134; tcl: 40
file content (80 lines) | stat: -rw-r--r-- 2,040 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?
function display_options($string) {
?>
	<select name="precision">
		<option>exactly matches</option>
		<option selected>approximates</option>
		<option>starts with</option>
		<option>ends with</option>
		<option>contains</option>
		</select>
<?
}
function display_items($string) {
?>
	<select name="objectclass">
		<option selected>People</option>
		<option>Groups</option>
		<option>Joinable Groups</option>
		<option>Services</option>
		<option>Organisations</option>
		<option>Documents</option>
		</select>
<?
}
function display_attribs($string) {
?>
	<select name="attrib">
		<option selected>Common Name</option>
		<option>Surname</option>
		<option>Business Phone</option>
		<option>E-mail Address</option>
		<option>Distinguished Name</option>
		<option>Title</option>
		<option>Location</option>
		</select>
<?
}

function display_base_dn($string) {
?>
	<select name="base_dn">
		<option value="c=US">US</option>
		<option value="o=University of Michigan, c=US" selected>University of Michigan</option>
		<option value="o=Balorda and Balorda, c=UK">Balorda and Balorda</option>
		</select>
<?
}
		
function display_simple_form() {
	global $lm, $FILE;
?>	<form method=form action=<? echo $FILE; ?>>
	<input type=text name=search_filter size=25 value="<? echo $lm->search_filter; ?>"><br>
	<input type=hidden name=ldap_action value=search>
	<input type=submit value="Search"><input type=reset value="Clear">
	</form><?
}

function display_advanced_form() {
	global $lm, $FILE;
?>
	<table width="100%" border=1 cellspacing=0 cellpadding=0>
	<tr>
		<td colspan=2 bgcolor="lightyellow"> <!bgcolor=#9380DB>
			<p class=form>
			<form method=get action=<? echo $FILE; ?>>
			Find <?display_items("objectclass")?>
			within <?display_base_dn("base_dn")?>
			whose <?display_attribs("attrib")?><br>
			<?display_options("precision")?>
			<input type=text name=search_string size=25 value="">
			<input type=hidden name=ldap_action value=search>
			<input type=submit value="Search">
			</form>
			</p>
			</td>
		</tr>
	</table>
<?
}
?>