]+>' . preg_quote($_symbol_anchor, '#') . '#', '', $body); // Replace IMG tags (= images) with character strings // STEP1: Delete comment lines $body = preg_replace('#-]*(?:-[^>-]+)*?)??)*(?:>|$(?!\n)|--.*$)#', '', $body); // STEP2: Delete tag $body = preg_replace('#()([\w\W]*)()#i', '', $body); // STEP3: paraedit-symbol to pen-emoji(for DoCoMo) $body = preg_replace('#(]+>)?(]+>)?]*alt="Edit"[^>]*>(?(2))(?(1))#i', '勒', $body); // STEP4: => change to $body = preg_replace('#]*)title="keitai"[^>]*>#i', '', $body); // With ALT option $body = preg_replace('#(]+>)?(]+>)?]*alt="([^"]+)"[^>]*>(?(2))(?(1))#i', '[$3]', $body); // Without ALT option $body = preg_replace('#(]+>)?(]+>)?]+>(?(2))(?(1))#i', '[img]', $body); // STEP5: change to to 1) die('Unable to edit: Too large contents for your device'); // Get one page $body = substr($body, $pageno * $max_size, $max_size); // Navigation resource string $navistr = array( 'start' => '[u]', 'final' => '[b]', 'new' => 'New', 'edit' => 'Edit', 'freeze' => 'Freeze', 'unfreeze' => 'Unfreeze', 'top' => 'Top', 'menu' => 'Menu', 'recent' => 'Recent', 'prev' => 'Prev', 'next' => 'Next', 'reload' => 'Reload', ); // ---- // Top navigation (text) bar $headnavi = array(); $footnavi = array(); $headnavi[] = '' . $navistr['final'] . ''; $footnavi[] = '' . $navistr['start'] . ''; if ($rw) { $footnavi[] = '1.New'; $footnavi[] = '2.Edit'; if ($is_read && $function_freeze) { if (! $is_freeze) { $footnavi[] = '3.Freeze'; } else { $footnavi[] = '3.Unfreeze'; } } } $footnavi[] = '0.Top'; $headnavi[] = '4.Menu'; $headnavi[] = '5.Recent'; // Previous / Next block if ($pagecount > 1) { $prev = $pageno - 1; $next = $pageno + 1; if ($pageno > 0) { $headnavi[] = '7.Prev'; } $navi[] = $next . '/' . $pagecount . ' '; if ($pageno < $pagecount - 1) { $headnavi[] = '8.Next'; } } $headnavi[] = '9.Reload'; $headnavi = join(' ', $headnavi); $footnavi = join(' ', $footnavi); // ---- // 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 ?>