$xml = new AContent_LiveContentLink($content_id, 0); // store the XML data into the database // (implementation of AContent Live Content Link) // Hack to change parent page to a folder if (isset($_SESSION['s_cid'])) { $this_cid = $_SESSION['s_cid']; } else { $this_cid = $_REQUEST['cid']; } $sql_folder = "UPDATE %scontent SET content_type ='1', content_parent_id = '0', formatting = '0' WHERE content_id = %d"; $result = queryDB($sql_folder, array(TABLE_PREFIX, $this_cid)); require_once AT_INCLUDE_PATH . 'classes/AContent_lcl/AContent_lcl_importxml.class.php'; $ac_xml = new AContent_lcl_importxml(); // ATutor course $course_id = htmlentities($_SESSION['course_id']); $import = $ac_xml->importXML($xml->xmlStructure, $course_id); if ($import) { $msg->addFeedback('BASICLTI_SAVED'); } } } // show "Close window" button echo '<div style="text-align:center; margin:0 auto; padding: 20px">'; echo '<input type="submit" onclick="window.opener.location.reload(); javascript:window.close()" value="Close Window" class="button" />'; echo '</div>'; require AT_INCLUDE_PATH . 'footer.inc.php'; die; } /* get a list of all the tools, we have */ $sql = "SELECT * FROM %sbasiclti_tools WHERE course_id = 0" . " OR course_id=%d ORDER BY course_id,title"; $rows_tools = queryDB($sql, array(TABLE_PREFIX, $_SESSION['course_id']));