/[ldap]/html/find.cgi
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /html/find.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dpavlin, Wed May 3 08:28:04 2000 UTC revision 1.2 by dpavlin, Wed May 3 09:12:41 2000 UTC
# Line 8  $ldap = Net::LDAP->new('ldap.pliva.hr',p Line 8  $ldap = Net::LDAP->new('ldap.pliva.hr',p
8    
9  $ldap->bind;    # anonymous  $ldap->bind;    # anonymous
10    
11  %labels = ('givenname'=>'ime',  %labels = ('givenname'=>'imenu',
12          'sn'=>'prezime',          'sn'=>'prezimenu',
13          'cn'=>'ime i prezime');          'cn'=>'imenu i prezimenu');
14    
15    
16  print header,  print header,
17          start_html('LDAP pretraživanje'),          start_html('LDAP pretraživanje'),
18          start_form,          start_form,
19          "Pretražujte prema",popup_menu(-name=>'what',          "Pretražujte prema ",popup_menu(-name=>'what',
20                  -values=>['givenname','sn','cn'],                  -values=>['givenname','sn','cn'],
21                  -default=>'cn',                  -default=>'cn',
22                  -labels=>\%labels),                  -labels=>\%labels),
23          textfield(-name=>'search',-default=>'*'),p,          textfield(-name=>'search',-default=>'*'),
24          submit,          submit(-value=>"Počni"),p
25          end_form;          end_form;
26    
27  if(param()) {  if(param()) {
# Line 33  if(param()) { Line 33  if(param()) {
33    
34          print begin_ul;          print begin_ul;
35          my $max = $mesg->count;          my $max = $mesg->count;
36            print "Broj osoba koje odgovaraju upitu: ",$mesg->count,p;
37          for($i = 0 ; $i < $max ; $i++) {          for($i = 0 ; $i < $max ; $i++) {
38                  my $entry = $mesg->entry($i);                  my $entry = $mesg->entry($i);
39                  print li($entry->get('cn')," e-mail: ",$entry->get('mail'));                  my ($mail) = $entry->get('mail'); # array, take first
40                    print li($entry->get('cn')," <tt><a href=\"mailto: $mail\">$mail</tt>");
41          }          }
42          print end_ul;          print end_ul;
43                    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.26