input->get('path', '', 'string'); if (! $page) return; $section = explode('/', $page); $section = $section[0]; // $this->interface = new CKInterface(); $file = PAGEBUILDERCK_PATH . '/libraries/' . $page; $content = file_get_contents($file); $json = json_decode($content); if (! isset($json->htmlcode)) echo 'error'; // replace vars to allow data to be moved from another server $htmlcode = $json->htmlcode; $htmlcode = str_replace("|URIROOT|", JUri::root(true), $htmlcode); $htmlcode = str_replace("|URIBASE|", PAGEBUILDERCK_URI_ROOT, $htmlcode); $htmlcode = str_replace("|PBCK_COMPONENT|", "components/com_pagebuilderck", $htmlcode); $htmlcode = str_replace("|PBCK_ADMIN_COMPONENT|", "administrator/components/com_pagebuilderck", $htmlcode); $htmlcode = str_replace("|IMPORTFOLDER|", 'administrator/components/com_pagebuilderck/libraries/' . $section, $htmlcode); echo $htmlcode; exit; } }