phpldapadmin/htdocs/ldif_import_form.php

62 lines
1.7 KiB
PHP
Raw Normal View History

2009-06-30 09:22:30 +00:00
<?php
2009-06-30 09:40:37 +00:00
// $Header: /cvsroot/phpldapadmin/phpldapadmin/htdocs/ldif_import_form.php,v 1.19.2.1 2005/10/19 13:26:21 wurley Exp $
2009-06-30 09:22:30 +00:00
2009-06-30 09:29:51 +00:00
/**
2009-06-30 08:07:14 +00:00
* Displays a form to allow the user to upload and import
* an LDIF file.
*
* Variables expected as GET vars:
* - server_id
2009-06-30 09:29:51 +00:00
*
* @package phpLDAPadmin
*/
/**
2009-06-30 08:07:14 +00:00
*/
2009-06-30 09:22:30 +00:00
require './common.php';
2009-06-30 08:07:14 +00:00
2009-06-30 09:40:37 +00:00
if (! ini_get('file_uploads'))
pla_error($lang['php_upload']);
2009-06-30 09:29:51 +00:00
$server_id = (isset($_GET['server_id']) ? $_GET['server_id'] : '');
$ldapserver = $ldapservers->Instance($server_id);
2009-06-30 08:07:14 +00:00
2009-06-30 09:29:51 +00:00
if( $ldapserver->isReadOnly() )
pla_error( $lang['no_updates_in_read_only_mode'] );
if( ! $ldapserver->haveAuthInfo())
pla_error( $lang['not_enough_login_info'] );
2009-06-30 08:07:14 +00:00
2009-06-30 09:22:30 +00:00
include './header.php'; ?>
2009-06-30 08:07:14 +00:00
<body>
2009-06-30 08:09:20 +00:00
<h3 class="title"><?php echo $lang['import_ldif_file_title']?></h3>
2009-06-30 09:29:51 +00:00
<h3 class="subtitle"><?php echo $lang['server']?>: <b><?php echo htmlspecialchars( $ldapserver->name ); ?></b></h3>
2009-06-30 08:07:14 +00:00
<br />
<br />
2009-06-30 08:09:20 +00:00
<?php echo $lang['select_ldif_file']?><br />
2009-06-30 08:07:14 +00:00
<br />
<form action="ldif_import.php" method="post" class="new_value" enctype="multipart/form-data">
2009-06-30 09:22:30 +00:00
2009-06-30 08:07:14 +00:00
<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />
2009-06-30 09:22:30 +00:00
<input type="file" name="ldif_file" /> <br />
<div style="margin-top: 5px;"><input type="checkbox" name="continuous_mode" value="1" /><span style="font-size: 90%;"><?php echo $lang['dont_stop_on_errors']; ?></span></div>
<div style="margin-top:10px;">
<input type="submit" value="<?php echo $lang['proceed_gt']?>" />
</div>
<?php
if( ! ini_get( 'file_uploads' ) )
echo "<br /><small><b>" . $lang['warning_file_uploads_disabled'] . "</b></small><br />";
else
echo "<br /><small><b>" . sprintf( $lang['max_file_size'], ini_get( 'upload_max_filesize' ) ) . "</b></small><br />";
?>
2009-06-30 08:07:14 +00:00
</form>
</body>
</html>