2 //YANMAH2 - Yet ANother Mobile Accelerated HatenaHaiku
3 //(c) 2014 YANMAH2 project
4 //This program is freesoftware. you can redistribute it and/or modify it under the terms of the [GNU Affero GPL v3](http://www.gnu.org/licenses/agpl.html).
7 define("HELLO","world");
8 require_once "product_definitions.php";
9 require_once "configurable_variables.php";
10 require_once "common_functions.php";
13 require_once 'init_processor.php';
14 // var_dump($_SESSION);
15 if (isset($_GET["reftime"]) && $_GET["reftime"] != '') {
16 header('Cache-Control: private, max-age=' . 60*60*24);
20 $selfcall = htmlspecialchars($_SERVER["PHP_SELF"], ENT_QUOTES);
21 $safequery = htmlspecialchars($_SERVER["QUERY_STRING"], ENT_QUOTES);
23 <?php //セキュリティのための前処理。
25 if (isset($_GET["keyword"])) checkKeyword($_GET["keyword"]);
26 if (isset($_GET['word'])) checkKeyword($_GET['word']);
27 if (isset($_GET['users'])) checkKeyword($_GET['users']);
28 if (isset($_GET["user"])) {
29 checkId($_GET["user"]);
30 $_GET['user'] = preg_replace("/ +$/u", "", $_GET['user']);
32 if (isset($_GET["following"])) {
33 checkId($_GET["following"]);
34 $_GET['following'] = preg_replace("/ +$/u", "", $_GET['following']);
37 if (isset($_GET['page'])) checkPagenum($_GET['page']);
38 if (isset($_GET['image'])) checkImagemode($_GET['image']);
39 if (isset($_SESSION['image'])) checkImagemode($_SESSION['image']);
40 if (isset($_GET['album'])) checkAlbum($_GET['album']);
43 if (!isset($_SESSION['auth']) || $_SESSION['auth'] != TRUE){
44 // if ($_SESSION['image'] != 'on'){
46 if (isset($_COOKIE[session_name()])){
47 setcookie(session_name(), '', time() - 42000, dirname($_SERVER['SCRIPT_NAME']) . '/', $_SERVER["SERVER_NAME"]);
55 if (isset($_GET['with']) || isset($_GET['log'])){
56 require 'login_processor.php';
57 }// if (isset($_SESSION['oauth_stat'])) session_regenerate_id(TRUE);
61 if (isset($_POST['posting'])){
62 // if (isset($_SESSION['postkey']) && isset($_POST['postkey']) && md5($_SESSION['postkey']) == $_POST['postkey']){
63 // unset($_SESSION['postkey']);
66 require 'post_processor.php';
72 if (isset($_GET["keyword"]) && $_GET["keyword"] != ''){
73 $get_keyword = htmlspecialchars($_GET["keyword"], ENT_QUOTES);
74 $json_url = "{$api_base_url}statuses/keyword_timeline.xml?word=" . rawurlencode($_GET['keyword']) . "&body_formats=html_touch";
75 $page_head = $get_keyword . " でひとこと";
76 $official = "{$haiku_official_url}keyword/" . rawurlencode($_GET['keyword']);
77 $self_anchor = "http://{$_SERVER["SERVER_NAME"]}{$selfcall}?keyword=" . rawurlencode($_GET['keyword']);
78 $entries_mode = 'keyword_timeline';
79 } elseif (isset($_GET["user"]) && $_GET["user"] != ''){
80 $get_user = htmlspecialchars($_GET["user"], ENT_QUOTES);
81 $json_url = "{$api_base_url}statuses/user_timeline/".$_GET['user'].".xml?body_formats=html_touch";
82 $page_head = "{$get_user} のエントリー";
83 $official = "{$haiku_official_url}{$get_user}/";
84 $self_anchor = "http://{$_SERVER["SERVER_NAME"]}{$selfcall}?user=".rawurlencode($_GET['user']);
85 $entries_mode = 'user_timeline';
86 } elseif (isset($_GET["following"]) && $_GET["following"] != ''){
87 $get_following = htmlspecialchars($_GET["following"], ENT_QUOTES);
88 $json_url = "{$api_base_url}statuses/friends_timeline/".$_GET['following'].".xml";
89 if (isset($_SESSION['auth']) && $_SESSION['auth'] === TRUE
90 && $get_following == $_SESSION['hatenaid']){
91 $json_url_noaouth = $json_url . "?body_formats=html_touch";
92 $json_url = "{$api_base_url}statuses/friends_timeline.xml";
94 $json_url = $json_url . "?body_formats=html_touch";
95 $page_head = "{$get_following} のアンテナ";
96 $official = "{$haiku_official_url}{$get_following}/following";
97 $self_anchor = "http://{$_SERVER["SERVER_NAME"]}{$selfcall}?following=".rawurlencode($_GET['following']);
98 $entries_mode = 'friends_timeline';
99 } elseif (isset($_GET['album']) && $_GET['album'] != ''){
100 if ($_GET['album'] == 'public'){
101 $get_album = 'public';
102 $json_url = "{$api_base_url}statuses/album.xml?body_formats=html_touch";
103 $page_head = 'みんなのアルバム';
104 $official = $haiku_official_url . 'album';
105 $self_anchor = "http://{$_SERVER["SERVER_NAME"]}{$selfcall}?album=".rawurlencode($_GET['album']);
106 $entries_mode = 'album';
108 $get_album = htmlspecialchars($_GET['album'], ENT_QUOTES);
109 $json_url = "{$api_base_url}statuses/album.xml?word=".rawurlencode($_GET['album'])."&body_formats=html_touch";
110 $page_head = $get_album.'のアルバム';
111 $official = $haiku_official_url.'keyword/'.rawurlencode($_GET['keyword']).'?mode=album';
112 $self_anchor = "http://{$_SERVER["SERVER_NAME"]}{$selfcall}?album=public";
113 $entries_mode = 'album';
115 } elseif (isset($_GET['users']) && $_GET['users'] != ''){
116 if ($_GET['users'] == 'public'){
117 $get_users = htmlspecialchars($_GET['users'], ENT_QUOTES);
118 $json_url = $api_base_url.'statuses/public_timeline.xml?count=100&body_formats=html_touch';
119 $page_head = 'ユーザー一覧';
120 $official = $haiku_official_url;
121 $self_anchor = "http://{$_SERVER["SERVER_NAME"]}{$selfcall}?users=public";
122 $entries_mode = 'users';
124 $get_users = htmlspecialchars($_GET['users'], ENT_QUOTES);
125 $json_url = $api_base_url.'statuses/keyword_timeline.xml?word='.rawurlencode($_GET['users']).'&count=100&body_formats=html_touch';
126 $page_head = $get_users.' のユーザー一覧';
127 $official = "{$haiku_official_url}keyword/" . rawurlencode($_GET['users']);
128 $self_anchor = "http://{$_SERVER["SERVER_NAME"]}{$selfcall}?users=".rawurlencode($_GET['users']);
129 $entries_mode = 'keyword_users';
131 } elseif (isset($_GET['favours']) && $_GET['favours'] != ''){
132 $get_favours = htmlspecialchars($_GET['favours'], ENT_QUOTES);
133 $json_url = "{$api_base_url}statuses/friends_timeline/".$get_favours.".xml";
134 if (isset($_SESSION['auth']) && $_SESSION['auth'] === TRUE
135 && $get_favours == $_SESSION['hatenaid']){
136 $json_url_noaouth = $json_url . "?count=100&body_formats=html_touch";
137 $json_url = "{$api_base_url}statuses/friends_timeline.xml";
139 $json_url = $json_url . "?count=100&body_formats=html_touch";
140 $page_head = $get_favours.' のお気に入り';
141 $official = "{$haiku_official_url}following";
142 $self_anchor = "http://{$_SERVER["SERVER_NAME"]}{$selfcall}?favours={$_GET['favours']}";
143 $entries_mode = 'favours';
145 $json_url = "{$api_base_url}statuses/public_timeline.xml?body_formats=html_touch";
146 $page_head = "みんなのエントリー";
147 $official = $haiku_official_url;
148 $self_anchor = "http://{$_SERVER["SERVER_NAME"]}{$selfcall}";
149 $entries_mode = 'default';
152 if (isset($_GET['page']) && $_GET['page'] != ''){
153 if ($entries_mode == 'default'){
154 $self_anchor_possibly_with_pagenum = $self_anchor . '?page=' . $_GET['page'];
156 $self_anchor_possibly_with_pagenum = $self_anchor . '&page=' . $_GET['page'];
158 $relog_back = $self_anchor_possibly_with_pagenum . '&log=try';
159 $relogin = $self_anchor_possibly_with_pagenum . '&with=haiku&callback='.rawurlencode(rawurldecode($relog_back));
161 if ($entries_mode != 'default'){
162 $self_anchor_possibly_with_pagenum = $self_anchor.'&page=1';
164 $self_anchor_possibly_with_pagenum = $self_anchor.'?page=1';
166 $relog_back = $self_anchor_possibly_with_pagenum . '&log=try';
167 $relogin = $self_anchor_possibly_with_pagenum . '&with=haiku&callback='.rawurlencode(rawurldecode($relog_back));
170 if ($get_image == 'on'){
171 $self_anchor_with_imagemode = $self_anchor_possibly_with_pagenum . '&image=on';
173 $self_anchor_with_imagemode = $self_anchor_possibly_with_pagenum . '&image=off';
175 $relog_back = $self_anchor_with_imagemode . '&log=try';
176 $relogin = $self_anchor_with_imagemode . '&with=haiku&callback='.rawurlencode(rawurldecode($relog_back));
180 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
181 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
182 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
184 <meta http-equiv="Content-Type" content="text/html; charset={$meta_charset}" />
185 <meta http-equiv="Content-Style-Type" content="text/css" />
186 <meta http-equiv="Content-Script-Type" content="text/javascript" />
187 <meta name="viewport" content="initial-scale={$iscale}, minimum-scale=0.1" />
188 <title>{$page_head} - {$site_name} {$site_name_caption}</title>
189 <link rel="stylesheet" href="{$style_sheet}" />
190 <link rel="icon" href="./favicon.ico" type="image/vnd.microsoft.icon" />
191 <link rel="shortcut icon" href="./favicon.ico" type="image/vnd.microsoft.icon" />
194 if (isset($starisjs) && $starisjs == '1'){
195 if ($entries_mode != 'users' && $entries_mode != 'keyword_users' && $entries_mode != 'favours'){
196 $echo = $echo . <<<EOL
197 <script type="text/javascript" src="http://s.hatena.ne.jp/js/HatenaStar.js"></script>
198 <script type="text/javascript">
199 Hatena.Star.SiteConfig = {
202 uri: 'a.to-original-link',
204 container: 'span.entry-head'
213 $echo = $echo . <<<EOL
220 // var_dump($_SESSION);
223 $echo = $echo . echoCommonHeader('#navigation-menu', $self_anchor_with_imagemode) . "<hr />\n";
224 $echo = $echo . "<div id=\"header\" class=\"{$entries_mode}\">\n";
225 $echo = $echo . "<h1 id=\"entries-head\" class=\"head1\">{$page_head} <a href=\"{$official}\" class=\"to-original-link\"> ‡ </a></h1>\n<hr />";
226 $echo = $echo . "</div>\n";
227 echo mb_convert_encoding($echo, $charcode, 'UTF-8');
231 if (isset($_SESSION['auth']) && $_SESSION['auth'] === TRUE){
232 if ($device_who == 'ktai'){
237 $echo = $echo . '<div class="post-box">';
238 $echo = $echo . '<form method="post" action="./post.php" enctype="application/x-www-form-urlencoded" accept-charset="'.$meta_charset.'">';
239 if ($entries_mode == 'keyword_timeline'){
240 $echo = $echo . '<input type="hidden" id="post-keyword" name="keyword" value="' . $get_keyword . '" />';
242 $echo = $echo . '<input type="text" id="post-keyword" name="keyword" maxlength="255" value="';
243 if (isset($_GET['word'])) $echo = $echo . htmlspecialchars($_GET['word'],ENT_QUOTES);
244 $echo = $echo . '" title="キーワード" size="80" /><br />';
246 $echo = $echo . '<textarea id="post-text" name="status" rows="'. $rows .'" cols="80" title="本文">';
247 if (isset($_GET['body'])) $echo = $echo . htmlspecialchars($_GET['body']);
248 $echo = $echo . '</textarea><br />';
249 $echo = $echo . '<input type="hidden" name="posting" value="status" />';
250 $echo = $echo . '<input type="hidden" name="return" value="'.htmlspecialchars($self_anchor_possibly_with_pagenum,ENT_QUOTES).'" />';
251 /* $rand = mt_rand(); $_SESSION['postkey'] = $rand;
252 $rand_md5 = md5($rand);
253 echo "<input type=\"hidden\" name=\"postkey\" value=\"{$rand_md5}\" />";*/
254 if (isset($_GET['from']) && $_GET['from'] != ''){
255 $_SESSION['source'] = htmlspecialchars($_GET['from'], ENT_QUOTES);
257 if (isset($_SESSION['source']) && $_SESSION['source'] != ''){
258 $from = $_SESSION['source'];
260 $from = $product_name_abbr;
262 $echo = $echo . <<<EOL
263 <input type="submit" id="post-haiku" value="Haiku!" />
264 <label for="post-from">from </label><input type="text" id="post-from" name="source" value="{$from}" maxlength="170" />
267 // if (isset($_GET['keyword'])) echo '?keyword='.rawurlencode($_GET['keyword']);
268 $echo = $echo . "return=".htmlspecialchars($self_anchor_with_imagemode,ENT_QUOTES);
269 $echo = $echo . '" class="navigation-link">イマココ</a>';
270 $echo = $echo . '</form>';
271 if (isset($_SESSION['post_result']) && $_SESSION['post_result'] != ''){
272 $echo = $echo . '<div class="post-result">';
273 // var_dump($_SESSION);
274 if ($_SESSION['post_result'] === TRUE){
275 // var_dump($_SESSION['post_to']);
276 if ($_SESSION['post_to'] == 'hateb'){
277 // var_dump($_SESSION['post_body']);
278 $echo = $echo . echoHateBxml(simplexml_load_string($_SESSION['post_body']));
280 $json_body = $_SESSION['post_body'];
281 $contents = checkEntryData($json_body);
282 if (preg_match("/^oauth_problem=token_rejected$/", $json_body)){
283 $echo = $echo . "<p>アクセストークンが無効になっています。<a href=\"{$relogin}\">再認証</a>を行なってください。</p>";
284 } elseif ($contents['stat'] == FALSE && $contents['ercode'] != 'x'){
285 $echo = $echo . "<p>何かのエラーです。</p>\n";
286 $echo = $echo . print_r(strip_tags($contents['contents']));
287 $echo = $echo . "<br />{$json_body}</blockquote>\n";
288 } elseif ($contents['stat'] == FALSE && $contents['ercode'] == 'x'){
289 $echo = $echo . "<p>何かのエラーですす。</p>\n";
290 $echo = $echo . "<blockquote>{$contents['ermes']}</blockquote>\n";
292 $echo = $echo . '<span>' . $_SESSION['post_result_mes'] . '</span>';
293 $entry_processor_mode = "entry"; $eprocessor_sub_mode = 'presult';
294 $val = $contents['contents'];
295 require 'entry_processor.php';
296 unset($eprocessor_sub_mode);
297 $echo = $echo . "<hr />\n";
298 /* $val = $_SESSION['post_body'];
299 require 'entry_processor.php';*/
304 if ($_SESSION['post_result'] === FALSE){
305 $echo = $echo . '<span>' . $_SESSION['post_result_mes'] . '</span>';
306 $echo = $echo . "<blockquote>{$_SESSION['post_error']}</blockquote>";
307 // var_export($_SESSION['$post_session']);
309 $echo = $echo . '</div>';
310 $_SESSION['post_to'] = '';
311 $_SESSION['post_result'] = '';
312 $_SESSION['post_result_mes'] = '';
313 $_SESSION['post_error'] = '';
314 $_SESSION['post_body'] = '';
315 libxml_clear_errors();
317 $echo = $echo . '</div>';
318 echo mb_convert_encoding($echo, $charcode, 'UTF-8');
321 if (isset($_SESSION['oauth_stat'])){
322 $echo = $echo . '<div class="oauth-res">'."\n";
323 if ($_SESSION['oauth_stat'] === TRUE) {
324 $echo = $echo . "<span>アクセストークンを更新しました。</span>\n";
326 $echo = $echo . "<span>アクセストークンを取得できませんでした。</span>\n";
327 $echo = $echo . "<blockquote>{$_SESSION['oauth_stat']}</blockquote>";
329 $echo = $echo . '</div>'."\n";
330 echo mb_convert_encoding($echo, $charcode, 'UTF-8');
336 $echo = $echo . '<div class="contents">'."\n";
337 function constRequest($json_url){
338 global $ecount, $entries_mode;
339 if (isset($_GET["reftime"]) && $_GET["reftime"] != '') {
340 $request_url = $json_url . '&reftime=' . rawurlencode($_GET['reftime']);
341 } elseif (!isset($_GET["page"])){
342 $request_url = $json_url;
344 $request_url = $json_url.'&page='.$_GET["page"];
346 if (isset($ecount) && !preg_match("/users|keyword_users|favours/", $entries_mode)){
347 $request_url = $request_url . '&count=' . $ecount;
351 $request_url = constRequest($json_url);
352 // var_dump($entries_mode);
353 // var_dump($request_url);
354 // var_dump($request_url);
356 // var_dump($get_image);
357 if (isset($_SESSION['auth']) && $_SESSION['auth'] === TRUE){
358 $json = getJson($request_url, TRUE, $conkey, $conkey_sec, $_SESSION['acstoken'], $_SESSION['acs_sec']);
359 if (preg_match("/^oauth_problem=token_rejected$/", $json['body'])){
360 $echo = $echo . "<p class=\"oauth-res\">アクセストークンが無効になっています。<a href=\"{$relogin}\">再認証</a>を行なってください。</p>";
361 $json = getJson(constRequest($json_url_noaouth), FALSE);
363 if ($json['stat'] !== TRUE){
364 $contents = strip_tags($json['stat']);
365 $echo = $echo . "<p>はてなハイク API からデータを取得できなかったような気がします。</p>\n";
366 $echo = $echo . "<blockquote>";
367 if (isset($json['http'])) echo "HTTP {$json['http']}<br />";
368 $echo = $echo . "{$json['stat']}<br />{$contents}</blockquote>\n";
369 $timeline_putted = FALSE;
371 $json_body = $json['body'];
372 $contents = checkEntryData($json_body);
373 if ($contents['stat'] == FALSE && $contents['ercode'] != 'x'){
374 // var_dump($contents);
375 // var_dump($json['body']);
376 $echo = $echo . "<p>はてなハイク API からデータを取得できなかったような気がします。</p>\n";
377 $echo = $echo . "<blockquote>HTTP {$json['http']}<br />";
378 $echo = $echo . 'XML error '.$contents['ercode'].':'.$contents['ermes'];
379 $echo = $echo . "<br />".strip_tags($json['body'])."</blockquote>\n";
380 $timeline_putted = FALSE;
381 } elseif ($contents['stat'] == FALSE && $contents['ercode'] == 'x'){
382 $echo = $echo . "<p>はてなハイク API からデータを取得できなかったような気がします。</p>\n";
383 $echo = $echo . "<blockquote>HTTP {$json['http']}<br />{$contents['ermes']}</blockquote>\n";
384 $timeline_putted = FALSE;
386 // var_dump($contents);
388 if ($entries_mode == 'default' || $entries_mode == 'album'){ $dict = array(); $spam = 0; }
389 if ($entries_mode == 'users' || $entries_mode == 'keyword_users' || $entries_mode == 'favours'){
391 $echo = $echo . "<dl class=\"users-list\">\n";
393 foreach ($contents['contents'] as $val){
394 echo mb_convert_encoding($echo, $charcode, 'UTF-8');
396 if ($entries_mode == 'users' || $entries_mode == 'keyword_users' || $entries_mode == 'favours'){
397 $entry_processor_mode = 'users';
398 require 'entry_processor.php';
400 $entry_processor_mode = "entries";
401 require 'entry_processor.php';
402 echo mb_convert_encoding($echo, $charcode, 'UTF-8');
405 $timeline_putted = TRUE;
407 if (isset($spam) && $spam > 0) $echo = "<p>{$spam} スパムっぽいのを表示しませんでした。</p>";
408 if ($entries_mode == 'users' || $entries_mode == 'keyword_users' || $entries_mode == 'favours') {
409 $echo = $echo . "</dl>\n";
411 $echo = $echo . '<p>' . count($ustock) . '/' . count($contents['contents']) .
412 ' unique</p>' . "\n";
417 // $json = getJson($request_url, FALSE);
418 $echo = $echo . '<p>内容を読むには<a href="./login.php?return='.rawurlencode(rawurldecode($self_anchor_with_imagemode)).'" class="navigation-link">ログイン</a>してください。</p>';
420 echo mb_convert_encoding($echo, $charcode, 'UTF-8');
424 // var_dump($contents);
425 if (isset($_SESSION['auth']) && $_SESSION['auth'] === TRUE){
426 if ($entries_mode == 'keyword_timeline' || $entries_mode == 'keyword_users'){
427 if (isset($timeline_putted) && $timeline_putted === TRUE){
428 $object_key = $contents['contents']->status[0]->keyword;
429 $object_title = $contents['contents']->status[0]->target->title;
431 if ($entries_mode == 'keyword_timeline'){
432 $object_key = $_GET['keyword'];
433 $object_title =$_GET['keyword'];
435 if ($entries_mode == 'keyword_users'){
436 $object_key = $_GET['users'];
437 $object_title = $_GET['users'];
440 // var_dump($status_0);
441 if (preg_match("/^{$http_url_regexp}$/u", $object_key)){
442 if (preg_match("/&/u", $object_key)){
443 $echo = $echo . '<p>URL: <a href="'.$mobile_gateway.rawurlencode(rawurldecode($object_key)).'" class="external-link">'.htmlspecialchars($object_title,ENT_QUOTES).'</a> を<a href="mailto:b@hatena.ne.jp?body='.rawurlencode(rawurldecode($object_key)).'">メールではてなブックマークに追加する。</a></p>';
445 $echo = $echo . '<form method="post" action="" enctype="application/x-www-form-urlencoded" accept-charset="'.$meta_charset.'" class="hateb-form">'."\n";
446 $echo = $echo . '<label>URL: <a href="'.$mobile_gateway.rawurlencode(rawurldecode($object_key)).'" class="external-link">'.htmlspecialchars($object_title,ENT_QUOTES).'</a> をはてなブックマークに追加する。</label><br />';
447 $echo = $echo . '<label for="bcomment">コメント:</label>';
448 $echo = $echo . '<input type="text" id="bcomment" name="comment" maxlength="100" value="" title="ブックマークコメント" />';
449 $echo = $echo . '<input type="hidden" name="url" value="'.$get_keyword.'" />';
450 $echo = $echo . '<input type="hidden" name="posting" value="hateb" />';
451 $echo = $echo . '<input type="hidden" name="return" value="'.htmlspecialchars($self_anchor_possibly_with_pagenum, ENT_QUOTES).'" />';
452 $echo = $echo . '<input type="submit" id="post-hateb" value="[B!]" title="URL をはてなブックマークに追加する。" />';
453 $echo = $echo . '</form>';
456 } elseif (preg_match("/^(asin:)([[:alnum:]])+$/u", $object_key)){
457 $asin = preg_replace("/^(asin:)([[:alnum:]]+)$/u", "\${2}", $object_key);
458 $echo = $echo . '<p class="to-amazon"><a href="'.'http://www.amazon.co.jp/gp/aw/d.html/?a='.$asin.'" class="external-link">'.$object_title.' を Amazon.co.jp で見る。</a></p>';
459 } elseif (preg_match("/^id:[a-zA-Z1234567890]{1}[-_a-zA-Z1234567890@]{1,30}[a-zA-Z1234567890]{1} *$/u", $object_key)){
461 $echo = $echo . '<form method="post" action="" enctype="application/x-www-form-urlencoded" accept-charset="'.$meta_charset.'" class="hateb-form">'."\n";
462 $echo = $echo . '<label>このハイクキーワードをはてなブックマークに追加する。</label><br />';
463 $echo = $echo . '<label for="bcomment">コメント:</label>';
464 $echo = $echo . '<input type="text" id="bcomment" name="comment" maxlength="100" value="" title="ブックマークコメント" />';
465 $echo = $echo . '<input type="hidden" name="url" value="http://'.$haiku_host.'/keyword/'.htmlspecialchars($get_keyword, ENT_QUOTES).'" />';
466 $echo = $echo . '<input type="hidden" name="posting" value="hateb" />';
467 $echo = $echo . '<input type="hidden" name="return" value="'.htmlspecialchars($self_anchor_possibly_with_pagenum, ENT_QUOTES).'" />';
468 $echo = $echo . '<input type="submit" id="post-hateb" value="[B!]" title="このハイクキーワードをはてなブックマークに追加する。" />';
469 $echo = $echo . '</form>';
473 $echo = $echo . '</div>';
474 echo mb_convert_encoding($echo, $charcode, 'UTF-8');
480 $navi_imaging = TRUE;
481 require 'footer_include.php';
482 $echo = $echo . '</div></body></html>';
483 echo mb_convert_encoding($echo, $charcode, 'UTF-8');
484 if (isset($_SESSION['oauth_stat'])) unset($_SESSION['oauth_stat']);