AddressBook

 view release on metacpan or  search on metacpan

examples/phonelist.cgi  view on Meta::CPAN

#!/usr/bin/perl

use AddressBook;
use CGI;

$query = CGI::new();
print $query->header(-charset=>'UTF-8');
print "<html><head>\n";
print "<style type=\"text/css\">\n";
print "td {font-size: 8pt; vertical-align: top}\n";
print "</style>\n";
print "<title>Phone List</title></head><body>\n";

$ldap=AddressBook->new(source => LDAP);
$html=AddressBook->new(source => phonelist,config=>$ldap->{config});

$lines = 0;
print "<table>\n";
print "<tr><td><table>\n";

$ldap->search(filter=>{phonelist => "Yes"});
while ($entry = $ldap->read) {
  if ($lines >= 36) {print "</table></td><td><table>\n";$lines=0}
  $cell = $html->write($entry);
  (@matches) = $cell =~ /<tr>(?!<\/tr>)/gi;
  $lines += $#matches;
  print "$cell\n";
}

print "</table></td></tr></table></font>\n";
print "</body></html>\n";

html/index.html  view on Meta::CPAN

<ul>
<li><a href=AddressBook.html>AddressBook</a> - The base AddressBook object
<li><a href=AddressBook/Entry.html>AddressBook::Entry</a> - An AddressBook Entry
<li><a href=AddressBook/Config.html>AddressBook::Config</a> - The AddressBook configuration object.
Also configuration file information.
</ul>
<p>See also the man pages for the <a href=#backend_doc>different backend databases</a>.
<hr>
<h3>Examples</h3>
<p>The following sample files are provided in the examples directory. 
<font color=red>Note:  It is highly recommended that you back up your addressbook database 
before running one of these scripts.</font>
<table>
  <tr><td>ldap-abook.conf<td>A sample configuration file which is used by all of the sample scripts
  <tr><td>abook.palm<td>A PalmOS conduit which synchronizes a palm pilot with an LDAP database.
  <tr><td>SyncAbook<td>Same as abook.palm, but written as a <a href=http://www.moshpit.org/>PilotManager</a> 
conduit.
  <tr><td>phonelist.cgi<td>A cgi script which will generate a list of names and phone numbers from
an LDAP database.
</table>
<hr>
<h3>See Also</h3>



( run in 0.956 second using v1.01-cache-2.11-cpan-ceb78f64989 )