It is not an admitted page
";
}
if (! isset($error_mg)){
$source = get_source($page);
$body_source = "";
if(isset($vars['part_num'])){
$find_part = 0;
foreach ($source as $source_line) {
if (preg_match("/^\*{1,3}/", $source_line)) {
$count++;
$find_part = ($vars['part_num'] == $count) ? 1 : 0 ;
}
if ( $find_part ) $body_source .= $source_line;
}
} else {
$body_source = $source;
}
$get['page'] = $post['page'] = $vars['page'] = $page;
$body = convert_html($body_source);
}
pkwk_common_headers();
header('Content-type: text/html');
$head = <<
EOD;
$head .= <<
$title
EOD;
$head .= ' ' . "\r\n";
$head .= ' \r\n";
$head .= ' ' . "\r\n";
$head .= ' ' . "\r\n";
$head .= ' ' . "\r\n";
$head .= ' ' . "\r\n";
$head .= "\r\n\r\n";
$head .= PLUGIN_PAGE_VIEWER_SCRIPT . "\r\n";
print $head . $body . "\r\n\r\n";
exit;
}
function plugin_page_viewer_convert()
{
global $script, $vars;
$args = func_get_args();
foreach ($args as $opt_key) {
list($key, $val) = explode('=', $opt_key);
$opt[strtolower($key)] = htmlspecialchars($val);
}
if(! isset($opt['refer'])) return 'Please put the page name';
if(! is_page($opt['refer'],$reload=FALSE)) return 'There is not the page name that you appointed';
if(isset($opt['url'])){
$url = $opt['url'];
} else {
$url = $script;
}
if(! preg_match("/\?$/",$url)){
$url .= preg_match("/index.php$/",$url) ? '?' : 'index.php?';
}
$url .= 'plugin=page_viewer&refer=' . $opt['refer'];
if(isset($opt['part_num'])) $url .= '&part_num=' . $opt['part_num'];
if (exist_plugin_convert('greybox')){
$body .= do_plugin_convert(greybox,$opt['caption'] . ',' . $url . ',' . $opt['img'] . ',' . $opt['height'] . ',' . $opt['width']);
}
return $body;
}
function plugin_page_viewer_inline()
{
$args = func_get_args();
array_pop($args);
return call_user_func_array('plugin_page_viewer_convert', $args);
}
?>