]+>' . preg_quote($_symbol_anchor, '#') . '#', '', $body); // Shrink IMG tags (= images) with character strings // With ALT option $body = preg_replace('#(]+>)?(]+>)?]*alt="([^"]+)"[^>]*>(?(2))(?(1))#i', '[$3]', $body); // Without ALT option $body = preg_replace('#(]+>)?(]+>)?]+>(?(2))(?(1))#i', '[img]', $body); // ---- // Check content volume, Page numbers, divided by this skin $pagecount = ceil(strlen($body) / $max_size); // Too large contents to edit if ($edit && $pagecount > 1) die('Unable to edit: Too large contents for your device'); // Get one page $body = substr($body, $pageno * $max_size, $max_size); // ---- // Top navigation (text) bar $navi = array(); $navi[] = '0.Top'; if ($rw) { $navi[] = '1.New'; $navi[] = '2.Edit'; if ($is_read && $function_freeze) { if (! $is_freeze) { $navi[] = '3.Freeze'; } else { $navi[] = '3.Unfreeze'; } } } $navi[] = '4.Menu'; $navi[] = '5.Recent'; // Previous / Next block if ($pagecount > 1) { $prev = $pageno - 1; $next = $pageno + 1; if ($pageno > 0) { $navi[] = '7.Prev'; } $navi[] = $next . '/' . $pagecount . ' '; if ($pageno < $pagecount - 1) { $navi[] = '8.Next'; } } $navi = join(' | ', $navi); // ---- // Output HTTP headers pkwk_headers_sent(); if(TRUE) { // Force Shift JIS encode for Japanese embedded browsers and devices header('Content-Type: text/html; charset=Shift_JIS'); $title = mb_convert_encoding($title, 'SJIS', SOURCE_ENCODING); $body = mb_convert_encoding($body, 'SJIS', SOURCE_ENCODING); } else { header('Content-Type: text/html; charset=' . CONTENT_CHARSET); } // Output ?><?php echo $title ?>