File: ldif_import_form.php

package info (click to toggle)
phpldapadmin 0.9.5-3sarge3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,052 kB
  • ctags: 2,526
  • sloc: php: 21,258; sh: 262; makefile: 132; xml: 42
file content (54 lines) | stat: -rw-r--r-- 1,632 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
// $Header: /cvsroot/phpldapadmin/phpldapadmin/ldif_import_form.php,v 1.16 2004/10/24 23:51:49 uugdave Exp $
 

/* 
 * ldif_import_form.php
 * Displays a form to allow the user to upload and import
 * an LDIF file.
 *
 * Variables expected as GET vars:
 *  - server_id
 */

require './common.php';

$server_id = $_GET['server_id'];
$server_name = $servers[$server_id]['name'];

check_server_id( $server_id ) or pla_error( $lang['bad_server_id'] );
have_auth_info( $server_id ) or pla_error( $lang['not_enough_login_info'] );

include './header.php'; ?>

<body>

<h3 class="title"><?php echo $lang['import_ldif_file_title']?></h3>
<h3 class="subtitle"><?php echo $lang['server']?>: <b><?php echo htmlspecialchars( $server_name ); ?></b></h3>

<br />
<br />
<?php echo $lang['select_ldif_file']?><br />
<br />

<form action="ldif_import.php" method="post" class="new_value" enctype="multipart/form-data">

<input type="hidden" name="server_id" value="<?php echo $server_id; ?>" />

<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 />";
?>


</form>

</body>
</html>