Exemplo n.º 1
0
 *  - 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'] : '';
$encoded_dn = rawurlencode($dn);
$rdn = get_rdn($dn);
$container = get_container($dn);
$attrs = $ldapserver->getDNAttrs($dn);
$select_server_html = server_select_list($ldapserver->server_id, true, 'server_id_dst');
include './header.php';
?>

<body>

<h3 class="title"><?php 
echo _('Compare another DN with') . '&nbsp;' . $rdn;
?>
</h3>
<h3 class="subtitle"><?php 
echo _('Server');
?>
: <b><?php 
echo $ldapserver->name;
?>
Exemplo n.º 2
0
 *
 * @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;
Exemplo n.º 3
0
 * 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">';
Exemplo n.º 4
0
if (isset($ldapserver) && !$ldapserver->haveAuthInfo()) {
    pla_error(_('Not enough information to login to server. Please check your configuration.'));
}
# Output format, table or list?
$result_formats = array('list', 'table');
$format = isset($_GET['format']) ? $_GET['format'] : $config->GetValue('search', 'display');
if (!in_array($format, $result_formats)) {
    $format = 'list';
}
# build the server drop-down html and JavaScript array (for base_dns)
$js_on_change_string = '';
if (isset($_GET['form']) && $_GET['form'] == 'advanced') {
    $js_on_change_string = 'onChange="document.forms[0].base_dn.value=servers[document.forms[0].server_id.value].base_dn"';
}
if (isset($ldapserver)) {
    $server_menu_html = server_select_list($ldapserver->server_id, true, 'server_id', $js_on_change_string);
    $server_info_list = server_info_list();
}
$filter = isset($_GET['filter']) ? clean_search_vals($_GET['filter']) : null;
$attr = isset($_GET['attribute']) ? $_GET['attribute'] : null;
# grab the base dn for the search
if (isset($_GET['base_dn']) && $_GET['base_dn']) {
    $base_dn = $_GET['base_dn'];
    $base_dn_is_invalid = false;
    $base_dn_does_not_exist = false;
    if (trim($base_dn)) {
        if (!is_dn_string($base_dn)) {
            $base_dn_is_invalid = true;
        } elseif (!$ldapserver->dnExists($base_dn)) {
            $base_dn_does_not_exist = true;
        }
Exemplo n.º 5
0
echo '<form action="cmd.php" method="post" name="copy_form">';
echo '<input type="hidden" name="cmd" value="copy" />';
printf('<input type="hidden" name="server_id" value="%s" />', $app['server']->getIndex());
printf('<input type="hidden" name="server_id_src" value="%s" />', $app['server']->getIndex());
printf('<input type="hidden" name="dn_src" value="%s" />', htmlspecialchars($request['dn']));
echo "\n";
echo '<table style="border-spacing: 10px">';
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'));
echo '<td>';
printf('<input type="text" name="dn_dst" size="45" value="%s" />', htmlspecialchars($request['dn']));
draw_chooser_link('copy_form.dn_dst', 'true', get_rdn($request['dn']));
echo '</td>';
echo '</tr>';
echo "\n";
printf('<tr><td>%s:</td><td>%s</td></tr>', _('Destination Server'), server_select_list($app['server']->getIndex(), true, 'server_id_dst'));
echo "\n";
# We search all children, not only the visible children in the tree
$request['children'] = $app['server']->getContainerContents($request['dn']);
if (count($request['children']) > 0) {
    echo '<tr>';
    printf('<td><label for="recursive">%s</label>:</td>', _('Recursive copy'));
    echo '<td><input type="checkbox" id="recursive" name="recursive" onClick="copy_field_toggle(this)" />';
    printf('<small>(%s)</small></td>', _('Recursively copy all children of this object as well.'));
    echo '</tr>';
    echo "\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>';
    echo "\n";
Exemplo n.º 6
0
$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><nobr><input type="text" name="dn" id="dn" style="width:230px" value="%s" />&nbsp;', htmlspecialchars($dn));
draw_chooser_link('export_form.dn');
echo '</nobr></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));
Exemplo n.º 7
0
 protected function tree()
 {
     if (defined('DEBUG_ENABLED') && DEBUG_ENABLED && (($fargs = func_get_args()) || ($fargs = 'NOARGS'))) {
         debug_log('Entered (%%)', 129, 0, __FILE__, __LINE__, __METHOD__, $fargs);
     }
     if (!isset($_SESSION[APPCONFIG])) {
         return;
     }
     if (is_null($this->index)) {
         $this->index = min(array_keys($_SESSION[APPCONFIG]->getServerList()));
     }
     if (count($_SESSION[APPCONFIG]->getServerList()) > 1) {
         echo '<form name="server_select" action="cmd.php" method="post">';
         echo '<table class="server_select"><tr><td>';
         printf('%s:<br />%s', _('Server Select'), server_select_list($this->index, false, 'index', true, sprintf("onchange=\"tree_unhide('index',%s)\"", $this->index)));
         echo '</td></tr></table>';
         echo '</form>';
         echo "\n\n";
     }
     foreach ($_SESSION[APPCONFIG]->getServerList() as $index => $server) {
         printf('<div id="ajSID_%s" style="display: %s">', $server->getIndex(), $server->getIndex() == $this->index ? 'block' : 'none');
         $tree = Tree::getInstance($server->getIndex());
         $tree->draw();
         echo '</div>';
         echo "\n\n";
     }
 }