var_dump($this->times); } if ($this->session_authentication) { $_SESSION["wpd_session_auth"] = uniqid("wpd_session_auth"); } return $rslt; } function addTitle($content = '') { return "<div style=\"border:solid 1px red;\">" . $content . "</div>"; } } } //Initialize the WpDojoLoader class if (class_exists("WpDojoLoader")) { $dl_dojoLoader = new WpDojoLoader(); } //Initialize the WpDojoLoader_AdminLoader class if (class_exists("WpDojoLoader_AdminLoader")) { $dl_adminLoader = new WpDojoLoader_AdminLoader(); } //Initialize the admin and users panel if (!function_exists("WpDojoLoader_showAdmin")) { function WpDojoLoader_showAdmin() { global $dl_adminLoader; if (!isset($dl_adminLoader)) { return; } if (function_exists('add_options_page')) { add_options_page('Dojo Loader', 'Dojo Loader', 9, basename(__FILE__), array(&$dl_adminLoader, 'printAdminPage'));
if ($pos === false) { $authorised = false; } } /* */ } else { $authorised = true; } /**/ if ($authorised) { if (isset($_GET['id']) && !empty($_GET['id'])) { //var_dump(get_post($_GET['id'])); $pst = get_post($_GET['id']); //echo "post_status:".$pst->post_status; if ($pst->post_status == "publish") { $dl_dojoLoader = new WpDojoLoader(); //$dl_dojoLoader->addcontenttags = false; $tplname = $_GET['template']; $uid = $_GET['uid']; $cntgroup = $_GET['contentgroup']; $dl_dojoLoader->customtemplates = array(array($tplname, $uid)); $dl_dojoLoader->customuid = $uid; $dl_dojoLoader->contentgroup = $cntgroup; $dl_dojoLoader->ajaxload = true; $dl_dojoLoader->debugmode = false; $content = $dl_dojoLoader->addContent($pst->post_content); echo $content; } } else { die('{"response":"1","message":"' . __('No id or content.') . '"}'); }