47 require_once(
"adlparser/SeqTreeBuilder.php");
48 require_once(
"../../../Services/Init/classes/class.ilIniFile.php");
59 define(
"ILIAS_WEB_DIR",
$ini->readVariable(
"clients",
"path"));
60 define(
"ILIAS_ABSOLUTE_PATH",
$ini->readVariable(
'server',
'absolute_path'));
61 define(
"ILIAS_CLIENT_ID",
$ini->readVariable(
'clients',
'default'));
62 define(
"ILIAS_CLIENT_INI",
$ini->readVariable(
'clients',
'inifile'));
73 define(
"ILIAS_DB_NAME",
$cini->readVariable(
"db",
"name"));
74 define(
"ILIAS_DB_HOST",
$cini->readVariable(
"db",
"host"));
75 define(
"ILIAS_DB_USER",
$cini->readVariable(
"db",
"user"));
76 define(
"ILIAS_DB_PASS",
$cini->readVariable(
"db",
"pass"));
77 define(
"ILIAS_DB_TYPE",
$cini->readVariable(
"db",
"type"));
88 while (false !== ($entry =
$d->read())) {
89 if($entry !=
'.' && $entry !=
'..' && is_dir($search_path.
"/".$entry)) {
90 array_push(
$dirs, $entry);
97 for ($i=0;$i<count(
$dirs);$i++) {
100 if (is_file($toparse)) {
103 $id = $webdir=str_replace(
"lm_",
"",
$dirs[$i]);
104 $result = mysql_query(
"SELECT * FROM cp_package WHERE(obj_id=$id)");
106 if (count(
$row)>0 && strlen(
$row[
'jsdata'])>10) {
110 $global=
$ret[
'global'];
111 $adltree=mysql_escape_string(json_encode(
$ret[
'tree']));
112 $result_update = mysql_query(
"UPDATE cp_package SET activitytree='$adltree',global_to_system='$global' WHERE(obj_id=$id)") or die(mysql_error());
113 echo "Updated activitytree for: ".
$dirs[$i]." Global:".$global." \
n";