44 require_once(
"adlparser/SeqTreeBuilder.php");
45 require_once(
"../../../classes/class.ilIniFile.php");
54 define(
"ILIAS_WEB_DIR",
$ini->readVariable(
"clients",
"path"));
55 define(
"ILIAS_ABSOLUTE_PATH",
$ini->readVariable(
'server',
'absolute_path'));
56 define(
"ILIAS_CLIENT_ID",
$ini->readVariable(
'clients',
'default'));
57 define(
"ILIAS_CLIENT_INI",
$ini->readVariable(
'clients',
'inifile'));
68 define(
"ILIAS_DB_NAME",
$cini->readVariable(
"db",
"name"));
69 define(
"ILIAS_DB_HOST",
$cini->readVariable(
"db",
"host"));
70 define(
"ILIAS_DB_USER",
$cini->readVariable(
"db",
"user"));
71 define(
"ILIAS_DB_PASS",
$cini->readVariable(
"db",
"pass"));
72 define(
"ILIAS_DB_TYPE",
$cini->readVariable(
"db",
"type"));
83 while (false !== ($entry =
$d->read())) {
84 if($entry !=
'.' && $entry !=
'..' && is_dir($search_path.
"/".$entry)) {
85 array_push(
$dirs, $entry);
92 for ($i=0;$i<count(
$dirs);$i++) {
95 if (is_file($toparse)) {
98 $id = $webdir=str_replace(
"lm_",
"",
$dirs[$i]);
99 $result = mysql_query(
"SELECT * FROM cp_package WHERE(obj_id=$id)");
101 if (count(
$row)>0 && strlen(
$row[
'jsdata'])>10) {
105 $global=
$ret[
'global'];
106 $adltree=mysql_escape_string(json_encode(
$ret[
'tree']));
107 $result_update = mysql_query(
"UPDATE cp_package SET activitytree='$adltree',global_to_system='$global' WHERE(obj_id=$id)") or die(mysql_error());
108 echo "Updated activitytree
for: ".
$dirs[$i]." Global:".$global." \
n";