#',$sHTML,-1,PREG_SPLIT_NO_EMPTY); $body_array = preg_split('##',$sHTML,-1,PREG_SPLIT_NO_EMPTY); $res = array(); if (count($title_array) > 2) { $res['title'] = $title_array[1]; } if (count($body_array) > 2) { $res['body'] = $body_array[1]; } //var_dump($body_array); return $res; } function isImageFile($sHelpPath) { // from pluginutil.inc.php $fspath = KT_DIR . $sHelpPath; $pi = pathinfo($fspath); $mime_type = ""; $sExtension = KTUtil::arrayGet($pi, 'extension'); if (!empty($sExtension)) { $mime_type = DBUtil::getOneResultKey(array("SELECT mimetypes FROM " . KTUtil::getTableName('mimetypes') . " WHERE LOWER(filetypes) = ?", $sExtension), "mimetypes"); } if (($mime_type == 'image/png') || ($mime_type == 'image/gif') || ($mime_type == 'image/jpeg')) { } return false; } function outputHelpImage($sHelpPath) { $fspath = KT_DIR . $sHelpPath; header("Content-Type: $mime_type"); header("Content-Length: " . filesize($fspath)); readfile($fspath); // does this output it?! exit(0); } } ?>