File: search_util.js

package info (click to toggle)
phpldapadmin 0.9.5-3sarge3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,052 kB
  • ctags: 2,526
  • sloc: php: 21,258; sh: 262; makefile: 132; xml: 42
file content (76 lines) | stat: -rw-r--r-- 1,871 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
// File: search_util.js
// Purpose:
// This JavaScript file defines some functions used by the two search forms for
// auto-populating the base DN dynamically when a server is selected from the
// drop-down.
// $Header: /cvsroot/phpldapadmin/phpldapadmin/search_util.js,v 1.2 2004/03/19 20:17:51 i18phpldapadmin Exp $

//the array to store the server
var servers = new Array();


//---------------------------------------------------------------------
//		Definition of the object server			      	
//---------------------------------------------------------------------

//constructor of the server
//param id the id of the server
//param name the name of the server
//param base_dn the base dn of the server

function server(id,name,base_dn){

	//the properties of the object
	this.id =id;
	this.name = name;
	this.base_dn = base_dn;

	// the method of the server
	this.getId=getId;
	this.setId=setId;
	this.getName = getName;
	this.setName = setName;
	this.setBaseDn = setBaseDn;
	this.getBaseDn = getBaseDn;
}
// set the id of the server
function setId(id){
	this.id = id;
}	
	
//return the id of the server
function getId(){
	return this.id;
}

// set the name of the server
function setName(name){
	this.name = name;
}	

// return the name of the server	
function getName(){
	return this.name;
}

// return the base dn of the server
function getBaseDn(){
	return this.base_dn;
}	

// set the base dn of the server
function setBaseDn(base_dn){
	this.base_dn = base_dn;
}

//-----------------------------------------------------------------------
//			End of the definition of the server
//-----------------------------------------------------------------------


// add a server object to the array of server
function addToServersList(obj_server){
	servers[servers.length] = obj_server;
}