X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=web%2Fsearch.cgi;h=7a541001daf90743f0ba3e481600e773ad408145;hb=91ce4ae2f194d2fa00716d0bfab5b77be74e0f6e;hp=3c21fb7402eef82f4b8d0191b803aad648adba09;hpb=c50d88536a4feb3087d1aa802e110250cb2861fc;p=mirror%2Fuserdir-ldap.git diff --git a/web/search.cgi b/web/search.cgi index 3c21fb7..7a54100 100755 --- a/web/search.cgi +++ b/web/search.cgi @@ -1,6 +1,7 @@ #!/usr/bin/perl -# (c) 1999 Debian and Randolph Chung. Licensed under the GPL. +# $Id: search.cgi,v 1.6 2000/03/26 22:13:25 tausq Exp $ +# (c) 1999 Randolph Chung. Licensed under the GPL. use lib '.'; use strict vars; @@ -115,7 +116,7 @@ if (!$dosearch) { $data = $entries->{$dn}; # These are local variables.. i have enough global vars as it is... - my ($ufdn, $login, $name, $email, $fingerprint, $address, $latlong, $vacation, $created, $modified) = undef; + my ($ufdn, $login, $name, $icquin, $email, $fingerprint, $address, $latlong, $vacation, $created, $modified, $lastseen) = undef; $ufdn = $dn; # Net::LDAP does not have a dn2ufn function, but this is close enough :) @@ -131,6 +132,11 @@ if (!$dosearch) { $email .= "$_"; } + # ICQ + if ($data->{icquin}->[0]) { + $icquin = sprintf("%s", $data->{icquin}->[0], $data->{icquin}->[0]); + } + # Format PGP/GPG key fingerprints my $fi; foreach (@{$data->{keyfingerprint}}) { @@ -152,6 +158,10 @@ if (!$dosearch) { $modified = &Util::FormatTimestamp($data->{modifytimestamp}->[0]); $created = &Util::FormatTimestamp($data->{createtimestamp}->[0]); + # Last seen information (Echelon) + $lastseen = &Util::FormatLastSeen($data->{"activity-pgp"}->[0], + $data->{"activity-from"}->[0]); + # Link in the debian login id $login = $data->{uid}->[0]."\@debian.org"; $login = "$login"; @@ -172,6 +182,9 @@ if (!$dosearch) { $outsub{searchresults} .= FormatEntry($dataspecref->{ircnick}, $data->{ircnick}->[0]); $outsub{searchresults} .= FormatEntry($dataspecref->{loginshell}, $data->{loginshell}->[0]); $outsub{searchresults} .= FormatEntry($dataspecref->{fingerprint}, $fingerprint); + if ($icquin) { + $outsub{searchresults} .= FormatEntry($dataspecref->{icquin}, $icquin); + } if ($auth) { # Some data should only be available to authorized users... @@ -182,6 +195,7 @@ if (!$dosearch) { $outsub{searchresults} .= FormatEntry($dataspecref->{latlong}, $latlong); $outsub{searchresults} .= FormatEntry($dataspecref->{phone}, $data->{telephonenumber}->[0] || "- unlisted -"); $outsub{searchresults} .= FormatEntry($dataspecref->{fax}, $data->{fascimiletelephonenumber}->[0] || "- unlisted -"); + $outsub{searchresults} .= FormatEntry($dataspecref->{lastseen}, $lastseen); } $outsub{searchresults} .= FormatEntry($dataspecref->{created}, $created); $outsub{searchresults} .= FormatEntry($dataspecref->{modified}, $modified); @@ -190,7 +204,7 @@ if (!$dosearch) { # If this is ourselves, present a link to do mods if ($auth && ($id eq $data->{uid}->[0])) { #TODO: extract this string into a url for translation... - $outsub{searchresults} .= "Edit my settings\n"; + $outsub{searchresults} .= "Edit my settings\n"; } $outsub{searchresults} .= "


\n"; @@ -253,3 +267,5 @@ sub FormatEntry { return "$key: $val\n"; } + +exit 0;