-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathimporter.php
48 lines (39 loc) · 1006 Bytes
/
importer.php
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
<?php
/* importer run as www-data user */
include('conf.inc.php');
include('modules/common.inc.php');
$now=strftime("%d/%m/%Y %H:%M:%S");
class GUI {
function GUI() {
$this->info='';
$this->error='';
}
function info($txt) {
global $now;
if($txt == '') return;
fwrite(STDERR, "[$now]: ".print_r($txt, true)." \n");
}
function debug($txt) {
if($txt == '') return;
if (DEBUG)
fwrite(STDERR, "D: ".print_r($txt, true)." \n");
}
function debuga($txt) {
$this->debug($txt);
}
function session_info($txt) {
$this->info.="$txt<br/>";
$this->info("SESSION INFO: ".$txt);
}
function session_error($txt) {
$this->error.="$txt<br/>";
$this->debug("SESSION ERROR:".$txt);
}
}
$gui = new GUI();
include("classes/ldap.class.php");
include("classes/importer.class.php");
global $ldap;
$ldap = new LDAP();
$importer = new Importer();
$importer->doImport();