haveAuthInfo())
pla_error( $lang['not_enough_login_info'] );
$dn = isset($_GET['dn']) ? $_GET['dn'] : false;
$dn !== false or pla_error($lang['missing_dn_in_query_string']);
$decoded_dn = rawurldecode($dn);
$encoded_dn = rawurlencode($decoded_dn);
/* Template authors may wish to present the user with a link back to the default, generic
template for editing. They may use this as the target of the href to do so.
@deprectated
*/
$default_href = sprintf("edit.php?server_id=%s&dn=%s&use_default_template=true",$ldapserver->server_id,$encoded_dn);
$use_default_template = isset( $_GET['use_default_template'] ) || $config->GetValue('template_engine','enable');
if( $use_default_template ) {
if ($config->GetValue('template_engine','enable'))
require './template_engine.php';
else
require TMPLDIR.'modification/default.php';
} else {
$template = get_template($ldapserver,$dn);
$template_file = TMPLDIR."modification/$template.php";
if (file_exists($template_file))
require $template_file;
else {
printf('%s %s %s
',$lang['missing_template_file'],$template_file,$lang['using_default']);
require TMPLDIR.'modification/default.php';
}
}
?>