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