lcs-pla : Initial release (svn_builpackage compatibilty)
authormisterphi <misterphi>
Tue, 3 Mar 2009 15:51:58 +0000 (15:51 +0000)
committermisterphi <misterphi@1012e355-7652-49d3-8fd6-1f9b0b464cea>
Tue, 3 Mar 2009 15:51:58 +0000 (15:51 +0000)
git-svn-id: https://svn.tice.ac-caen.fr/svn/LcsSE3/BacASable/LCS2.0ndg/sources/trunk/lcs-pla@2261 1012e355-7652-49d3-8fd6-1f9b0b464cea

499 files changed:
conf/Mod/pla/config/config.php [new file with mode: 0644]
conf/Mod/pla/lib/hooks.php [new file with mode: 0644]
conf/Orig/phpldapadmin-0.9.8.5.tar.gz [new file with mode: 0644]
conf/Scripts/chown.sh [new file with mode: 0644]
debian/README [new file with mode: 0644]
debian/README.Debian [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/postinst [new file with mode: 0644]
debian/postrm [new file with mode: 0644]
debian/rules [new file with mode: 0755]
doc-html/index.html [new file with mode: 0644]
pla/.cvsignore [new file with mode: 0644]
pla/INSTALL [new file with mode: 0644]
pla/LICENSE [new file with mode: 0644]
pla/VERSION [new file with mode: 0644]
pla/config/.cvsignore [new file with mode: 0644]
pla/config/config.php [new file with mode: 0644]
pla/config/config.php.example [new file with mode: 0644]
pla/doc/README-translation.txt [new file with mode: 0644]
pla/doc/pla-test-i18n.ldif [new file with mode: 0644]
pla/htdocs/add_attr.php [new file with mode: 0644]
pla/htdocs/add_attr_form.php [new file with mode: 0644]
pla/htdocs/add_oclass.php [new file with mode: 0644]
pla/htdocs/add_oclass_form.php [new file with mode: 0644]
pla/htdocs/add_value.php [new file with mode: 0644]
pla/htdocs/add_value_form.php [new file with mode: 0644]
pla/htdocs/collapse.php [new file with mode: 0644]
pla/htdocs/common.php [new file with mode: 0644]
pla/htdocs/compare.php [new file with mode: 0644]
pla/htdocs/compare_form.php [new file with mode: 0644]
pla/htdocs/copy.php [new file with mode: 0644]
pla/htdocs/copy_form.php [new file with mode: 0644]
pla/htdocs/create.php [new file with mode: 0644]
pla/htdocs/create_form.php [new file with mode: 0644]
pla/htdocs/css/style.css [new file with mode: 0644]
pla/htdocs/delete.php [new file with mode: 0644]
pla/htdocs/delete_attr.php [new file with mode: 0644]
pla/htdocs/delete_form.php [new file with mode: 0644]
pla/htdocs/download_binary_attr.php [new file with mode: 0644]
pla/htdocs/entry_chooser.php [new file with mode: 0644]
pla/htdocs/expand.php [new file with mode: 0644]
pla/htdocs/export.php [new file with mode: 0755]
pla/htdocs/export_form.php [new file with mode: 0755]
pla/htdocs/header.php [new file with mode: 0644]
pla/htdocs/help.php [new file with mode: 0644]
pla/htdocs/images/add.png [new file with mode: 0644]
pla/htdocs/images/bug.png [new file with mode: 0644]
pla/htdocs/images/calendar.png [new file with mode: 0644]
pla/htdocs/images/catalog.png [new file with mode: 0644]
pla/htdocs/images/children.png [new file with mode: 0644]
pla/htdocs/images/compare.png [new file with mode: 0644]
pla/htdocs/images/countries/af.png [new file with mode: 0644]
pla/htdocs/images/countries/al.png [new file with mode: 0644]
pla/htdocs/images/countries/am.png [new file with mode: 0644]
pla/htdocs/images/countries/an.png [new file with mode: 0644]
pla/htdocs/images/countries/ao.png [new file with mode: 0644]
pla/htdocs/images/countries/ar.png [new file with mode: 0644]
pla/htdocs/images/countries/at.png [new file with mode: 0644]
pla/htdocs/images/countries/au.png [new file with mode: 0644]
pla/htdocs/images/countries/aw.png [new file with mode: 0644]
pla/htdocs/images/countries/az.png [new file with mode: 0644]
pla/htdocs/images/countries/ba.png [new file with mode: 0644]
pla/htdocs/images/countries/bb.png [new file with mode: 0644]
pla/htdocs/images/countries/bd.png [new file with mode: 0644]
pla/htdocs/images/countries/be.png [new file with mode: 0644]
pla/htdocs/images/countries/bf.png [new file with mode: 0644]
pla/htdocs/images/countries/bg.png [new file with mode: 0644]
pla/htdocs/images/countries/bh.png [new file with mode: 0644]
pla/htdocs/images/countries/bi.png [new file with mode: 0644]
pla/htdocs/images/countries/bj.png [new file with mode: 0644]
pla/htdocs/images/countries/bm.png [new file with mode: 0644]
pla/htdocs/images/countries/bn.png [new file with mode: 0644]
pla/htdocs/images/countries/bo.png [new file with mode: 0644]
pla/htdocs/images/countries/br.png [new file with mode: 0644]
pla/htdocs/images/countries/bs.png [new file with mode: 0644]
pla/htdocs/images/countries/bt.png [new file with mode: 0644]
pla/htdocs/images/countries/bw.png [new file with mode: 0644]
pla/htdocs/images/countries/by.png [new file with mode: 0644]
pla/htdocs/images/countries/bz.png [new file with mode: 0644]
pla/htdocs/images/countries/ca.png [new file with mode: 0644]
pla/htdocs/images/countries/cf.png [new file with mode: 0644]
pla/htdocs/images/countries/cg.png [new file with mode: 0644]
pla/htdocs/images/countries/ch.png [new file with mode: 0644]
pla/htdocs/images/countries/ci.png [new file with mode: 0644]
pla/htdocs/images/countries/ck.png [new file with mode: 0644]
pla/htdocs/images/countries/cl.png [new file with mode: 0644]
pla/htdocs/images/countries/cm.png [new file with mode: 0644]
pla/htdocs/images/countries/cn.png [new file with mode: 0644]
pla/htdocs/images/countries/co.png [new file with mode: 0644]
pla/htdocs/images/countries/cr.png [new file with mode: 0644]
pla/htdocs/images/countries/cu.png [new file with mode: 0644]
pla/htdocs/images/countries/cv.png [new file with mode: 0644]
pla/htdocs/images/countries/cy.png [new file with mode: 0644]
pla/htdocs/images/countries/cz.png [new file with mode: 0644]
pla/htdocs/images/countries/de.png [new file with mode: 0644]
pla/htdocs/images/countries/dk.png [new file with mode: 0644]
pla/htdocs/images/countries/dz.png [new file with mode: 0644]
pla/htdocs/images/countries/ec.png [new file with mode: 0644]
pla/htdocs/images/countries/ee.png [new file with mode: 0644]
pla/htdocs/images/countries/eg.png [new file with mode: 0644]
pla/htdocs/images/countries/er.png [new file with mode: 0644]
pla/htdocs/images/countries/es.png [new file with mode: 0644]
pla/htdocs/images/countries/et.png [new file with mode: 0644]
pla/htdocs/images/countries/fi.png [new file with mode: 0644]
pla/htdocs/images/countries/fj.png [new file with mode: 0644]
pla/htdocs/images/countries/fo.png [new file with mode: 0644]
pla/htdocs/images/countries/fr.png [new file with mode: 0644]
pla/htdocs/images/countries/ga.png [new file with mode: 0644]
pla/htdocs/images/countries/gb.png [new file with mode: 0644]
pla/htdocs/images/countries/ge.png [new file with mode: 0644]
pla/htdocs/images/countries/gi.png [new file with mode: 0644]
pla/htdocs/images/countries/gl.png [new file with mode: 0644]
pla/htdocs/images/countries/gp.png [new file with mode: 0644]
pla/htdocs/images/countries/gr.png [new file with mode: 0644]
pla/htdocs/images/countries/gt.png [new file with mode: 0644]
pla/htdocs/images/countries/gu.png [new file with mode: 0644]
pla/htdocs/images/countries/gy.png [new file with mode: 0644]
pla/htdocs/images/countries/hk.png [new file with mode: 0644]
pla/htdocs/images/countries/hr.png [new file with mode: 0644]
pla/htdocs/images/countries/ht.png [new file with mode: 0644]
pla/htdocs/images/countries/hu.png [new file with mode: 0644]
pla/htdocs/images/countries/id.png [new file with mode: 0644]
pla/htdocs/images/countries/ie.png [new file with mode: 0644]
pla/htdocs/images/countries/il.png [new file with mode: 0644]
pla/htdocs/images/countries/in.png [new file with mode: 0644]
pla/htdocs/images/countries/iq.png [new file with mode: 0644]
pla/htdocs/images/countries/ir.png [new file with mode: 0644]
pla/htdocs/images/countries/is.png [new file with mode: 0644]
pla/htdocs/images/countries/it.png [new file with mode: 0644]
pla/htdocs/images/countries/jm.png [new file with mode: 0644]
pla/htdocs/images/countries/jo.png [new file with mode: 0644]
pla/htdocs/images/countries/jp.png [new file with mode: 0644]
pla/htdocs/images/countries/ke.png [new file with mode: 0644]
pla/htdocs/images/countries/kg.png [new file with mode: 0644]
pla/htdocs/images/countries/kh.png [new file with mode: 0644]
pla/htdocs/images/countries/ki.png [new file with mode: 0644]
pla/htdocs/images/countries/kp.png [new file with mode: 0644]
pla/htdocs/images/countries/kr.png [new file with mode: 0644]
pla/htdocs/images/countries/ky.png [new file with mode: 0644]
pla/htdocs/images/countries/kz.png [new file with mode: 0644]
pla/htdocs/images/countries/lb.png [new file with mode: 0644]
pla/htdocs/images/countries/lc.png [new file with mode: 0644]
pla/htdocs/images/countries/lk.png [new file with mode: 0644]
pla/htdocs/images/countries/lt.png [new file with mode: 0644]
pla/htdocs/images/countries/lu.png [new file with mode: 0644]
pla/htdocs/images/countries/lv.png [new file with mode: 0644]
pla/htdocs/images/countries/ly.png [new file with mode: 0644]
pla/htdocs/images/countries/ma.png [new file with mode: 0644]
pla/htdocs/images/countries/mc.png [new file with mode: 0644]
pla/htdocs/images/countries/md.png [new file with mode: 0644]
pla/htdocs/images/countries/mg.png [new file with mode: 0644]
pla/htdocs/images/countries/mn.png [new file with mode: 0644]
pla/htdocs/images/countries/mo.png [new file with mode: 0644]
pla/htdocs/images/countries/mp.png [new file with mode: 0644]
pla/htdocs/images/countries/ms.png [new file with mode: 0644]
pla/htdocs/images/countries/mt.png [new file with mode: 0644]
pla/htdocs/images/countries/mx.png [new file with mode: 0644]
pla/htdocs/images/countries/my.png [new file with mode: 0644]
pla/htdocs/images/countries/mz.png [new file with mode: 0644]
pla/htdocs/images/countries/na.png [new file with mode: 0644]
pla/htdocs/images/countries/nc.png [new file with mode: 0644]
pla/htdocs/images/countries/nf.png [new file with mode: 0644]
pla/htdocs/images/countries/nl.png [new file with mode: 0644]
pla/htdocs/images/countries/no.png [new file with mode: 0644]
pla/htdocs/images/countries/np.png [new file with mode: 0644]
pla/htdocs/images/countries/nr.png [new file with mode: 0644]
pla/htdocs/images/countries/nz.png [new file with mode: 0644]
pla/htdocs/images/countries/om.png [new file with mode: 0644]
pla/htdocs/images/countries/pa.png [new file with mode: 0644]
pla/htdocs/images/countries/pe.png [new file with mode: 0644]
pla/htdocs/images/countries/pf.png [new file with mode: 0644]
pla/htdocs/images/countries/ph.png [new file with mode: 0644]
pla/htdocs/images/countries/pk.png [new file with mode: 0644]
pla/htdocs/images/countries/pl.png [new file with mode: 0644]
pla/htdocs/images/countries/pm.png [new file with mode: 0644]
pla/htdocs/images/countries/pr.png [new file with mode: 0644]
pla/htdocs/images/countries/pt.png [new file with mode: 0644]
pla/htdocs/images/countries/py.png [new file with mode: 0644]
pla/htdocs/images/countries/qa.png [new file with mode: 0644]
pla/htdocs/images/countries/ro.png [new file with mode: 0644]
pla/htdocs/images/countries/ru.png [new file with mode: 0644]
pla/htdocs/images/countries/sa.png [new file with mode: 0644]
pla/htdocs/images/countries/sb.png [new file with mode: 0644]
pla/htdocs/images/countries/sd.png [new file with mode: 0644]
pla/htdocs/images/countries/se.png [new file with mode: 0644]
pla/htdocs/images/countries/sg.png [new file with mode: 0644]
pla/htdocs/images/countries/si.png [new file with mode: 0644]
pla/htdocs/images/countries/sk.png [new file with mode: 0644]
pla/htdocs/images/countries/sl.png [new file with mode: 0644]
pla/htdocs/images/countries/so.png [new file with mode: 0644]
pla/htdocs/images/countries/sr.png [new file with mode: 0644]
pla/htdocs/images/countries/sy.png [new file with mode: 0644]
pla/htdocs/images/countries/tc.png [new file with mode: 0644]
pla/htdocs/images/countries/tg.png [new file with mode: 0644]
pla/htdocs/images/countries/th.png [new file with mode: 0644]
pla/htdocs/images/countries/tn.png [new file with mode: 0644]
pla/htdocs/images/countries/to.png [new file with mode: 0644]
pla/htdocs/images/countries/tp.png [new file with mode: 0644]
pla/htdocs/images/countries/tr.png [new file with mode: 0644]
pla/htdocs/images/countries/tt.png [new file with mode: 0644]
pla/htdocs/images/countries/tv.png [new file with mode: 0644]
pla/htdocs/images/countries/tw.png [new file with mode: 0644]
pla/htdocs/images/countries/tz.png [new file with mode: 0644]
pla/htdocs/images/countries/ua.png [new file with mode: 0644]
pla/htdocs/images/countries/ug.png [new file with mode: 0644]
pla/htdocs/images/countries/us.png [new file with mode: 0644]
pla/htdocs/images/countries/uy.png [new file with mode: 0644]
pla/htdocs/images/countries/va.png [new file with mode: 0644]
pla/htdocs/images/countries/ve.png [new file with mode: 0644]
pla/htdocs/images/countries/vg.png [new file with mode: 0644]
pla/htdocs/images/countries/vi.png [new file with mode: 0644]
pla/htdocs/images/countries/vn.png [new file with mode: 0644]
pla/htdocs/images/countries/ws.png [new file with mode: 0644]
pla/htdocs/images/countries/ye.png [new file with mode: 0644]
pla/htdocs/images/countries/yu.png [new file with mode: 0644]
pla/htdocs/images/countries/za.png [new file with mode: 0644]
pla/htdocs/images/countries/zw.png [new file with mode: 0644]
pla/htdocs/images/country.png [new file with mode: 0644]
pla/htdocs/images/cut.png [new file with mode: 0644]
pla/htdocs/images/dc.png [new file with mode: 0644]
pla/htdocs/images/device.png [new file with mode: 0644]
pla/htdocs/images/document.png [new file with mode: 0644]
pla/htdocs/images/door.png [new file with mode: 0644]
pla/htdocs/images/error.png [new file with mode: 0644]
pla/htdocs/images/files.png [new file with mode: 0644]
pla/htdocs/images/find.png [new file with mode: 0644]
pla/htdocs/images/folder.png [new file with mode: 0644]
pla/htdocs/images/go.png [new file with mode: 0644]
pla/htdocs/images/hard-drive.png [new file with mode: 0644]
pla/htdocs/images/help.png [new file with mode: 0644]
pla/htdocs/images/home.png [new file with mode: 0644]
pla/htdocs/images/host.png [new file with mode: 0644]
pla/htdocs/images/index.php [new file with mode: 0644]
pla/htdocs/images/info.png [new file with mode: 0644]
pla/htdocs/images/ldap-server.png [new file with mode: 0644]
pla/htdocs/images/light.png [new file with mode: 0644]
pla/htdocs/images/locality.png [new file with mode: 0644]
pla/htdocs/images/lock.png [new file with mode: 0644]
pla/htdocs/images/logo.jpg [new file with mode: 0644]
pla/htdocs/images/logo_small.jpg [new file with mode: 0644]
pla/htdocs/images/mail.png [new file with mode: 0644]
pla/htdocs/images/mail_account.png [new file with mode: 0644]
pla/htdocs/images/mail_alias.png [new file with mode: 0644]
pla/htdocs/images/minus.png [new file with mode: 0644]
pla/htdocs/images/move.png [new file with mode: 0644]
pla/htdocs/images/n.png [new file with mode: 0644]
pla/htdocs/images/network.png [new file with mode: 0644]
pla/htdocs/images/nogo.png [new file with mode: 0644]
pla/htdocs/images/nt_machine.png [new file with mode: 0644]
pla/htdocs/images/nt_user.png [new file with mode: 0644]
pla/htdocs/images/o.png [new file with mode: 0644]
pla/htdocs/images/object.png [new file with mode: 0644]
pla/htdocs/images/ou.png [new file with mode: 0644]
pla/htdocs/images/paypal-donate.png [new file with mode: 0644]
pla/htdocs/images/phone.png [new file with mode: 0644]
pla/htdocs/images/photo.png [new file with mode: 0644]
pla/htdocs/images/plus.png [new file with mode: 0644]
pla/htdocs/images/process.png [new file with mode: 0644]
pla/htdocs/images/refresh.png [new file with mode: 0644]
pla/htdocs/images/rename.png [new file with mode: 0644]
pla/htdocs/images/rfc.png [new file with mode: 0644]
pla/htdocs/images/save.png [new file with mode: 0644]
pla/htdocs/images/server-settings.png [new file with mode: 0644]
pla/htdocs/images/server-small.png [new file with mode: 0644]
pla/htdocs/images/server.png [new file with mode: 0644]
pla/htdocs/images/smile.png [new file with mode: 0644]
pla/htdocs/images/star.png [new file with mode: 0644]
pla/htdocs/images/terminal.png [new file with mode: 0644]
pla/htdocs/images/timeout.png [new file with mode: 0644]
pla/htdocs/images/tools-no.png [new file with mode: 0644]
pla/htdocs/images/tools.png [new file with mode: 0644]
pla/htdocs/images/trash.png [new file with mode: 0644]
pla/htdocs/images/uid.png [new file with mode: 0644]
pla/htdocs/images/uniquegroup.png [new file with mode: 0644]
pla/htdocs/images/unknown.png [new file with mode: 0644]
pla/htdocs/images/up.png [new file with mode: 0644]
pla/htdocs/images/user.png [new file with mode: 0644]
pla/htdocs/images/warning.png [new file with mode: 0644]
pla/htdocs/images/warning_small.png [new file with mode: 0644]
pla/htdocs/index.php [new file with mode: 0644]
pla/htdocs/js/date_selector.js [new file with mode: 0644]
pla/htdocs/js/entry_chooser.js [new file with mode: 0644]
pla/htdocs/js/generic_utils.js [new file with mode: 0644]
pla/htdocs/js/ie_png_work_around.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/README [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar-blue.css [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar-blue2.css [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar-brown.css [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar-green.css [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar-setup.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar-setup_stripped.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar-system.css [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar-tas.css [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar-win2k-1.css [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar-win2k-2.css [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar-win2k-cold-1.css [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar-win2k-cold-2.css [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar.php [new file with mode: 0644]
pla/htdocs/js/jscalendar/calendar_stripped.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-af.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-al.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-bg.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-big5-utf8.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-big5.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-br.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-ca.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-cs-utf8.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-cs-win.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-da.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-de.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-du.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-el.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-en.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-es.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-fi.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-fr.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-he-utf8.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-hr-utf8.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-hr.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-hu.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-it.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-jp.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-ko-utf8.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-ko.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-lt-utf8.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-lt.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-lv.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-nl.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-no.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-pl-utf8.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-pl.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-pt.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-ro.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-ru.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-ru_win_.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-si.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-sk.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-sp.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-sv.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-tr.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/calendar-zh.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/lang/cn_utf8.js [new file with mode: 0644]
pla/htdocs/js/jscalendar/menuarrow.gif [new file with mode: 0644]
pla/htdocs/js/jscalendar/menuarrow2.gif [new file with mode: 0644]
pla/htdocs/js/jscalendar/skins/aqua/active-bg.gif [new file with mode: 0644]
pla/htdocs/js/jscalendar/skins/aqua/dark-bg.gif [new file with mode: 0644]
pla/htdocs/js/jscalendar/skins/aqua/hover-bg.gif [new file with mode: 0644]
pla/htdocs/js/jscalendar/skins/aqua/menuarrow.gif [new file with mode: 0644]
pla/htdocs/js/jscalendar/skins/aqua/normal-bg.gif [new file with mode: 0644]
pla/htdocs/js/jscalendar/skins/aqua/rowhover-bg.gif [new file with mode: 0644]
pla/htdocs/js/jscalendar/skins/aqua/status-bg.gif [new file with mode: 0644]
pla/htdocs/js/jscalendar/skins/aqua/theme.css [new file with mode: 0644]
pla/htdocs/js/jscalendar/skins/aqua/title-bg.gif [new file with mode: 0644]
pla/htdocs/js/jscalendar/skins/aqua/today-bg.gif [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/COPYING [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/LICENSE [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/layerstreemenu.css [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/lib/PHPLIB.php [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/lib/layersmenu-common.inc.php [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/lib/treemenu.inc.php [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/libjs/layersmenu-browser_detection.js [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/libjs/layerstreemenu-cookies.js [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/libjs/layerstreemenu.ijs [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_collapse.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_collapse_corner.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_collapse_corner_first.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_collapse_first.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_corner.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_expand.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_expand_corner.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_expand_corner_first.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_expand_first.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_folder_closed.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_folder_open.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_leaf.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_space.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_split.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_split_first.png [new file with mode: 0644]
pla/htdocs/js/phplayersmenu/menuimages/tree_vertline.png [new file with mode: 0644]
pla/htdocs/js/search_util.js [new file with mode: 0644]
pla/htdocs/ldif_import.php [new file with mode: 0644]
pla/htdocs/ldif_import_form.php [new file with mode: 0644]
pla/htdocs/login.php [new file with mode: 0644]
pla/htdocs/login_form.php [new file with mode: 0644]
pla/htdocs/logout.php [new file with mode: 0644]
pla/htdocs/mass_delete.php [new file with mode: 0644]
pla/htdocs/password_checker.php [new file with mode: 0644]
pla/htdocs/purge_cache.php [new file with mode: 0644]
pla/htdocs/rdelete.php [new file with mode: 0644]
pla/htdocs/refresh.php [new file with mode: 0644]
pla/htdocs/rename.php [new file with mode: 0644]
pla/htdocs/rename_form.php [new file with mode: 0644]
pla/htdocs/schema.php [new file with mode: 0644]
pla/htdocs/search.php [new file with mode: 0644]
pla/htdocs/server_info.php [new file with mode: 0644]
pla/htdocs/template_engine.php [new file with mode: 0644]
pla/htdocs/timeout.php [new file with mode: 0644]
pla/htdocs/tree.php [new file with mode: 0644]
pla/htdocs/update.php [new file with mode: 0644]
pla/htdocs/update_confirm.php [new file with mode: 0644]
pla/htdocs/view_jpeg_photo.php [new file with mode: 0644]
pla/htdocs/welcome.php [new file with mode: 0644]
pla/index.php [new file with mode: 0644]
pla/lib/blowfish.php [new file with mode: 0644]
pla/lib/common.php [new file with mode: 0644]
pla/lib/config_default.php [new file with mode: 0644]
pla/lib/createlm.php [new file with mode: 0644]
pla/lib/emuhash_functions.php [new file with mode: 0644]
pla/lib/export_functions.php [new file with mode: 0755]
pla/lib/functions.php [new file with mode: 0644]
pla/lib/hooks.php [new file with mode: 0644]
pla/lib/ldap_error_codes.txt [new file with mode: 0644]
pla/lib/ldap_supported_oids.txt [new file with mode: 0644]
pla/lib/ldif_functions.php [new file with mode: 0644]
pla/lib/schema_functions.php [new file with mode: 0644]
pla/lib/search_form_advanced.php [new file with mode: 0644]
pla/lib/search_form_predefined.php [new file with mode: 0644]
pla/lib/search_form_simple.php [new file with mode: 0644]
pla/lib/search_results_list.php [new file with mode: 0644]
pla/lib/search_results_table.php [new file with mode: 0644]
pla/lib/server_functions.php [new file with mode: 0644]
pla/lib/session_functions.php [new file with mode: 0644]
pla/lib/syslog.php [new file with mode: 0644]
pla/lib/template_functions.php [new file with mode: 0644]
pla/lib/timeout_functions.php [new file with mode: 0644]
pla/lib/tree_functions.php [new file with mode: 0644]
pla/locale/ca_ES/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/ca_ES/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/cs_CZ/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/cs_CZ/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/de_DE/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/de_DE/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/es_ES/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/es_ES/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/fr_FR/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/fr_FR/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/hu_HU/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/hu_HU/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/it_IT/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/it_IT/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/ja_JP/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/ja_JP/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/nl_BE/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/nl_BE/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/pl_PL/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/pl_PL/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/pt_BR/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/pt_BR/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/ru_RU/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/ru_RU/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/sv_FI/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/sv_FI/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/zh_CN/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/locale/zh_TW/LC_MESSAGES/messages.mo [new file with mode: 0644]
pla/locale/zh_TW/LC_MESSAGES/messages.po [new file with mode: 0644]
pla/templates/SUSE-posixGroup.xml [new file with mode: 0644]
pla/templates/SUSE-sambaGroupMapping.xml [new file with mode: 0644]
pla/templates/alias.xml [new file with mode: 0644]
pla/templates/courierMailAccount.xml [new file with mode: 0644]
pla/templates/courierMailAlias.xml [new file with mode: 0644]
pla/templates/creation/custom.php [new file with mode: 0644]
pla/templates/dNSDomain.xml [new file with mode: 0644]
pla/templates/example.xml [new file with mode: 0644]
pla/templates/inetOrgPerson.xml [new file with mode: 0644]
pla/templates/kolabPerson.xml [new file with mode: 0644]
pla/templates/mozillaOrgPerson.xml [new file with mode: 0644]
pla/templates/organizationalRole.xml [new file with mode: 0644]
pla/templates/ou.xml [new file with mode: 0644]
pla/templates/posixAccount.xml [new file with mode: 0644]
pla/templates/posixGroup.xml [new file with mode: 0644]
pla/templates/sambaDomain.xml [new file with mode: 0644]
pla/templates/sambaGroupMapping.xml [new file with mode: 0644]
pla/templates/sambaMachine.xml [new file with mode: 0644]
pla/templates/sambaSamAccount.xml [new file with mode: 0644]
pla/templates/sendmailMTAAliasObject.xml [new file with mode: 0644]
pla/templates/sendmailMTAClass.xml [new file with mode: 0644]
pla/templates/sendmailMTACluster.xml [new file with mode: 0644]
pla/templates/sendmailMTAMapObject.xml [new file with mode: 0644]
pla/templates/sendmailVirtualDomain.xml [new file with mode: 0644]
pla/templates/sendmailVirtualUser.xml [new file with mode: 0644]
pla/templates/simpleSecurityObject.xml [new file with mode: 0644]
pla/templates/template.dtd [new file with mode: 0644]
pla/templates/template_header.php [new file with mode: 0644]
pla/tools/po/make_all [new file with mode: 0755]
pla/tools/po/make_mo [new file with mode: 0755]
pla/tools/po/make_po [new file with mode: 0755]
pla/tools/po/make_po_ca [new file with mode: 0755]
pla/tools/po/make_po_de [new file with mode: 0755]
pla/tools/po/make_po_es [new file with mode: 0755]
pla/tools/po/make_po_fr [new file with mode: 0755]
pla/tools/po/make_po_hu [new file with mode: 0755]
pla/tools/po/make_po_it [new file with mode: 0755]
pla/tools/po/make_po_ja [new file with mode: 0755]
pla/tools/po/messages.header [new file with mode: 0644]
pla/tools/unit_test.php [new file with mode: 0644]

diff --git a/conf/Mod/pla/config/config.php b/conf/Mod/pla/config/config.php
new file mode 100644 (file)
index 0000000..8c30a39
--- /dev/null
@@ -0,0 +1,384 @@
+<?php
+include "/var/www/lcs/includes/headerauth.inc.php";
+
+list ($idpers,$login) = isauth();
+
+/**
+ * The phpLDAPadmin config file
+ *
+ * This is where you can customise some of the phpLDAPadmin defaults
+ * that are defined in config_default.php.
+ *
+ * To override a default, use the $config->custom variable to do so.
+ * For example, the default for defining the language in config_default.php
+ *
+ * $this->default->appearance['lang'] = array(
+ *     'desc'=>'Language',
+ *     'default'=>'auto');
+ *
+ * to override this, use $config->custom->appearance['lang'] = 'en';
+ *
+ * This file is also used to configure your LDAP server connections.
+ *
+ * You must specify at least one LDAP server there. You may add
+ * as many as you like. You can also specify your language, and
+ * many other options.
+ *
+ * NOTE: Commented out values in this file prefixed by //, represent the
+ * defaults that have been defined in config_default.php.
+ * Commented out values prefixed by #, dont refelct their default value, you can
+ * check config_default.php if you want to see what the default is.
+ *
+ * DONT change config_default.php, you changes will be lost by the next release
+ * of PLA. Instead change this file - as it will NOT be replaced by a new
+ * version of phpLDAPadmin.
+ */
+
+/*********************************************/
+/* Useful important configuration overrides  */
+/*********************************************/
+
+/* If you are asked to put pla in debug mode, this is how you do it: */
+  $config->custom->debug['level'] = 2;
+  $config->custom->debug['syslog'] = true;
+  $config->custom->debug['file'] = '/tmp/pla_debug.log';
+
+/* phpLDAPadmin can encrypt the content of sensitive cookies if you set this
+   to a big random string. */
+$config->custom->session['blowfish'] = '';
+
+/* The language setting. If you set this to 'auto', phpLDAPadmin will attempt
+   to determine your language automatically. Otherwise, available lanaguages
+   are: 'ct', 'de', 'en', 'es', 'fr', 'it', 'nl', and 'ru'
+   Localization is not complete yet, but most strings have been translated.
+   Please help by writing language files. See lang/en.php for an example. */
+// $config->custom->appearance['language'] = 'auto';
+
+/* The temporary storage directory where we will put jpegPhoto data
+   This directory must be readable and writable by your web server. */
+// $config->custom->jpeg['tmpdir'] = "/tmp";     // Example for Unix systems
+#  $config->custom->jpeg['tmpdir'] = "c:\\temp"; // Example for Windows systems
+
+/*********************************************/
+/* Define your LDAP servers in this section  */
+/*********************************************/
+
+$i=0;
+$ldapservers = new LDAPServers;
+
+/* A convenient name that will appear in the tree viewer and throughout
+   phpLDAPadmin to identify this LDAP server to users. */
+$ldapservers->SetValue($i,'server','name','LDAP Server LCS');
+
+/* Examples:
+   'ldap.example.com',
+   'ldaps://ldap.example.com/',
+   'ldapi://%2fusr%local%2fvar%2frun%2fldapi'
+           (Unix socket at /usr/local/var/run/ldap) */
+$ldapservers->SetValue($i,'server','host','127.0.0.1');
+
+/* The port your LDAP server listens on (no quotes). 389 is standard. */
+// $ldapservers->SetValue($i,'server','port','389');
+
+/* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin
+   auto-detect it for you. */
+$ldapservers->SetValue($i,'server','base',array($ldap_base_dn));
+
+/* Three options for auth_type:
+   1. 'cookie': you will login via a web form, and a client-side cookie will
+      store your login dn and password.
+   2. 'session': same as cookie but your login dn and password are stored on the
+      web server in a persistent session variable.
+   3. 'config': specify your login dn and password here in this config file. No
+      login will be required to use phpLDAPadmin for this server.
+
+   Choose wisely to protect your authentication information appropriately for
+   your situation. If you choose 'cookie', your cookie contents will be
+   encrypted using blowfish and the secret your specify above as
+   session['blowfish']. */
+$ldapservers->SetValue($i,'server','auth_type','config');
+
+/* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or
+   'cookie' or 'session' auth_types, LEAVE THE LOGIN_DN AND LOGIN_PASS BLANK. If
+   you specify a login_attr in conjunction with a cookie or session auth_type,
+   then you can also specify the login_dn/login_pass here for searching the
+   directory for users (ie, if your LDAP server does not allow anonymous binds. */
+// $ldapservers->SetValue($i,'login','dn','');
+$ldapservers->SetValue($i,'login','dn',$adminRdn.",".$ldap_base_dn);
+$rights=exec(" ldapsearch -xLLL member='uid=$login,ou=People,".$ldap_base_dn."' dn | grep '^dn: cn=lcs_is_admin' | wc -l");
+if  ( ($login!="" && $rights=="1")  ) {
+    $login="admin";
+    $ldapservers->SetValue($i,'login','pass',$adminPw);
+} else
+    $ldapservers->SetValue($i,'login','pass','');
+
+/* Use TLS (Transport Layer Security) to connect to the LDAP server. */
+// $ldapservers->SetValue($i,'server','tls',false);
+
+/* If the link between your web server and this LDAP server is slow, it is
+   recommended that you set 'low_bandwidth' to true. This will enable
+   phpLDAPadmin to forego some "fancy" features to conserve bandwidth. */
+$ldapservers->SetValue($i,'server','low_bandwidth',true);
+
+/* Default password hashing algorithm. One of md5, ssha, sha, md5crpyt, smd5,
+   blowfish, crypt or leave blank for now default algorithm. */
+// $ldapservers->SetValue($i,'appearance','password_hash','md5');
+
+/* If you specified 'cookie' or 'session' as the auth_type above, you can
+   optionally specify here an attribute to use when logging in. If you enter
+   'uid' and login as 'dsmith', phpLDAPadmin will search for (uid=dsmith)
+   and log in as that user.
+   Leave blank or specify 'dn' to use full DN for logging in. Note also that if
+   your LDAP server requires you to login to perform searches, you can enter the
+   DN to use when searching in 'login_dn' and 'login_pass' above. You may also
+   specify 'string', in which case you can provide a string to use for logging
+   users in. See 'login_string' directly below. */
+// $ldapservers->SetValue($i,'login','attr','dn');
+
+/* If you specified 'cookie' or 'session' as the auth_type above, and you
+   specified 'string' for 'login_attr' above, you must provide a string here for
+   logging users in. If, for example, I have a lot of user entries with DNs like
+   "uid=dsmith,ou=People,dc=example,dc=com", then I can specify a string
+   "uid=<username>,ou=People,dc=example,dc=com" and my users can login with
+   their user names alone, ie: "dsmith" in this case. */
+#  $ldapservers->SetValue($i,'login','string','uid=<username>,ou=People,dc=example,dc=com');
+
+/* If 'login_attr' is used above such that phpLDAPadmin will search for your DN
+   at login, you may restrict the search to a specific objectClass. EG, set this
+   to 'posixAccount' or 'inetOrgPerson', depending upon your setup. */
+// $ldapservers->SetValue($i,'login','class','');
+
+/* Specify true If you want phpLDAPadmin to not display or permit any
+   modification to the LDAP server. */
+if ($pla_bind==0) 
+    $ldapservers->SetValue($i,'server','read_only',true);
+else 
+    $ldapservers->SetValue($i,'server','read_only',false);
+
+/* Specify false if you do not want phpLDAPadmin to draw the 'Create new' links
+   in the tree viewer. */
+// $ldapservers->SetValue($i,'appearance','show_create',true);
+
+/* This feature allows phpLDAPadmin to automatically determine the next
+   available uidNumber for a new entry. */
+// $ldapservers->SetValue($i,'auto_number','enable',true);
+
+/* The mechanism to use when finding the next available uidNumber. Two possible
+   values: 'uidpool' or 'search'.
+   The 'uidpool' mechanism uses an existing uidPool entry in your LDAP server to
+   blindly lookup the next available uidNumber. The 'search' mechanism searches
+   for entries with a uidNumber value and finds the first available uidNumber
+   (slower). */
+// $ldapservers->SetValue($i,'auto_number','mechanism','search');
+
+/* The DN of the search base when the 'search' mechanism is used above. */
+$ldapservers->SetValue($i,'auto_number','search_base',$ldap_base_dn);
+
+/* The minimum number to use when searching for the next available UID number
+   (only when 'search' is used for auto_uid_number_mechanism' */
+// $ldapservers->SetValue($i,'auto_number','min','1000');
+
+/* The DN of the uidPool entry when 'uidpool' mechanism is used above. */
+// $servers[$i]['auto_uid_number_uid_pool_dn'] = 'cn=uidPool,dc=example,dc=com';
+
+/* If you set this, then phpldapadmin will bind to LDAP with this user ID when
+   searching for the uidnumber. The idea is, this user id would have full
+   (readonly) access to uidnumber in your ldap directory (the logged in user
+   may not), so that you can be guaranteed to get a unique uidnumber for your
+   directory. */
+// $ldapservers->SetValue($i,'auto_number','dn','');
+
+/* The password for the dn above. */
+// $ldapservers->SetValue($i,'auto_number','pass','');
+
+/* Enable anonymous bind login. */
+$ldapservers->SetValue($i,'login','anon_bind',false);
+
+/* Use customized page with prefix when available. */
+// $ldapservers->SetValue($i,'custom','pages_prefix','custom_');
+
+/* If you set this, then phpldapadmin will bind to LDAP with this user when
+   testing for unique attributes (as set in unique_attrs array). If you want to
+   enforce unique attributes, than this id should have full (readonly) access
+   to the attributes in question (the logged in user may not have enough access)
+*/
+// $ldapservers->SetValue($i,'unique_attrs','dn','');
+
+/* The password for the dn above */
+// $ldapservers->SetValue($i,'unique_attrs','pass','');
+
+/* If you set this, then only these DNs are allowed to log in. This array can
+   contain individual users, groups or ldap search filter(s). Keep in mind that
+   the user has not authenticated yet, so this will be an anonymous search to
+   the LDAP server, so make your ACLs allow these searches to return results! */
+# $ldapservers->SetValue($i,'login','allowed_dns',array(
+#      'uid=stran,ou=People,dc=example,dc=com',
+#      '(&(gidNumber=811)(objectClass=groupOfNames))',
+#      '(|(uidNumber=200)(uidNumber=201))',
+#      'cn=callcenter,ou=Group,dc=example,dc=com'));
+
+/* Set this if you dont want this LDAP server to show in the tree */
+// $ldapservers->SetValue($i,'appearance','visible',true);
+
+/* This is the time out value in minutes for the server. After as many minutes
+   of inactivity you will be automatically logged out. If not set, the default
+   value will be ( session_cache_expire()-1 ) */
+#  $ldapservers->SetValue($i,'login','timeout',30);
+
+/* Set this if you want phpldapadmin to perform rename operation on entry which
+   has children. Certain servers are known to allow it, certain are not */
+// $ldapservers->SetValue($i,'server','branch_rename',false);
+
+/**************************************************************************
+ * If you want to configure additional LDAP servers, do so below.         *
+ * Remove the commented lines and use this section as a template for all  *
+ * your other LDAP servers.                                               *
+ **************************************************************************/
+
+/*
+$i++;
+$ldapservers->SetValue($i,'server','name','LDAP Server');
+$ldapservers->SetValue($i,'server','host','127.0.0.1');
+$ldapservers->SetValue($i,'server','port','389');
+$ldapservers->SetValue($i,'server','base',array(''));
+$ldapservers->SetValue($i,'server','auth_type','cookie');
+$ldapservers->SetValue($i,'login','dn','');
+$ldapservers->SetValue($i,'login','pass','');
+$ldapservers->SetValue($i,'server','tls',false);
+$ldapservers->SetValue($i,'server','low_bandwidth',false);
+$ldapservers->SetValue($i,'appearance','password_hash','md5');
+$ldapservers->SetValue($i,'login','attr','uid');
+$ldapservers->SetValue($i,'login','string','');
+$ldapservers->SetValue($i,'login','class','');
+$ldapservers->SetValue($i,'server','read_only',false);
+$ldapservers->SetValue($i,'appearance','show_create',true);
+$ldapservers->SetValue($i,'auto_number','enable',true);
+$ldapservers->SetValue($i,'auto_number','mechanism','search');
+$ldapservers->SetValue($i,'auto_number','search_base','');
+$ldapservers->SetValue($i,'auto_number','min','1000');
+$ldapservers->SetValue($i,'auto_number','dn','');
+$ldapservers->SetValue($i,'auto_number','pass','');
+$ldapservers->SetValue($i,'login','anon_bind',true);
+$ldapservers->SetValue($i,'custom','pages_prefix','custom_');
+$ldapservers->SetValue($i,'unique_attrs','dn','');
+$ldapservers->SetValue($i,'unique_attrs','pass','');
+*/
+
+/*********************************************/
+/* User-friendly attribute translation       */
+/*********************************************/
+
+/* Use this array to map attribute names to user friendly names. For example, if
+   you don't want to see "facsimileTelephoneNumber" but rather "Fax". */
+$friendly_attrs = array();
+
+$friendly_attrs['facsimileTelephoneNumber'] = 'Fax';
+$friendly_attrs['telephoneNumber']                     = 'Phone';
+
+/*********************************************/
+/* Support for attrs display order           */
+/*********************************************/
+
+/* Use this array if you want to have your attributes displayed in a specific
+   order. You can use default attribute names or their fridenly names.
+   For example, "sn" will be displayed right after "givenName". All the other
+   attributes that are not specified in this array will be displayed after in
+   alphabetical order. */
+#  $attrs_display_order = array(
+#      'givenName',
+#      'sn',
+#      'cn',
+#      'displayName',
+#      'uid',
+#      'uidNumber',
+#      'gidNumber',
+#      'homeDirectory',
+#      'mail',
+#      'userPassword'
+#  );
+
+/*********************************************/
+/* Hidden attributes                         */
+/*********************************************/
+
+/* You may want to hide certain attributes from being displayed in the editor
+   screen. Do this by adding the desired attributes to this list (and uncomment
+   it). This only affects the editor screen. Attributes will still be visible in
+   the schema browser and elsewhere. An example is provided below:
+   NOTE: The user must be able to read the hidden_except_dn entry to be
+   excluded. */
+#  $hidden_attrs = array( 'jpegPhoto', 'objectClass' );
+#  $hidden_except_dn = "cn=PLA UnHide,ou=Groups,c=AU";
+
+/* Hidden attributes in read-only mode. If undefined, it will be equal to
+   $hidden_attrs. */
+#  $hidden_attrs_ro = array(
+#      'objectClass','shadowWarning', 'shadowLastChange', 'shadowMax',
+#      'shadowFlag', 'shadowInactive', 'shadowMin', 'shadowExpire');
+
+/**                                         **/
+/** Read-only attributes                    **/
+/**                                         **/
+
+/* You may want to phpLDAPadmin to display certain attributes as read only,
+   meaning that users will not be presented a form for modifying those
+   attributes, and they will not be allowed to be modified on the "back-end"
+   either. You may configure this list here:
+   NOTE: The user must be able to read the read_only_except_dn entry to be
+   excluded. */
+#  $read_only_attrs = array( 'objectClass' );
+#  $read_only_except_dn = "cn=PLA ReadWrite,ou=Groups,c=AU";
+
+/* An example of how to specify multiple read-only attributes: */
+#  $read_only_attrs = array( 'jpegPhoto', 'objectClass', 'someAttribute' );
+
+/*********************************************/
+/* Unique attributes                         */
+/*********************************************/
+
+/* You may want phpLDAPadmin to enforce some attributes to have unique values
+   (ie: not belong to other entries in your tree. This (together with
+   unique_attrs['dn'] and unique_attrs['pass'] option will not let updates to
+   occur with other attributes have the same value.
+   NOTE: Currently the unique_attrs is NOT enforced when copying a dn. (Need to
+   present a user with the option of changing the unique attributes. */
+#  $unique_attrs = array('uid','uidNumber','mail');
+
+/*********************************************/
+/* Predefined Queries (canned views)         */
+/*********************************************/
+
+/* To make searching easier, you may setup predefined queries below: */
+$q=0;
+$queries = array();
+
+/* The name that will appear in the simple search form */
+$queries[$q]['name'] = 'User List';
+
+/* The base to search on */
+$queries[$q]['base'] = $ldap_base_dn;
+
+/* The search scope (sub, base, one) */
+$queries[$q]['scope'] = 'sub';
+
+/* The LDAP filter to use */
+$queries[$q]['filter'] = '(&(objectClass=posixAccount)(uid=*))';
+
+/* The attributes to return */
+$queries[$q]['attributes'] = 'cn, uid, homeDirectory';
+
+/* If you want to configure more pre-defined queries, copy and paste the above (including the "$q++;") */
+$q++;
+$queries[$q]['name'] = 'Samba Users';
+$queries[$q]['base'] = 'dc=example,dc=com';
+$queries[$q]['scope'] = 'sub';
+$queries[$q]['filter'] = '(&(|(objectClass=sambaAccount)(objectClass=sambaSamAccount))(objectClass=posixAccount)(!(uid=*$)))';
+$queries[$q]['attributes'] = 'uid, smbHome, uidNumber';
+
+$q++;
+$queries[$q]['name'] = 'Samba Computers';
+$queries[$q]['base'] = 'dc=example,dc=com';
+$queries[$q]['scope'] = 'sub';
+$queries[$q]['filter'] = '(&(objectClass=sambaAccount)(uid=*$))';
+$queries[$q]['attributes'] = 'uid, homeDirectory';
+?>
diff --git a/conf/Mod/pla/lib/hooks.php b/conf/Mod/pla/lib/hooks.php
new file mode 100644 (file)
index 0000000..830654f
--- /dev/null
@@ -0,0 +1,186 @@
+cd<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/lib/hooks.php,v 1.6.4.2 2007/01/27 13:53:20 wurley Exp $
+
+/**
+ * Functions related to hooks management.
+ *
+ * @author Benjamin Drieu <benjamin.drieu@fr.alcove.com> and Alcôve
+ * @package phpLDAPadmin
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+if ( ! isset($hooks) ) {
+  /** This variable contains all hooks that are defined.  */
+  $hooks = array();
+}
+
+/**
+ * Compares two arrays by numerically comparing their 'prority'
+ * value.  Standard `cmp-like' function.
+ *
+ * @param a First element to compare.
+ * @param b Second element to compare.
+ *
+ * @return -1 if priority of first element is smaller than second
+ * element priority.  1 otherwise.
+ */
+function sort_array_by_priority ( $a, $b ) {
+  return ( ( $a['priority'] < $b['priority'] ) ? -1 : 1 );
+}
+
+/**
+ * Runs procedures attached to a hook.
+ *
+ * @param hook_name    Name of hook to run.
+ * @param args         Array of optional arguments set by
+ *                     phpldapadmin.  It is normally in a form known
+ *                     by call_user_func_array() :
+ * <pre>[ 'server_id' => 0,
+ *   'dn' => 'uid=epoussa,ou=tech,o=corp,o=fr' ]</pre>
+ *
+ * @return true if all procedures returned true, false otherwise.
+ */
+function run_hook ( $hook_name, $args ) {
+  global $hooks;
+
+  $debug = 0;
+       syslog_debug ( "Running hook $hook_name." );
+
+  if ( ! array_key_exists ( $hook_name, $hooks ) ) {
+      syslog_notice ( "Hook '$hook_name' not defined !\n" );
+      return true;
+  }
+
+  unset ( $rollbacks );
+  $rollbacks = array ();
+  reset ( $hooks[$hook_name] );
+
+  /** Execution of procedures attached is done using a numeric order
+   * since all procedures have been attached to the hook with a
+   * numerical weight. */
+  while ( list ( $key, $hook ) = each ( $hooks[$hook_name] ) ) {
+      array_push ( $rollbacks, $hook['rollback_function'] );
+       syslog_debug ( "Calling " . $hook['hook_function'] . "\n" );
+      $result = call_user_func_array ( $hook['hook_function'], $args );
+      syslog_notice ( "Called " . $hook['hook_function'] . "\n" );
+
+      /** If a procedure fails, its optional rollback is executed with
+       * the same arguments.  After that, all rollbacks from
+       * previously executed procedures are executed in the reverse
+       * order.  */
+      if ( $result != true ) {
+               syslog_debug ( "Function " . $hook['hook_function'] . " returned $result\n" );
+
+         while ( $rollbacks ) {
+             $rollback = array_pop ( $rollbacks );
+
+             if ( $rollback != false ) {
+                       syslog_debug ( "Executing rollback $rollback\n" );
+                 call_user_func_array ( $rollback, $args );
+               }
+           }
+
+         return false;
+      }
+  }
+
+  return true;
+}
+
+/**
+ * Adds a procedure to a hook for later execution.
+ *
+ * @param hook_name            Name of the hook.
+ * @param priority             Numeric priority.  Lowest means
+ *                             procedure will be executed before.
+ * @param hook_function                Name of the php function called upon
+ *                             hook trigger.
+ * @param rollback_function    Name of the php rollback function
+ *                             called upon failure.
+ */
+function add_hook ( $hook_name, $priority, $hook_function, $rollback_function ) {
+  global $hooks;
+
+  if ( ! array_key_exists ( $hook_name, $hooks ) ) {
+      $hooks[$hook_name] = array();
+  }
+
+  array_push ( $hooks[$hook_name], array ( 'priority' => $priority, 'hook_function' => $hook_function,
+       'rollback_function' => $rollback_function ) );
+
+  uasort ( $hooks[$hook_name], "sort_array_by_priority" );
+}
+
+/**
+ * Removes a procedure from a hook, based on a filter.
+ *
+ * @param hook_name            Name of the hook.
+ * @param priority             Numeric priority.  If set, all
+ *                             procedures of that priority will be
+ *                             removed.
+ * @param hook_function                Name of the procedure function.  If
+ *                             set, all procedures that call this
+ *                             function will be removed.
+ * @param rollback_function    Name of the php rollback function
+ *                             called upon failure.  If set, all
+ *                             procedures that call this function
+ *                             as a rollback will be removed.
+ */
+function remove_hook ( $hook_name, $priority, $hook_function, $rollback_function ) {
+  global $hooks;
+
+  if ( array_key_exists ( $hook_name, $hooks ) ) {
+      reset ( $hooks[$hook_name] );
+
+      while ( list ( $key, $hook ) = each ( $hooks[$hook_name] ) ) {
+         if ( ( $priority >= 0 && $priority == $hook['priority'] ) ||
+              ( $hook_function && $hook_function == $hook['hook_function'] ) ||
+              ( $rollback_function && $rollback_function == $hook['rollback_function'] ) ) {
+             unset ( $hooks[$hook_name][$key] );
+         }
+
+      }
+  }
+}
+
+/**
+ * Removes all procedures from a hook.
+ *
+ * @param hook_name    Name of hook to clear.
+ */
+function clear_hooks ( $hook_name )      {
+  global $hooks;
+
+  if ( array_key_exists ( $hook_name, $hooks ) ) {
+      unset ( $hooks[$hook_name] );
+  }
+}
+
+/* Evaluating user-made hooks */
+if (is_dir(HOOKSDIR)) {
+  $dir = dir(HOOKSDIR);
+
+  while (false !== ($entry = $dir->read())) {
+      $filename = sprintf('%s/%s',HOOKSDIR,$entry);
+               if (is_file($filename) and eregi('php[0-9]+$',$entry))
+                       require_once "hooks/$entry";
+  }
+
+  $dir -> close();
+}
+
+?>
diff --git a/conf/Orig/phpldapadmin-0.9.8.5.tar.gz b/conf/Orig/phpldapadmin-0.9.8.5.tar.gz
new file mode 100644 (file)
index 0000000..090b35b
Binary files /dev/null and b/conf/Orig/phpldapadmin-0.9.8.5.tar.gz differ
diff --git a/conf/Scripts/chown.sh b/conf/Scripts/chown.sh
new file mode 100644 (file)
index 0000000..6ab18da
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+chown -R root:root /usr/share/doc/lcs/$1
+chown -R root:root /var/lib/lcs/$1
+chown -R www-data:www-data /usr/share/lcs/$1
+chmod 750 /usr/share/lcs/$1
diff --git a/debian/README b/debian/README
new file mode 100644 (file)
index 0000000..af8d619
--- /dev/null
@@ -0,0 +1,18 @@
+README, version : 2.1~3   27/02/2009
+
+Philippe Leclerc <philippe.leclerc1@ac-caen.fr>
+
+LCS module : pla - Readme
+===========================
+Un ensemble de scripts PHP pour administrer le LDAP via un navigateur web
+
+-----------
+pla est basé sur phpmyadmin http://phpldapadmin.sourceforge.net/ version : 0.9.8.5
+
+Les fichiers originaux de la version officielle sont disponibles dans le répertoire :
+/var/lib/lcs/pla/Orig
+
+Les fichiers modifiés sont disponibles dans le répertoire :
+/var/lib/lcs/pla/Mod
+
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644 (file)
index 0000000..4705323
--- /dev/null
@@ -0,0 +1,6 @@
+lcs-pla for Debian
+------------------
+
+
+
+ -- Philippe Leclerc <philippe.leclerc1@ac-caen.fr>  Sun,  1 Mar 2009 18:29:14 +0100
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..a724387
--- /dev/null
@@ -0,0 +1,6 @@
+lcs-pla (2.1~3-1) unstable; urgency=low
+
+  * Initial release (svn_builpackage compatibilty)
+
+ -- Philippe Leclerc <philippe.leclerc1@ac-caen.fr>  Sun,  1 Mar 2009 18:29:14 +0100
+
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..ae2fc66
--- /dev/null
@@ -0,0 +1,12 @@
+Source: lcs-pla
+Section: misc
+Priority:optionnal
+Maintainer: Philippe Leclerc <philippe.leclerc1@ac-caen.fr>
+Build-Depends: debhelper (>= 5)
+Standards-Version: 3.7.2
+
+Package: lcs-pla
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, lcs-web
+Description: Install PhpLdapAdmin on LCS server
+ This package allows to administer the LDAP on LCS server.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..ef8419e
--- /dev/null
@@ -0,0 +1,31 @@
+This package was debianized by Philippe Leclerc <philippe.leclerc1@ac-caen.fr> on
+Sun,  1 Mar 2009 18:29:14 +0100.
+
+It was downloaded from https://svn.tice.ac-caen.fr/svn/LcsSE3/LCS/
+
+lcs-pla is based on PhpLdapAdmin : http://phpldapadmin.sourceforge.net/
+
+Copyright: 2008 Philippe Leclerc
+
+License:
+This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this package; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+  
+The Debian packaging is (C) 2009, Philippe Leclerc <philippe.leclerc1@ac-caen.fr> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
+
diff --git a/debian/postinst b/debian/postinst
new file mode 100644 (file)
index 0000000..03b253a
--- /dev/null
@@ -0,0 +1,118 @@
+#!/bin/sh
+# postinst script for lcs-pma
+#
+# see: dh_installdeb(1)
+
+set -e
+
+VER="2.1~3"
+MODULE="pla"
+VERAPPLI="0.9.8.5"
+INDICEMAJNBR="0"
+
+CONF="/var/lib/lcs/$MODULE"
+PATHMOD="/usr/share/lcs/$MODULE"
+APACHECONF="/etc/lcs/apache.conf"
+APACHE2CONF="/etc/apache2/lcs-main/67_pla.conf"
+
+case "$1" in
+   install| configure)
+
+if [ "$2" = "" ] || [ "$2" = "$VER" ]; then
+    #
+    # Inscription du module dans applis.lcs_db
+    #
+    /usr/bin/mysql -e "INSERT INTO lcs_db.applis (id, name, value, descr, num_maj, version, chemin, type) VALUES ('', '$MODULE', '1', 'Administration web serveur LDAPLCS', '$INDICEMAJNBR', '$VER', '$PATHMOD', 'S');"
+else
+    echo "Mise ajour du paquet module LCS $MODULE de $2 vers $VER"
+    #
+    # Lecture de l'indice de maj dans la table lcs_db.applis
+    #
+    MAJNBR=`mysql -se "SELECT num_maj FROM lcs_db.applis WHERE name='$MODULE';"`
+    let MAJNBR+=1
+    if [ ! -e $CONF/Maj/maj$MAJNBR.sh ]; then
+       echo "Pas de script de mise a jour a appliquer !"
+    else
+        while [ -e $CONF/Maj/maj$MAJNBR.sh ]; do
+            echo "Application du script Maj$MAJNBR"
+            $CONF/Maj/maj$MAJNBR.sh
+            let MAJNBR+=1
+       done
+       
+       fi
+       
+       #
+       # Mise a jour du Numero de version
+       #
+       #let MAJNBR-=1
+        #
+        # Inscription du module dans applis.lcs_db
+        #
+        /usr/bin/mysql -e "UPDATE lcs_db.applis SET num_maj='$INDICEMAJNBR', version='$VER' WHERE name='$MODULE';" 
+        #
+        # Fin de la mise a jour
+        #
+       echo "Termine."
+    
+fi
+#
+# Mise en place du lien symbolique 
+#
+if [ ! -e /usr/share/doc/lcs-$MODULE ]; then
+    ln -s /usr/share/doc/lcs/$MODULE /usr/share/doc/lcs-$MODULE
+fi
+#
+# Mise en place de 20.annu.inc
+#
+echo "Activation du lien dans le menu d'administration"
+
+if ! grep -q '\        "Explorateur LDAP' /var/www/lcs/includes/menu.d/20annu.inc 
+then
+sed -i "/Annuaire/a\\\t\"Explorateur LDAP\",\"../pla/\\\\\"\ target=\'_new\'\\\\\"\",\"lcs_is_admin\"," /var/www/lcs/includes/menu.d/20annu.inc
+fi
+
+echo "Changement des droits sur l'arborescence du module"
+#
+$CONF/Scripts/chown.sh $MODULE
+
+# cas de l'ancienne conf apache
+if [ -e $APACHECONF ]; then
+  if [ `grep -c "Alias /$MODULE/ /usr/share/lcs/$MODULE/" $APACHECONF` = 0 ]; then
+    #
+    # Ajout de l'alias
+    #
+    echo "Mise en place de l'alias $MODULE"
+    echo "Alias /$MODULE/ /usr/share/lcs/$MODULE/" >> $APACHECONF
+    if [ -e /etc/init.d/apache2 ]; then
+        /etc/init.d/apache2 reload > /dev/null 2>&1
+    else
+        /etc/init.d/apache reload > /dev/null 2>&1
+    fi
+  fi
+fi
+# cas de la nouvelle configuration apache
+if [ ! -e $APACHE2CONF ]; then
+  cat >$APACHE2CONF <<EOF
+Alias /pla/ /usr/share/lcs/pla/
+EOF
+  /etc/init.d/apache2 reload > /dev/null 2>&1
+fi
+
+;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
diff --git a/debian/postrm b/debian/postrm
new file mode 100644 (file)
index 0000000..62839b8
--- /dev/null
@@ -0,0 +1,78 @@
+#!/bin/sh
+# postrm script for lcs-pma
+#
+# see: dh_installdeb(1)
+
+set -e
+
+MODULE="pla"
+APACHECONF="/etc/lcs/apache.conf"
+APACHE2CONF="/etc/apache2/lcs-main/67_pla.conf"
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+case "$1" in
+    purge|remove)
+        #
+        # Suppression de l'alias 
+        #
+        # cas de l'ancienne conf apache
+        if [ -e $APACHECONF ]; then
+          grep -v 'Alias /$MODULE/ /usr/share/lcs/$MODULE/' $APACHECONF > /tmp/apache.conf
+          mv /tmp/apache.conf $APACHECONF
+          if [ -e /etc/init.d/apache2 ]; then
+            invoke-rc.d apache2 force-reload > /dev/null 2>&1
+         else
+            /etc/init.d/apache reload > /dev/null 2>&1
+          fi
+        fi
+        # cas de la nouvelle configuration apache
+        if [ -e $APACHE2CONF ]; then
+          rm -r $APACHE2CONF
+          /etc/init.d/apache2 reload > /dev/null 2>&1
+        fi
+        #
+        # Remplacement de 20annu.inc
+        #
+        echo "Désactivation du lien dans le menu d'administration"
+    cp -a /var/www/lcs/includes/menu.d/20annu.inc /var/www/lcs/includes/menu.d/20annu.in
+       cat /var/www/lcs/includes/menu.d/20annu.in | sed 's/^   "Explorateur LDAP/\#    "Explorateur LDAP'/ > /var/www/lcs/includes/menu.d/20annu.inc
+       rm /var/www/lcs/includes/menu.d/20annu.in
+        #
+        # Desinscription du module de la table lcs_db.applis
+        #
+        mysql -e "DELETE FROM lcs_db.applis WHERE name = '$MODULE';";
+        #
+        # Nettoyage des repertoires
+        # 
+        if [ -e /usr/share/lcs/$MODULE ]; then
+          rm -R /usr/share/lcs/$MODULE
+        fi
+        ;;
+
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..d7419c8
--- /dev/null
@@ -0,0 +1,98 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+else
+       CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+
+       touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+       dh_testdir
+
+       # Add here commands to compile the package.
+       $(MAKE)
+       #docbook-to-man debian/lcs-pla.sgml > lcs-pla.1
+
+       touch $@
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       # Add here commands to clean up after the build process.
+       -$(MAKE) clean
+
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+       dh_installdirs
+
+       # Add here commands to install the package into debian/lcs-pla.
+       $(MAKE) DESTDIR=$(CURDIR)/debian/lcs-pla install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs 
+       dh_installdocs
+       dh_installexamples
+#      dh_install
+#      dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+       dh_strip
+       dh_compress
+       dh_fixperms
+#      dh_perl
+#      dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/doc-html/index.html b/doc-html/index.html
new file mode 100644 (file)
index 0000000..5d024c3
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>Modules LCS PLA</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+  <style type="text/css" media="all">@import "../../c/c.css";</style>
+</head>
+<body>
+<h1>Documentation Module LCS PLA</h1>
+<h2>Versions :</h2>
+<ul>
+    <li>Paquet module : 2.1~3 </li>
+    <li>PhpLdapAdmin : 0.9.8.5 </li>
+    <li>Site officiel de  PhpLdapAdmin : <a href="http://phpldapadmin.sourceforge.net/">http://phpldapadmin.sourceforge.net/</a></li>
+</ul>
+    
+</ul>
+<h3>Qu'est ce que <i class="emphasis">PhpLdapAdmin</i> :</h3>
+<p><i class="emphasis">PhpLdapAdmin</i>  adapté au <i class="emphasis">LCS</i>,  permet à l'administrateur de gérer l'annuaire LDAP via une interface web.
+</p>
+        <li> Arborescence LDAP</li>
+     <li> Copier les entrées LDAP (même exemplaire entre les différents serveurs)</li>
+     <li> Copier récursivement des arbres entiers</li>
+     <li> Supprimer les entrées LDAP</li>
+     <li> Supprimer récursivement</li>
+     <li> Afficher et modifier les attributs de l'image (comme jpegPhoto)</li>
+     <li> Recherches LDAP  ( simple et avancée)</li>
+     <li> Exportation LDIF  et DSML </li>
+     <li> Importation LDIF</li>
+     <li> Renommer les entrées LDAP</li>
+     <li> Gérer les hachages de mots de passe utilisateur (supports sha, crypt, md5, blowfish, md5crypt</li>
+     <li> Augmentation automatique des numéros UID</li>
+     <li> Configurable en lecture seule et lecture / écriture modes. </li>
+
+
+<H2>Maintenance du module :</H2>
+<BLOCKQUOTE><b>Philippe LECLERC </b>: &lt;Misterphi &gt; philippe.leclerc1@ac-caen.fr</BLOCKQUOTE>
+</body>
+</html>
diff --git a/pla/.cvsignore b/pla/.cvsignore
new file mode 100644 (file)
index 0000000..fd85e30
--- /dev/null
@@ -0,0 +1 @@
+VERSION
diff --git a/pla/INSTALL b/pla/INSTALL
new file mode 100644 (file)
index 0000000..7618b9a
--- /dev/null
@@ -0,0 +1,23 @@
+For install instructions in non-English languages, see the wiki:
+    http://wiki.phpldapadmin.info
+
+* Requirements
+
+  phpLDAPadmin requires the following:
+      a. A web server (Apache, IIS, etc).
+      b. PHP 4.1.0 or newer (with LDAP support)
+
+* To install
+
+  1. Unpack the archive (if you're reading this, you already did that).
+  2. Put the resulting 'phpldapadmin' directory somewhere in your webroot.
+  3. Copy 'config.php.example' to 'config.php' and edit to taste (this is in the config/ directory).
+  4. Then, point your browser to the phpldapadmin directory.
+
+* For additional help
+
+  See the wiki:
+    http://wiki.phpldapadmin.info
+
+  Join our mailing list: 
+    https://lists.sourceforge.net/lists/listinfo/phpldapadmin-devel
diff --git a/pla/LICENSE b/pla/LICENSE
new file mode 100644 (file)
index 0000000..022e560
--- /dev/null
@@ -0,0 +1,341 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+
diff --git a/pla/VERSION b/pla/VERSION
new file mode 100644 (file)
index 0000000..ee103ab
--- /dev/null
@@ -0,0 +1 @@
+$Name: RELEASE-0_9_8_5 $
diff --git a/pla/config/.cvsignore b/pla/config/.cvsignore
new file mode 100644 (file)
index 0000000..4f4773f
--- /dev/null
@@ -0,0 +1 @@
+config.php
diff --git a/pla/config/config.php b/pla/config/config.php
new file mode 100644 (file)
index 0000000..2e350c3
--- /dev/null
@@ -0,0 +1,383 @@
+<?php
+include "/var/www/lcs/includes/headerauth.inc.php";
+
+list ($idpers,$login) = isauth();
+
+/**
+ * The phpLDAPadmin config file
+ *
+ * This is where you can customise some of the phpLDAPadmin defaults
+ * that are defined in config_default.php.
+ *
+ * To override a default, use the $config->custom variable to do so.
+ * For example, the default for defining the language in config_default.php
+ *
+ * $this->default->appearance['lang'] = array(
+ *     'desc'=>'Language',
+ *     'default'=>'auto');pla/htdocs/index.php
+ *
+ * to override this, use $config->custom->appearance['lang'] = 'en';
+ *
+ * This file is also used to configure your LDAP server connections.
+ *
+ * You must specify at least one LDAP server there. You may add
+ * as many as you like. You can also specify your language, and
+ * many other options.
+ *
+ * NOTE: Commented out values in this file prefixed by //, represent the
+ * defaults that have been defined in config_default.php.
+ * Commented out values prefixed by #, dont refelct their default value, you can
+ * check config_default.php if you want to see what the default is.
+ *
+ * DONT change config_default.php, you changes will be lost by the next release
+ * of PLA. Instead change this file - as it will NOT be replaced by a new
+ * version of phpLDAPadmin.
+ */
+
+/*********************************************/
+/* Useful important configuration overrides  */
+/*********************************************/
+
+/* If you are asked to put pla in debug mode, this is how you do it: */
+  #$config->custom->debug['level'] = 0;
+  #$config->custom->debug['syslog'] = true;
+  #$config->custom->debug['file'] = '/tmp/pla_debug.log';
+
+/* phpLDAPadmin can encrypt the content of sensitive cookies if you set this
+   to a big random string. */
+$config->custom->session['blowfish'] = '';
+
+/* The language setting. If you set this to 'auto', phpLDAPadmin will attempt
+   to determine your language automatically. Otherwise, available lanaguages
+   are: 'ct', 'de', 'en', 'es', 'fr', 'it', 'nl', and 'ru'
+   Localization is not complete yet, but most strings have been translated.
+   Please help by writing language files. See lang/en.php for an example. */
+// $config->custom->appearance['language'] = 'auto';
+
+/* The temporary storage directory where we will put jpegPhoto data
+   This directory must be readable and writable by your web server. */
+// $config->custom->jpeg['tmpdir'] = "/tmp";     // Example for Unix systems
+#  $config->custom->jpeg['tmpdir'] = "c:\\temp"; // Example for Windows systems
+
+/*********************************************/
+/* Define your LDAP servers in this section  */
+/*********************************************/
+
+$i=0;
+$ldapservers = new LDAPServers;
+
+/* A convenient name that will appear in the tree viewer and throughout
+   phpLDAPadmin to identify this LDAP server to users. */
+$ldapservers->SetValue($i,'server','name','LDAP Server LCS');
+
+/* Examples:
+   'ldap.example.com',
+   'ldaps://ldap.example.com/',
+   'ldapi://%2fusr%local%2fvar%2frun%2fldapi'
+           (Unix socket at /usr/local/var/run/ldap) */
+$ldapservers->SetValue($i,'server','host',$ldap_server);
+
+/* The port your LDAP server listens on (no quotes). 389 is standard. */
+// $ldapservers->SetValue($i,'server','port','389');
+
+/* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin
+   auto-detect it for you. */
+$ldapservers->SetValue($i,'server','base',array($ldap_base_dn));
+
+/* Three options for auth_type:
+   1. 'cookie': you will login via a web form, and a client-side cookie will
+      store your login dn and password.
+   2. 'session': same as cookie but your login dn and password are stored on the
+      web server in a persistent session variable.
+   3. 'config': specify your login dn and password here in this config file. No
+      login will be required to use phpLDAPadmin for this server.
+
+   Choose wisely to protect your authentication information appropriately for
+   your situation. If you choose 'cookie', your cookie contents will be
+   encrypted using blowfish and the secret your specify above as
+   session['blowfish']. */
+$ldapservers->SetValue($i,'server','auth_type','config');
+
+/* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or
+   'cookie' or 'session' auth_types, LEAVE THE LOGIN_DN AND LOGIN_PASS BLANK. If
+   you specify a login_attr in conjunction with a cookie or session auth_type,
+   then you can also specify the login_dn/login_pass here for searching the
+   directory for users (ie, if your LDAP server does not allow anonymous binds. */
+// $ldapservers->SetValue($i,'login','dn','');
+$ldapservers->SetValue($i,'login','dn',$adminRdn.",".$ldap_base_dn);
+$rights=exec(" ldapsearch -xLLL member='uid=$login,ou=People,".$ldap_base_dn."' dn | grep '^dn: cn=lcs_is_admin' | wc -l");
+if  ( ($login!="" && $rights=="1")  ) {
+    $login="admin";
+    $ldapservers->SetValue($i,'login','pass',$adminPw);
+} else
+    $ldapservers->SetValue($i,'login','pass','');
+/* Use TLS (Transport Layer Security) to connect to the LDAP server. */
+// $ldapservers->SetValue($i,'server','tls',false);
+
+/* If the link between your web server and this LDAP server is slow, it is
+   recommended that you set 'low_bandwidth' to true. This will enable
+   phpLDAPadmin to forego some "fancy" features to conserve bandwidth. */
+$ldapservers->SetValue($i,'server','low_bandwidth',true);
+
+/* Default password hashing algorithm. One of md5, ssha, sha, md5crpyt, smd5,
+   blowfish, crypt or leave blank for now default algorithm. */
+// $ldapservers->SetValue($i,'appearance','password_hash','md5');
+
+/* If you specified 'cookie' or 'session' as the auth_type above, you can
+   optionally specify here an attribute to use when logging in. If you enter
+   'uid' and login as 'dsmith', phpLDAPadmin will search for (uid=dsmith)
+   and log in as that user.
+   Leave blank or specify 'dn' to use full DN for logging in. Note also that if
+   your LDAP server requires you to login to perform searches, you can enter the
+   DN to use when searching in 'login_dn' and 'login_pass' above. You may also
+   specify 'string', in which case you can provide a string to use for logging
+   users in. See 'login_string' directly below. */
+// $ldapservers->SetValue($i,'login','attr','dn');
+
+/* If you specified 'cookie' or 'session' as the auth_type above, and you
+   specified 'string' for 'login_attr' above, you must provide a string here for
+   logging users in. If, for example, I have a lot of user entries with DNs like
+   "uid=dsmith,ou=People,dc=example,dc=com", then I can specify a string
+   "uid=<username>,ou=People,dc=example,dc=com" and my users can login with
+   their user names alone, ie: "dsmith" in this case. */
+#  $ldapservers->SetValue($i,'login','string','uid=<username>,ou=People,dc=example,dc=com');
+
+/* If 'login_attr' is used above such that phpLDAPadmin will search for your DN
+   at login, you may restrict the search to a specific objectClass. EG, set this
+   to 'posixAccount' or 'inetOrgPerson', depending upon your setup. */
+// $ldapservers->SetValue($i,'login','class','');
+
+/* Specify true If you want phpLDAPadmin to not display or permit any
+   modification to the LDAP server. */
+if ($pla_bind==0) 
+    $ldapservers->SetValue($i,'server','read_only',true);
+else 
+    $ldapservers->SetValue($i,'server','read_only',false);
+
+/* Specify false if you do not want phpLDAPadmin to draw the 'Create new' links
+   in the tree viewer. */
+// $ldapservers->SetValue($i,'appearance','show_create',true);
+
+/* This feature allows phpLDAPadmin to automatically determine the next
+   available uidNumber for a new entry. */
+// $ldapservers->SetValue($i,'auto_number','enable',true);
+
+/* The mechanism to use when finding the next available uidNumber. Two possible
+   values: 'uidpool' or 'search'.
+   The 'uidpool' mechanism uses an existing uidPool entry in your LDAP server to
+   blindly lookup the next available uidNumber. The 'search' mechanism searches
+   for entries with a uidNumber value and finds the first available uidNumber
+   (slower). */
+// $ldapservers->SetValue($i,'auto_number','mechanism','search');
+
+/* The DN of the search base when the 'search' mechanism is used above. */
+$ldapservers->SetValue($i,'auto_number','search_base',$ldap_base_dn);
+
+/* The minimum number to use when searching for the next available UID number
+   (only when 'search' is used for auto_uid_number_mechanism' */
+// $ldapservers->SetValue($i,'auto_number','min','1000');
+
+/* The DN of the uidPool entry when 'uidpool' mechanism is used above. */
+// $servers[$i]['auto_uid_number_uid_pool_dn'] = 'cn=uidPool,dc=example,dc=com';
+
+/* If you set this, then phpldapadmin will bind to LDAP with this user ID when
+   searching for the uidnumber. The idea is, this user id would have full
+   (readonly) access to uidnumber in your ldap directory (the logged in user
+   may not), so that you can be guaranteed to get a unique uidnumber for your
+   directory. */
+// $ldapservers->SetValue($i,'auto_number','dn','');
+
+/* The password for the dn above. */
+// $ldapservers->SetValue($i,'auto_number','pass','');
+
+/* Enable anonymous bind login. */
+$ldapservers->SetValue($i,'login','anon_bind',false);
+
+/* Use customized page with prefix when available. */
+// $ldapservers->SetValue($i,'custom','pages_prefix','custom_');
+
+/* If you set this, then phpldapadmin will bind to LDAP with this user when
+   testing for unique attributes (as set in unique_attrs array). If you want to
+   enforce unique attributes, than this id should have full (readonly) access
+   to the attributes in question (the logged in user may not have enough access)
+*/
+// $ldapservers->SetValue($i,'unique_attrs','dn','');
+
+/* The password for the dn above */
+// $ldapservers->SetValue($i,'unique_attrs','pass','');
+
+/* If you set this, then only these DNs are allowed to log in. This array can
+   contain individual users, groups or ldap search filter(s). Keep in mind that
+   the user has not authenticated yet, so this will be an anonymous search to
+   the LDAP server, so make your ACLs allow these searches to return results! */
+# $ldapservers->SetValue($i,'login','allowed_dns',array(
+#      'uid=stran,ou=People,dc=example,dc=com',
+#      '(&(gidNumber=811)(objectClass=groupOfNames))',
+#      '(|(uidNumber=200)(uidNumber=201))',
+#      'cn=callcenter,ou=Group,dc=example,dc=com'));
+
+/* Set this if you dont want this LDAP server to show in the tree */
+// $ldapservers->SetValue($i,'appearance','visible',true);
+
+/* This is the time out value in minutes for the server. After as many minutes
+   of inactivity you will be automatically logged out. If not set, the default
+   value will be ( session_cache_expire()-1 ) */
+#  $ldapservers->SetValue($i,'login','timeout',30);
+
+/* Set this if you want phpldapadmin to perform rename operation on entry which
+   has children. Certain servers are known to allow it, certain are not */
+// $ldapservers->SetValue($i,'server','branch_rename',false);
+
+/**************************************************************************
+ * If you want to configure additional LDAP servers, do so below.         *
+ * Remove the commented lines and use this section as a template for all  *
+ * your other LDAP servers.                                               *
+ **************************************************************************/
+
+/*
+$i++;
+$ldapservers->SetValue($i,'server','name','LDAP Server');
+$ldapservers->SetValue($i,'server','host','127.0.0.1');
+$ldapservers->SetValue($i,'server','port','389');
+$ldapservers->SetValue($i,'server','base',array(''));
+$ldapservers->SetValue($i,'server','auth_type','cookie');
+$ldapservers->SetValue($i,'login','dn','');
+$ldapservers->SetValue($i,'login','pass','');
+$ldapservers->SetValue($i,'server','tls',false);
+$ldapservers->SetValue($i,'server','low_bandwidth',false);
+$ldapservers->SetValue($i,'appearance','password_hash','md5');
+$ldapservers->SetValue($i,'login','attr','uid');
+$ldapservers->SetValue($i,'login','string','');
+$ldapservers->SetValue($i,'login','class','');
+$ldapservers->SetValue($i,'server','read_only',false);
+$ldapservers->SetValue($i,'appearance','show_create',true);
+$ldapservers->SetValue($i,'auto_number','enable',true);
+$ldapservers->SetValue($i,'auto_number','mechanism','search');
+$ldapservers->SetValue($i,'auto_number','search_base','');
+$ldapservers->SetValue($i,'auto_number','min','1000');
+$ldapservers->SetValue($i,'auto_number','dn','');
+$ldapservers->SetValue($i,'auto_number','pass','');
+$ldapservers->SetValue($i,'login','anon_bind',true);
+$ldapservers->SetValue($i,'custom','pages_prefix','custom_');
+$ldapservers->SetValue($i,'unique_attrs','dn','');
+$ldapservers->SetValue($i,'unique_attrs','pass','');
+*/
+
+/*********************************************/
+/* User-friendly attribute translation       */
+/*********************************************/
+
+/* Use this array to map attribute names to user friendly names. For example, if
+   you don't want to see "facsimileTelephoneNumber" but rather "Fax". */
+$friendly_attrs = array();
+
+$friendly_attrs['facsimileTelephoneNumber'] = 'Fax';
+$friendly_attrs['telephoneNumber']                     = 'Phone';
+
+/*********************************************/
+/* Support for attrs display order           */
+/*********************************************/
+
+/* Use this array if you want to have your attributes displayed in a specific
+   order. You can use default attribute names or their fridenly names.
+   For example, "sn" will be displayed right after "givenName". All the other
+   attributes that are not specified in this array will be displayed after in
+   alphabetical order. */
+#  $attrs_display_order = array(
+#      'givenName',
+#      'sn',
+#      'cn',
+#      'displayName',
+#      'uid',
+#      'uidNumber',
+#      'gidNumber',
+#      'homeDirectory',
+#      'mail',
+#      'userPassword'
+#  );
+
+/*********************************************/
+/* Hidden attributes                         */
+/*********************************************/
+
+/* You may want to hide certain attributes from being displayed in the editor
+   screen. Do this by adding the desired attributes to this list (and uncomment
+   it). This only affects the editor screen. Attributes will still be visible in
+   the schema browser and elsewhere. An example is provided below:
+   NOTE: The user must be able to read the hidden_except_dn entry to be
+   excluded. */
+#  $hidden_attrs = array( 'jpegPhoto', 'objectClass' );
+#  $hidden_except_dn = "cn=PLA UnHide,ou=Groups,c=AU";
+
+/* Hidden attributes in read-only mode. If undefined, it will be equal to
+   $hidden_attrs. */
+#  $hidden_attrs_ro = array(
+#      'objectClass','shadowWarning', 'shadowLastChange', 'shadowMax',
+#      'shadowFlag', 'shadowInactive', 'shadowMin', 'shadowExpire');
+
+/**                                         **/
+/** Read-only attributes                    **/
+/**                                         **/
+
+/* You may want to phpLDAPadmin to display certain attributes as read only,
+   meaning that users will not be presented a form for modifying those
+   attributes, and they will not be allowed to be modified on the "back-end"
+   either. You may configure this list here:
+   NOTE: The user must be able to read the read_only_except_dn entry to be
+   excluded. */
+#  $read_only_attrs = array( 'objectClass' );
+#  $read_only_except_dn = "cn=PLA ReadWrite,ou=Groups,c=AU";
+
+/* An example of how to specify multiple read-only attributes: */
+#  $read_only_attrs = array( 'jpegPhoto', 'objectClass', 'someAttribute' );
+
+/*********************************************/
+/* Unique attributes                         */
+/*********************************************/
+
+/* You may want phpLDAPadmin to enforce some attributes to have unique values
+   (ie: not belong to other entries in your tree. This (together with
+   unique_attrs['dn'] and unique_attrs['pass'] option will not let updates to
+   occur with other attributes have the same value.
+   NOTE: Currently the unique_attrs is NOT enforced when copying a dn. (Need to
+   present a user with the option of changing the unique attributes. */
+#  $unique_attrs = array('uid','uidNumber','mail');
+
+/*********************************************/
+/* Predefined Queries (canned views)         */
+/*********************************************/
+
+/* To make searching easier, you may setup predefined queries below: */
+$q=0;
+$queries = array();
+
+/* The name that will appear in the simple search form */
+$queries[$q]['name'] = 'User List';
+
+/* The base to search on */
+$queries[$q]['base'] = $ldap_base_dn;
+
+/* The search scope (sub, base, one) */
+$queries[$q]['scope'] = 'sub';
+
+/* The LDAP filter to use */
+$queries[$q]['filter'] = '(&(objectClass=posixAccount)(uid=*))';
+
+/* The attributes to return */
+$queries[$q]['attributes'] = 'cn, uid, homeDirectory';
+
+/* If you want to configure more pre-defined queries, copy and paste the above (including the "$q++;") */
+$q++;
+$queries[$q]['name'] = 'Samba Users';
+$queries[$q]['base'] = 'dc=example,dc=com';
+$queries[$q]['scope'] = 'sub';
+$queries[$q]['filter'] = '(&(|(objectClass=sambaAccount)(objectClass=sambaSamAccount))(objectClass=posixAccount)(!(uid=*$)))';
+$queries[$q]['attributes'] = 'uid, smbHome, uidNumber';
+
+$q++;
+$queries[$q]['name'] = 'Samba Computers';
+$queries[$q]['base'] = 'dc=example,dc=com';
+$queries[$q]['scope'] = 'sub';
+$queries[$q]['filter'] = '(&(objectClass=sambaAccount)(uid=*$))';
+$queries[$q]['attributes'] = 'uid, homeDirectory';
+?>
diff --git a/pla/config/config.php.example b/pla/config/config.php.example
new file mode 100644 (file)
index 0000000..11a5b2f
--- /dev/null
@@ -0,0 +1,381 @@
+<?php
+/** NOTE **
+ ** Make sure that <?php is the FIRST line of this file!
+ ** IE: There should NOT be any blank lines or spaces BEFORE <?php
+ **/
+
+/**
+ * The phpLDAPadmin config file
+ *
+ * This is where you can customise some of the phpLDAPadmin defaults
+ * that are defined in config_default.php.
+ *
+ * To override a default, use the $config->custom variable to do so.
+ * For example, the default for defining the language in config_default.php
+ *
+ * $this->default->appearance['lang'] = array(
+ *  'desc'=>'Language',
+ *  'default'=>'auto');
+ *
+ * to override this, use $config->custom->appearance['lang'] = 'en';
+ *
+ * This file is also used to configure your LDAP server connections.
+ *
+ * You must specify at least one LDAP server there. You may add
+ * as many as you like. You can also specify your language, and
+ * many other options.
+ *
+ * NOTE: Commented out values in this file prefixed by //, represent the
+ * defaults that have been defined in config_default.php.
+ * Commented out values prefixed by #, dont reflect their default value, you can
+ * check config_default.php if you want to see what the default is.
+ *
+ * DONT change config_default.php, you changes will be lost by the next release
+ * of PLA. Instead change this file - as it will NOT be replaced by a new
+ * version of phpLDAPadmin.
+ */
+
+/*********************************************/
+/* Useful important configuration overrides  */
+/*********************************************/
+
+/* If you are asked to put pla in debug mode, this is how you do it: */
+#  $config->custom->debug['level'] = 255;
+#  $config->custom->debug['syslog'] = true;
+#  $config->custom->debug['file'] = '/tmp/pla_debug.log';
+
+/* phpLDAPadmin can encrypt the content of sensitive cookies if you set this
+   to a big random string. */
+$config->custom->session['blowfish'] = '';
+
+/* The language setting. If you set this to 'auto', phpLDAPadmin will attempt
+   to determine your language automatically. Otherwise, available lanaguages
+   are: 'ct', 'de', 'en', 'es', 'fr', 'it', 'nl', and 'ru'
+   Localization is not complete yet, but most strings have been translated.
+   Please help by writing language files. See lang/en.php for an example. */
+// $config->custom->appearance['language'] = 'auto';
+
+/* The temporary storage directory where we will put jpegPhoto data
+   This directory must be readable and writable by your web server. */
+// $config->custom->jpeg['tmpdir'] = "/tmp";     // Example for Unix systems
+#  $config->custom->jpeg['tmpdir'] = "c:\\temp"; // Example for Windows systems
+
+/*********************************************/
+/* Define your LDAP servers in this section  */
+/*********************************************/
+
+$i=0;
+$ldapservers = new LDAPServers;
+
+/* A convenient name that will appear in the tree viewer and throughout
+   phpLDAPadmin to identify this LDAP server to users. */
+$ldapservers->SetValue($i,'server','name','My LDAP Server');
+
+/* Examples:
+   'ldap.example.com',
+   'ldaps://ldap.example.com/',
+   'ldapi://%2fusr%local%2fvar%2frun%2fldapi'
+           (Unix socket at /usr/local/var/run/ldap) */
+// $ldapservers->SetValue($i,'server','host','127.0.0.1');
+
+/* The port your LDAP server listens on (no quotes). 389 is standard. */
+// $ldapservers->SetValue($i,'server','port','389');
+
+/* Array of base DNs of your LDAP server. Leave this blank to have phpLDAPadmin
+   auto-detect it for you. */
+// $ldapservers->SetValue($i,'server','base',array(''));
+
+/* Three options for auth_type:
+   1. 'cookie': you will login via a web form, and a client-side cookie will
+      store your login dn and password.
+   2. 'session': same as cookie but your login dn and password are stored on the
+      web server in a persistent session variable.
+   3. 'config': specify your login dn and password here in this config file. No
+      login will be required to use phpLDAPadmin for this server.
+
+   Choose wisely to protect your authentication information appropriately for
+   your situation. If you choose 'cookie', your cookie contents will be
+   encrypted using blowfish and the secret your specify above as
+   session['blowfish']. */
+// $ldapservers->SetValue($i,'server','auth_type','cookie');
+
+/* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or
+   'cookie' or 'session' auth_types, LEAVE THE LOGIN_DN AND LOGIN_PASS BLANK. If
+   you specify a login_attr in conjunction with a cookie or session auth_type,
+   then you can also specify the login_dn/login_pass here for searching the
+   directory for users (ie, if your LDAP server does not allow anonymous binds. */
+// $ldapservers->SetValue($i,'login','dn','');
+#  $ldapservers->SetValue($i,'login','dn','cn=Manager,dc=example,dc=com');
+
+/* Your LDAP password. If you specified an empty login_dn above, this MUST also
+   be blank. */
+// $ldapservers->SetValue($i,'login','pass','');
+#  $ldapservers->SetValue($i,'login','pass','secret');
+
+/* Use TLS (Transport Layer Security) to connect to the LDAP server. */
+// $ldapservers->SetValue($i,'server','tls',false);
+
+/* If the link between your web server and this LDAP server is slow, it is
+   recommended that you set 'low_bandwidth' to true. This will enable
+   phpLDAPadmin to forego some "fancy" features to conserve bandwidth. */
+// $ldapservers->SetValue($i,'server','low_bandwidth',false);
+
+/* Default password hashing algorithm. One of md5, ssha, sha, md5crpyt, smd5,
+   blowfish, crypt or leave blank for now default algorithm. */
+// $ldapservers->SetValue($i,'appearance','password_hash','md5');
+
+/* If you specified 'cookie' or 'session' as the auth_type above, you can
+   optionally specify here an attribute to use when logging in. If you enter
+   'uid' and login as 'dsmith', phpLDAPadmin will search for (uid=dsmith)
+   and log in as that user.
+   Leave blank or specify 'dn' to use full DN for logging in. Note also that if
+   your LDAP server requires you to login to perform searches, you can enter the
+   DN to use when searching in 'login_dn' and 'login_pass' above. You may also
+   specify 'string', in which case you can provide a string to use for logging
+   users in. See 'login_string' directly below. */
+// $ldapservers->SetValue($i,'login','attr','dn');
+
+/* If you specified 'cookie' or 'session' as the auth_type above, and you
+   specified 'string' for 'login_attr' above, you must provide a string here for
+   logging users in. If, for example, I have a lot of user entries with DNs like
+   "uid=dsmith,ou=People,dc=example,dc=com", then I can specify a string
+   "uid=<username>,ou=People,dc=example,dc=com" and my users can login with
+   their user names alone, ie: "dsmith" in this case. */
+#  $ldapservers->SetValue($i,'login','string','uid=<username>,ou=People,dc=example,dc=com');
+
+/* If 'login_attr' is used above such that phpLDAPadmin will search for your DN
+   at login, you may restrict the search to a specific objectClass. EG, set this
+   to 'posixAccount' or 'inetOrgPerson', depending upon your setup. */
+// $ldapservers->SetValue($i,'login','class',null);
+
+/* Specify true If you want phpLDAPadmin to not display or permit any
+   modification to the LDAP server. */
+// $ldapservers->SetValue($i,'server','read_only',false);
+
+/* Specify false if you do not want phpLDAPadmin to draw the 'Create new' links
+   in the tree viewer. */
+// $ldapservers->SetValue($i,'appearance','show_create',true);
+
+/* This feature allows phpLDAPadmin to automatically determine the next
+   available uidNumber for a new entry. */
+// $ldapservers->SetValue($i,'auto_number','enable',true);
+
+/* The mechanism to use when finding the next available uidNumber. Two possible
+   values: 'uidpool' or 'search'.
+   The 'uidpool' mechanism uses an existing uidPool entry in your LDAP server to
+   blindly lookup the next available uidNumber. The 'search' mechanism searches
+   for entries with a uidNumber value and finds the first available uidNumber
+   (slower). */
+// $ldapservers->SetValue($i,'auto_number','mechanism','search');
+
+/* The DN of the search base when the 'search' mechanism is used above. */
+#  $ldapservers->SetValue($i,'auto_number','search_base','ou=People,dc=example,dc=com');
+
+/* The minimum number to use when searching for the next available UID number
+   (only when 'search' is used for auto_uid_number_mechanism' */
+// $ldapservers->SetValue($i,'auto_number','min','1000');
+
+/* The DN of the uidPool entry when 'uidpool' mechanism is used above. */
+#  $servers[$i]['auto_uid_number_uid_pool_dn'] = 'cn=uidPool,dc=example,dc=com';
+
+/* If you set this, then phpldapadmin will bind to LDAP with this user ID when
+   searching for the uidnumber. The idea is, this user id would have full
+   (readonly) access to uidnumber in your ldap directory (the logged in user
+   may not), so that you can be guaranteed to get a unique uidnumber for your
+   directory. */
+// $ldapservers->SetValue($i,'auto_number','dn',null);
+
+/* The password for the dn above. */
+// $ldapservers->SetValue($i,'auto_number','pass',null);
+
+/* Enable anonymous bind login. */
+// $ldapservers->SetValue($i,'login','anon_bind',true);
+
+/* Use customized page with prefix when available. */
+#  $ldapservers->SetValue($i,'custom','pages_prefix','custom_');
+
+/* If you set this, then phpldapadmin will bind to LDAP with this user when
+   testing for unique attributes (as set in unique_attrs array). If you want to
+   enforce unique attributes, than this id should have full (readonly) access
+   to the attributes in question (the logged in user may not have enough access)
+*/
+// $ldapservers->SetValue($i,'unique_attrs','dn',null);
+
+/* The password for the dn above */
+// $ldapservers->SetValue($i,'unique_attrs','pass',null);
+
+/* If you set this, then only these DNs are allowed to log in. This array can
+   contain individual users, groups or ldap search filter(s). Keep in mind that
+   the user has not authenticated yet, so this will be an anonymous search to
+   the LDAP server, so make your ACLs allow these searches to return results! */
+#  $ldapservers->SetValue($i,'login','allowed_dns',array(
+#   'uid=stran,ou=People,dc=example,dc=com',
+#   '(&(gidNumber=811)(objectClass=groupOfNames))',
+#   '(|(uidNumber=200)(uidNumber=201))',
+#   'cn=callcenter,ou=Group,dc=example,dc=com'));
+
+/* Set this if you dont want this LDAP server to show in the tree */
+// $ldapservers->SetValue($i,'appearance','visible',true);
+
+/* This is the time out value in minutes for the server. After as many minutes
+   of inactivity you will be automatically logged out. If not set, the default
+   value will be ( session_cache_expire()-1 ) */
+#  $ldapservers->SetValue($i,'login','timeout',30);
+
+/* Set this if you want phpldapadmin to perform rename operation on entry which
+   has children. Certain servers are known to allow it, certain are not */
+// $ldapservers->SetValue($i,'server','branch_rename',false);
+
+/**************************************************************************
+ * If you want to configure additional LDAP servers, do so below.         *
+ * Remove the commented lines and use this section as a template for all  *
+ * your other LDAP servers.                                               *
+ **************************************************************************/
+
+/*
+$i++;
+$ldapservers->SetValue($i,'server','name','LDAP Server');
+$ldapservers->SetValue($i,'server','host','127.0.0.1');
+$ldapservers->SetValue($i,'server','port','389');
+$ldapservers->SetValue($i,'server','base',array(''));
+$ldapservers->SetValue($i,'server','auth_type','cookie');
+$ldapservers->SetValue($i,'login','dn','');
+$ldapservers->SetValue($i,'login','pass','');
+$ldapservers->SetValue($i,'server','tls',false);
+$ldapservers->SetValue($i,'server','low_bandwidth',false);
+$ldapservers->SetValue($i,'appearance','password_hash','md5');
+$ldapservers->SetValue($i,'login','attr','dn');
+$ldapservers->SetValue($i,'login','string',null);
+$ldapservers->SetValue($i,'login','class',null);
+$ldapservers->SetValue($i,'server','read_only',false);
+$ldapservers->SetValue($i,'appearance','show_create',true);
+$ldapservers->SetValue($i,'auto_number','enable',true);
+$ldapservers->SetValue($i,'auto_number','mechanism','search');
+$ldapservers->SetValue($i,'auto_number','search_base',null);
+$ldapservers->SetValue($i,'auto_number','min','1000');
+$ldapservers->SetValue($i,'auto_number','dn',null);
+$ldapservers->SetValue($i,'auto_number','pass',null);
+$ldapservers->SetValue($i,'login','anon_bind',true);
+$ldapservers->SetValue($i,'custom','pages_prefix','custom_');
+$ldapservers->SetValue($i,'unique_attrs','dn',null);
+$ldapservers->SetValue($i,'unique_attrs','pass',null);
+*/
+
+/*********************************************/
+/* User-friendly attribute translation       */
+/*********************************************/
+
+/* Use this array to map attribute names to user friendly names. For example, if
+   you don't want to see "facsimileTelephoneNumber" but rather "Fax". */
+$friendly_attrs = array();
+
+$friendly_attrs['facsimileTelephoneNumber'] = 'Fax';
+$friendly_attrs['telephoneNumber']          = 'Phone';
+
+/*********************************************/
+/* Support for attrs display order           */
+/*********************************************/
+
+/* Use this array if you want to have your attributes displayed in a specific
+   order. You can use default attribute names or their fridenly names.
+   For example, "sn" will be displayed right after "givenName". All the other
+   attributes that are not specified in this array will be displayed after in
+   alphabetical order. */
+#  $attrs_display_order = array(
+#   'givenName',
+#   'sn',
+#   'cn',
+#   'displayName',
+#   'uid',
+#   'uidNumber',
+#   'gidNumber',
+#   'homeDirectory',
+#   'mail',
+#   'userPassword'
+#  );
+
+/*********************************************/
+/* Hidden attributes                         */
+/*********************************************/
+
+/* You may want to hide certain attributes from being displayed in the editor
+   screen. Do this by adding the desired attributes to this list (and uncomment
+   it). This only affects the editor screen. Attributes will still be visible in
+   the schema browser and elsewhere. An example is provided below:
+   NOTE: The user must be able to read the hidden_except_dn entry to be
+   excluded. */
+#  $hidden_attrs = array( 'jpegPhoto', 'objectClass' );
+#  $hidden_except_dn = "cn=PLA UnHide,ou=Groups,c=AU";
+
+/* Hidden attributes in read-only mode. If undefined, it will be equal to
+   $hidden_attrs. */
+#  $hidden_attrs_ro = array(
+#   'objectClass','shadowWarning', 'shadowLastChange', 'shadowMax',
+#   'shadowFlag', 'shadowInactive', 'shadowMin', 'shadowExpire');
+
+/**                                         **/
+/** Read-only attributes                    **/
+/**                                         **/
+
+/* You may want to phpLDAPadmin to display certain attributes as read only,
+   meaning that users will not be presented a form for modifying those
+   attributes, and they will not be allowed to be modified on the "back-end"
+   either. You may configure this list here:
+   NOTE: The user must be able to read the read_only_except_dn entry to be
+   excluded. */
+#  $read_only_attrs = array( 'objectClass' );
+#  $read_only_except_dn = "cn=PLA ReadWrite,ou=Groups,c=AU";
+
+/* An example of how to specify multiple read-only attributes: */
+#  $read_only_attrs = array( 'jpegPhoto', 'objectClass', 'someAttribute' );
+
+/*********************************************/
+/* Unique attributes                         */
+/*********************************************/
+
+/* You may want phpLDAPadmin to enforce some attributes to have unique values
+   (ie: not belong to other entries in your tree. This (together with
+   unique_attrs['dn'] and unique_attrs['pass'] option will not let updates to
+   occur with other attributes have the same value.
+   NOTE: Currently the unique_attrs is NOT enforced when copying a dn. (Need to
+   present a user with the option of changing the unique attributes. */
+#  $unique_attrs = array('uid','uidNumber','mail');
+
+/*********************************************/
+/* Predefined Queries (canned views)         */
+/*********************************************/
+
+/* To make searching easier, you may setup predefined queries below: */
+$q=0;
+$queries = array();
+
+/* The name that will appear in the simple search form */
+$queries[$q]['name'] = 'User List';
+
+/* The base to search on */
+$queries[$q]['base'] = 'dc=example,dc=com';
+
+/* The search scope (sub, base, one) */
+$queries[$q]['scope'] = 'sub';
+
+/* The LDAP filter to use */
+$queries[$q]['filter'] = '(&(objectClass=posixAccount)(uid=*))';
+
+/* The attributes to return */
+$queries[$q]['attributes'] = 'cn, uid, homeDirectory, telephonenumber, jpegphoto';
+
+/* If you want to configure more pre-defined queries, copy and paste the above (including the "$q++;") */
+$q++;
+$queries[$q]['name'] = 'Samba Users';
+$queries[$q]['base'] = 'dc=example,dc=com';
+$queries[$q]['scope'] = 'sub';
+$queries[$q]['filter'] = '(&(|(objectClass=sambaAccount)(objectClass=sambaSamAccount))(objectClass=posixAccount)(!(uid=*$)))';
+$queries[$q]['attributes'] = 'uid, smbHome, uidNumber';
+
+$q++;
+$queries[$q]['name'] = 'Samba Computers';
+$queries[$q]['base'] = 'dc=example,dc=com';
+$queries[$q]['scope'] = 'sub';
+$queries[$q]['filter'] = '(&(objectClass=sambaAccount)(uid=*$))';
+$queries[$q]['attributes'] = 'uid, homeDirectory';
+?>
diff --git a/pla/doc/README-translation.txt b/pla/doc/README-translation.txt
new file mode 100644 (file)
index 0000000..8c4cc33
--- /dev/null
@@ -0,0 +1,2 @@
+Please see http://wiki.phpldapadmin.info/Translating now for information on
+translating PLA.
diff --git a/pla/doc/pla-test-i18n.ldif b/pla/doc/pla-test-i18n.ldif
new file mode 100644 (file)
index 0000000..b094593
--- /dev/null
@@ -0,0 +1,67 @@
+# $Header: /cvsroot/phpldapadmin/phpldapadmin/doc/pla-test-i18n.ldif,v 1.4 2004/03/19 20:22:54 i18phpldapadmin Exp $
+# This is a Test-File for characters / encoding
+# 1. Change the
+#      ,dc=example,dc=com
+#    to avalue for your organisation
+# 2. Import it with phpldapadmin
+#
+# pla-i18n, example.com
+#
+dn: ou=pla-i18n,dc=example,dc=com
+ou: pla-i18n
+objectClass: top
+objectClass: organizationalUnit
+
+# pl, pla-i18n, example.com
+dn: ou=pl,ou=pla-i18n,dc=example,dc=com
+description:: IGRvcMOza2k=
+description:: xITFu8WaxbnEhsWDxYHDk8SYIMSFxbzFm8W6xIfFhMWCw7PEmQ==
+description:: V3NrYXrDs3drYQ==
+objectClass: top
+objectClass: organizationalUnit
+ou: pl
+
+# ru, pla-i18n, example.com
+dn: ou=ru,ou=pla-i18n,dc=example,dc=com
+description:: 0LfQstGD0YfQuNGCINC/0L7QtNC+0LHQvdC+
+description:: 0J/RgNC+0YHRgtCw0Y8g0YTQvtGA0LzQsCDQv9C+0LjRgdC6
+objectClass: top
+objectClass: organizationalUnit
+ou: ru
+
+# jp, pla-i18n, example.com
+dn: ou=jp,ou=pla-i18n,dc=example,dc=com
+ou: jp
+objectClass: top
+objectClass: organizationalUnit
+description:: SVNPLTIwMjItSlDjga7lpJrlm73nsY3oqIDoqp7jgbjjga7mi6HlvLXmgKc=
+
+# pt-br, pla-i18n, example.com
+dn: ou=pt-br,ou=pla-i18n,dc=example,dc=com
+ou: pt-br
+objectClass: top
+objectClass: organizationalUnit
+description:: VmVyIGFzIHJlcXVpc2nDp8O1ZXMgZW0gYWJlcnRv
+
+# de, pla-i18n, example.com
+dn: ou=de,ou=pla-i18n,dc=example,dc=com
+ou: de
+objectClass: top
+objectClass: organizationalUnit
+description:: U29uZGVyemVpY2hlbiDDtsOkw7zDnyDDlsOEw5w=
+description:: w5bDliDDnMOcIMOEw4Q=
+
+# sv, pla-i18n, example.com
+dn: ou=sv,ou=pla-i18n,dc=example,dc=com
+ou: sv
+objectClass: top
+objectClass: organizationalUnit
+description:: U8O2a29tZsOlbmc=
+description:: bMOldGVyIHNvbQ==
+
+# ca, pla-i18n, example.com
+dn: ou=ca,ou=pla-i18n,dc=example,dc=com
+ou: ca
+objectClass: top
+objectClass: organizationalUnit
+description:: RXMgdGluZHLDoSBxdWUgY29uZmlybWFyIGFxdWVzdGEgZGVjaXNpw7M=
diff --git a/pla/htdocs/add_attr.php b/pla/htdocs/add_attr.php
new file mode 100644 (file)
index 0000000..c8e9aa1
--- /dev/null
@@ -0,0 +1,167 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/add_attr.php,v 1.18.2.7 2005/12/09 23:32:37 wurley Exp $
+
+/**
+ * Adds an attribute/value pair to an object
+ *
+ * Variables that come in via common.php
+ *  - server_id
+ * Variables that come in as POST vars:
+ *  - dn
+ *  - attr
+ *  - val
+ *  - binary
+ *
+ * @package phpLDAPadmin
+ * @todo: For boolean attributes, convert the response to TRUE/FALSE.
+ */
+/**
+ */
+
+require './common.php';
+
+if( $ldapserver->isReadOnly() )
+       pla_error( _('You cannot perform updates while server is in read-only mode') );
+if( ! $ldapserver->haveAuthInfo())
+       pla_error( _('Not enough information to login to server. Please check your configuration.') );
+
+$attr = $_POST['attr'];
+$val  = isset( $_POST['val'] ) ? $_POST['val'] : false;;
+$dn = $_POST['dn'] ;
+$is_binary_val = isset( $_POST['binary'] ) ? true : false;
+
+$encoded_dn = rawurlencode( $dn );
+$encoded_attr = rawurlencode( $attr );
+
+if( ! $is_binary_val && $val == "" ) {
+       pla_error( _('You left the attribute value blank. Please go back and try again.') );
+}
+
+// special case for binary attributes (like jpegPhoto and userCertificate):
+// we must go read the data from the file and override $val with the binary data
+// Secondly, we must check if the ";binary" option has to be appended to the name
+// of the attribute.
+
+// Check to see if this is a unique Attribute
+if ($badattr = $ldapserver->checkUniqueAttr($dn,$attr,array($val))) {
+       $search_href = sprintf('search.php?search=true&form=advanced&server_id=%s&filter=%s=%s',$ldapserver->server_id,$attr,$badattr);
+       pla_error(sprintf( _('Your attempt to add <b>%s</b> (<i>%s</i>) to <br><b>%s</b><br> is NOT allowed. That attribute/value belongs to another entry.<p>You might like to <a href=\'%s\'>search</a> for that entry.'),$attr,$badattr,$dn,$search_href ) );
+}
+
+if( $is_binary_val ) {
+       if( 0 == $_FILES['val']['size'] )
+               pla_error( _('The file you chose is either empty or does not exist. Please go back and try again.') );
+
+       if( ! is_uploaded_file( $_FILES['val']['tmp_name'] ) ) {
+
+               if( isset( $_FILES['val']['error'] ) )
+
+                       switch($_FILES['val']['error']) {
+                               case 0: //no error; possible file attack!
+                                       pla_error( _('Security error: The file being uploaded may be malicious.') );
+                                       break;
+
+                               case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini
+                                       pla_error( _('The file you uploaded is too large. Please check php.ini, upload_max_size setting') );
+                                       break;
+
+                               case 2: //uploaded file exceeds the MAX_FILE_SIZE directive specified in the html form
+                                       pla_error( _('The file you uploaded is too large. Please check php.ini, upload_max_size setting') );
+                                       break;
+
+                               case 3: //uploaded file was only partially uploaded
+                                       pla_error( _('The file you selected was only partially uploaded, likley due to a network error.') );
+                                       break;
+
+                               case 4: //no file was uploaded
+                                       pla_error( _('You left the attribute value blank. Please go back and try again.') );
+                                       break;
+
+                               default: //a default error, just in case!  :)
+                                       pla_error( _('Security error: The file being uploaded may be malicious.') );
+                                       break;
+                       }
+
+               else
+                       pla_error( _('Security error: The file being uploaded may be malicious.') );
+       }
+
+       $file = $_FILES['val']['tmp_name'];
+       $f = fopen( $file, 'r' );
+       $binary_data = fread( $f, filesize( $file ) );
+       fclose( $f );
+
+       $val = $binary_data;
+
+       if( is_binary_option_required( $ldapserver, $attr ) )
+               $attr .= ";binary";
+}
+
+/* Automagically hash new userPassword attributes according to the
+   chosen in config.php. */
+if( 0 == strcasecmp( $attr, 'userpassword' ) ) {
+       if (trim($ldapserver->default_hash) != '' ) {
+               $enc_type = $ldapserver->default_hash;
+               $val = password_hash( $val, $enc_type );
+       }
+}
+
+elseif (strcasecmp($attr,'sambaNTPassword') == 0) {
+       $sambapassword = new smbHash;
+       $val = $sambapassword->nthash($val);
+}
+
+elseif (strcasecmp($attr,'sambaLMPassword') == 0) {
+       $sambapassword = new smbHash;
+       $val = $sambapassword->lmhash($val);
+}
+
+$new_entry = array( $attr => $val );
+$result = $ldapserver->attrModify($dn,$new_entry);
+
+if ($result)
+       header(sprintf('Location: template_engine.php?server_id=%s&dn=%s&modified_attrs[]=%s',
+               $ldapserver->server_id,$encoded_dn,$encoded_attr));
+
+else
+       pla_error( _('Failed to add the attribute.'),$ldapserver->error(),$ldapserver->errno() );
+
+/**
+ * Check if we need to append the ;binary option to the name
+ * of some binary attribute
+ *
+ * @param object $ldapserver Server Object that the attribute is in.
+ * @param attr $attr Attribute to test to see if it requires ;binary added to it.
+ * @return bool
+ */
+
+function is_binary_option_required( $ldapserver, $attr ) {
+
+       // list of the binary attributes which need the ";binary" option
+       $binary_attributes_with_options = array(
+               // Superior: Ldapv3 Syntaxes (1.3.6.1.4.1.1466.115.121.1)
+               '1.3.6.1.4.1.1466.115.121.1.8' => "userCertificate",
+               '1.3.6.1.4.1.1466.115.121.1.8' => "caCertificate",
+               '1.3.6.1.4.1.1466.115.121.1.10' => "crossCertificatePair",
+               '1.3.6.1.4.1.1466.115.121.1.9' => "certificateRevocationList",
+               '1.3.6.1.4.1.1466.115.121.1.9' => "authorityRevocationList",
+               // Superior: Netscape Ldap attributes types (2.16.840.1.113730.3.1)
+               '2.16.840.1.113730.3.1.40'      =>  "userSMIMECertificate"
+       );
+
+       // quick check by attr name (short circuits the schema check if possible)
+       //foreach( $binary_attributes_with_options as $oid => $name )
+       //if( 0 == strcasecmp( $attr, $name ) )
+        //return true;
+
+       $schema_attr = $ldapserver->getSchemaAttribute($attr);
+       if( ! $schema_attr )
+               return false;
+
+       $syntax = $schema_attr->getSyntaxOID();
+       if( isset( $binary_attributes_with_options[ $syntax ] ) )
+               return true;
+
+       return false;
+}
+?>
diff --git a/pla/htdocs/add_attr_form.php b/pla/htdocs/add_attr_form.php
new file mode 100644 (file)
index 0000000..a1fc5e2
--- /dev/null
@@ -0,0 +1,197 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/add_attr_form.php,v 1.13.2.2 2005/12/09 14:27:32 wurley Exp $
+
+/**
+ * Displays a form for adding an attribute/value to an LDAP entry.
+ *
+ * Variables that come in via common.php
+ *  - server_id
+ * Variables that come in as GET vars:
+ *  - dn (rawurlencoded)
+ *
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+
+if( $ldapserver->isReadOnly() )
+       pla_error( _('You cannot perform updates while server is in read-only mode') );
+if( ! $ldapserver->haveAuthInfo())
+       pla_error( _('Not enough information to login to server. Please check your configuration.') );
+
+$dn = $_GET['dn'];
+$encoded_dn = rawurlencode( $dn );
+$rdn = get_rdn( $dn );
+
+$friendly_attrs = process_friendly_attr_table();
+
+include './header.php'; ?>
+
+<body>
+
+<h3 class="title"><?php echo sprintf( _('Add new attribute'), htmlspecialchars( $rdn ) ); ?></b></h3>
+<h3 class="subtitle"><?php echo _('Server'); ?>: <b><?php echo $ldapserver->name; ?></b> &nbsp;&nbsp;&nbsp; <?php echo _('Distinguished Name'); ?>: <b><?php echo htmlspecialchars( ( $dn ) ); ?></b></h3>
+
+<?php $attrs = $ldapserver->getDNAttrs($dn);
+
+$oclasses = $ldapserver->getDNAttr($dn,'objectClass');
+if( ! is_array( $oclasses ) )
+       $oclasses = array( $oclasses );
+
+$avail_attrs = array();
+
+$schema_oclasses = $ldapserver->SchemaObjectClasses($dn);
+foreach( $oclasses as $oclass ) {
+       $schema_oclass = $ldapserver->getSchemaObjectClass($oclass,$dn);
+
+       if( $schema_oclass && 0 == strcasecmp( 'objectclass', get_class( $schema_oclass ) ) )
+               $avail_attrs = array_merge( $schema_oclass->getMustAttrNames( $schema_oclasses ),
+                       $schema_oclass->getMayAttrNames( $schema_oclasses ),
+                       $avail_attrs );
+}
+
+$avail_attrs = array_unique( $avail_attrs );
+$avail_attrs = array_filter( $avail_attrs, "not_an_attr" );
+sort( $avail_attrs );
+
+$avail_binary_attrs = array();
+foreach( $avail_attrs as $i => $attr ) {
+
+       if ($ldapserver->isAttrBinary($attr)) {
+               $avail_binary_attrs[] = $attr;
+               unset( $avail_attrs[ $i ] );
+       }
+}
+?>
+
+<br />
+
+<center>
+
+<?php echo _('Add new attribute');
+
+if( is_array( $avail_attrs ) && count( $avail_attrs ) > 0 ) { ?>
+
+       <br />
+       <br />
+
+       <form action="add_attr.php" method="post">
+       <input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
+       <input type="hidden" name="dn" value="<?php echo htmlspecialchars($dn); ?>" />
+
+       <select name="attr">
+
+       <?php $attr_select_html = '';
+       usort($avail_attrs,"sortAttrs");
+       foreach( $avail_attrs as $a ) {
+
+               // is there a user-friendly translation available for this attribute?
+               if( isset( $friendly_attrs[ strtolower( $a ) ] ) ) {
+                       $attr_display = htmlspecialchars( $friendly_attrs[ strtolower( $a ) ] ) . " (" .
+                               htmlspecialchars($a) . ")";
+
+               } else {
+                       $attr_display = htmlspecialchars( $a );
+               }
+
+               echo $attr_display;
+               $attr_select_html .= "<option>$attr_display</option>\n";
+               echo "<option value=\"" . htmlspecialchars($a) . "\">$attr_display</option>";
+       } ?>
+
+       </select>
+
+       <input type="text" name="val" size="20" />
+       <input type="submit" name="submit" value="<?php echo _('Add'); ?>" class="update_dn" />
+       </form>
+
+<?php } else { ?>
+
+       <br />
+       <br />
+       <small>(<?php echo _('no new attributes available for this entry'); ?>)</small>
+       <br />
+       <br />
+
+<?php } ?>
+
+<?php echo _('Add new binary attribute');
+if( count( $avail_binary_attrs ) > 0 ) { ?>
+
+       <!-- Form to add a new BINARY attribute to this entry -->
+       <form action="add_attr.php" method="post" enctype="multipart/form-data">
+       <input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
+       <input type="hidden" name="dn" value="<?php echo $dn; ?>" />
+       <input type="hidden" name="binary" value="true" />
+       <br />
+
+       <select name="attr">
+
+       <?php $attr_select_html = '';
+
+       usort($avail_binary_attrs,"sortAttrs");
+
+       foreach( $avail_binary_attrs as $a ) {
+
+               // is there a user-friendly translation available for this attribute?
+               if( isset( $friendly_attrs[ strtolower( $a ) ] ) ) {
+                       $attr_display = htmlspecialchars( $friendly_attrs[ strtolower( $a ) ] ) . " (" .
+                               htmlspecialchars($a) . ")";
+
+               } else {
+                       $attr_display = htmlspecialchars( $a );
+               }
+
+               echo $attr_display;
+               $attr_select_html .= "<option>$attr_display</option>\n";
+               echo "<option value=\"" . htmlspecialchars($a) . "\">$attr_display</option>";
+       } ?>
+
+       </select>
+
+       <input type="file" name="val" size="20" />
+       <input type="submit" name="submit" value="<?php echo _('Add'); ?>" class="update_dn" />
+
+       <?php if( ! ini_get( 'file_uploads' ) )
+               echo "<br><small><b>" . _('Your PHP configuration has disabled file uploads. Please check php.ini before proceeding.') . "</b></small><br>";
+
+       else
+               echo "<br><small><b>" . sprintf( _('Maximum file size: %s'), ini_get( 'upload_max_filesize' ) ) . "</b></small><br>";
+       ?>
+
+       </form>
+
+<?php } else { ?>
+
+       <br />
+       <br />
+       <small>(<?php echo _('no new binary attributes available for this entry'); ?>)</small>
+
+<?php } ?>
+
+</center>
+</body>
+</html>
+
+<?php
+
+/**
+ * Given an attribute $x, this returns true if it is NOT already specified
+ * in the current entry, returns false otherwise.
+ *
+ * @param attr $x
+ * @return bool
+ * @ignore
+ */
+function not_an_attr( $x ) {
+       global $attrs;
+
+       //return ! isset( $attrs[ strtolower( $x ) ] );
+       foreach( $attrs as $attr => $values )
+               if( 0 == strcasecmp( $attr, $x ) )
+                       return false;
+       return true;
+}
+?>
diff --git a/pla/htdocs/add_oclass.php b/pla/htdocs/add_oclass.php
new file mode 100644 (file)
index 0000000..4069d81
--- /dev/null
@@ -0,0 +1,64 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/add_oclass.php,v 1.17.2.5 2005/12/09 23:32:37 wurley Exp $
+
+/**
+ * Adds an objectClass to the specified dn.
+ *
+ * Note, this does not do any schema violation checking. That is
+ * performed in add_oclass_form.php.
+ *
+ * Variables that come in via common.php
+ *  - server_id
+ * Variables that come in as POST vars:
+ *  - dn (rawurlencoded)
+ *  - new_oclass
+ *  - new_attrs (array, if any)
+ *
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+
+if( $ldapserver->isReadOnly() )
+       pla_error( _('You cannot perform updates while server is in read-only mode') );
+if( ! $ldapserver->haveAuthInfo())
+       pla_error( _('Not enough information to login to server. Please check your configuration.') );
+
+$dn = rawurldecode( $_POST['dn'] );
+$new_oclass = unserialize( rawurldecode( $_POST['new_oclass'] ) );
+$new_attrs = $_POST['new_attrs'];
+
+$encoded_dn = rawurlencode( $dn );
+
+if ($ldapserver->isAttrReadOnly('objectClass'))
+       pla_error( "ObjectClasses are flagged as read only in the phpLDAPadmin configuration." );
+
+$new_entry = array();
+$new_entry['objectClass'] = $new_oclass;
+
+$new_attrs_entry = array();
+$new_oclass_entry = array( 'objectClass' => $new_oclass );
+
+if( is_array( $new_attrs ) && count( $new_attrs ) > 0 )
+       foreach( $new_attrs as $attr => $val ) {
+
+               // Check to see if this is a unique Attribute
+               if ($badattr = $ldapserver->checkUniqueAttr($dn,$attr,array($val))) {
+                       $search_href = sprintf('search.php?search=true&form=advanced&server_id=%s&filter=%s=%s',
+                               $ldapserver->server_id,$attr,$badattr);
+                       pla_error(sprintf( _('Your attempt to add <b>%s</b> (<i>%s</i>) to <br><b>%s</b><br> is NOT allowed. That attribute/value belongs to another entry.<p>You might like to <a href=\'%s\'>search</a> for that entry.'),$attr,$badattr,$dn,$search_href ) );
+               }
+
+               $new_entry[ $attr ] = $val;
+       }
+
+$add_res = $ldapserver->attrModify($dn,$new_entry);
+
+if (! $add_res)
+       pla_error(_('Could not perform ldap_mod_add operation.'),$ldapserver->error(),$ldapserver->errno());
+
+else
+       header(sprintf('Location: template_engine.php?server_id=%s&dn=%s&modified_attrs[]=objectclass',$ldapserver->server_id,$encoded_dn));
+?>
diff --git a/pla/htdocs/add_oclass_form.php b/pla/htdocs/add_oclass_form.php
new file mode 100644 (file)
index 0000000..1a890eb
--- /dev/null
@@ -0,0 +1,137 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/add_oclass_form.php,v 1.23.2.6 2005/12/09 23:32:37 wurley Exp $
+
+/**
+ * This page may simply add the objectClass and take you back to the edit page,
+ * but, in one condition it may prompt the user for input. That condition is this:
+ *
+ *    If the user has requested to add an objectClass that requires a set of
+ *    attributes with 1 or more not defined by the object. In that case, we will
+ *    present a form for the user to add those attributes to the object.
+ *
+ * Variables that come in via common.php
+ *  - server_id
+ * Variables that come in as REQUEST vars:
+ *  - dn (rawurlencoded)
+ *  - new_oclass
+ *
+ * @package phpLDAPadmin
+ * @todo If an attribute expects a DN, show the dn browser.
+ */
+/**
+ */
+require './common.php';
+
+if( $ldapserver->isReadOnly() )
+       pla_error( _('You cannot perform updates while server is in read-only mode') );
+if( ! $ldapserver->haveAuthInfo())
+       pla_error( _('Not enough information to login to server. Please check your configuration.') );
+
+if (! isset($_REQUEST['new_oclass']))
+        pla_error( _('You did not select any ObjectClasses for this object. Please go back and do so.'));
+
+$new_oclass = $_REQUEST['new_oclass'];
+$dn = rawurldecode( $_REQUEST['dn'] );
+$encoded_dn = rawurlencode( $dn );
+
+/* Ensure that the object has defined all MUST attrs for this objectClass.
+ * If it hasn't, present a form to have the user enter values for all the
+ * newly required attrs. */
+
+$entry = $ldapserver->getDNAttrs($dn,true);
+
+$current_attrs = array();
+foreach( $entry as $attr => $junk )
+       $current_attrs[] = strtolower($attr);
+
+// grab the required attributes for the new objectClass
+$schema_oclasses = $ldapserver->SchemaObjectClasses();
+$must_attrs = array();
+foreach( $new_oclass as $oclass_name ) {
+       $oclass = $ldapserver->getSchemaObjectClass($oclass_name);
+       if( $oclass )
+               $must_attrs = array_merge( $must_attrs, $oclass->getMustAttrNames( $schema_oclasses ) );
+}
+$must_attrs = array_unique( $must_attrs );
+
+// We don't want any of the attr meta-data, just the string
+//foreach( $must_attrs as $i => $attr )
+       //$must_attrs[$i] = $attr->getName();
+
+// build a list of the attributes that this new objectClass requires,
+// but that the object does not currently contain
+$needed_attrs = array();
+foreach( $must_attrs as $attr ) {
+       $attr = $ldapserver->getSchemaAttribute($attr);
+
+       //echo "<pre>"; var_dump( $attr ); echo "</pre>";
+
+       // First, check if one of this attr's aliases is already an attribute of this entry
+       foreach( $attr->getAliases() as $alias_attr_name )
+               if( in_array( strtolower( $alias_attr_name ), $current_attrs ) )
+
+               // Skip this attribute since it's already in the entry
+                       continue;
+
+       if( in_array( strtolower($attr->getName()), $current_attrs ) )
+               continue;
+
+       // We made it this far, so the attribute needs to be added to this entry in order
+       // to add this objectClass
+       $needed_attrs[] = $attr;
+}
+
+if( count( $needed_attrs ) > 0 ) {
+       include './header.php'; ?>
+       <body>
+
+       <h3 class="title"><?php echo _('New Required Attributes'); ?></h3>
+       <h3 class="subtitle"><?php echo _('This action requires you to add') . ' ' . count($needed_attrs) .
+               ' ' . _('new attributes'); ?></h3>
+
+       <small>
+
+       <?php echo _('Instructions: In order to add these objectClass(es) to this entry, you must specify');
+       echo ' ' . count( $needed_attrs ) . ' ' . _('new attributes') . ' ';
+       echo _('that this objectClass requires. You can do so in this form.'); ?>
+
+       </small>
+
+       <br />
+       <br />
+
+       <form action="add_oclass.php" method="post">
+       <input type="hidden" name="new_oclass" value="<?php echo rawurlencode( serialize( $new_oclass ) ); ?>" />
+       <input type="hidden" name="dn" value="<?php echo $encoded_dn; ?>" />
+       <input type="hidden" name="server_id" value="<?php echo $ldapserver->server_id; ?>" />
+
+       <table class="edit_dn" cellspacing="0">
+       <tr><th colspan="2"><?php echo _('New Required Attributes'); ?></th></tr>
+
+       <?php foreach( $needed_attrs as $count => $attr ) { ?>
+
+        <tr><td class="attr"><b><?php echo htmlspecialchars($attr->getName()); ?></b></td></tr>
+       <tr><td class="val"><input type="text" name="new_attrs[<?php echo htmlspecialchars($attr->getName()); ?>]" value="" size="40" /></tr>
+       <?php } ?>
+
+       </table>
+       <br />
+       <br />
+       <center><input type="submit" value="<?php echo _('Add ObjectClass and Attributes'); ?>" /></center>
+       </form>
+
+       </body>
+       </html>
+
+<?php } else {
+
+       $add_res = $ldapserver->attrModify($dn,array('objectClass'=>$new_oclass));
+       if (! $add_res)
+               pla_error("Could not perform ldap_mod_add operation.",
+                         $ldapserver->error(),$ldapserver->errno());
+       else
+               header(sprintf('Location: template_engine.php?server_id=%s&dn=%s&modified_attrs[]=objectClass',
+                       $ldapserver->server_id,$encoded_dn));
+
+}
+?>
diff --git a/pla/htdocs/add_value.php b/pla/htdocs/add_value.php
new file mode 100644 (file)
index 0000000..a01b58c
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/add_value.php,v 1.19.2.5 2005/12/09 23:32:37 wurley Exp $
+
+/**
+ * Adds a value to an attribute for a given dn.
+ *
+ * Variables that come in via common.php
+ *  - server_id
+ * Variables that come in as POST vars:
+ *  - dn (rawurlencoded)
+ *  - attr (rawurlencoded) the attribute to which we are adding a value
+ *  - new_value (form element)
+ *  - binary
+ *
+ * On success, redirect to the edit_dn page. On failure, echo an error.
+ *
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+
+if( $ldapserver->isReadOnly() )
+       pla_error( _('You cannot perform updates while server is in read-only mode') );
+if( ! $ldapserver->haveAuthInfo())
+       pla_error( _('Not enough information to login to server. Please check your configuration.') );
+
+$attr = $_POST['attr'];
+$new_value = $_POST['new_value'];
+$dn = rawurldecode( $_POST['dn'] );
+$is_binary_val = isset( $_POST['binary'] ) ? true : false;
+
+$encoded_dn = rawurlencode( $dn );
+$encoded_attr = rawurlencode( $attr );
+
+if ($ldapserver->isAttrReadOnly($attr))
+       pla_error(sprintf(_('The attribute "%s" is flagged as read-only in the phpLDAPadmin configuration.'),htmlspecialchars( $attr )));
+
+// special case for binary attributes:
+// we must go read the data from the file.
+if( $is_binary_val ) {
+       $file = $_FILES['new_value']['tmp_name'];
+
+       $f = fopen( $file, 'r' );
+       $binary_value = fread( $f, filesize( $file ) );
+       fclose( $f );
+
+       $new_value = $binary_value;
+}
+
+$new_entry = array( $attr => $new_value );
+
+// Check to see if this is a unique Attribute
+if ($badattr = $ldapserver->checkUniqueAttr($dn,$attr,$new_entry)) {
+       $search_href = sprintf('search.php?search=true&form=advanced&server_id=%s&filter=%s=%s',$ldapserver->server_id,$attr,$badattr);
+       pla_error(sprintf( _('Your attempt to add <b>%s</b> (<i>%s</i>) to <br><b>%s</b><br> is NOT allowed. That attribute/value belongs to another entry.<p>You might like to <a href=\'%s\'>search</a> for that entry.'),$attr,$badattr,$dn,$search_href ) );
+}
+
+// Call the custom callback for each attribute modification
+// and verify that it should be modified.
+if( run_hook ( 'pre_attr_add', array ( 'server_id' => $ldapserver->server_id, 'dn' => $dn, 'attr_name' => $attr,
+       'new_value' => $new_entry ) ) ) {
+
+       $add_result = $ldapserver->attrModify($dn,$new_entry);
+
+       if (! $add_result)
+               pla_error(_('Could not perform ldap_mod_add operation.'),
+                         $ldapserver->error(),$ldapserver->errno());
+}
+
+header(sprintf('Location: template_engine.php?server_id=%s&dn=%s&modified_attrs[]=%s',
+       $ldapserver->server_id,$encoded_dn,$encoded_attr));
+?>
diff --git a/pla/htdocs/add_value_form.php b/pla/htdocs/add_value_form.php
new file mode 100644 (file)
index 0000000..2cb4b44
--- /dev/null
@@ -0,0 +1,205 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/add_value_form.php,v 1.34.2.5 2007/01/27 12:51:47 wurley Exp $
+
+/**
+ * Displays a form to allow the user to enter a new value to add
+ * to the existing list of values for a multi-valued attribute.
+ *
+ * Variables that come in via common.php
+ *  - server_id
+ * Variables that come in as GET vars:
+ *  - dn (rawurlencoded)
+ *  - attr (rawurlencoded) the attribute to which we are adding a value
+ *
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+
+if ($ldapserver->isReadOnly())
+       pla_error(_('You cannot perform updates while server is in read-only mode'));
+if (! $ldapserver->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+$attr = $_GET['attr'];
+$dn = isset($_GET['dn']) ? $_GET['dn'] : null;
+$encoded_dn = rawurlencode($dn);
+$encoded_attr = rawurlencode($attr);
+
+if (! is_null($dn))
+       $rdn = get_rdn($dn);
+else
+       $rdn = null;
+
+$current_values = $ldapserver->getDNAttr($dn,$attr);
+if ($current_values) {
+       if (! is_array($current_values))
+               $current_values = array($current_values);
+
+       $num_current_values = count($current_values);
+
+} else {
+       $current_values = array();
+       $num_current_values = 0;
+}
+
+$is_object_class = (strcasecmp($attr, 'objectClass') == 0) ? true : false;
+
+if ($is_object_class) {
+       # fetch all available objectClasses and remove those from the list that are already defined in the entry
+       $schema_oclasses = $ldapserver->SchemaObjectClasses();
+
+       foreach($current_values as $oclass)
+               unset($schema_oclasses[strtolower($oclass)]);
+
+} else {
+       $schema_attr = $ldapserver->getSchemaAttribute($attr);
+}
+
+include './header.php';
+
+echo '<body>';
+printf('<h3 class="title">%s <b>%s</b> %s <b>%s</b></h3>',
+       _('Add new'),htmlspecialchars($attr),_('value to'),htmlspecialchars($rdn));
+printf('<h3 class="subtitle">%s <b>%s</b> &nbsp;&nbsp;&nbsp; %s: <b>%s</b></h3>',
+       _('Server'),$ldapserver->name,_('Distinguished Name'),htmlspecialchars($dn));
+
+printf('%s <b>%s</b> %s <b>%s</b>:',
+       _('Current list of'),$num_current_values,_('values for attribute'),htmlspecialchars($attr));
+
+if ($num_current_values) {
+       if ($ldapserver->isJpegPhoto($attr)) {
+
+       echo '<table><tr><td>';
+       draw_jpeg_photos($ldapserver, $dn, $attr, false);
+       echo '</td></tr></table>';
+
+       # <!-- Temporary warning until we find a way to add jpegPhoto values without an INAPROPRIATE_MATCHING error -->
+       printf('<p><small>%s</small></p>',
+               _('Note: You will get an "inappropriate matching" error if you have not setup an EQUALITY rule on your LDAP server for this attribute.'));
+       # <!-- End of temporary warning -->
+
+       } elseif ($ldapserver->isAttrBinary($attr)) {
+               echo '<ul>';
+
+               if (is_array($vals)) {
+                       for ($i=1; $i<=count($vals); $i++) {
+                               $href = sprintf('download_binary_attr.php?server_id=%s&amp;dn=%s&amp;attr=%s&amp;value_num=%s',
+                                       $ldapserver->server_id,$encoded_dn,$attr,$i-1);
+
+                               printf('<li><a href="%s"><img src="images/save.png" />%s (%s)</a></li>',
+                                       $href,_('download value'),$i);
+                       }
+
+               } else {
+                       $href = sprintf('download_binary_attr.php?server_id=%s&amp;dn=%s&amp;attr=%s',
+                               $ldapserver->server_id,$encoded_dn,$attr);
+                       printf('<li><a href="%s"><img src="images/save.png" />%s</a></li>',
+                               $href,_('download value'));
+               }
+
+               echo '</ul>';
+               # <!-- Temporary warning until we find a way to add jpegPhoto values without an INAPROPRIATE_MATCHING error -->
+               printf('<p><small>%s</small></p>',
+                       _('Note: You will get an "inappropriate matching" error if you have not setup an EQUALITY rule on your LDAP server for this attribute.'));
+               # <!-- End of temporary warning -->
+
+       } else {
+               echo '<ul class="current_values">';
+
+               if (is_array($current_values)) {
+                       if (strcasecmp($attr,'userPassword') == 0) {
+                               foreach ($current_values as $key => $value) {
+                                       if (obfuscate_password_display(get_enc_type($value)))
+                                               echo '<li><span style="white-space: nowrap;">'.preg_replace('/./','*',$value).'<br /></li>';
+                                       else
+                                               echo '<li><span style="white-space: nowrap;">'.htmlspecialchars($value).'<br /></li>';
+                               }
+
+                       } else {
+                               foreach ($current_values as $val)
+                                       printf('<li><span style="white-space: nowrap;">%s</span></li>',htmlspecialchars($val));
+                       }
+
+               } else {
+                       printf('<li><span style="white-space: nowrap;">%s</span></li>',htmlspecialchars($current_values));
+               }
+
+               echo '</ul>';
+       }
+} else {
+       echo '<br /><br />';
+}
+
+echo _('Enter the value you would like to add:');
+echo '<br /><br />';
+
+if ($is_object_class) {
+       echo '<form action="add_oclass_form.php" method="post" class="new_value">';
+       printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
+       printf('<input type="hidden" name="dn" value="%s" />',$encoded_dn);
+
+       echo '<select name="new_oclass[]" multiple="true" size="15">';
+       foreach ($schema_oclasses as $name => $oclass) {
+               # exclude any structural ones, as they'll only generate an LDAP_OBJECT_CLASS_VIOLATION
+               if ($oclass->getType() == 'structural')
+                       continue; 
+
+               printf('<option value="%s">%s</option>',$oclass->getName(),$oclass->getName());
+       }
+       echo '</select>';
+
+       echo '<br />';
+       printf('<input type="submit" value="%s" />',_('Add new ObjectClass'));
+       echo '<br />';
+
+       if ($config->GetValue('appearance','show_hints'))
+               printf('<small><br /><img src="images/light.png" /><span class="hint">%s</span></small>',
+                       _('Note: You may be required to enter new attributes that these objectClass(es) require'));
+
+} else {
+       echo '<form action="add_value.php" method="post" class="new_value" name="new_value_form">';
+
+       if ($ldapserver->isAttrBinary($attr))
+               echo 'enctype="multipart/form-data"';
+
+       printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
+       printf('<input type="hidden" name="dn" value="%s" />',$encoded_dn);
+       printf('<input type="hidden" name="attr" value="%s" />',$encoded_attr);
+
+       if ($ldapserver->isAttrBinary($attr)) {
+               echo '<input type="file" name="new_value" />';
+               echo '<input type="hidden" name="binary" value="true" />';
+
+       } else {
+               if ($ldapserver->isMultiLineAttr($attr)) {
+                       echo '<textarea name="new_value" rows="3" cols="30"></textarea>';
+               } else {
+                       printf('<input type="text"%s name="new_value" size="40" value="" />',
+                               ($schema_attr->getMaxLength() ? sprintf(' maxlength="%s"',$schema_attr->getMaxLength()) : ''));
+
+                       # draw the "browse" button next to this input box if this attr houses DNs:
+                       if ($ldapserver->isDNAttr($attr))
+                               draw_chooser_link("new_value_form.new_value", false);
+               }
+       }
+
+       printf('<input type="submit" name="submit" value="%s" />',_('Add New Value'));
+       echo '<br />';
+
+       if ($schema_attr->getDescription())
+               printf('<small><b>%s:</b> %s</small><br />',_('Description'),$schema_attr->getDescription());
+
+       if ($schema_attr->getType())
+               printf('<small><b>%s:</b> %s</small><br />',_('Syntax'),$schema_attr->getType());
+
+       if ($schema_attr->getMaxLength())
+               printf('<small><b>%s:</b> %s %s</small><br />',
+                       _('Maximum Length'),number_format($schema_attr->getMaxLength()),_('characters'));
+
+       echo '</form>';
+}
+echo '</body></html>';
+?>
diff --git a/pla/htdocs/collapse.php b/pla/htdocs/collapse.php
new file mode 100644 (file)
index 0000000..70f0259
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/collapse.php,v 1.13.4.2 2007/03/18 03:16:05 wurley Exp $
+
+/**
+ * This script alters the session variable 'tree', collapsing it
+ * at the dn specified in the query string.
+ *
+ * Variables that come in via common.php
+ *  - server_id
+ * Variables that come in as GET vars:
+ *  - dn (rawurlencoded)
+ *
+ * Note: this script is equal and opposite to expand.php
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+
+$dn = $_GET['dn'];
+$tree = get_cached_item($ldapserver->server_id,'tree');
+$tree['browser'][$dn]['open'] = false;
+set_cached_item($ldapserver->server_id,'tree','null',$tree);
+
+/* If cookies were disabled, build the url parameter for the session id.
+   It will be append to the url to be redirect */
+$id_session_param = '';
+if (SID != '')
+       $id_session_param = sprintf('&%s=%s',session_name(),session_id());
+
+header(sprintf('Location:tree.php?foo=%s#%s_%s%s',random_junk(),$ldapserver->server_id,rawurlencode($dn),$id_session_param));
+?>
diff --git a/pla/htdocs/common.php b/pla/htdocs/common.php
new file mode 100644 (file)
index 0000000..38ac4ee
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+# This is a temporary file
+@define('LIBDIR',sprintf('%s/',realpath('../lib/')));
+require LIBDIR.'common.php';
+?>
diff --git a/pla/htdocs/compare.php b/pla/htdocs/compare.php
new file mode 100644 (file)
index 0000000..0831f6e
--- /dev/null
@@ -0,0 +1,588 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/compare.php,v 1.12.2.6 2007/01/27 12:38:59 wurley Exp $
+
+/**
+ * Compare two DNs - the destination DN is editable.
+ * @package phpLDAPadmin
+ */
+/**
+ * @todo: Must fix dc/domainComponent evaluation.
+ */
+
+require './common.php';
+
+$dn_src = isset($_POST['dn_src']) ? $_POST['dn_src'] : null;
+$dn_dst = isset($_POST['dn_dst']) ? $_POST['dn_dst'] : null;
+
+$encoded_dn_src = rawurlencode($dn_src);
+$encoded_dn_dst = rawurlencode($dn_dst);
+
+$server_id_src = (isset($_POST['server_id_src']) ? $_POST['server_id_src'] : '');
+$server_id_dst = (isset($_POST['server_id_dst']) ? $_POST['server_id_dst'] : '');
+
+$ldapserver_src = $ldapservers->Instance($server_id_src);
+if (! $ldapserver_src->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+$ldapserver_dst = $ldapservers->Instance($server_id_dst);
+if (! $ldapserver_src->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+if (! $ldapserver_src->dnExists($dn_src))
+       pla_error(sprintf(_('No such entry: %s'),pretty_print_dn($dn_src)));
+if (! $ldapserver_dst->dnExists($dn_dst))
+       pla_error(sprintf(_('No such entry: %s'),pretty_print_dn($dn_dst)));
+
+$friendly_attrs = process_friendly_attr_table();
+
+$attrs_src = $ldapserver_src->getDNAttrs($dn_src,false,$config->GetValue('deref','view'));
+$attrs_dst = $ldapserver_dst->getDNAttrs($dn_dst,false,$config->GetValue('deref','view'));
+
+# Get a list of all attributes.
+$attrs_all = array_keys($attrs_src);
+foreach ($attrs_dst as $key => $val)
+       if (! in_array($key,$attrs_all))
+               $attrs_all[] = $key;
+
+include './header.php';
+?>
+
+<body>
+
+<table class="comp_dn" border=0>
+       <tr><td colspan=6>
+               <h3 class="title"><?php echo _('Comparing the following DNs'); ?></h3>
+       </td></tr>
+
+       <tr>
+               <td colspan=2 width=20%>
+                       <h3 class="subtitle"><?php echo _('Attribute'); ?><br />&nbsp;</h3>
+               </td>
+               <td colspan=2 width=40%>
+                       <h3 class="subtitle"><?php echo _('Server'); ?>: <b><?php echo $ldapserver_src->name; ?></b><br /><?php echo _('Distinguished Name');?>: <b><?php echo htmlspecialchars(($dn_src)); ?></b></h3>
+               </td>
+               <td colspan=2 width=40%>
+                       <h3 class="subtitle"><?php echo _('Server'); ?>: <b><?php echo $ldapserver_dst->name; ?></b><br /><?php echo _('Distinguished Name');?>: <b><?php echo htmlspecialchars(($dn_dst)); ?></b></h3>
+               </td>
+       </tr>
+       <tr>
+               <td colspan=6 align=right>
+                       <form action="compare.php" method="post" name="compare_form">
+                       <input type="hidden" name="server_id_src" value="<?php echo $ldapserver_dst->server_id; ?>" />
+                       <input type="hidden" name="server_id_dst" value="<?php echo $ldapserver_src->server_id; ?>" />
+                       <input type="hidden" name="dn_src" value="<?php echo htmlspecialchars($dn_dst); ?>" />
+                       <input type="hidden" name="dn_dst" value="<?php echo htmlspecialchars($dn_src); ?>" />
+                       <input type="submit" value="<?php echo _('Switch Entry'); ?>" />
+                       </form>
+               </td>
+       </tr>
+
+<?php
+if (! $attrs_all || ! is_array($attrs_all)) {
+       printf('<tr><td colspan="2">(%s)</td></tr>',_('This entry has no attributes'));
+       print '</table>';
+       print '</html>';
+       die();
+}
+
+sort($attrs_all);
+
+# Work through each of the attributes.
+foreach ($attrs_all as $attr) {
+       flush();
+
+       # If this is the DN, get the next attribute.
+       if (! strcasecmp($attr,'dn'))
+               continue;
+
+       # Has the config.php specified that this attribute is to be hidden or shown?
+       if ($ldapserver_src->isAttrHidden($attr) || $ldapserver_dst->isAttrHidden($attr))
+               continue;
+?>
+
+       <!-- Begin Attribute -->
+       <tr>
+
+       <?php foreach (array('src','dst') as $side) { ?>
+
+               <?php
+               if ($side == 'dst' && ! $ldapserver_dst->isReadOnly()) { ?>
+
+       <form action="update_confirm.php" method="post" name="edit_form">
+       <input type="hidden" name="server_id" value="<?php echo $ldapserver_dst->server_id; ?>" />
+       <input type="hidden" name="dn" value="<?php echo $dn_dst; ?>" />
+
+               <?php }
+
+               $schema_attr_src = $ldapserver_src->getSchemaAttribute($attr,$dn_src);
+               $schema_attr_dst = $ldapserver_dst->getSchemaAttribute($attr,$dn_dst);
+
+               # Setup the $attr_note, which will be displayed to the right of the attr name (if any)
+               $attr_note = '';
+               $required_note = '';
+
+               # is there a user-friendly translation available for this attribute?
+               if (isset($friendly_attrs[strtolower($attr)])) {
+                       $attr_display = $friendly_attrs[strtolower($attr)];
+                       $attr_note = sprintf('<acronym title="%s">alias</acronym>',sprintf(_('Note: \'%s\' is an alias for \'%s\''),$attr_display,$attr));
+
+               } else {
+                       $attr_note = '';
+                       $attr_display = $attr;
+               }
+
+               # is this attribute required by an objectClass?
+               $required_by = '';
+               switch ($side) {
+                       case 'src':
+                               $ldapserver = $ldapserver_src;
+                               if ($schema_attr_src)
+                                       foreach ($schema_attr_src->getRequiredByObjectClasses() as $required)
+                                               if (isset($attrs_src['objectClass']) && in_array(strtolower($required),arrayLower($attrs_src['objectClass'])))
+                                                       $required_by .= $required . ' ';
+
+                               # It seems that some LDAP servers (Domino) returns attributes in lower case?
+                               elseif (isset($attrs_src['objectclass']) && in_array(strtolower($required),arrayLower($attrs_src['objectclass'])))
+                                       $required_by .= $required . ' ';
+
+                               break;
+
+                       case 'dst':
+                               $ldapserver = $ldapserver_dst;
+                               if ($schema_attr_dst)
+                                       foreach ($schema_attr_dst->getRequiredByObjectClasses() as $required)
+                                               if (isset($attrs_dst['objectClass']) && in_array(strtolower($required),arrayLower($attrs_dst['objectClass'])))
+                                                       $required_by .= $required . ' ';
+
+                               # It seems that some LDAP servers (Domino) returns attributes in lower case?
+                               elseif (isset($attrs_dst['objectclass']) && in_array(strtolower($required),arrayLower($attrs_dst['objectclass'])))
+                                       $required_by .= $required . ' ';
+                               break;
+               }
+
+               if ($side == 'src') { ?>
+                       <td class="attr">
+                               <?php $schema_href="schema.php?server_id=$server_id_src&amp;view=attributes&amp;viewvalue=".real_attr_name($attr); ?>
+                               <b><a title="<?php echo sprintf(_('Click to view the schema definition for attribute type \'%s\''),$attr) ?>" href="<?php echo $schema_href; ?>"><?php echo $attr_display; ?></a></b>
+                       </td>
+
+                       <td class="attr_note">
+                               <sup><small><?php echo $attr_note; ?></small></sup>
+                       </td>
+               <?php }
+
+               if ($required_by) {
+                       $required_note .= sprintf('<acronym title="%s">%s</acronym>',sprintf(_('Required attribute for objectClass(es) %s'),$required_by),_('required'));
+               ?>
+                       <td colspan=2 class="attr_note">
+                               <sup><small><?php echo $required_note; ?></small></sup>
+                       </td>
+               <?php } else { ?>
+                       <td colspan=2 class="attr_note">&nbsp;</td>
+               <?php } ?>
+
+               <?php if ($ldapserver->isAttrReadOnly($attr)) { ?>
+                               <small>(<acronym title="<?php echo _('This attribute has been flagged as read only by the phpLDAPadmin administrator'); ?>"><?php echo _('read only'); ?></acronym>)</small>
+               <?php } ?>
+                       </td>
+
+       <?php } ?>
+
+       </tr>
+       <!-- End of Attribute -->
+
+       <!-- Begin Values -->
+       <tr>
+
+       <?php
+       foreach (array('src','dst') as $side) {
+               $vals = null; ?>
+
+
+               <?php
+               # If this attribute isnt set, then show a blank.
+               $toJump = 0;
+               switch ($side) {
+                       case 'src':
+                               print '<td colspan=2>&nbsp</td><td class="attr">';
+
+                               if (! isset($attrs_src[$attr])) {
+                                       echo "<small>&lt;". _('No Value')."&gt;</small></td>";
+                                       $toJump = 1;
+                                       continue;
+                               } else
+                                       $vals = $attrs_src[$attr];
+
+                               $ldapserver = $ldapserver_src;
+                               break;
+
+                       case 'dst':
+                               print '<td colspan=2>&nbsp</td><td class="val">';
+
+                               if (! isset($attrs_dst[$attr])) {
+                                       echo "<small>&lt;". _('No Value')."&gt;</small></td>";
+                                       $toJump = 1;
+                                       continue;
+                               } else
+                                       $vals = $attrs_dst[$attr];
+
+                               $ldapserver = $ldapserver_dst;
+                               break;
+               }
+
+               if ($toJump) continue;
+               if (! is_array($vals))
+                       $vals = array($vals);
+
+               /*
+                * Is this attribute a jpegPhoto?
+                */
+               if ($ldapserver->isJpegPhoto($attr)) {
+
+                       switch ($side) {
+                               case 'src':
+                                       // Don't draw the delete buttons if there is more than one jpegPhoto
+                                       //      (phpLDAPadmin can't handle this case yet)
+                                       draw_jpeg_photos($ldapserver,$dn_src,$attr,false);
+                                       break;
+
+                               case 'dst':
+                                       if ($ldapserver_dst->isReadOnly() || $ldapserver_dst->isAttrReadOnly($attr))
+                                               draw_jpeg_photos($ldapserver,$dn_dst,$attr,false);
+                                       else
+                                               draw_jpeg_photos($ldapserver,$dn_dst,$attr,true);
+
+                                       break;
+                       }
+
+                       // proceed to the next attribute
+                       echo "</td>\n";
+                       continue;
+               }
+
+               /*
+                * Is this attribute binary?
+                */
+               if ($ldapserver->isAttrBinary($attr)) {
+                       switch ($side) {
+                               case 'src':
+                                       $href = sprintf("download_binary_attr.php?server_id=%s&dn=%s&attr=%s",$ldapserver->server_id,$encoded_dn_src,$attr);
+                                       break;
+
+                               case 'dst':
+                                       $href = sprintf("download_binary_attr.php?server_id=%s&dn=%s&attr=%s",$ldapserver->server_id,$encoded_dn_dst,$attr);
+                                       break;
+                       }
+                       ?>
+
+                       <small>
+
+                       <?php echo _('Binary value'); ?><br />
+
+                       <?php if (count($vals) > 1) { for($i=1; $i<=count($vals); $i++) { ?>
+                               <a href="<?php echo $href . "&amp;value_num=$i"; ?>"><img
+                                       src="images/save.png" /> <?php echo _('download value'); ?>(<?php echo $i; ?>)</a><br />
+
+                       <?php } } else { ?>
+                               <a href="<?php echo $href; ?>"><img src="images/save.png" /> <?php echo _('download value'); ?></a><br />
+
+                       <?php }
+
+                       if ($side == 'dst' && ! $ldapserver_dst->isReadOnly() && ! $ldapserver->isAttrReadOnly($attr)) { ?>
+
+                               <a href="javascript:deleteAttribute('<?php echo $attr; ?>');" style="color:red;"><img src="images/trash.png" /> <?php echo _('delete attribute'); ?></a>
+
+                       <?php } ?>
+
+                       </small>
+               </td>
+
+                       <?php continue;
+               }
+
+               /*
+                * Note: at this point, the attribute must be text-based (not binary or jpeg)
+                */
+
+               /*
+                * If this server is in read-only mode or this attribute is configured as read_only,
+                * simply draw the attribute values and continue.
+                */
+
+               if ($side == 'dst' && ($ldapserver->isReadOnly() || $ldapserver->isAttrReadOnly($attr))) {
+                       if (is_array($vals)) {
+                               foreach ($vals as $i => $val) {
+                                       if (trim($val) == "")
+                                               echo "<span style=\"color:red\">[" . _('empty') . "]</span><br />\n";
+
+                                       elseif (0 == strcasecmp($attr,'userPassword') && $config->GetValue('appearance','obfuscate_password_display'))
+                                               echo preg_replace('/./','*',$val) . "<br />";
+
+                                       else
+                                               echo htmlspecialchars($val) . "<br />";
+                               }
+
+                       // @todo: redundant - $vals is always an array.
+                       } else {
+                               if (0 == strcasecmp($attr,'userPassword') && $config->GetValue('appearance','obfuscate_password_display'))
+                                       echo preg_replace('/./','*',$vals) . "<br />";
+                               else
+                                       echo $vals . "<br />";
+                       }
+                       echo "</td>";
+                       continue;
+               }
+
+               /*
+                * Is this a userPassword attribute?
+                */
+               if (! strcasecmp($attr,'userpassword')) {
+                       $user_password = $vals[0];
+                       $enc_type = get_enc_type($user_password);
+
+                       // Set the default hashing type if the password is blank (must be newly created)
+                       if ($user_password == '') {
+                               $enc_type = get_default_hash($server_id);
+                       }
+
+                       if ($side == 'dst') { ?>
+
+                               <input type="hidden" name="old_values[userpassword]" value="<?php echo htmlspecialchars($user_password); ?>" />
+
+                               <!-- Special case of enc_type to detect changes when user changes enc_type but not the password value -->
+                               <input size="38" type="hidden" name="old_enc_type" value="<?php echo ($enc_type==''?'clear':$enc_type); ?>" />
+
+                       <?php }
+
+                       if (obfuscate_password_display($enc_type))  {
+                               echo htmlspecialchars(preg_replace('/./','*',$user_password));
+                       } else {
+                               echo htmlspecialchars($user_password);
+                       } ?>
+
+                       <br />
+
+                       <?php if ($side == 'dst') { ?>
+
+                               <input style="width: 260px" type="password" name="new_values[userpassword]" value="<?php echo htmlspecialchars($user_password); ?>" />
+
+                               <?php echo enc_type_select_list($enc_type);
+
+                       } ?>
+
+                               <br />
+
+                               <script language="javascript">
+                               <!--
+                               function passwordComparePopup()
+                               {
+                                       mywindow = open('password_checker.php','myname','resizable=no,width=450,height=200,scrollbars=1');
+                                       mywindow.location.href = 'password_checker.php?hash=<?php echo base64_encode($user_password); ?>&base64=true';
+                                       if (mywindow.opener == null)
+                                         mywindow.opener = self;
+                               }
+                               -->
+                               </script>
+
+                               <small><a href="javascript:passwordComparePopup()"><?php echo _('Check password'); ?></a></small>
+
+                       </td>
+
+                       <?php continue;
+               }
+
+               /*
+                * Is this a boolean attribute?
+                */
+               if ($ldapserver->isAttrBoolean($attr)) {
+                       $val = $vals[0];
+
+                       if ($side = 'dst') {?>
+
+                               <input type="hidden" name="old_values[<?php echo htmlspecialchars($attr); ?>]" value="<?php echo htmlspecialchars($val); ?>" />
+
+                               <select name="new_values[<?php echo htmlspecialchars($attr); ?>]">
+                                       <option value="TRUE"<?php echo ($val=='TRUE' ? ' selected' : ''); ?>><?php echo _('true'); ?></option>
+                                       <option value="FALSE"<?php echo ($val=='FALSE' ? ' selected' : ''); ?>><?php echo _('false'); ?></option>
+                                       <option value="">(<?php echo _('none, remove value'); ?>)</option>
+                               </select>
+
+                       <?php } ?>
+
+                       </td>
+
+                       <?php continue;
+               }
+
+               /*
+                * End of special case attributes (non plain text).
+                */
+
+               foreach ($vals as $i => $val) {
+
+                       if ($side == 'dst') {
+                               $input_name = "new_values[" . htmlspecialchars($attr) . "][$i]";
+                               // We smack an id="..." tag in here that doesn't have [][] in it to allow the
+                               // draw_chooser_link() to identify it after the user clicks.
+                               $input_id = "new_values_" . htmlspecialchars($attr) . "_" . $i; ?>
+
+                               <!-- The old_values array will let update.php know if the entry contents changed
+                                    between the time the user loaded this page and saved their changes. -->
+                               <input type="hidden" name="old_values[<?php echo htmlspecialchars($attr); ?>][<?php echo $i; ?>]" value="<?php echo htmlspecialchars($val); ?>" />
+                       <?php }
+
+                       // Is this value is a structural objectClass, make it read-only
+                       if (0 == strcasecmp($attr,'objectClass')) { ?>
+
+                               <a title="<?php echo _('View the schema description for this objectClass'); ?>" href="schema.php?server_id=<?php echo $ldapserver->server_id; ?>&amp;view=objectClasses&amp;viewvalue=<?php echo htmlspecialchars($val); ?>"><img src="images/info.png" /></a>
+
+                               <?php $schema_object = $ldapserver->getSchemaObjectClass($val);
+
+                               if ($schema_object->getType() == 'structural') {
+                                       echo "$val <small>(<acronym title=\"" . sprintf(_('This is a structural ObjectClass and cannot be removed.')) . "\">" . _('structural') . "</acronym>)</small><br />";
+
+                                       if ($side == 'dst') {?>
+
+                               <input type="hidden" name="<?php echo $input_name; ?>" id="<?php echo $input_id; ?>" value="<?php echo htmlspecialchars($val); ?>" />
+
+                                       <?php }
+                               continue;
+                               }
+                       }
+
+                       if (is_dn_string($val) || $ldapserver->isDNAttr($attr)) { ?>
+
+                               <a title="<?php echo sprintf(_('Go to %s'),htmlspecialchars($val)); ?>" href="template_engine.php?server_id=<?php echo $ldapserver->server_id; ?>&amp;dn=<?php echo rawurlencode($val); ?>"><img style="vertical-align: top" src="images/go.png" /></a>
+
+                       <?php } elseif (is_mail_string($val)) { ?>
+
+                               <a href="mailto:<?php echo htmlspecialchars($val); ?>"><img style="vertical-align: center" src="images/mail.png" /></a>
+
+                       <?php } elseif (is_url_string($val)) { ?>
+
+                               <a href="<?php echo htmlspecialchars($val); ?>" target="new"><img style="vertical-align: center" src="images/dc.png" /></a>
+
+                       <?php }
+
+                       if ($ldapserver->isMultiLineAttr($attr,$val)) {
+
+                               if ($side == 'dst') {?>
+                               <textarea class="val" rows="3" cols="30" name="<?php echo $input_name; ?>" id="<?php echo $input_id; ?>"><?php echo htmlspecialchars($val); ?></textarea>
+
+                               <?php } else {
+                                       echo htmlspecialchars($val);
+                               }
+
+                       } else {
+
+                               if ($side == 'dst') {?>
+
+                               <input type="text" class="val" name="<?php echo $input_name; ?>" id="<?php echo $input_id; ?>" value="<?php echo htmlspecialchars($val); ?>" />
+
+                               <?php } else {
+                                       echo htmlspecialchars($val);
+                               }
+                       }
+
+                       // draw a link for popping up the entry browser if this is the type of attribute
+                       // that houses DNs.
+                       if ($ldapserver->isDNAttr($attr))
+                               draw_chooser_link("edit_form.$input_id",false); ?>
+
+                       <br />
+               <?php } ?>
+
+               </td>
+
+       <?php } /* end foreach value */ ?>
+
+       </tr>
+
+               <?php
+               /* Draw the "add value" link under the list of values for this attributes */
+
+               if (! $ldapserver_dst->isReadOnly()) {
+
+                       // First check if the required objectClass is in this DN
+                       $isOK = 0;
+                       $src_oclass = array();
+                       $attr_object = $ldapserver_dst->getSchemaAttribute($attr,$dn_dst);
+                       foreach ($attr_object->used_in_object_classes as $oclass) {
+                               if (in_array(strtolower($oclass),arrayLower($attrs_dst['objectClass']))) {
+                                       $isOK = 1;
+                                       break;
+                               } else {
+                                       // Find oclass that the source has that provides this attribute.
+                                       if (in_array($oclass,$attrs_src['objectClass']))
+                                               $src_oclass[] = $oclass;
+                               }
+                       }
+
+                       print "<tr><td colspan=2></td><td colspan=2>&nbsp</td><td>&nbsp;</td><td>";
+                       if (! $isOK) {
+
+                               if (count($src_oclass) == 1) {
+                                       $add_href = sprintf('add_oclass_form.php?server_id=%s&dn=%s&new_oclass=%s',
+                                               $ldapserver_dst->server_id,$encoded_dn_dst,$src_oclass[0]);
+                               } else {
+                                       $add_href = sprintf('add_value_form.php?server_id=%s&dn=%s&attr=objectClass',
+                                               $ldapserver_dst->server_id,$encoded_dn_dst);
+                               }
+
+                               if ($attr == 'objectClass')
+                                       printf('<div class="add_oclass">(<a href="%s" title="%s">%s</a>)</div>',$add_href,_('Add ObjectClass and Attributes'),_('add value'));
+                               else
+                                       printf('<div class="add_oclass">(<a href="%s" title="%s">%s</a>)</div>',$add_href,sprintf(_('You need one of the following ObjectClass(es) to add this attribute %s.'),implode(" ",$src_oclass)),_('Add new ObjectClass'));
+
+                       } else {
+                               if (! $schema_attr_dst->getIsSingleValue() || (! isset($vals))) {
+
+                                       $add_href = sprintf('add_value_form.php?server_id=%s&dn=%s&attr=%s',
+                                               $ldapserver_dst->server_id,$encoded_dn_dst,rawurlencode($attr));
+
+                                       printf('<div class="add_value">(<a href="%s" title="%s">%s</a>)</div>',
+                                               $add_href,sprintf(_('Add an additional value to attribute \'%s\''),$attr),_('add value'));
+                               }
+                       }
+               }
+
+               print "</td></tr>"; ?>
+
+               </td>
+
+       <?php flush(); ?>
+
+       </tr>
+
+<?php } /* End foreach ($attrs as $attr => $vals) */
+
+if (! $ldapserver_dst->isReadOnly()) { ?>
+
+       <td colspan="2">&nbsp</td><td colspan=2><center><input type="submit" value="<?php echo _('Save Changes'); ?>" /></center></td></tr></form>
+
+<?php } ?>
+
+</table>
+
+<?php /* If this entry has a binary attribute,we need to provide a form for it to submit when deleting it. */ ?>
+<script language="javascript">
+//<!--
+function deleteAttribute(attrName)
+{
+       if (confirm("<?php echo _('Really delete attribute'); ?> '" + attrName + "'?")) {
+               document.delete_attribute_form.attr.value = attrName;
+               document.delete_attribute_form.submit();
+       }
+}
+//-->
+</script>
+
+<!-- This form is submitted by JavaScript when the user clicks "Delete attribute" on a binary attribute -->
+<form name="delete_attribute_form" action="delete_attr.php" method="post">
+       <input type="hidden" name="server_id" value="<?php echo $ldapserver_dst->server_id; ?>" />
+       <input type="hidden" name="dn" value="<?php echo $dn_dst; ?>" />
+       <input type="hidden" name="attr" value="FILLED IN BY JAVASCRIPT" />
+</form>
+
+</body>
+</html>
diff --git a/pla/htdocs/compare_form.php b/pla/htdocs/compare_form.php
new file mode 100644 (file)
index 0000000..bd049e4
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/compare_form.php,v 1.2.4.3 2006/04/29 03:15:34 wurley Exp $
+
+/**
+ * Compares to DN entries side by side.
+ *
+ *  - dn (rawurlencoded)
+ *  - server_id
+ *
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+
+if (! $ldapserver->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+$dn = (isset($_GET['dn']) ? $_GET['dn'] : '');
+$rdn = get_rdn($dn);
+$select_server_html = server_select_list($ldapserver->server_id,true,'server_id_dst');
+
+include './header.php';
+
+echo '<body>';
+
+printf('<h3 class="title">%s %s</h3>',_('Compare another DN with'),htmlspecialchars($rdn));
+printf('<h3 class="subtitle">%s: <b>%s</b>',_('Server'),$ldapserver->name);
+if ($dn)
+       printf('&nbsp;&nbsp;&nbsp;%s: <b>%s</b>',_('Distinguished Name'),htmlspecialchars($dn));
+echo '</h3>';
+echo "\n";
+
+echo '<center>';
+printf('%s <b>%s</b> %s<br />',_('Compare'),htmlspecialchars($rdn),_('with '));
+
+echo '<form action="compare.php" method="post" name="compare_form">';
+printf('<input type="hidden" name="server_id_src" value="%s" />',$ldapserver->server_id);
+echo "\n";
+
+echo '<table style="border-spacing: 10px">';
+echo "\n";
+echo '<tr><td>';
+
+if (! $dn) {
+       printf('<acronym title="%s">%s</acronym>:',_('Compare this DN with another'),_('Source DN'));
+       echo '</td><td>';
+       printf('<input type="text" name="dn_src" size="45" value="%s" />',htmlspecialchars($dn));
+       draw_chooser_link('compare_form.dn_src','true',$rdn);
+
+} else
+       printf('<input type="hidden" name="dn_src" value="%s" />',htmlspecialchars($dn));
+
+echo '</td></tr>';
+echo "\n";
+
+echo '<tr>';
+printf('<td><acronym title="%s">%s</acronym>:</td>',_('Compare this DN with another'),_('Destination DN'));
+echo '<td>';
+echo '<input type="text" name="dn_dst" size="45" value="" />';
+draw_chooser_link('compare_form.dn_dst','true','');
+echo '</td>';
+echo '</tr>';
+echo "\n";
+
+printf('<tr><td>%s:</td><td>%s</td></tr>',_('Destination Server'),$select_server_html);
+echo "\n";
+
+printf('<tr><td colspan="2" align="right"><input type="submit" value="%s" /></td></tr>',_('Compare'));
+echo "\n";
+
+echo '</table>';
+echo '</form>';
+echo '</center>';
+echo '</body>';
+echo '</html>';
+?>
diff --git a/pla/htdocs/copy.php b/pla/htdocs/copy.php
new file mode 100644 (file)
index 0000000..0786c73
--- /dev/null
@@ -0,0 +1,189 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/copy.php,v 1.36.2.12 2007/03/18 01:31:19 wurley Exp $
+
+/**
+ * Copies a given object to create a new one.
+ *
+ * Vars that come in as POST vars
+ *  - source_dn (rawurlencoded)
+ *  - new_dn (form element)
+ *  - server_id
+ *
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+
+$server_id_src = (isset($_POST['server_id']) ? $_POST['server_id'] : '');
+$server_id_dst = (isset($_POST['dest_server_id']) ? $_POST['dest_server_id'] : '');
+
+$ldapserver_src = $ldapservers->Instance($server_id_src);
+$ldapserver_dst = $ldapservers->Instance($server_id_dst);
+
+if ($ldapserver_dst->isReadOnly())
+       pla_error(_('Destination server is currently READ-ONLY.'));
+
+if (! $ldapserver_src->haveAuthInfo() || ! $ldapserver_dst->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+$dn_src = $_POST['old_dn'];
+$dn_dst = $_POST['new_dn'];
+$do_recursive = (isset($_POST['recursive']) && $_POST['recursive'] == 'on') ? true : false;
+$do_remove = (isset($_POST['remove']) && $_POST['remove'] == 'yes') ? true : false;
+
+include './header.php';
+
+# Error checking
+if (0 == strlen(trim($dn_dst)))
+       pla_error(_('You left the destination DN blank.'));
+
+if (pla_compare_dns($dn_src,$dn_dst) == 0 && $server_id_src == $server_id_dst)
+       pla_error(_('The source and destination DN are the same.'));
+
+if ($ldapserver_dst->dnExists($dn_dst))
+       pla_error(sprintf(_('The destination entry (%s) already exists.'),pretty_print_dn($dn_dst)));
+
+if (! $ldapserver_dst->dnExists(get_container($dn_dst)))
+       pla_error(sprintf(_('The destination container (%s) does not exist.'),pretty_print_dn(get_container($dn_dst))));
+
+if ($do_recursive) {
+       $filter = isset($_POST['filter']) ? $_POST['filter'] : '(objectClass=*)';
+
+       # Build a tree similar to that of the tree browser to give to r_copy_dn
+       $snapshot_tree = array();
+       print '<body>';
+       printf('<h3 class="title">%s%s</h3>',_('Copying '),htmlspecialchars($dn_src));
+       printf('<h3 class="subtitle">%s</h3>',_('Recursive copy progress'));
+       print '<br /><br />';
+       print '<small>';
+       print _('Building snapshot of tree to copy... ');
+
+       flush();
+
+       $snapshot_tree = build_tree($ldapserver_src,$dn_src,array(),$filter);
+       printf('<span style="color:green">%s</span><br />',_('Success'));
+       flush();
+
+       # Prevent script from bailing early on a long delete
+       @set_time_limit(0);
+
+       $copy_result = r_copy_dn($ldapserver_src,$ldapserver_dst,$snapshot_tree,$dn_src,$dn_dst);
+       print '</small>';
+
+} else {
+       $copy_result = copy_dn($ldapserver_src,$ldapserver_dst,$dn_src,$dn_dst);
+}
+
+if ($copy_result) {
+       $edit_url = sprintf('template_engine.php?server_id=%s&amp;dn=%s',$server_id_dst,rawurlencode($dn_dst));
+       $new_rdn = get_rdn($dn_dst);
+       $container = get_container($dn_dst);
+
+       printf('<center>%s<a href="%s">%s</a></center>',_('Copy successful! Would you like to '),$edit_url,_('view the new entry'));
+       echo '<!-- refresh the tree view (with the new DN renamed) and redirect to the edit_dn page -->';
+       echo '<script type="text/javascript" language="javascript">parent.left_frame.location.reload();</script>';
+       echo '</body></html>';
+
+       if ($do_remove) {
+               sleep(2);
+               $delete_url = sprintf('delete_form.php?server_id=%s&dn=%s',$server_id_src,rawurlencode($dn_src));
+               echo '<!-- redirect to the delete form -->';
+               printf('<script type="text/javascript" language="javascript">parent.right_frame.location="%s" </script>',$delete_url);
+       }
+}
+
+function r_copy_dn($ldapserver_src,$ldapserver_dst,$snapshottree,$root_dn,$dn_dst) {
+        if (DEBUG_ENABLED)
+               debug_log('r_copy_dn: Entered with (%s,%s,%s,%s,%s)',1,
+                       $ldapserver_src->server_id,$ldapserver_dst->server_id,$snapshottree,$root_dn,$dn_dst);
+
+       printf('<span style="white-space: nowrap;">%s %s...',_('Copying'),htmlspecialchars($root_dn));
+       flush();
+
+       $copy_result = copy_dn($ldapserver_src,$ldapserver_dst,$root_dn,$dn_dst);
+
+       if (! $copy_result)
+               return false;
+
+       printf('<span style="color:green">%s</span><br />',_('Success'));
+       flush();
+
+       $children = isset($snapshottree[$root_dn]) ? $snapshottree[$root_dn] : null;
+       if (is_array($children) && count($children) > 0) {
+               foreach($children as $child_dn) {
+                       $child_rdn = get_rdn($child_dn);
+                       $new_dest_dn = sprintf('%s,%s',$child_rdn,$dn_dst);
+                       r_copy_dn($ldapserver_src,$ldapserver_dst,$snapshottree,$child_dn,$new_dest_dn);
+               }
+
+       } else {
+               return true;
+       }
+
+       return true;
+}
+
+function copy_dn($ldapserver_src,$ldapserver_dst,$dn_src,$dn_dst) {
+        if (DEBUG_ENABLED)
+               debug_log('copy_dn: Entered with (%s,%s,%s,%s)',17,
+                       $ldapserver_src->server_id,$ldapserver_dst->server_id,$dn_src,$dn_dst);
+
+       $new_entry = $ldapserver_src->getDNAttrs($dn_src);
+
+       # modify the prefix-value (ie "bob" in cn=bob) to match the destination DN's value.
+       $rdn_attr = substr($dn_dst,0,strpos($dn_dst,'='));
+       $rdn_value = get_rdn($dn_dst);
+       $rdn_value = substr($rdn_value,strpos($rdn_value,'=') + 1);
+       $new_entry[$rdn_attr] = $rdn_value;
+
+       # don't need a dn attribute in the new entry
+       unset($new_entry['dn']);
+
+       # Check the user-defined custom call back first
+       if (run_hook('pre_entry_create',
+               array ('server_id'=>$ldapserver_dst->server_id,'dn'=>$dn_dst,'attrs'=>$new_entry))) {
+
+               $add_result = $ldapserver_dst->add($dn_dst,$new_entry);
+               if (! $add_result) {
+                       run_hook('post_entry_create',
+                               array('server_id'=>$ldapserver_dst->server_id,'dn'=>$dn_dst,'attrs'=>$new_entry));
+
+                       echo '</small><br /><br />';
+                       pla_error(_('Failed to copy DN: ').$dn_dst,$ldapserver_dst->error(),$ldapserver_dst->errno());
+               }
+
+               return $add_result;
+
+       } else {
+               return false;
+       }
+}
+
+/**
+ * @param object $ldapserver
+ * @param dn $dn
+ * @param array $tree
+ * @param string $filter
+ */
+function build_tree($ldapserver,$dn,$buildtree) {
+       if (DEBUG_ENABLED)
+               debug_log('build_tree: Entered with (%s,%s,%s)',1,
+                       $ldapserver->server_id,$dn,$buildtree);
+
+       # we search all children, not only the visible children in the tree
+       $children = $ldapserver->getContainerContents($dn,0);
+
+       if (is_array($children) && count($children) > 0) {
+               $buildtree[$dn] = $children;
+               foreach ($children as $child_dn)
+                       $buildtree = build_tree($ldapserver,$child_dn,$buildtree);
+       }
+
+       if (DEBUG_ENABLED)
+               debug_log('build_tree: Returning (%s)',1,$buildtree);
+
+       return $buildtree;
+}
+?>
diff --git a/pla/htdocs/copy_form.php b/pla/htdocs/copy_form.php
new file mode 100644 (file)
index 0000000..755b096
--- /dev/null
@@ -0,0 +1,122 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/copy_form.php,v 1.24.4.5 2006/04/29 03:27:41 wurley Exp $
+
+/**
+ * Copies a given object to create a new one.
+ *
+ * Variables that come in via common.php
+ *  - server_id
+ * Variables that come in via GET variables
+ *  - dn (rawurlencoded)
+ *
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+
+if ($ldapserver->isReadOnly())
+       pla_error(_('You cannot perform updates while server is in read-only mode'));
+if (! $ldapserver->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+$dn = $_GET['dn'] ;
+$rdn = get_rdn($dn);
+$attrs = $ldapserver->getDNAttrs($dn);
+$select_server_html = server_select_list($ldapserver->server_id,true,'dest_server_id');
+$children = $ldapserver->getContainerContents($dn);
+
+include './header.php';
+
+# Draw some javaScrpt to enable/disable the filter field if this may be a recursive copy
+if (is_array($children) && count($children) > 0) { ?>
+
+       <script type="text/javascript" language="javascript">
+       //<!--
+       function toggle_disable_filter_field(recursive_checkbox)
+       {
+               if (recursive_checkbox.checked) {
+                       recursive_checkbox.form.remove.disabled = false;
+                       recursive_checkbox.form.filter.disabled = false;
+               } else {
+                       recursive_checkbox.form.remove.disabled = true;
+                       recursive_checkbox.form.remove.checked = false;
+                       recursive_checkbox.form.filter.disabled = true;
+               }
+       }
+       //-->
+       </script>
+
+<?php
+}
+
+echo '<body>';
+
+printf('<h3 class="title">%s %s</h3>',_('Copy'),htmlspecialchars($rdn));
+printf('<h3 class="subtitle">%s: <b>%s</b> &nbsp;&nbsp;&nbsp; %s: <b>%s</b></h3>',_('Server'),$ldapserver->name,
+       _('Distinguished Name'),htmlspecialchars($dn));
+echo "\n";
+
+echo '<center>';
+printf('%s <b>%s</b> %s:<br /><br />',_('Copy'),htmlspecialchars($rdn),_('to a new object'));
+
+echo '<form action="copy.php" method="post" name="copy_form">';
+printf('<input type="hidden" name="old_dn" value="%s" />',htmlspecialchars($dn));
+printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
+echo "\n";
+
+echo '<table style="border-spacing: 10px">';
+echo "\n";
+
+echo '<tr>';
+printf('<td><acronym title="%s">%s</acronym>:</td>',
+       _('The full DN of the new entry to be created when copying the source entry'),_('Destination DN'));
+printf('<td><input type="text" name="new_dn" size="45" value="%s" />',htmlspecialchars($dn));
+draw_chooser_link('copy_form.new_dn','true',htmlspecialchars($rdn));
+echo '</td></tr>';
+echo "\n";
+
+printf('<tr><td>%s</td><td>%s</td></tr>',_('Destination Server'),$select_server_html);
+echo "\n";
+
+if (is_array($children) && count($children) > 0) {
+       echo '<tr>';
+       printf('<td><label for="recursive">%s</label>:</td>',_('Recursive copy'));
+       echo '<td><input type="checkbox" id="recursive" name="recursive" onClick="toggle_disable_filter_field(this)" />';
+       printf('<small>(%s)</small></td>',_('Recursively copy all children of this object as well.'));
+       echo '</tr>'."\n";
+
+       echo '<tr>';
+       printf('<td><acronym title="%s">%s</acronym>:</td>',_('When performing a recursive copy, only copy those entries which match this filter'),_('Filter'));
+       echo '<td><input type="text" name="filter" value="(objectClass=*)" size="45" disabled />';
+       echo '</tr>'."\n";
+
+       echo '<tr>';
+       printf('<td>%s</td>',_('Delete after copy (move):'));
+       echo '<td><input type="checkbox" name="remove" value="yes"/ disabled>';
+       printf('<small>(%s)</small)</td>',_('Make sure your filter (above) will select all child records.'));
+       echo '</tr>';
+
+} else {
+       printf('<tr><td>%s</td><td><input type="checkbox" name="remove" value="yes"/></td></tr>',_('Delete after copy (move):'));
+}
+echo "\n";
+
+printf('<tr><td colspan="2" align="right"><input type="submit" value="%s" /></td></tr>',_('Copy '));
+echo "\n";
+echo '</table></form>';
+echo "\n";
+
+echo '<script type="text/javascript" language="javascript">';
+echo '<!--';
+echo '/* If the user uses the back button, this way we draw the filter field properly. */';
+echo 'toggle_disable_filter_field(document.copy_form.recursive);';
+echo '//-->';
+echo '</script>';
+
+if ($config->GetValue('appearance','show_hints'))
+       printf('<small><img src="images/light.png" alt="Light" /><span class="hint">%s</span></small>',_('Hint: Copying between different servers only works if there are no schema violations'));
+
+echo '</center></body></html>';
+?>
diff --git a/pla/htdocs/create.php b/pla/htdocs/create.php
new file mode 100644 (file)
index 0000000..10d3efa
--- /dev/null
@@ -0,0 +1,160 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/create.php,v 1.44.2.6 2006/02/19 02:57:01 wurley Exp $
+
+/**
+ * Creates a new object.
+ *
+ * Variables that come in via common.php
+ *  - server_id
+ * Variables that come in as POST vars:
+ *  - new_dn
+ *  - attrs (an array of attributes)
+ *  - vals (an array of values for the above attrs)
+ *  - required_attrs (an array with indices being the attributes,
+ *                   and the values being their respective values)
+ *  - object_classes (rawurlencoded, and serialized array of objectClasses)
+ *
+ * @package phpLDAPadmin
+ */
+/**
+ * @todo: posixgroup with empty memberlist generates an error.
+ */
+
+require './common.php';
+
+if ($ldapserver->isReadOnly())
+       pla_error(_('You cannot perform updates while server is in read-only mode'));
+if (! $ldapserver->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+$new_dn = isset($_POST['new_dn']) ? $_POST['new_dn'] : null;
+$required_attrs = isset($_POST['required_attrs']) ? $_POST['required_attrs'] : false;
+$object_classes = unserialize(rawurldecode($_POST['object_classes']));
+$redirect = isset($_POST['redirect']) ? $_POST['redirect'] : false;
+
+# See if there are any presubmit values to work out.
+if (isset($_POST['presubmit']) && count($_POST['presubmit']) && isset($_POST['template'])) {
+       $templates = new Templates($ldapserver->server_id);
+       $template = $templates->GetTemplate($_POST['template']);
+
+       foreach ($_POST['presubmit'] as $attr) {
+               $_POST['attrs'][] = $attr;
+               $_POST['form'][$attr] = $templates->EvaluateDefault($ldapserver,$template['attribute'][$attr]['presubmit'],$_POST['container']);
+               $_POST['vals'][] = $_POST['form'][$attr];
+       }
+
+       # @todo: This section needs to be cleaned up, and will be when the old templates are removed. In the mean time...
+       # Rebuild the $_POST['attrs'] & $_POST['vals'], as they can be inconsistent.
+       unset($_POST['attrs']);
+       unset($_POST['vals']);
+       foreach ($_POST['form'] as $attr => $val) {
+               $_POST['attrs'][] = $attr;
+               $_POST['vals'][] = $val;
+       }
+}
+
+$vals = isset($_POST['vals']) ? $_POST['vals'] : array();
+$attrs = isset($_POST['attrs']) ? $_POST['attrs'] : array();
+
+# build the new entry
+$new_entry = array();
+if (isset($required_attrs) && is_array($required_attrs)) {
+       foreach ($required_attrs as $attr => $val) {
+               if ($val == '')
+                       pla_error(sprintf(_('You left the value blank for required attribute (%s).'),htmlspecialchars($attr)));
+
+               $new_entry[$attr][] = $val;
+       }
+}
+
+if (isset($attrs) && is_array($attrs)) {
+       foreach ($attrs as $i => $attr) {
+
+               if ($ldapserver->isAttrBinary($attr)) {
+                       if (isset($_FILES['vals']['name'][$i]) && $_FILES['vals']['name'][$i] != '' ) {
+
+                               # read in the data from the file
+                               $file = $_FILES['vals']['tmp_name'][$i];
+                               $f = fopen($file,'r');
+                               $binary_data = fread($f,filesize($file));
+                               fclose($f);
+
+                               $val = $binary_data;
+                               $new_entry[$attr][] = $val;
+
+                       } elseif (isset($_SESSION['submitform'][$attr])) {
+                               $new_entry[$attr][] = $_SESSION['submitform'][$attr];
+                               unset($_SESSION['submitform'][$attr]);
+                       }
+
+               } else {
+                       if (is_array($vals[$i])) {
+
+                               # If the array has blank entries, then ignore them.
+                               foreach ($vals[$i] as $value) {
+                                       if (trim($value))
+                                               $new_entry[$attr][] = $value;
+                               }
+
+                       } else {
+                               $val = isset($vals[$i]) ? $vals[$i] : '';
+
+                               if ('' !== trim($val))
+                                       $new_entry[$attr][] = $val;
+                       }
+               }
+       }
+}
+
+$new_entry['objectClass'] = $object_classes;
+if (! in_array('top',$new_entry['objectClass']))
+       $new_entry['objectClass'][] = 'top';
+
+foreach ($new_entry as $attr => $vals) {
+       # Check to see if this is a unique Attribute
+       if ($badattr = $ldapserver->checkUniqueAttr($new_dn,$attr,$vals)) {
+               $search_href = sprintf('search.php?search=true&amp;form=advanced&amp;server_id=%s&amp;filter=%s=%s',
+                       $ldapserver->server_id,$attr,$badattr);
+               pla_error(sprintf(_('Your attempt to add <b>%s</b> (<i>%s</i>) to <br><b>%s</b><br> is NOT allowed. That attribute/value belongs to another entry.<p>You might like to <a href=\'%s\'>search</a> for that entry.'),$attr,$badattr,$new_dn,$search_href));
+       }
+
+       if (! $ldapserver->isAttrBinary($attr))
+               if (is_array($vals))
+                       foreach ($vals as $i => $v)
+                               $new_entry[$attr][$i] = $v;
+               else
+                       $new_entry[$attr] = $vals;
+}
+
+# Check the user-defined custom call back first
+if (run_hook('pre_entry_create',array('server_id'=>$ldapserver->server_id,'dn'=>$new_dn,'attrs'=>$new_entry)))
+       $add_result = $ldapserver->add($new_dn,$new_entry);
+
+if ($add_result) {
+       run_hook('post_entry_create',array('server_id'=>$ldapserver->server_id,'dn'=>$new_dn,'attrs'=>$new_entry));
+
+       if ($redirect)
+               $redirect_url = $redirect;
+       else
+               $redirect_url = sprintf('template_engine.php?server_id=%s&dn=%s',$ldapserver->server_id,rawurlencode($new_dn));
+
+       echo '<html><head>';
+       $tree = get_cached_item($ldapserver->server_id,'tree');
+       $container = get_container($new_dn);
+
+       if ((isset($tree['browser'][$container]['open']) && $tree['browser'][$container]['open']) || 
+               in_array($new_dn,$ldapserver->getBaseDN())) {
+
+               echo '<!-- refresh the tree view (with the new DN renamed) and redirect to the edit_dn page -->';
+               printf('<script language="javascript">parent.left_frame.location.reload();location.href="%s"</script>',$redirect_url);
+       }
+
+       printf('<meta http-equiv="refresh" content="0; url=%s" />',$redirect_url);
+       echo '</head><body>';
+       printf('%s <a href="%s">%s</a>.',_('Redirecting...'),$redirect_url,_('here'));
+       echo '</body></html>';
+
+} else {
+       pla_error(_('Could not add the object to the LDAP server.'),$ldapserver->error(),$ldapserver->errno());
+}
+?>
diff --git a/pla/htdocs/create_form.php b/pla/htdocs/create_form.php
new file mode 100644 (file)
index 0000000..2ed0dd6
--- /dev/null
@@ -0,0 +1,134 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/Attic/create_form.php,v 1.31.2.5 2005/12/31 04:21:37 wurley Exp $
+
+/**
+ * The menu where the user chooses an RDN, Container, and Template for creating a new entry.
+ * After submitting this form, the user is taken to their chosen Template handler.
+ *
+ * Variables that come in via common.php
+ *  - server_id
+ * Variables that come in as GET vars
+ *  - container (rawurlencoded) (optional)
+ *
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+
+if ($ldapserver->isReadOnly())
+       pla_error(_('You cannot perform updates while server is in read-only mode'));
+if (! $ldapserver->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+$container = $_REQUEST['container'];
+$server_menu_html = server_select_list($ldapserver->server_id,true);
+
+include './header.php';
+
+echo '<body>';
+
+printf('<h3 class="title">%s</h3>',_('Create Object'));
+printf('<h3 class="subtitle">%s</h3>',_('Choose a template'));
+printf('<center><h3>%s</h3></center>',_('Select a template for the creation process'));
+
+echo '<form action="template_engine.php" method="post">';
+printf('<input type="hidden" name="container" value="%s" />',htmlspecialchars($container));
+
+echo '<table class="create">';
+printf('<tr><td class="heading">%s:</td><td>%s</td></tr>',_('Server'),$server_menu_html);
+
+echo '<tr>';
+printf('<td class="heading">%s:</td>',_('Template'));
+echo '<td>';
+
+echo '<table class="template_display">';
+echo '<tr><td>';
+
+echo '<table class="templates">';
+
+$i = -1;
+
+$template_xml = new Templates($ldapserver->server_id);
+$templates = $template_xml->_template;
+
+# Remove non-visable templates.
+foreach ($templates as $index => $template)
+       if (isset($template['visible']) && (! $template['visible']))
+               unset ($templates[$index]);
+
+$templates['custom']['title'] = 'Custom';
+$templates['custom']['icon'] = 'images/object.png';
+
+$count = count($templates);
+foreach ($templates as $name => $template) {
+       $i++;
+
+       # If the template doesnt have a title, we'll use the desc field.
+       $template['desc'] = isset($template['title']) ? $template['title'] : $template['desc'];
+
+       # Balance the columns properly
+       if ((count($templates) % 2 == 0 && $i == intval($count / 2)) ||
+               (count($templates) % 2 == 1 && $i == intval($count / 2) + 1))
+
+               echo '</table></td><td><table class="templates">';
+
+       # Check and see if this template should be shown in the list
+       $isValid = false;
+
+       if (isset($template['regexp'])) {
+               if (@preg_match('/'.$template['regexp'].'/i',$container))
+                       $isValid = true;
+       } else
+               $isValid = true;
+
+       if (isset($template['invalid']) && $template['invalid'])
+               $isValid = false;
+
+       echo '<tr>';
+       if (! $isValid || (isset($template['handler']) && ! file_exists(TMPLDIR.'creation/'.$template['handler'])))
+               echo '<td class="icon"><img src="images/error.png" /></td>';
+       else
+               printf('<td><input type="radio" name="template" value="%s" id="%s" %s /></td>',
+                       htmlspecialchars($name),htmlspecialchars($name),
+                       ! $isValid ? 'disabled' : (strcasecmp('Custom',$name) ? '' : 'checked'));
+
+       printf('<td class="icon"><label for="%s"><img src="%s" /></label></td>',
+               htmlspecialchars($name),$template['icon']);
+
+       printf('<td class="name"><label for="%s">',
+               htmlspecialchars($name));
+
+       if (strcasecmp('Custom', $template['desc']) == 0)
+                echo '<b>';
+
+       if (! $isValid)
+               if (isset($template['invalid']) && $template['invalid'])
+                       printf('<span style="color: gray"><acronym title="%s">',
+                               isset($template['invalid_reason']) ? $template['invalid_reason'] :
+                                       _('This template has been disabled in the XML file.'));
+               else
+                       printf('<span style="color: gray"><acronym title="%s">',
+                               _('This template is not allowed in this container.'));
+
+       echo htmlspecialchars($template['desc']);
+
+       if (! $isValid) echo '</acronym></span>';
+       if (strcasecmp('Custom', $template['desc']) == 0)
+               echo '</b>';
+
+       echo '</label></td></tr>';
+
+}
+
+echo '</table>';
+echo '</td></tr></table>';
+echo '</td></tr>';
+
+printf('<tr><td colspan="2"><center><input type="submit" name="submit" value="%s" /></center></td></tr>',
+       htmlspecialchars(_('Proceed >>')));
+
+echo '</table>';
+echo '</form></body></html>';
+?>
diff --git a/pla/htdocs/css/style.css b/pla/htdocs/css/style.css
new file mode 100644 (file)
index 0000000..55023de
--- /dev/null
@@ -0,0 +1,664 @@
+/* $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/css/style.css,v 1.44.4.3 2008/11/28 14:21:37 wurley Exp $ */
+span.hint {
+       font-size: small;
+       font-weight: normal;
+       color: #888;
+}
+
+span.warning {
+       font-size: small;
+       font-weight: normal;
+       color: #f00;
+}
+
+span.x-small {
+       font-size: x-small;
+}
+
+table.schema_oclasses {
+       border-left: 1px solid black;
+       border-right: 1px solid black;
+       border-bottom: 1px solid black;
+       border-top: 0;
+       margin-bottom: 10px;
+       background-color: #eee;
+}
+
+table.schema_oclasses td {
+       vertical-align: top;
+       text-align: left;
+       padding-left: 5px;
+}
+
+table.schema_attr th {
+       background-color: #016;
+       padding: 5px;
+       color: white;
+       font-weight: bold;
+       font-size: 100%;
+}
+
+table.schema_attr td {
+       padding: 5px;
+       vertical-align: top;
+}
+
+table.schema_attr tr.even {
+       background-color: #eee;
+}
+
+table.schema_attr tr.odd {
+       background-color: #ccc;
+}
+
+table.schema_attr tr.highlight{
+       background-color: #bcd;
+       font-weight: Bold;
+}
+
+table.notice tr td {
+       font-size: 9pt;
+       padding: 2px;
+       margin: 0px;
+       background-color: #eee;
+}
+
+table.error {
+       width: 500px;
+       border: 2px solid black;
+}
+
+table.error tr td table.bug tr td{
+       padding: 6px;
+       margin: 0px;
+       background-color: #eee;
+}
+
+table.error tr td {
+       vertical-align: top;
+       text-align: left;
+       padding: 15px;
+       border: 0px;
+}
+
+table.error tr td h2 {
+       margin: 5px;
+       margin-bottom: 20px;
+}
+
+table.error tr td.img {
+       vertical-align: middle;
+       text-align: center;
+       width: 20px;
+}
+
+table.confirm th {
+       background-color: #016;
+       padding: 5px;
+       color: white;
+       font-weight: normal;
+}
+
+table.confirm tr td {
+       padding: 4px;
+}
+
+table.confirm tr.spacer {
+       background-color: #ddd;
+}
+
+table.confirm tr.even {
+       background-color: #ccc;
+}
+
+table.confirm tr.odd {
+       background-color: #eee;
+}
+
+table.confirm tr td.heading {
+       text-align: right;
+       font-size: 75%;
+}
+
+table.confirm td.icon {
+       text-align: center;
+}
+
+table.browse tr td {
+       border: 0;
+       margin: 0;
+       padding: 0;
+}
+
+table.template_display tr td {
+    vertical-align: top;
+}
+
+table.templates tr td {
+       text-align: left;
+       vertical-align: middle;
+}
+
+table.templates tr {
+       height: 25px;
+}
+
+table.templates td.icon {
+       text-align: center;
+}
+
+table.exporters tr td {
+       text-align: left;
+       vertical-align: middle;
+}
+
+table.exporters tr {
+       height: 25px;
+}
+
+a img {
+       border: 0px;
+}
+
+body {
+       font-family: arial, helvetica, sans-serif;
+       background-color: white;
+       font-size: 10pt;
+}
+
+table.tree tr.login td {
+}
+
+table.tree td.links {
+       padding: 0px;
+       font-size: 10px;
+       padding-left: 12px;
+       font-size: 10px;
+}
+
+table.tree td.links a {
+       font-size: 10px;
+}
+
+table.tree {
+       border: 0px;
+}
+
+table.tree img {
+       border: 0px;
+}
+       
+table.tree td {
+       padding: 2px;
+       border: 0px solid black;
+}
+
+table.tree tr {
+}
+
+table.tree tr.server td.icon {
+       width: 14px;
+}
+
+table.tree tr.server td {
+       padding-top: 15px;
+       padding-bottom: 0px;
+       vertical-align: top;
+       font-size: 12px;
+       text-align: left;
+}
+
+table.tree td.icon {
+       text-align: center;
+       padding: 0px;
+       width: 14px;
+       font-size: 10px;
+}
+
+table.tree td.rdn {
+       width: 500px;
+}
+
+table.tree td.rdn a {
+       text-decoration: none;
+       color: black;
+}
+
+table.tree td.rdn a:hover {
+       text-decoration: underline;
+       color: blue;
+}
+
+table.tree td.create {
+}
+
+table.tree td.create a {
+       text-decoration: none;
+       color: black;
+}
+
+table.tree td.create a:hover {
+       text-decoration: underline;
+       color: blue;
+}
+
+
+table.tree td.spacer {
+       width: 22px;
+}
+
+table.tree td.expander {
+       text-align: center;
+       width: 22px;
+       max-width: 22px;
+       min-width: 22px;
+}
+
+table.tree td span.count {
+       color: gray;
+       font-size: 85%;
+}
+
+h3.title {
+       text-align: center;
+       margin: 0px;
+       padding: 10px;
+       color: white;
+       background-color: #018;
+       border: 1px solid black;
+       font-weight: normal;
+       font-size: 140%;
+}
+
+h3.subtitle {
+       text-align: center;
+       margin: 0px;
+       margin-bottom: 15px;
+       font-size: 75%;
+       color: white;
+       border-bottom: 1px solid black;
+       border-left: 1px solid black;
+       border-right: 1px solid black;
+       background: #018;
+       padding: 4px;
+       font-weight: normal;
+}
+
+table.comp_dn {
+       border-collapse: collapse;
+       border-spacing: 0px;
+       empty-cells: show;
+       font-size: 80%;
+}
+
+table.comp_dn tr {
+       width: 200px;
+}
+table.comp_dn tr td.attr {
+       background-color: #eee;
+       vertical-align: top;
+}
+
+table.comp_dn tr td.attr_note {
+       text-align: right;
+       background-color: #eee;
+       padding-right: 50px;
+}
+
+table.edit_dn {
+       border-collapse: collapse;
+       border-spacing: 0px;
+       empty-cells: show;
+       width: 600px;
+}
+
+table.edit_dn input {
+       margin: 1px;
+}
+
+table.edit_dn input.val {
+       font-size: 12px;
+       width: 350px; 
+       font-family: arial, helvetica, sans-serif;
+       background-color: white;
+}
+
+table.edit_dn textarea.val {
+       font-size: 12px;
+       width: 350px; 
+       font-family: arial, helvetica, sans-serif;
+       background-color: white;
+}
+
+table.edit_dn tr td {
+       padding: 4px;
+       padding-right: 0px;
+}
+
+table.edit_dn tr td.attr {
+       background-color: #eee;
+       vertical-align: top;
+}
+
+table.edit_dn tr td.heading {
+       border-top: 3px solid #ccc;
+       font-weight: bold;
+}
+
+table.edit_dn tr td.attr_note {
+    text-align: right;
+       background-color: #eee;
+}
+
+table.edit_dn tr td.attr a {
+       text-decoration: none;
+       color: black;
+}
+
+table.edit_dn tr td.attr a:hover {
+       text-decoration: underline;
+       color: #016;
+}
+
+table.edit_dn tr td.val {
+       text-align: left;
+       vertical-align: middle;
+       padding-bottom: 10px;
+       padding-left: 50px;
+}
+
+
+/** When an attr is updated, it is highlighted to indicate such */
+table.edit_dn tr.updated_attr td.attr {
+       border-top: 1px dashed green;
+       border-left: 1px dashed green;
+       background-color: #ded;
+}
+
+table.edit_dn tr.updated_attr td.attr_note {
+       border-top: 1px dashed green;
+       border-right: 1px dashed green;
+       background-color: #ded;
+}
+
+/** An extra row that sits at the bottom of recently modified attrs to encase them in dashes */
+table.edit_dn tr.updated_attr td.bottom {
+       border-top: 1px dashed green;
+}
+
+/** Formatting for the value cell when it is the attribute that has been recently modified */
+table.edit_dn tr.updated_attr td.val {
+       border-left: 1px dashed green;
+       border-right: 1px dashed green;
+}
+
+/* Neede to prevent sub-tables (like the one in which jpegPhotos are displayed)
+ * from drawing borders as well. */
+table.edit_dn tr.updated_attr td table td {
+       border: 0px;
+}
+
+table.edit_dn tr.updated_attr a {
+}
+
+table.edit_dn tr.mod_dn {
+       background: #def;
+}
+
+table.edit_dn tr.row1 {
+       background: #eee;
+}
+
+table.edit_dn tr.row2 {
+       background: #ccc;
+}
+
+input.update_dn {
+       font-size: 65%;
+}
+
+small {
+       font-size: 8pt;
+}
+
+form.edit_dn {
+       margin: 0px;
+       padding: 0px;
+}
+
+h4.oclass {
+       background: #016;
+       padding: 5px;
+       margin: 0px;
+       margin-top: 8px;
+       font-weight: normal;
+       border: 1px solid black;
+       font-size: 120%;
+       color: white;
+}
+
+h4.oclass_sub {
+       background: #dde;
+       border: 1px solid black;
+       border-top: 0px;
+       font-weight: normal;
+       margin: 0px;
+       padding: 2px;
+       padding-left: 5px;
+       font-size: 80%;
+}
+
+ul.schema {
+       margin: 5px;
+       margin-left: 0px;
+       padding-left: 20px;
+}
+
+ul.schema li {
+       margin-left: 0px;
+       padding-left: 0px;
+}
+
+ul.schema li small {
+       font-size: 75%;
+       color: #777;
+}
+
+ul.schema li small a {
+       color: #77c;
+}
+
+ul.current_values {
+       padding: 5px;
+       padding-left: 25px;
+       width: 200px;
+       margin-left: 50px;
+}
+
+form.new_value {
+       margin-left: 70px;
+}
+
+table.search_result_table {
+    border-spacing: 0;
+    border-collapse: collapse;
+    empty-cells: show;
+}
+
+table.search_result_table td {
+    vertical-align: top;
+    border: 1px solid gray;
+    padding: 4px;
+}
+
+table.search_result_table th {
+    border: 1px solid gray;
+    padding: 10px;
+    padding-left: 20px;
+    padding-right: 20px;
+}
+
+table.search_result_table tr.highlight {
+    background-color: #eee;
+}
+
+
+ul.search {
+       font-weight: bold;
+}
+
+table.search_header {
+       background-color: #ddf;
+    width: 100%;
+    vertical-align: top;
+}
+
+div.search_result {
+       list-style-type: none;
+       padding: 6px;
+       padding-left: 20px;
+       margin-right: 40px;
+}
+
+table.attrs {
+       font-weight: normal;
+       font-size: 75%;
+       margin: 0px;
+       margin-left: 35px;
+}
+
+table.attrs td {
+       padding-right: 10px;
+}
+
+table.attrs td.attr {
+       color: #aaa;
+       padding-left: 15px;
+}
+
+form.search {
+       width: 500px;
+       background-color: #ddf;
+       padding: 5px;
+}
+
+table.edit_dn_menu {
+       font-size: 75%;
+}
+
+table.edit_dn_menu td.icon {
+       width: 16px;
+       text-align: center;
+}
+
+input.scary {
+       background: red;
+       font-weight: bold;
+       color: white;
+}
+
+input.cancel {
+       padding-left: 10px;
+       padding-right: 10px;
+       font-weight: bold;
+}
+
+input.happy {
+       background: green;
+       font-weight: bold;
+       color: white;
+}
+
+table.delete_confirm {
+       width: 76%;
+       background-color: #ddf;
+       padding: 20px;
+       text-align: left;
+}
+
+table.login {
+       background-color: #ddf;
+       padding: 10px;
+}
+
+table.login td {
+       padding: 5px;
+}
+
+table.create {
+       font-size: 75%;
+}
+
+table.create td.heading {
+       vertical-align: top;
+       padding: 10px;
+}
+
+table.create td.name {
+       font-size: 11px;
+       width: 350px; 
+}
+
+div.add_value {
+       font-size: 10pt;
+       margin: 0px;
+    padding: 0px;
+}
+
+a.logged_in_dn {
+       text-decoration: none;
+       color: black;
+}
+
+a.logged_in_dn:hover {
+       text-decoration: underline;
+       color: blue;
+}
+
+a:hover {
+       color: red;
+}
+
+
+/* Styles for formatting the documentation page */
+
+h3.doc {
+       margin-left: 60px;
+}
+
+h2.doc {
+       margin-left: 20px;
+}
+
+p.doc {
+       margin-left: 100px;
+}
+
+table.export_form {
+       font-size: 75%;
+       width: 400px;
+       border-spacing: 10px;
+       border-collapse: separate;
+}
+
+table.export_form tr td {
+       font-size: 11px;
+       text-align: left;
+       vertical-align: top;
+       padding: 4px;
+}
+
+table.form tr td {
+       vertical-align: top;
+       padding: 4px;
+}
+
+
+.attribute_failed {
+       color: red;
+}
+
+img.chooser {
+        /* This makes the chooser image line up properly when placed next to a form element in a table cell*/
+        vertical-align: bottom;
+}
diff --git a/pla/htdocs/delete.php b/pla/htdocs/delete.php
new file mode 100644 (file)
index 0000000..8838792
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/delete.php,v 1.24.2.3 2005/12/11 08:21:03 wurley Exp $
+
+/**
+ * Deletes a DN and presents a "job's done" message.
+ *
+ * Variables that come in via common.php
+ *  - server_id
+ * Variables that come in as POST vars:
+ *  - dn (rawurlencoded)
+ *
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+
+if ($ldapserver->isReadOnly())
+       pla_error(_('You cannot perform updates while server is in read-only mode'));
+if (! $ldapserver->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+$dn = $_POST['dn'];
+
+if (is_null($dn))
+       pla_error(_('You must specify a DN'));
+
+if (! $ldapserver->dnExists($dn))
+       pla_error(sprintf(_('No such entry: %s'),'<b>'.pretty_print_dn($dn).'</b>'));
+
+# Check the user-defined custom callback first.
+if (run_hook('pre_entry_delete',array('server_id'=>$ldapserver->server_id,'dn'=>$dn)))
+       $del_result = $ldapserver->delete($dn);
+else
+       pla_error(sprintf(_('Could not delete the entry: %s'),'<b>'.pretty_print_dn($dn).'</b>'));
+
+if ($del_result) {
+       # Custom callback
+       run_hook('post_entry_delete',array('server_id'=>$ldapserver->server_id,'dn'=>$dn));
+
+       include './header.php';
+       echo '<body>';
+
+       echo '<script type="text/javascript" language="javascript">parent.left_frame.location.reload();</script>';
+       echo '<br /><br />';
+       printf('<center>'._('Entry %s deleted successfully.').'</center>','<b>'.pretty_print_dn($dn).'</b>');
+       echo '</body>';
+
+} else {
+       pla_error(sprintf(_('Could not delete the entry: %s'),'<b>'.pretty_print_dn($dn).'</b>'),
+                 $ldapserver->error(),$ldapserver->errno());
+}
+echo '</html>';
+?>
diff --git a/pla/htdocs/delete_attr.php b/pla/htdocs/delete_attr.php
new file mode 100644 (file)
index 0000000..d282cc1
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/delete_attr.php,v 1.14.2.5 2005/12/09 14:29:37 wurley Exp $
+
+/**
+ *  Deletes an attribute from an entry with NO confirmation.
+ *
+ * Variables that come in via common.php
+ * - server_id
+ *
+ *  On success, redirect to template_engine.php
+ *  On failure, echo an error.
+ *
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+
+if ($ldapserver->isReadOnly())
+       pla_error(_('You cannot perform updates while server is in read-only mode'));
+if (! $ldapserver->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+$dn = isset($_POST['dn']) ? $_POST['dn'] : null;
+$attr = isset($_POST['attr']) ? $_POST['attr'] : null;
+
+if (! $dn)
+       pla_error(_('No DN specified'));
+
+if (! $attr)
+       pla_error(_('No attribute name specified.'));
+
+$encoded_dn = rawurlencode($dn);
+
+if ($ldapserver->isAttrReadOnly($attr))
+       pla_error(sprintf(_('The attribute "%s" is flagged as read-only in the phpLDAPadmin configuration.'),htmlspecialchars($attr)));
+
+$update_array = array();
+$update_array[$attr] = array();
+
+$res = $ldapserver->modify($dn,$update_array);
+if ($res) {
+       $redirect_url = sprintf('template_engine.php?server_id=%s&dn=%s',$ldapserver->server_id,$encoded_dn);
+
+       foreach($update_array as $attr => $junk)
+               $redirect_url .= "&modified_attrs[]=$attr";
+
+       header("Location: $redirect_url");
+
+} else {
+       pla_error(_('Could not perform ldap_modify operation.'),$ldapserver->error(),$ldapserver->errno());
+}
+?>
diff --git a/pla/htdocs/delete_form.php b/pla/htdocs/delete_form.php
new file mode 100644 (file)
index 0000000..4726711
--- /dev/null
@@ -0,0 +1,153 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/delete_form.php,v 1.20.4.6 2006/04/29 04:05:14 wurley Exp $
+
+/**
+ * delete_form.php
+ * Displays a last chance confirmation form to delete a dn.
+ *
+ * Variables that come in via common.php
+ *  - server_id
+ * Variables that come in as GET vars:
+ *  - dn (rawurlencoded)
+ *
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+
+if ($ldapserver->isReadOnly())
+       pla_error(_('You cannot perform updates while server is in read-only mode'));
+if (! $ldapserver->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+$dn = $_GET['dn'];
+$children = $ldapserver->getContainerContents($dn,0,'(objectClass=*)',LDAP_DEREF_NEVER);
+$has_children = count($children) > 0 ? true : false;
+
+include './header.php';
+
+echo '<body>';
+printf('<h3 class="title">'._('Delete %s').'</h3>',htmlspecialchars(get_rdn($dn)));
+printf('<h3 class="subtitle">%s: <b>%s</b> &nbsp;&nbsp;&nbsp; %s: <b>%s</b></h3>',
+       _('Server'),$ldapserver->name,_('Distinguished Name'),htmlspecialchars($dn));
+echo "\n";
+
+echo '<center>';
+
+if ($has_children) {
+       printf('<b>%s</b><br /><br />',_('Permanently delete all children also?'));
+       flush();
+
+       # get the total number of child objects (whole sub-tree)
+       $s = $ldapserver->search(null,dn_escape($dn),'objectClass=*',array('dn'));
+       $sub_tree_count = count($s);
+
+       echo '<table class="delete_confirm">';
+       echo '<tr>';
+       echo '<td><p>';
+       printf(_('This entry is the root of a sub-tree containing %s entries.'),$sub_tree_count);
+       printf('<small>(<a href="search.php?search=true&amp;server_id=%s&amp;filter=%s&amp;base_dn=%s&amp;form=advanced&amp;scope=sub">%s</a>)</small>',
+               $ldapserver->server_id,rawurlencode('objectClass=*'),rawurlencode($dn),_('view entries'));
+       echo '<br /><br />';
+
+       printf(_('phpLDAPadmin can recursively delete this entry and all %s of its children. See below for a list of all the entries that this action will delete. Do you want to do this?'),($sub_tree_count-1));
+       echo '<br /><br />';
+
+       printf('<small>%s</small>',
+               _('Note: this is potentially very dangerous and you do this at your own risk. This operation cannot be undone. Take into consideration aliases, referrals, and other things that may cause problems.'));
+       echo '<br /><br />';
+       echo "\n";
+
+       echo '<table width="100%">';
+       echo '<tr>';
+       echo '<td><center>';
+       echo '<form action="rdelete.php" method="post">';
+       printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
+       printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
+       printf('<input type="submit" class="scary" value="%s" />',sprintf(_('Delete all %s objects'),$sub_tree_count));
+       echo '</form>';
+       echo '</center></td>';
+
+       echo '<td><center>';
+       echo '<form action="template_engine.php" method="get">';
+       printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
+       printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
+       printf('<input type="submit" name="submit" value="%s" class="cancel" />',_('Cancel'));
+       echo '</form>';
+       echo '</center></td>';
+       echo '</tr>';
+       echo '</table>';
+       echo "\n";
+
+       echo '</td>';
+       echo '</tr>';
+       echo '</table>';
+       echo "\n";
+
+       flush();
+
+       echo '<br /><br />';
+       echo _('List of entries to be deleted:');
+       echo '<br />';
+
+       printf('<select size="%s" multiple disabled style="background:white; color:black;width:500px" >',min(10,$sub_tree_count));
+       $i=0;
+       foreach ($s as $dn => $junk) {
+               $i++;
+               printf('<option>%s. %s</option>',$i,htmlspecialchars(dn_unescape($dn)));
+       }
+       echo '</select>';
+       echo "\n";
+
+} else {
+       echo '<table class="delete_confirm">';
+       echo '<tr>';
+
+       echo '<td nowrap>';
+       echo _('Are you sure you want to permanently delete this object?');
+       echo '<br /><br />';
+
+       printf('<acronym title="%s">%s</acronym>: <b>%s</b>',_('Distinguished Name'),_('DN'),pretty_print_dn($dn));
+       echo '<br />';
+       printf('%s: <b>%s</b>',_('Server'),htmlspecialchars($ldapserver->name));
+       echo '<br /><br />';
+       echo "\n";
+
+       echo '<table width="100%">';
+       echo '<tr>';
+
+       echo '<td><center>';
+       echo '<form action="delete.php" method="post">';
+       printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
+       printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
+       printf('<input type="submit" name="submit" value="%s" class="scary" />',_('Delete'));
+       echo '</form>';
+
+       echo '</center></td>';
+
+       echo '<td><center>';
+       echo '<form action="template_engine.php" method="get">';
+       printf('<input type="hidden" name="dn" value="%s" />',htmlspecialchars($dn));
+       printf('<input type="hidden" name="server_id" value="%s" />',$ldapserver->server_id);
+       printf('<input type="submit" name="submit" value="%s" class="cancel" />',_('Cancel'));
+       echo '</form>';
+
+       echo '</center></td>';
+       echo '</tr>';
+       echo '</table>';
+       echo "\n";
+
+       echo '</td>';
+       echo '</tr>';
+       echo '</table>';
+       echo "\n";
+
+}
+
+echo '</center>';
+echo '<br />';
+echo '</body>';
+echo '</html>';
+?>
diff --git a/pla/htdocs/download_binary_attr.php b/pla/htdocs/download_binary_attr.php
new file mode 100644 (file)
index 0000000..b7b5472
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/download_binary_attr.php,v 1.13.2.3 2005/12/08 11:49:28 wurley Exp $
+
+/**
+ * @package phpLDAPadmin
+ * Variables that come in via common.php
+ *  - server_id
+ */
+/**
+ */
+
+require './common.php';
+
+if ($ldapserver->isReadOnly())
+       pla_error(_('You cannot perform updates while server is in read-only mode'));
+if (! $ldapserver->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+$dn = rawurldecode($_GET['dn']);
+$attr = $_GET['attr'];
+
+# if there are multiple values in this attribute, which one do you want to see?
+$value_num = isset($_GET['value_num']) ? $_GET['value_num'] : null;
+
+if (! $ldapserver->dnExists($dn))
+       pla_error(sprintf(_('No such entry: %s'),pretty_print_dn($dn)));
+
+$search = $ldapserver->search(null,$dn,'(objectClass=*)',array($attr),'base',false,$config->GetValue('deref','view'));
+
+# Dump the binary data to the browser
+header('Content-type: octet-stream');
+header("Content-disposition: attachment; filename=$attr");
+header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
+header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
+if ($value_num && is_array($search[$attr][$dn]))
+       echo $search[$dn][$attr][$value_num];
+else
+       echo $search[$dn][$attr];
+?>
diff --git a/pla/htdocs/entry_chooser.php b/pla/htdocs/entry_chooser.php
new file mode 100644 (file)
index 0000000..390f40d
--- /dev/null
@@ -0,0 +1,117 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/entry_chooser.php,v 1.27.2.5 2008/11/28 14:21:37 wurley Exp $
+
+/**
+ * Display a selection (popup window) to pick a DN.
+ *
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+
+$container = isset($_GET['container']) ? rawurldecode($_GET['container']) : false;
+$return_form_element = isset($_GET['form_element']) ? htmlspecialchars($_GET['form_element']) : null;
+$rdn = isset($_GET['rdn']) ? htmlspecialchars($_GET['rdn']) : null;
+
+include "./header.php";
+
+printf('<h3 class="subtitle">%s</h3>',_('Entry Chooser'));
+flush();
+?>
+
+<script type="text/javascript" language="javascript">
+       function returnDN(dn) {
+               opener.document.<?php echo $return_form_element; ?>.value = dn;
+               close();
+       }
+</script>
+
+<?php
+if ($container) {
+       printf('%s<b>%s</b>',_('Server: '),htmlspecialchars($ldapserver->name));
+       echo '<br />';
+       printf('%s<b>%s</b>',_('Looking in: '),htmlspecialchars($container));
+       echo '<br />';
+}
+
+/* Has the use already begun to descend into a specific server tree? */
+if (isset($ldapserver) && $container !== false) {
+
+       if (! $ldapserver->haveAuthInfo())
+               pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+       $dn_list = $ldapserver->getContainerContents($container,0,'(objectClass=*)',$config->GetValue('deref','tree'));
+       sort($dn_list);
+
+       foreach ($ldapserver->getBaseDN() as $base_dn) {
+               if (DEBUG_ENABLED)
+                       debug_log('entry_chooser.php: Comparing BaseDN [%s] with container [%s]',64,$base_dn,$container);
+
+               if (! pla_compare_dns($container,$base_dn)) {
+                       $parent_container = false;
+                       $up_href = sprintf('entry_chooser.php?form_element=%s&amp;rdn=%s',$return_form_element,$rdn);
+                       break;
+
+               } else {
+                       $parent_container = get_container($container);
+                       $up_href = sprintf('entry_chooser.php?form_element=%s&amp;rdn=%s&amp;server_id=%s&amp;container=%s',
+                               $return_form_element,$rdn,$ldapserver->server_id,rawurlencode($parent_container));
+               }
+       }
+
+       echo '&nbsp;';
+       printf('<a href="%s" style="text-decoration:none"><img src="images/up.png" /> %s</a>',$up_href,_('Back Up...'));
+       echo '<br />';
+
+       if (! count($dn_list))
+               printf('&nbsp;&nbsp;&nbsp;(%s)<br />',_('no entries'));
+
+       else
+               foreach ($dn_list as $dn) {
+                       $href = sprintf("javascript:returnDN('%s%s')",
+                               ($rdn ? '"'.htmlspecialchars(dn_js_escape($rdn)).',"' : ''),
+                               htmlspecialchars(dn_js_escape($dn)));
+                       echo '&nbsp;&nbsp;&nbsp;';
+                       printf('<a href="entry_chooser.php?server_id=%s&amp;form_element=%s&amp;rdn=%s&amp;container=%s"><img src="images/plus.png" /></a>',
+                               $ldapserver->server_id,$return_form_element,$rdn,rawurlencode($dn));
+
+                       printf('<a href="%s">%s</a>',$href,htmlspecialchars($dn));
+                       echo '<br />';
+               }
+
+/* draw the root of the selection tree (ie, list all the servers) */
+} else {
+       foreach ($ldapservers->GetServerList() as $id) {
+
+               $ldapserver = $ldapservers->Instance($id);
+
+               if ($ldapserver->isVisible()) {
+
+                       if (! $ldapserver->haveAuthInfo())
+                               continue;
+
+                       else {
+                               printf('<b>%s</b>',htmlspecialchars($ldapserver->name));
+                               echo '<br />';
+                               foreach ($ldapserver->getBaseDN() as $dn) {
+                                       if (! $dn) {
+                                               printf('<small>&nbsp;&nbsp;&nbsp;(%s)</small><br />',_('Could not determine base DN'));
+
+                                       } else {
+                                               $href = sprintf("javascript:returnDN('%s%s')",($rdn ? "$rdn," : ''),$dn);
+
+                                               echo '&nbsp;&nbsp;&nbsp;';
+                                               printf('<a href="entry_chooser.php?server_id=%s&amp;form_element=%s&amp;rdn=%s&amp;container=%s"><img src="images/plus.png" /></a> ',
+                                                       $ldapserver->server_id,$return_form_element,$rdn,rawurlencode($dn));
+
+                                               printf('<a href="%s">%s</a>',$href,htmlspecialchars($dn));
+                                               echo '<br />';
+                                       }
+                               }
+                       }
+               }
+       }
+}
+?>
diff --git a/pla/htdocs/expand.php b/pla/htdocs/expand.php
new file mode 100644 (file)
index 0000000..8526114
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/expand.php,v 1.22.4.3 2007/03/18 03:16:05 wurley Exp $
+
+/**
+ * This script alters the session variable 'tree', expanding it
+ * at the dn specified in the query string.
+ *
+ * Variables that come in via common.php
+ *  - server_id
+ * Variables that come in as GET vars:
+ *  - dn (rawurlencoded)
+ *
+ * Note: this script is equal and opposite to collapse.php
+ * @package phpLDAPadmin
+ * @see collapse.php
+ */
+/**
+ */
+
+require './common.php';
+no_expire_header();
+
+if (! $ldapserver->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+# This allows us to display large sub-trees without running out of time.
+@set_time_limit(0);
+
+$dn = $_GET['dn'];
+
+# We dont need this result, as we'll use the SESSION value when we call tree.php
+$ldapserver->getContainerContents($dn,0,'(objectClass=*)',$config->GetValue('deref','tree'));
+
+$tree = get_cached_item($ldapserver->server_id,'tree');
+$tree['browser'][$dn]['open'] = true;
+set_cached_item($ldapserver->server_id,'tree','null',$tree);
+
+/* If cookies were disabled, build the url parameter for the session id.
+   It will be append to the url to be redirect */
+$id_session_param = '';
+if (SID != '')
+       $id_session_param = sprintf('&%s=%s',session_name(),session_id());
+
+header(sprintf('Location:tree.php?foo=%s#%s_%s%s',random_junk(),$ldapserver->server_id,rawurlencode($dn),$id_session_param));
+?>
diff --git a/pla/htdocs/export.php b/pla/htdocs/export.php
new file mode 100755 (executable)
index 0000000..96f33ba
--- /dev/null
@@ -0,0 +1,111 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/export.php,v 1.15.4.6 2005/12/10 12:03:44 wurley Exp $
+
+/**
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+# Fix a bug with IE:
+ini_set('session.cache_limiter','');
+
+require './common.php';
+require LIBDIR.'export_functions.php';
+
+if (! $ldapserver->haveAuthInfo())
+       pla_error(_('Not enough information to login to server. Please check your configuration.'));
+
+$base_dn = isset($_POST['dn']) ? $_POST['dn']:NULL;
+$format = isset($_POST['format']) ? $_POST['format'] : 'unix';
+$scope = isset($_POST['scope']) ? $_POST['scope'] : 'base';
+$filter = isset($_POST['filter']) ? $_POST['filter'] : 'objectclass=*';
+$target = isset($_POST['target']) ? $_POST['target'] : 'display';
+$save_as_file = isset($_POST['save_as_file']) && $_POST['save_as_file'] == 'on';
+
+if (isset($_POST['filter'])) {
+       preg_replace('/\s+/','',$_POST['filter']);
+       $attributes = split(',',preg_replace('/\s+/','',$_POST['attributes']));
+
+} else {
+       $attributes = array();
+}
+
+# add system attributes if needed
+if (isset($_POST['sys_attr'])) {
+       array_push($attributes,'*');
+       array_push($attributes,'+');
+}
+
+isset($_POST['exporter_id']) or pla_error(_('You must choose an export format.'));
+$exporter_id = $_POST['exporter_id'];
+isset($exporters[$exporter_id]) or pla_error(_('Invalid export format'));
+
+# Initialisation of other variables
+$friendly_rdn = get_rdn($base_dn,1);
+$extension = $exporters[$exporter_id]['extension'];
+
+# default case not really needed
+switch ($format) {
+       case 'win':
+               $br = "\r\n";
+               break;
+       case 'mac':
+               $br = "\r";
+               break;
+       case 'unix':
+       default:
+               $br = "\n";
+}
+
+# get the decoree,ie the source
+$plaLdapExporter = new PlaLdapExporter($ldapserver->server_id,$filter,$base_dn,$scope,$attributes);
+
+# the decorator do it that way for the moment
+$exporter = null;
+
+switch ($exporter_id) {
+       case 0:
+               $exporter = new PlaLdifExporter($plaLdapExporter);
+               break;
+
+       case 1:
+               $exporter = new PlaDsmlExporter($plaLdapExporter);
+               break;
+
+       case 2:
+               $exporter = new PlaVcardExporter($plaLdapExporter);
+               break;
+
+       case 3:
+               $exporter = new PlaCSVExporter($plaLdapExporter);
+               break;
+
+       default:
+               # truly speaking,this default case will never be reached. See check at the bottom.
+               pla_error(_('No available exporter found.'));
+}
+
+# set the CLRN
+$exporter->setOutputFormat($br);
+
+if (isset($_REQUEST['compress']) && $_REQUEST['compress'] = 'on')
+       $exporter->compress(true);
+
+# prevent script from bailing early for long search
+@set_time_limit(0);
+
+# send the header
+if ($save_as_file)
+       header('Content-type: application/download');
+else
+       header('Content-type: text/plain');
+
+header(sprintf('Content-Disposition: filename="%s.%s"',$friendly_rdn,$exporters[$exporter_id]['extension'].($exporter->isCompressed()?'.gz':'')));
+header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
+header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
+header('Cache-Control: post-check=0, pre-check=0', false);
+
+# and export
+$exporter->export();
+?>
diff --git a/pla/htdocs/export_form.php b/pla/htdocs/export_form.php
new file mode 100755 (executable)
index 0000000..df147e8
--- /dev/null
@@ -0,0 +1,165 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/export_form.php,v 1.22.4.7 2007/03/18 03:16:05 wurley Exp $
+
+/**
+ * export_form.php
+ * Html form to choose an export format(ldif,...)
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+require './common.php';
+require LIBDIR.'export_functions.php';
+
+$format = isset($_GET['format']) ? $_GET['format'] : get_line_end_format();
+$scope = isset($_GET['scope']) ? $_GET['scope'] : 'base' ;
+$exporter_id = isset($_GET['exporter_id']) ? $_GET['exporter_id'] : 0 ;
+$dn = isset($_GET['dn']) ? $_GET['dn'] : null;
+$filter = isset($_GET['filter']) ? $_GET['filter'] : '(objectClass=*)';
+$attributes = isset($_GET['attributes']) ? $_GET['attributes'] : '*';
+$sys_attr = isset($_GET['sys_attr']) && $_GET['sys_attr'] == 'true' ? true : false;
+
+$available_formats = array (
+       'unix' => 'UNIX (Linux, BSD)',
+       'mac'  => 'Macintosh',
+       'win'  => 'Windows'
+);
+
+$available_scopes = array (
+       'base' => _('Base (base dn only)'),
+       'one' => _('One (one level beneath base)'),
+       'sub' => _('Sub (entire subtree)')
+);
+
+
+include './header.php';
+
+echo '<body>';
+printf('<h3 class="title">%s</h3>',_('Export'));
+echo '<br />';
+echo '<center>';
+echo '<form name="export_form" action="export.php" method="post">';
+echo '<table class="export_form">';
+echo '<tr>';
+echo '<td>';
+
+echo '<fieldset>';
+printf('<legend>%s</legend>',_('Export'));
+
+echo '<table>';
+printf('<tr><td>%s</td><td>%s</td></tr>',_('Server'),server_select_list());
+
+echo '<tr>';
+printf('<td style="white-space:nowrap">%s</td>',_('Base DN'));
+printf('<td><span style="white-space: nowrap;"><input type="text" name="dn" id="dn" style="width:230px" value="%s" />&nbsp;',htmlspecialchars($dn));
+draw_chooser_link('export_form.dn');
+echo '</span></td>';
+echo '</tr>';
+
+echo '<tr>';
+printf('<td><span style="white-space: nowrap">%s</span></td>',_('Search Scope'));
+
+echo '<td>';
+
+foreach ($available_scopes as $id => $desc)
+       printf('<input type="radio" name="scope" value="%s" id="%s"%s /><label for="%s">%s</label><br />',
+               htmlspecialchars($id),htmlspecialchars($id),($id == $scope) ? 'checked="true"' : '',
+               htmlspecialchars($id),htmlspecialchars($desc));
+
+echo '</td>';
+echo '</tr>';
+
+printf('<tr><td>%s</td><td><input type="text" name="filter" style="width:300px" value="%s" /></td></tr>',
+       _('Search Filter'),htmlspecialchars($filter));
+
+printf('<tr><td>%s</td><td><input type="text" name="attributes" style="width:300px" value="%s" /></td></tr>',
+       _('Show Attributtes'),htmlspecialchars($attributes));
+
+printf('<tr><td>&nbsp;</td><td><input type="checkbox" name="sys_attr" id="sys_attr" %s/> <label for="sys_attr">%s</label></td></tr>',
+       $sys_attr ? 'checked="true" ' : '',_('Include system attributes'));
+
+printf('<tr><td>&nbsp;</td><td><input type="checkbox" id="save_as_file" name="save_as_file" onclick="toggle_disable_field_saveas(this)" /> <label for="save_as_file">%s</label></td></tr>',
+       _('Save as file'));
+
+printf('<tr><td>&nbsp;</td><td><input type="checkbox" id="compress" name="compress" disabled /> <label for="compress">%s</label></td></tr>',
+       _('Compress'));
+
+echo '</table>';
+echo '</fieldset>';
+echo '</td>';
+echo '</tr>';
+echo '<tr>';
+echo '<td>';
+
+echo '<table style="width: 100%">';
+echo '<tr><td style="width: 50%">';
+echo '<fieldset style="height: 100px">';
+
+printf('<legend>%s</legend>',_('Export format'));
+
+foreach ($exporters as $index => $exporter) {
+       printf('<input type="radio" name="exporter_id" id="exporter_id_%s" value="%s"%s />',
+               htmlspecialchars($index),htmlspecialchars($index),($index==$exporter_id) ? ' checked="true"' : '');
+       printf('<label for="%s">%s</label><br />',
+               htmlspecialchars($index),htmlspecialchars($exporter['desc']));
+}
+
+echo '</fieldset>';
+echo '</td>';
+echo '<td style="width: 50%">';
+echo '<fieldset style="height: 100px">';
+
+printf('<legend>%s</legend>',_('Line ends'));
+foreach ($available_formats as $id => $desc)
+       printf('<input type="radio" name="format" value="%s" id="%s"%s /><label for="%s">%s</label><br />',
+               htmlspecialchars($id),htmlspecialchars($id),($format==$id) ? ' checked="true"' : '',
+               htmlspecialchars($id),htmlspecialchars($desc));
+
+echo '</fieldset>';
+echo '</td></tr>';
+echo '</table>';
+echo '</td>';
+echo '</tr>';
+
+echo '<tr>';
+echo '<td colspan="2">';
+printf('<center><input type="submit" name="target" value="%s" /></center>',
+       htmlspecialchars(_('Proceed >>')));
+echo '</td>';
+echo '</tr>';
+echo '</table>';
+
+echo '</form>';
+echo '</center>';
+
+/**
+ * Helper functoin for fetching the line end format.
+ * @return String 'win', 'unix', or 'mac' based on the user's browser..
+ */
+function get_line_end_format() {
+       if (is_browser_os_windows())
+               return 'win';
+       elseif (is_browser_os_unix())
+               return 'unix';
+       elseif (is_browser_os_mac())
+               return 'mac';
+       else
+               return 'unix';
+}
+
+?>
+<script type="text/javascript" language="javascript">
+<!--
+        function toggle_disable_field_saveas(id) {
+                if (id.checked) {
+                        id.form.compress.disabled = false;
+                } else {
+                        id.form.compress.disabled = true;
+                        id.form.compress.checked = false;
+                }
+        }
+-->
+</script>
+</body>
+</html>
diff --git a/pla/htdocs/header.php b/pla/htdocs/header.php
new file mode 100644 (file)
index 0000000..c036155
--- /dev/null
@@ -0,0 +1,58 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/header.php,v 1.21.2.4 2006/04/29 03:14:45 wurley Exp $
+
+/**
+ * @package phpLDAPadmin
+ */
+
+/* We want to get $language into scope in case we were included
+   from within a function */
+$language = isset($config) ? $language = $config->GetValue('appearance','language') : 'auto';
+
+# text/xml won't work with MSIE, but is very useful for debugging xhtml code.
+# header('Content-type: text/xml; charset="UTF-8"');
+@header('Content-type: text/html; charset="UTF-8"');
+
+# XML version and encoding for well-behaved browsers
+echo '<?xml version="1.0" encoding="utf-8"?>'."\n";
+
+echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"'."\n";
+echo '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
+
+printf('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="%s" lang="%s" dir="ltr">',$language,$language);
+echo "\n\n";
+
+echo '<head>';
+
+if (isset($config) && $pagetitle = $config->GetValue('appearance','page_title'))
+       printf('<title>phpLDAPadmin - %s</title>',$pagetitle);
+else
+       echo '<title>phpLDAPadmin</title>';
+
+printf('<link type="text/css" rel="stylesheet" href="%sstyle.css" media="screen" />',CSSDIR);
+
+if (isset($server_id)) {
+       $custom_file = get_custom_file($server_id,'style.css',CSSDIR);
+
+       if (strcmp($custom_file,'style.css') != 0)
+               printf('<link type="text/css" rel="stylesheet" href="%s" media="screen" />',$custom_file);
+}
+
+printf('<script type="text/javascript" src="%sentry_chooser.js"></script>',JSDIR);
+printf('<script type="text/javascript" src="%sie_png_work_around.js"></script>',JSDIR);
+printf('<script type="text/javascript" src="%ssearch_util.js"></script>',JSDIR);
+printf('<script type="text/javascript" src="%sgeneric_utils.js"></script>',JSDIR);
+printf('<link type="text/css" rel="stylesheet" media="all" href="%s/jscalendar/calendar-blue.css" title="blue" />',JSDIR);
+printf('<script type="text/javascript" src="%sjscalendar/calendar.js"></script>',JSDIR);
+printf('<script type="text/javascript" src="%sjscalendar/lang/calendar-en.js"></script>',JSDIR);
+printf('<script type="text/javascript" src="%sjscalendar/calendar-setup.js"></script>',JSDIR);
+printf('<script type="text/javascript" src="%sdate_selector.js"></script>',JSDIR);
+printf('<link type="text/css" rel="stylesheet" href="%s/phplayersmenu/layerstreemenu.css"></link>',JSDIR);
+
+if (isset($meta_refresh_variable))
+       printf('<meta http-equiv="refresh" content="%s" />',$meta_refresh_variable);
+
+echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
+echo '</head>';
+echo "\n\n";
+?>
diff --git a/pla/htdocs/help.php b/pla/htdocs/help.php
new file mode 100644 (file)
index 0000000..77d9840
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/Attic/help.php,v 1.5 2005/02/26 12:35:05 wurley Exp $
+
+/**
+ * @package phpLDAPadmin
+ */
+/**
+ */
+
+include './common.php';
+include './header.php';
+
+$forum_href = get_href( 'forum' );
+?>
+
+<body>
+
+<h3 class="title">Help</h3>
+<br />
+<center>
+<p>Do you have a problem or question?</p>
+<p>Perhaps you are new to LDAP and need a little guidance?</p>
+<p>Help is only one click away. Visit the online <a href="<?php echo $forum_href; ?>">phpLDAPadmin support forum</a>.</p>
+<br />
+</center>
+
+</body>
+</html>
diff --git a/pla/htdocs/images/add.png b/pla/htdocs/images/add.png
new file mode 100644 (file)
index 0000000..7c04bad
Binary files /dev/null and b/pla/htdocs/images/add.png differ
diff --git a/pla/htdocs/images/bug.png b/pla/htdocs/images/bug.png
new file mode 100644 (file)
index 0000000..132f93f
Binary files /dev/null and b/pla/htdocs/images/bug.png differ
diff --git a/pla/htdocs/images/calendar.png b/pla/htdocs/images/calendar.png
new file mode 100644 (file)
index 0000000..c3cdf73
Binary files /dev/null and b/pla/htdocs/images/calendar.png differ
diff --git a/pla/htdocs/images/catalog.png b/pla/htdocs/images/catalog.png
new file mode 100644 (file)
index 0000000..907d939
Binary files /dev/null and b/pla/htdocs/images/catalog.png differ
diff --git a/pla/htdocs/images/children.png b/pla/htdocs/images/children.png
new file mode 100644 (file)
index 0000000..6fdc884
Binary files /dev/null and b/pla/htdocs/images/children.png differ
diff --git a/pla/htdocs/images/compare.png b/pla/htdocs/images/compare.png
new file mode 100644 (file)
index 0000000..e2f48bc
Binary files /dev/null and b/pla/htdocs/images/compare.png differ
diff --git a/pla/htdocs/images/countries/af.png b/pla/htdocs/images/countries/af.png
new file mode 100644 (file)
index 0000000..cda88b0
Binary files /dev/null and b/pla/htdocs/images/countries/af.png differ
diff --git a/pla/htdocs/images/countries/al.png b/pla/htdocs/images/countries/al.png
new file mode 100644 (file)
index 0000000..5925b27
Binary files /dev/null and b/pla/htdocs/images/countries/al.png differ
diff --git a/pla/htdocs/images/countries/am.png b/pla/htdocs/images/countries/am.png
new file mode 100644 (file)
index 0000000..45cd749
Binary files /dev/null and b/pla/htdocs/images/countries/am.png differ
diff --git a/pla/htdocs/images/countries/an.png b/pla/htdocs/images/countries/an.png
new file mode 100644 (file)
index 0000000..2d4d3a7
Binary files /dev/null and b/pla/htdocs/images/countries/an.png differ
diff --git a/pla/htdocs/images/countries/ao.png b/pla/htdocs/images/countries/ao.png
new file mode 100644 (file)
index 0000000..9463d24
Binary files /dev/null and b/pla/htdocs/images/countries/ao.png differ
diff --git a/pla/htdocs/images/countries/ar.png b/pla/htdocs/images/countries/ar.png
new file mode 100644 (file)
index 0000000..bd73382
Binary files /dev/null and b/pla/htdocs/images/countries/ar.png differ
diff --git a/pla/htdocs/images/countries/at.png b/pla/htdocs/images/countries/at.png
new file mode 100644 (file)
index 0000000..2a58c49
Binary files /dev/null and b/pla/htdocs/images/countries/at.png differ
diff --git a/pla/htdocs/images/countries/au.png b/pla/htdocs/images/countries/au.png
new file mode 100644 (file)
index 0000000..b20b048
Binary files /dev/null and b/pla/htdocs/images/countries/au.png differ
diff --git a/pla/htdocs/images/countries/aw.png b/pla/htdocs/images/countries/aw.png
new file mode 100644 (file)
index 0000000..411977e
Binary files /dev/null and b/pla/htdocs/images/countries/aw.png differ
diff --git a/pla/htdocs/images/countries/az.png b/pla/htdocs/images/countries/az.png
new file mode 100644 (file)
index 0000000..ced5af0
Binary files /dev/null and b/pla/htdocs/images/countries/az.png differ
diff --git a/pla/htdocs/images/countries/ba.png b/pla/htdocs/images/countries/ba.png
new file mode 100644 (file)
index 0000000..fb7d190
Binary files /dev/null and b/pla/htdocs/images/countries/ba.png differ
diff --git a/pla/htdocs/images/countries/bb.png b/pla/htdocs/images/countries/bb.png
new file mode 100644 (file)
index 0000000..9c07e14
Binary files /dev/null and b/pla/htdocs/images/countries/bb.png differ
diff --git a/pla/htdocs/images/countries/bd.png b/pla/htdocs/images/countries/bd.png
new file mode 100644 (file)
index 0000000..56bba0b
Binary files /dev/null and b/pla/htdocs/images/countries/bd.png differ
diff --git a/pla/htdocs/images/countries/be.png b/pla/htdocs/images/countries/be.png
new file mode 100644 (file)
index 0000000..9312218
Binary files /dev/null and b/pla/htdocs/images/countries/be.png differ
diff --git a/pla/htdocs/images/countries/bf.png b/pla/htdocs/images/countries/bf.png
new file mode 100644 (file)
index 0000000..1019379
Binary files /dev/null and b/pla/htdocs/images/countries/bf.png differ
diff --git a/pla/htdocs/images/countries/bg.png b/pla/htdocs/images/countries/bg.png
new file mode 100644 (file)
index 0000000..0f64f7d
Binary files /dev/null and b/pla/htdocs/images/countries/bg.png differ
diff --git a/pla/htdocs/images/countries/bh.png b/pla/htdocs/images/countries/bh.png
new file mode 100644 (file)
index 0000000..236693d
Binary files /dev/null and b/pla/htdocs/images/countries/bh.png differ
diff --git a/pla/htdocs/images/countries/bi.png b/pla/htdocs/images/countries/bi.png
new file mode 100644 (file)
index 0000000..7fa236a
Binary files /dev/null and b/pla/htdocs/images/countries/bi.png differ
diff --git a/pla/htdocs/images/countries/bj.png b/pla/htdocs/images/countries/bj.png
new file mode 100644 (file)
index 0000000..290016a
Binary files /dev/null and b/pla/htdocs/images/countries/bj.png differ
diff --git a/pla/htdocs/images/countries/bm.png b/pla/htdocs/images/countries/bm.png
new file mode 100644 (file)
index 0000000..96fb4dc
Binary files /dev/null and b/pla/htdocs/images/countries/bm.png differ
diff --git a/pla/htdocs/images/countries/bn.png b/pla/htdocs/images/countries/bn.png
new file mode 100644 (file)
index 0000000..53460dc
Binary files /dev/null and b/pla/htdocs/images/countries/bn.png differ
diff --git a/pla/htdocs/images/countries/bo.png b/pla/htdocs/images/countries/bo.png
new file mode 100644 (file)
index 0000000..5025e7f
Binary files /dev/null and b/pla/htdocs/images/countries/bo.png differ
diff --git a/pla/htdocs/images/countries/br.png b/pla/htdocs/images/countries/br.png
new file mode 100644 (file)
index 0000000..734ace9
Binary files /dev/null and b/pla/htdocs/images/countries/br.png differ
diff --git a/pla/htdocs/images/countries/bs.png b/pla/htdocs/images/countries/bs.png
new file mode 100644 (file)
index 0000000..36c4cbe
Binary files /dev/null and b/pla/htdocs/images/countries/bs.png differ
diff --git a/pla/htdocs/images/countries/bt.png b/pla/htdocs/images/countries/bt.png
new file mode 100644 (file)
index 0000000..3e10663
Binary files /dev/null and b/pla/htdocs/images/countries/bt.png differ
diff --git a/pla/htdocs/images/countries/bw.png b/pla/htdocs/images/countries/bw.png
new file mode 100644 (file)
index 0000000..bd8e293
Binary files /dev/null and b/pla/htdocs/images/countries/bw.png differ
diff --git a/pla/htdocs/images/countries/by.png b/pla/htdocs/images/countries/by.png
new file mode 100644 (file)
index 0000000..8f5b849
Binary files /dev/null and b/pla/htdocs/images/countries/by.png differ
diff --git a/pla/htdocs/images/countries/bz.png b/pla/htdocs/images/countries/bz.png
new file mode 100644 (file)
index 0000000..fb1bd5a
Binary files /dev/null and b/pla/htdocs/images/countries/bz.png differ
diff --git a/pla/htdocs/images/countries/ca.png b/pla/htdocs/images/countries/ca.png
new file mode 100644 (file)
index 0000000..d06843f
Binary files /dev/null and b/pla/htdocs/images/countries/ca.png differ
diff --git a/pla/htdocs/images/countries/cf.png b/pla/htdocs/images/countries/cf.png
new file mode 100644 (file)
index 0000000..35e6b47
Binary files /dev/null and b/pla/htdocs/images/countries/cf.png differ
diff --git a/pla/htdocs/images/countries/cg.png b/pla/htdocs/images/countries/cg.png
new file mode 100644 (file)
index 0000000..f2db518
Binary files /dev/null and b/pla/htdocs/images/countries/cg.png differ
diff --git a/pla/htdocs/images/countries/ch.png b/pla/htdocs/images/countries/ch.png
new file mode 100644 (file)
index 0000000..9899d78
Binary files /dev/null and b/pla/htdocs/images/countries/ch.png differ
diff --git a/pla/htdocs/images/countries/ci.png b/pla/htdocs/images/countries/ci.png
new file mode 100644 (file)
index 0000000..d536e9b
Binary files /dev/null and b/pla/htdocs/images/countries/ci.png differ
diff --git a/pla/htdocs/images/countries/ck.png b/pla/htdocs/images/countries/ck.png
new file mode 100644 (file)
index 0000000..271f568
Binary files /dev/null and b/pla/htdocs/images/countries/ck.png differ
diff --git a/pla/htdocs/images/countries/cl.png b/pla/htdocs/images/countries/cl.png
new file mode 100644 (file)
index 0000000..97db9ec
Binary files /dev/null and b/pla/htdocs/images/countries/cl.png differ
diff --git a/pla/htdocs/images/countries/cm.png b/pla/htdocs/images/countries/cm.png
new file mode 100644 (file)
index 0000000..febecad
Binary files /dev/null and b/pla/htdocs/images/countries/cm.png differ
diff --git a/pla/htdocs/images/countries/cn.png b/pla/htdocs/images/countries/cn.png
new file mode 100644 (file)
index 0000000..f3f36da
Binary files /dev/null and b/pla/htdocs/images/countries/cn.png differ
diff --git a/pla/htdocs/images/countries/co.png b/pla/htdocs/images/countries/co.png
new file mode 100644 (file)
index 0000000..2781663
Binary files /dev/null and b/pla/htdocs/images/countries/co.png differ
diff --git a/pla/htdocs/images/countries/cr.png b/pla/htdocs/images/countries/cr.png
new file mode 100644 (file)
index 0000000..09bb72d
Binary files /dev/null and b/pla/htdocs/images/countries/cr.png differ
diff --git a/pla/htdocs/images/countries/cu.png b/pla/htdocs/images/countries/cu.png
new file mode 100644 (file)
index 0000000..9be2138
Binary files /dev/null and b/pla/htdocs/images/countries/cu.png differ
diff --git a/pla/htdocs/images/countries/cv.png b/pla/htdocs/images/countries/cv.png
new file mode 100644 (file)
index 0000000..6204e60
Binary files /dev/null and b/pla/htdocs/images/countries/cv.png differ
diff --git a/pla/htdocs/images/countries/cy.png b/pla/htdocs/images/countries/cy.png
new file mode 100644 (file)
index 0000000..14b2deb
Binary files /dev/null and b/pla/htdocs/images/countries/cy.png differ
diff --git a/pla/htdocs/images/countries/cz.png b/pla/htdocs/images/countries/cz.png
new file mode 100644 (file)
index 0000000..