'', 'id' => '', ); $dir = str_replace("\\", "/", dirname(__FILE__)); $root = str_replace("\\", "/", $_SERVER["DOCUMENT_ROOT"]); $dir = str_replace($root, '', $dir); if (mb_substr($dir, -1) != '/') $dir .= '/'; $return['base'] = $dir; $str = $_SERVER["REQUEST_URI"]; $str = urldecode($str); $url = parse_url($str); $id = ""; $path = explode('/', str_replace($dir, '', $url['path'])); $id = $path[0]; $return['id'] = $id; return $return; } // 現在のURLを取得 $currentUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; // プレビューパラメータが含まれているかどうかを確認 if (strpos($currentUrl, '?preview') !== false) { // プレビュー用記事一覧データ取得 $detail = unserialize(file_get_contents("./data/preview/20000101_001/content.phps")); }else{ $detail = unserialize(file_get_contents("./data/" . $article['web_id'] . "/content.phps")); } // OGタグ関連 $url = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $og_url = $url; if (!empty($detail['eyecatch'])) { $og_image = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . "hokkaido.sasaru.media/article/" . $article["genre2"] . "/data/" . $article["web_id"] . "/eyecatch." . pathinfo($detail['eyecatch'], PATHINFO_EXTENSION); } else { //$og_image = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') ."hokkaido.sasaru.media/img/gogo.png"; $og_image = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') . "hokkaido.sasaru.media/img/ogp.jpg"; // 画像がNotFoundなので変更 } ?> SASARU Hokkaido | <?php echo htmlspecialchars($article["title"]); ?> "> "> "> "> //"> "> " . $ary[8] ."" : null; $t_cnt = 0; foreach ($ary as $val) { // 場所タグ(8個目以降のタグ)は別の場所に表示するためここでは7個目まで if ($t_cnt < 8) { if (substr($val, 0, 1) === '"' && substr($val, -1, 1) === '"') { $val = substr($val, 1, -1); } if ($val != "") { $tag[] = $val; } } $t_cnt++; } $index_name = array_search($article["cuser"], $writerProfileArrayName); //ライター一覧にいないライターの記事の場合は、ライター情報は「SASARU編集部」に置き換える if($index_name === false) { $writer_id = "w017"; } elseif(strpos($currentUrl, '?preview') !== false && !empty($_GET["cuser"])) { $writer_id = $_GET["cuser"]; } else { $writer_id = $article["cuser"]; } foreach ($writerProfileArray as $writer) { if($writer["login_id"] == $writer_id){ $id = $article["cuser"]; $post = (!empty($writer["post_hokkaido"])) ? $writer["post_hokkaido"] : $writer["post"]; $name = (!empty($writer["name_hokkaido"])) ? $writer["name_hokkaido"] : $writer["name"]; $img_head = ""; if(strpos($writer["img"], "writer_icon_") === false) $img_head = "writer_icon_"; $writer_icon = (!empty($writer["img_hokkaido"])) ? $img_head.$writer["img_hokkaido"] : $img_head.$writer["img"]; $introduction = (!empty($writer["introduction_hokkaido"])) ? $writer["introduction_hokkaido"] : $writer["introduction"]; $facebook = $writer["sns1"]; $twitter = $writer["sns2"]; $insta = $writer["sns3"]; $weblink1 = $writer["weblink1"]; $weblink2 = $writer["weblink2"]; $change_id = $writer["change_id"]; break; } } if(!empty($change_id)){ foreach($writerProfileArray as $writer_post_change){ if($writer_post_change["login_id"] == $change_id){ $id = $writer_post_change["login_id"]; $post = (!empty($writer_post_change["post_hokkaido"])) ? $writer_post_change["post_hokkaido"] : $writer_post_change["post"]; $name = (!empty($writer_post_change["name_hokkaido"])) ? $writer_post_change["name_hokkaido"] : $writer_post_change["name"]; $img_head = ""; if(strpos($writer_post_change["img"], "writer_icon_") === false) $img_head = "writer_icon_"; $writer_icon = (!empty($writer_post_change["img_hokkaido"])) ? $img_head.$writer_post_change["img_hokkaido"] : $img_head.$writer_post_change["img"]; $introduction = (!empty($writer_post_change["introduction_hokkaido"])) ? $writer_post_change["introduction_hokkaido"] : $writer_post_change["introduction"]; $facebook = $writer_post_change["sns1"]; $twitter = $writer_post_change["sns2"]; $insta = $writer_post_change["sns3"]; $weblink1 = $writer_post_change["weblink1"]; $weblink2 = $writer_post_change["weblink2"]; break; } } } ?>
" alt=""> ">

" alt=""> ">

" alt=""> ">

" alt=""> ">