<?php // Output HTTP headers pkwk_common_headers(); header('Cache-control: no-cache'); header('Pragma: no-cache'); header('Content-Type: text/html; charset=' . CONTENT_CHARSET); // Output HTML DTD, <html>, and receive content-type if (isset($pkwk_dtd)) { $_qhm_values['meta_content_type'] = pkwk_output_dtd($pkwk_dtd); } else { $_qhm_values['meta_content_type'] = pkwk_output_dtd(); } include_template('skin/killerpage2/pukiwiki.skin.php', $_qhm_values, false); exit(0);
switch (UI_LANG) { case 'ja_JP': $css_charset = 'Shift_JIS'; break; } // Output header pkwk_common_headers(); header('Cache-Control: no-cache'); header('Pragma: no-cache'); header('Content-Type: text/html; charset=' . CONTENT_CHARSET); header('ETag: ' . md5(MUTIME)); // Output HTML DTD, <html>, and receive content-type if (isset($pkwk_dtd)) { $meta_content_type = pkwk_output_dtd($pkwk_dtd); } else { $meta_content_type = pkwk_output_dtd(); } // Plus! not use $meta_content_type. because meta-content-type is most browser not used. umm... ?> <head> <meta http-equiv="content-type" content="application/xhtml+xml; charset=<?php echo CONTENT_CHARSET; ?> " /> <meta http-equiv="content-style-type" content="text/css" /> <meta http-equiv="content-script-type" content="text/javascript" /> <?php if (!$is_read) { ?> <meta name="robots" content="NOINDEX,NOFOLLOW" />
function plugin_tb_output_htmllist($tb_id) { pkwk_common_headers(); echo 'This function had been removed now. It will be created soon.<br />' . "\n"; echo 'Sorry for your inconvenience.'; exit; // ---- // Skeleton Logic global $script; global $_tb_date; $page = tb_id2page($tb_id); if ($page === false) { return false; } $data = tb_get(tb_get_filename($page)); // Sort: The first is the latest usort($data, create_function('$a,$b', 'return $b[0] - $a[0];')); $tb_body = ''; foreach ($data as $x) { if (count($x) != 5) { continue; } // Ignore incorrect record list($time, $url, $title, $excerpt, $blog_name) = $x; if ($title == '') { $title = 'no title'; } $time = date($_tb_date, $time + LOCALZONE); // May 2, 2003 11:25 AM $tb_body .= <<<EOD EOD; } // Output start pkwk_common_headers(); // BugTrack/466 Care for MSIE trouble // Logically correct, but MSIE will treat the data like 'file downloading' //header('Content-type: application/xhtml+xml; charset=UTF-8'); header('Content-type: text/html; charset=UTF-8'); // Works well $meta_content_type = pkwk_output_dtd(PKWK_DTD_XHTML_1_0_TRANSITIONAL, 'UTF-8'); $msg = <<<EOD <head> {$meta_content_type} </head> <body> {$script}?tb_id={$tb_id}<br /><br /> {$tb_body} </body> </html> EOD; echo mb_convert_encoding($msg, 'UTF-8', SOURCE_ENCODING); exit; }
function plugin_print_action() { global $defaultpage, $page_title, $newtitle; global $use_local_time, $language; global $head_tags, $foot_tags, $pkwk_dtd; global $vars; global $fixed_heading_edited, $autoglossary, $_symbol_paraedit, $_symbol_paraguiedit; global $_symbol_noexists; global $foot_explain, $note_hr; if (empty($vars['page']) || !is_page($vars['page'])) { return ''; } $page = $vars['page']; check_readable($page, false); $head = isset($vars['nohead']) ? 0 : 1; $foot = isset($vars['nofoot']) ? 0 : 1; $noa = isset($vars['noa']) ? 1 : 0; $fixed_heading_edited = $autoglossary = 0; $_symbol_paraedit = $_symbol_paraguiedit = ' '; $body = convert_html(get_source($page)); // Yetlist $noexists_pattern = '#<span class="noexists">([^<]*)<a[^>]+>' . preg_quote($_symbol_noexists, '#') . '</a></span>#'; $body = preg_replace($noexists_pattern, '$1', $body); // List of footnotes ksort($foot_explain, SORT_NUMERIC); $notes = !empty($foot_explain) ? $note_hr . join("\n", $foot_explain) : ''; if ($noa) { $body = strip_a($body); $notes = strip_a($notes); } // Tags will be inserted into <head></head> $head_tag = !empty($head_tags) ? join("\n", $head_tags) . "\n" : ''; $foot_tag = !empty($foot_tags) ? join("\n", $foot_tags) . "\n" : ''; $css_charset = 'utf-8'; switch (UI_LANG) { case 'ja_JP': $css_charset = 'Shift_JIS'; break; } // Output header pkwk_common_headers(); header('Cache-Control: no-cache'); header('Pragma: no-cache'); header('Content-Type: text/html; charset=' . CONTENT_CHARSET); header('ETag: ' . md5(MUTIME)); // Output HTML DTD, <html>, and receive content-type $meta_content_type = isset($pkwk_dtd) ? pkwk_output_dtd($pkwk_dtd) : pkwk_output_dtd(); $CONTENT_CHARSET = CONTENT_CHARSET; $SKIN_URI = SKIN_URI; $IMAGE_URI = IMAGE_URI; // Plus! not use $meta_content_type. because meta-content-type is most browser not used. umm... echo <<<EOD <head> <meta http-equiv="content-type" content="application/xhtml+xml; charset={$CONTENT_CHARSET}" /> <meta http-equiv="content-style-type" content="text/css" /> <meta http-equiv="content-script-type" content="text/javascript" /> <meta name="robots" content="NOINDEX,NOFOLLOW" /> EOD; // $newtitle - TITLE: (convert_html) if ($newtitle != '') { $h1 = $newtitle . ' - ' . $page_title; } elseif ($page == $defaultpage) { $h1 = $page_title; } else { $h1 = $page . ' - ' . $page_title; } echo ' <title>' . $h1 . '</title>' . "\n"; echo <<<EOD <link rel="stylesheet" href="{$SKIN_URI}default.css" type="text/css" media="screen" charset="{$css_charset}" /> <link rel="stylesheet" href="{$SKIN_URI}print.css" type="text/css" media="print" charset="{$css_charset}" /> <script type="text/javascript"> <!-- EOD; if (exist_plugin_convert('js_init')) { echo do_plugin_convert('js_init'); } echo <<<EOD // --> </script> <script type="text/javascript" src="{$SKIN_URI}lang/{$language}.js"></script> <script type="text/javascript" src="{$SKIN_URI}default.js"></script> EOD; if (!$use_local_time) { echo <<<EOD <script type="text/javascript" src="{$SKIN_URI}tzCalculation_LocalTimeZone.js"></script> EOD; } echo $head_tag; echo <<<EOD </head> <body> EOD; /* if ($head) { echo <<<EOD <div id="header"> <h1 class="title">$h1</h1> </div> EOD; } */ if ($head) { // Last modification date (string) of the page $lastmodified = get_date('D, d M Y H:i:s T', get_filetime($page)) . ' ' . get_pg_passage($page, FALSE); // <span style="font-size: large;line-height: 1;margin: 0px;padding: 0px;">$h1</span> $PRINT_HEAD_BGCOLOR = PRINT_HEAD_BGCOLOR; $PRINT_HEAD_BORDER = PRINT_HEAD_BORDER; echo <<<EOD <div style="background-color: {$PRINT_HEAD_BGCOLOR};border: 1px {$PRINT_HEAD_BORDER} solid;padding: 6px 8px;margin: 6px 1%;"> \t<h1 class="title">{$h1}</h1> \t<p style="font-size:10px;text-align:right;">Last-Modified: {$lastmodified}</p> </div> EOD; } echo <<<EOD <div id="contents"> <table class="contents" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="ctable" valign="top"> <div id="body"> EOD; echo $body; echo <<<EOD </div> </td> </tr> </table> </div> EOD; if ($notes) { echo <<<EOD <div id="note"> {$notes} </div> EOD; } if ($foot) { echo print_foot_area(); } if (exist_plugin_convert('tz')) { echo do_plugin_convert('tz'); } echo $foot_tag; echo <<<EOD </body> </html> EOD; die; }
function qhm_output_dtd($pkwk_dtd, $content_charset, $encode) { // Output HTTP headers pkwk_common_headers(); header('Cache-control: no-cache'); header('Pragma: no-cache'); header('Content-Type: text/html; charset=' . $encode); // Output HTML DTD, <html>, and receive content-type $meta_content_type = pkwk_output_dtd($pkwk_dtd); if ($content_charset != $encode) { $meta_content_type = str_replace($content_charset, $encode, $meta_content_type); } return $meta_content_type; }
function auth_catbody($title, $contents, $retry = false) { global $script, $default_script, $admin_email; $qm = get_qm(); // Output HTTP headers pkwk_common_headers(); header('Cache-control: no-cache'); header('Pragma: no-cache'); header('Content-Type: text/html; charset=' . CONTENT_CHARSET); // Output HTML DTD, <html>, and receive content-type if (isset($pkwk_dtd)) { $meta_content_type = pkwk_output_dtd($pkwk_dtd); } else { $meta_content_type = pkwk_output_dtd(); } $qv = QHM_VERSION; $pv = S_VERSION; $server_port = SERVER_PORT; $script_name = SCRIPT_NAME; $http_host = $_SERVER['HTTP_HOST']; $script_url = qhm_get_script_path(); $dispjs = 'scriptErr.visibility = "hidden";'; if ($default_script != '') { $s_notice_msg = $qm->replace('ss_authform.ntc_set_script', $script_url . '?plugin=qhmsetting&phase=script&mode=form'); $dispjs = <<<EOD \t\t\tscriptErr.style.border = '2px solid #66AACC'; \t\t\tscriptErr.style.backgroundColor = '#EEEEFF'; \t\t\tscriptErr.innerHTML = '<p>{$s_notice_msg}</p>'; EOD; } $s_err_msg = $qm->replace('ss_authform.err_set_script', $script_url . '?plugin=qhmsetting&phase=script&mode=form'); $jumphome_label = $qm->m['ss_authform']['jump_home']; $licence_msg = $qm->replace('ss_authform.licence', $qv, $pv); $error_login = ''; if ($retry && $admin_email != '') { $error_login = $qm->replace('ss_authform.err_login', $script . '?plugin=qhmpw') . ' '; } echo <<<EOD <head> {$meta_content_type} <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="robots" content="NOINDEX, NOFOLLOW" /> <title>{$title}</title> <script type="text/javascript"> <!-- window.onload = function() { \tvar scriptErr = document.getElementById('scripterror'); \t// wrong script \tif (location.hostname != '{$http_host}' \t\t\t|| location.port != '{$server_port}' \t\t\t|| location.pathname != '{$script_name}' ) { \t\tvar href = location.href.replace(location.search, ''); \t\tif(! href.match(/\\.php\$/)){ \t\t\thref += 'index.php'; \t\t} \t\tif (href == '{$script}') { \t\t\t{$dispjs} \t\t} \t\telse { \t\t\tscriptErr.style.border = '2px solid #FF3300'; \t\t\tscriptErr.style.backgroundColor = '#FFEEEE'; \t\t\tscriptErr.innerHTML = '<p style="color:red">{$s_err_msg}</p>'; \t\t} \t} \telse { \t\tscriptErr.visibility = "hidden"; \t} \t// wrong session save path \treturn false; } //--> </script> <style> .wrapper { margin: 0 auto; width: 300px; } .box { border:1px #ccc solid; padding:1em; color:#666; margin-top:15px; font-size:14px; border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; box-shadow: 2px 2px 8px #ccc; -moz-box-shadow: 2px 2px 8px #ccc; -webkit-box-shadow: 2px 2px 8px #ccc; } .box input[type=text], .box input[type=password] { margin: 0; font-size: 18px; border: 1px solid #999; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; padding: 3px; width: 260px; } .title { font-size:24px; font-weight: normal; color: #666; text-align:center; } body{ font-family: Arial, sans-serif; } label { display:block; margin-top: 1em; } input[type=submit], input[type=button] { border-style:none; display: inline-block; color: #fff; text-decoration: none; -moz-border-radius: 6px; -webkit-border-radius: 6px; -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.6); -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.6); text-shadow: 0 -1px 1px rgba(0,0,0,0.25); border-bottom: 1px solid rgba(0,0,0,0.25); position: relative; cursor: pointer; font-size: 18px; padding: 4px 14px 4px; background-color: #2981e4; margin: 1em 0 1em; } input[type=submit]:hover { background-color: #2575cf; } #footer { text-align:right;font-size:12px;color:#999 } #footer a { font-size:12px;color:#666 } </style> </head> <body> <div class="wrapper"> <h2 class="title">QHM {$title}</h2> {$contents} <div id="scripterror"></div> <div id="footer"> <p style="text-align:right;">{$error_login}<a href="{$script_url}" style="">{$jumphome_label}</a></p> <p style="">{$licence_msg}</p> </div> </div> </body> </html> EOD; }
function plugin_protect_convert() { global $use_local_time, $language; global $head_tags, $foot_tags, $pkwk_dtd; global $vars; global $fixed_heading_edited, $autoglossary, $_symbol_paraedit, $_symbol_paraguiedit; global $_symbol_noexists; global $foot_explain, $note_hr; $fixed_heading_edited = $autoglossary = 0; $_symbol_paraedit = $_symbol_paraguiedit = ' '; if (func_num_args() == 1) { list($plugin) = func_get_args(); } else { $plugin = ''; } $body = protect_body($plugin); // Yetlist $noexists_pattern = '#<span class="noexists">([^<]*)<a[^>]+>' . preg_quote($_symbol_noexists, '#') . '</a></span>#'; $body = preg_replace($noexists_pattern, '$1', $body); // List of footnotes ksort($foot_explain, SORT_NUMERIC); $notes = !empty($foot_explain) ? $note_hr . join("\n", $foot_explain) : ''; // Tags will be inserted into <head></head> $head_tag = !empty($head_tags) ? join("\n", $head_tags) . "\n" : ''; $foot_tag = !empty($foot_tags) ? join("\n", $foot_tags) . "\n" : ''; $css_charset = 'utf-8'; switch (UI_LANG) { case 'ja_JP': $css_charset = 'Shift_JIS'; break; } // Output header pkwk_common_headers(); header('Cache-Control: no-cache'); header('Pragma: no-cache'); header('Content-Type: text/html; charset=' . CONTENT_CHARSET); header('ETag: ' . md5(MUTIME)); // Output HTML DTD, <html>, and receive content-type $meta_content_type = isset($pkwk_dtd) ? pkwk_output_dtd($pkwk_dtd) : pkwk_output_dtd(); $CONTENT_CHARSET = CONTENT_CHARSET; $SKIN_URI = SKIN_URI; $IMAGE_URI = IMAGE_URI; // Plus! not use $meta_content_type. because meta-content-type is most browser not used. umm... echo <<<EOD <head> <meta http-equiv="content-type" content="application/xhtml+xml; charset={$CONTENT_CHARSET}" /> <meta http-equiv="content-style-type" content="text/css" /> <meta http-equiv="content-script-type" content="text/javascript" /> <meta name="robots" content="NOINDEX,NOFOLLOW" /> EOD; echo ' <title>Login</title>' . "\n"; echo <<<EOD <link rel="stylesheet" href="{$SKIN_URI}default.css" type="text/css" media="screen" charset="{$css_charset}" /> <link rel="stylesheet" href="{$SKIN_URI}print.css" type="text/css" media="print" charset="{$css_charset}" /> <script type="text/javascript"> <!-- EOD; if (exist_plugin_convert('js_init')) { echo do_plugin_convert('js_init'); } echo <<<EOD // --> </script> <script type="text/javascript" src="{$SKIN_URI}lang/{$language}.js"></script> <script type="text/javascript" src="{$SKIN_URI}default.js"></script> EOD; if (!$use_local_time) { echo <<<EOD <script type="text/javascript" src="{$SKIN_URI}tzCalculation_LocalTimeZone.js"></script> EOD; } echo $head_tag; echo <<<EOD </head> <body> EOD; echo <<<EOD <div id="contents"> <table class="contents" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="ctable" valign="top"> <div id="body"> EOD; echo $body; echo <<<EOD </div> </td> </tr> </table> </div> EOD; if ($notes) { echo <<<EOD <div id="note"> {$notes} </div> EOD; } if (exist_plugin_convert('tz')) { echo do_plugin_convert('tz'); } echo $foot_tag; echo <<<EOD </body> </html> EOD; die; }