Location: PHPKode > projects > LDAPted > ldapted/includes/listentries/Detail.php
<?php
/***************************************************************************
 *
 *                                  Detail.php
 *                              -------------------
 *
 *   begin                : Friday, Jul 5, 2002
 *   copyright            : (C) 2002 The Kabramps Team
 *   email                : hide@address.com,
 *                          hide@address.com
 *
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   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.
 *   (http://www.gnu.org/licenses/gpl.html)
 *
 ***************************************************************************/

class Detail extends ListEntry {
  
  function Detail ($entry, $attributes, $xml, $form, $tmpl) {
    $this->ListEntry($entry, $attributes, $xml, $form, $tmpl);
  }

  function get_view () {
    
    global $options;

    $dnObj = new dnInterpreter($this->entry["dn"]);
    for ($i=0; $i < count($this->attributes); $i++) {
      $assign[$this->attributes[$i]] = $this->control[$this->attributes[$i]]->get_view_panel();
    }
    
    $this->tmpl->assign('attribute',$assign);
    
    $this->tmpl->assign(array("TYPE"     => $dnObj->get_type($dnObj->get_leaf()),
			                  "DN"       => $this->entry["dn"],
			                  "WINDOWID" => $dnObj->get_javascript_encode(),
			                  "FORMULAR" => $this->form,
			                  'MODE'     => 'view',
			            ));

    return $this->tmpl->fetch("adapted/listentries/detail.tpl");
  }
}

?>
Return current item: LDAPted